{"_id":"@react-ssr/express","_rev":"1435-1ebc0f444cb23b74b1ed3ac573e709c2","name":"@react-ssr/express","dist-tags":{"latest":"0.24.0","canary":"0.25.0-canary.2"},"versions":{"0.0.1":{"name":"@react-ssr/express","version":"0.0.1","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/classiii/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/classiii/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/classiii/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/preset-typescript":"^7.3.3","@types/express":"^4.16.1","@types/node":"^12.0.0","cross-env":"^5.2.0","express":"^4.16.4","npm-run-all":"^4.1.5","rimraf":"^2.6.3","rollup":"^1.10.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-node-resolve":"^4.2.3","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4"},"gitHead":"712d75a10934cf1bdf1433e118aa7218035bed4b","_id":"@react-ssr/express@0.0.1","_nodeVersion":"12.1.0","_npmVersion":"lerna/3.13.4/node@v12.1.0+x64 (darwin)","dist":{"integrity":"sha512-hoXmCFBVu3V8Mvhe+gVC/88y2qLo4SnxX4EIlcqYS0ToFkdN8j8DqRsadAfXD90nORt+dKqNm5YQ4Xk85j3JIQ==","shasum":"0ff0a36602c960ffadf053e44e9b60303da3d5f9","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.0.1.tgz","fileCount":6,"unpackedSize":4551,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc0ZzACRA9TVsSAnZWagAARjwP/A4yxS8cnDUZJYsGbDD+\nAlXYtUiufIzwl0jXMc+RBFmUfaU5CnYQuaH9C3uKog5HG/HpCJ3fDY5S9enY\nh7tgsQKpxY24iWuMnVDPDn0FEou8cTam8hrHQCOkSGfFjRR3hzFf5+2F7LsS\nCvrLINFtVZrEM80trmKQIjer09vovQqynWsU8NmcT/+dSnVk8swUGKBPRH0F\nttOOuhdivcL64+wfcVAsDxcmoYqYkWn9v6dmMTLebWRbBcwQ1dlie87PUT3l\nS1r8iMghKO8y/uoDnuRBEQKLVDpmIeleqjyKoiyXQogM4u9r9O7Eq3XUFLjH\nVBCzp3YO4ibHpSm5E+NX6OwpdrJUaY8oqK3Duj3IQWXVxC5gUiI0VUniGrrS\nXKfXyTnRT9JWNtl7I0Soi16BH/KgqW0/4gC7FPD8A3aJDrIt01VAIN3YUxnS\nguxVZEhGEWheZJmE6yQcE+Tu5rgoRxMgxkNMsxtclwzc248b25FCGbHyhW3y\nFmr2sL8/IVHsf3oCgtvcfaz8HUT9RMkf/IiNGiN9cqoM4brfY1d1giySTujK\nn3k5Y0xqDZEAmK3folHuZsuNJ/wbo64ldtYe6d2dCV2PyUIQYQS8v7Wt9mNz\njs0PK0Co9B75FQmWCvTzrYNZRDTw1Qk2MHrF+qg+BLw0RFJMLebyX4gua+ki\ncuJr\r\n=lrOs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCZVY/VXzAYwTP5WIdEobpU56kRuy8VDnWVZtb4tbuODAIhAMmsgzhKeRyNY2MUOVWqtzvqtBmzsSaoc7+BWAcX6r5p"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.0.1_1557241023780_0.1575500927046889"},"_hasShrinkwrap":false},"0.0.2":{"name":"@react-ssr/express","version":"0.0.2","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/classiii/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/classiii/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/classiii/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/preset-typescript":"^7.3.3","@types/express":"^4.16.1","@types/node":"^12.0.0","cross-env":"^5.2.0","express":"^4.16.4","npm-run-all":"^4.1.5","rimraf":"^2.6.3","rollup":"^1.10.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-node-resolve":"^4.2.3","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4"},"gitHead":"d4c5f09d0c4f031d95c72492100ea76a1f7aef75","_id":"@react-ssr/express@0.0.2","_nodeVersion":"12.1.0","_npmVersion":"lerna/3.13.4/node@v12.1.0+x64 (darwin)","dist":{"integrity":"sha512-gkzeWq/FqRkeLoek5cQbcTj8cN7arrtMpI3Ylml2ex+9cHZSJ6UIFcEk85qRROW08JiZdyI/Mx6wO79qwrxZ0Q==","shasum":"eb613016ebe9ce6e45b1b1be874e6302ac739552","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.0.2.tgz","fileCount":6,"unpackedSize":4551,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc0akuCRA9TVsSAnZWagAAbGYQAKLkUXQ5QRQhDJ/lyeo/\nnTTLndmUu/HgbifCuoeU04iW5OFqGpeJNr6KOKu5FMerTSci1lJu2rfllSYf\nW88Hg3hvr0PljOnzIoixZjOxTn1C4TxD74tBFLrdwaVejUGKqi2pgQvfWtOi\nk3d4600PX23FsyQoS0Tb1nZrDS6OX264aZoQykbDYxCDPoGNU6uL2jwfkbYX\nE4Zzsc483wS7yrZ9Q2YQJOjxEUz0aDTFOmcSShBrRhzwlBRaKx0KuD2bDk7y\nY8RnI/pr+Hg+r82rSTo9fzCV8L2dcMPUqHDUywdnDLoLU0dX1Uj+OU4wppDI\nJE2hB/dS8y0T+wRtMy3zVzPvXA3hu+a0si/W8fEhu2MNXNaWxHfvb9MfrPTo\nZjqcxtaZmeLRdkx3+5Hfkid5F6TEu9wsvZC6OhagqrAineSadzQC4sKqR/wd\n9G41uO5qLoK6Cp4seU0BDYS3NpCM+/Gc+ZcPSF+wC4169SLQpfMsh38XyDgI\niBPo4zLTVEVNSdHEhCgXCselTByiybWxDneUKuzzdpcb9V+MBjEi5Na4j/M+\nmOrgHwYA3o+1c5cUfsLcw2Bqwu6wd4aA10zBnoItlW4D/dX/jsjmftGgIYlD\nmKtsQgmfDRDcJllP78JZpfSIYf9mArxMzMNNqOdxq3W7qGOR2l9GekPSwh7x\nHJ09\r\n=tPjn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDnt4zq8IzxZr+pqJa72AkKIp68pIn9nvrgLHSTboxWVAiEAuOX0lVDuPU0eBccrRZaZcoCfz08+LZeILTKVJARNKeA="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.0.2_1557244206118_0.5534527631021651"},"_hasShrinkwrap":false},"0.0.3":{"name":"@react-ssr/express","version":"0.0.3","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/classiii/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/classiii/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/classiii/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/preset-typescript":"^7.3.3","@types/express":"^4.16.1","@types/node":"^12.0.0","cross-env":"^5.2.0","express":"^4.16.4","npm-run-all":"^4.1.5","rimraf":"^2.6.3","rollup":"^1.10.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-node-resolve":"^4.2.3","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4"},"gitHead":"3f9a4f95344852e476fdb23c838bc8e389b37da6","_id":"@react-ssr/express@0.0.3","_nodeVersion":"12.1.0","_npmVersion":"lerna/3.13.4/node@v12.1.0+x64 (darwin)","dist":{"integrity":"sha512-pIFkFy0gyhXXYWM7yJ0ROvI1ZlyL/Gf5/KHVIYah7BGLwUfEalCR+OctToApZ4MFUZGbqJc5RbQuWE4m4CwaRQ==","shasum":"c49e0cb8c9d64dd9c330d5d3417822dc09eb3607","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.0.3.tgz","fileCount":6,"unpackedSize":4551,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc0bdwCRA9TVsSAnZWagAAbIQP/1YKv+wz9NN45mW5s9cO\n5yIMPXVmnDgZ/dpngnO5hRlJZUYnUzFOXEHmeJ65RxppxRixmqEjuuDYYqM0\n9XYJ84wp17tNQrG3lRZVrT22ETKX98vva8Jx8wOniF3b5o/Mo51LUuptdAw7\nF8d6FcFpX7Agl3PuabnGNTLrHjQt/mT6OR8in61HGk7fN/ElNsqCOrJgWiLs\nZJUVNdP/i3wEzOQjQ0ZsMmQyIkN8U+4LocHF5V0GNfkI+TDEiDv8TYcBHXSf\nFhplQV5Y+Nq9kei0ANqqnUK3mPohBAcwNHkZ6pMCyhCd6S9wpac3wPh2Uo86\nixebzGFCzpMlyg33G5eM0NRzBatW4gkWcrYriqftLhlSUQNmjik/aJpo/Uoj\nD9TxGQ8szcGCyLtE4Ja34xEjg80KEl1TOaa0uUzi9rd5axLed+w0KpqWP/0u\noMN2xnG01lkvJAMWw07HF3zigKbXLAyGGzxMQ1F7OiIhqE4gUM8xpB9xJePC\nE3sNjeT5flD17dGnhyrvc+zdz9gJvmSPVA1EydvhgLMGdrR/icUNtKmLjq+a\nqADBPU37BHhabiFA4G9P3oN10gMQ7qZJgNpXRYbFlE7ENCJ3kw1uvWucsnJ6\nbHrE9ASyUzAcT9IEu1keotE+itbCI+12AvyuGdrBaI8uGRKcQUJ5KhdJh0IO\n4ZwF\r\n=4EXD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC0ATgVZeQNNVlumhCI8zYnY2xb86AwdVY/VTQLI/7ChAiEAsypqMmJr8fRtIqaIAbG6i2c2iaDABHV6cwxOSZ8NoNo="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.0.3_1557247856197_0.2738146011381728"},"_hasShrinkwrap":false},"0.0.4":{"name":"@react-ssr/express","version":"0.0.4","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/classiii/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/classiii/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/classiii/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/preset-typescript":"^7.3.3","@types/express":"^4.16.1","@types/node":"^12.0.0","cross-env":"^5.2.0","express":"^4.16.4","npm-run-all":"^4.1.5","rimraf":"^2.6.3","rollup":"^1.10.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-node-resolve":"^4.2.3","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4"},"gitHead":"3a8e64ee939289bdf30fc198e94f8701a1b8b078","_id":"@react-ssr/express@0.0.4","_nodeVersion":"12.1.0","_npmVersion":"lerna/3.13.4/node@v12.1.0+x64 (darwin)","dist":{"integrity":"sha512-t4Kt18SciQ1xTAer67I4kTTC40y7oqQYhZoCheaa0tAk+biRtcvw2f+495IOLWpSTtMSTR5vwANY2oqWEjiPQA==","shasum":"86e75d9fa1d9a4c46bd262a6c07f3e90038838c5","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.0.4.tgz","fileCount":6,"unpackedSize":4551,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc0bm1CRA9TVsSAnZWagAArhwP/jFw/yUeiVoGtNsijK8y\nEpXq6nFGAkb18sgJNJ4YZ1HRaejf4FVmsap2L+wQpJQDe8iRB7wp4Ftqcw7e\nh+jb4BiE77khhCxfCIwpqg1i/+jMvt16iA2G6DKOEw7PBmh0PWt02y/9UhyH\n1/5If8kwinJ8EZOaTKUt+UEfVwzWcrYm8l3b11JM773OGwKbbTY86FLRaeqa\n7RZHEJmeDxu32u+z5loXbpYOyui5zc3HFJWeK91L/UPBDBR8rnULrHJSxBET\nOsA8tWhkDHJHGzhiHm/AJ6E6BYAmlZo+0DSiiRZR3TQqxFanG4OADNKkjqc6\nOKk7beV/ZFcUOOWJJrVwdbKF5Zu2CK6bx5zpmjD4KgNoXeb1IqtPeWEKsHPR\nCST8W2a1QiIV0FkwnP87h679NkwUh7Trs4hVyYkU5uAAzgud0+PsOuAEuhx6\nMxI7ngJemcm4MZy/TDXkl6nqxLDROlwffadFHvkSZ9+byf629g/WmY+THake\nIkzEccDYx3kApah8hm3EybAR/Fpp+lLyKCrhhAhph2B0QMtRxu2g3pbtn/zf\nWg3/zCvJIJAzGyDvr92BnTcxe1awDafM6O0hEdrR+4Vc+QJc5+ZPh4Mezw/R\nwA/1KruJJf1j7RgXyP3D29MEkzGDlcgp9kGac6W/++EWycY7c2A2dJToG6rf\nSi1P\r\n=vys5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCjoe/Uog8JKlwEg2cB1ukDKInCD5f9Lh+sTGSI1+Ew7QIgH1/0XZbgcSFR4mFlNKJP0Eo3uz4VxajCf03BEAfhZGo="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.0.4_1557248437092_0.3618310905737965"},"_hasShrinkwrap":false},"0.0.5":{"name":"@react-ssr/express","version":"0.0.5","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/classiii/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/classiii/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/classiii/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/preset-typescript":"^7.3.3","@types/express":"^4.16.1","@types/node":"^12.0.0","cross-env":"^5.2.0","express":"^4.16.4","npm-run-all":"^4.1.5","rimraf":"^2.6.3","rollup":"^1.10.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-node-resolve":"^4.2.3","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4"},"gitHead":"da327131b865f503be4a4a36e4902df815d2b089","_id":"@react-ssr/express@0.0.5","_nodeVersion":"12.1.0","_npmVersion":"lerna/3.13.4/node@v12.1.0+x64 (darwin)","dist":{"integrity":"sha512-yV0Xf3YIkqD6st7e17j8H8x5UCV4dOBlST5qJLw2COoRLLiIwAs5tVorOnPNwztoO1EOJGtkgQYkEjfNm1+l/A==","shasum":"aea84df74a0227b4255216da4533983c81943f2b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.0.5.tgz","fileCount":6,"unpackedSize":4551,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc0bscCRA9TVsSAnZWagAAxOIQAJ4ZqJB+fUQpOTjILP4s\nWuVY7n6n6PNHbRmUUsxr48oiZDke0cYQ9jO43VA1SHVP6s9okkPSPSGgUc4v\nEsn4EwYOl3+obZbBMKjmCptbGakRDqTzZuaJjKufHpP6GCQJdiykbWUqVpEY\nVKKqDehNLyCbaUKHwb3Yh3zVUuoSTD2Bqz0fzLr1b84nxP/XLfsEpUeczyAC\nrxcCuJpJuhllR9nU++19CSju9Hvm09ow0hxwWezrUUsZGX+g7yeDJel/inHc\nx/KUvRv+XUKUyWlaZ+spdmW7fNOLSDBxmudMRRJRZRqSy177kEph45periuh\nzFz1XWeDYtAZxX6HRIwPyaWOjXrjw+ioHIOVOLFaWBMU5amRfIH6npx5RuVs\ncqfpBgLZN+eS5AOBhTG7Vax36kMX0TrIEunqUaeYavINFTAR8/c91uhsArfR\nU+yDOe6XJH7DFIb9HrHJAebkPt26fwf1mw1GP287FWIuZjSXsjvwbpazGbKJ\ncAvuJ5fE+pV+v/GVf33R6X+er/itngQcPCnC1DaQqGl0y/ptq9o88UjReiJd\nDCftLxxqpkEywH7lPa62c3wH6MnOzgqxEVhR7RX5MvT03TKkEOwSeZcsz8B8\nE271i30heosyMcdbXA9iTe9CDThBLw/ECv69ejnzouFNaJ/ir3WxxadmInMZ\naxaF\r\n=cJVp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBMJuqac6FMsiGe9+r0DhtWGws/XAwDO/DzJjMGrMyL0AiEAl9Y9t7WyzZ+IsUWrRTSBuuxHOyCZYs6fOcgKtzmZ8HY="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.0.5_1557248796122_0.7664485281658846"},"_hasShrinkwrap":false},"0.0.6":{"name":"@react-ssr/express","version":"0.0.6","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/classiii/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/classiii/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/classiii/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/preset-typescript":"^7.3.3","@types/express":"^4.16.1","@types/node":"^12.0.0","cross-env":"^5.2.0","express":"^4.16.4","npm-run-all":"^4.1.5","rimraf":"^2.6.3","rollup":"^1.10.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-node-resolve":"^4.2.3","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4"},"gitHead":"a07ff5bb44a73c7cb6604b322aab5be1946aa5e0","_id":"@react-ssr/express@0.0.6","_nodeVersion":"12.1.0","_npmVersion":"lerna/3.13.4/node@v12.1.0+x64 (darwin)","dist":{"integrity":"sha512-Uoz20nP6aQkKiXiLmRx+l+21ssfvqZaq2uUR79PYOhK59LNVw0NdISkQ1G5pId+Se6rVEBeUKzvomn6MUeat4g==","shasum":"7f87f32812a3cd1867e0945e7e7f87c4803f77dd","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.0.6.tgz","fileCount":6,"unpackedSize":4551,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc0b5ZCRA9TVsSAnZWagAASt8P/AzVwQlh2QkjSHNm4G8O\n4XajnFhITZSUb2nRpxlq3pRN/5KuDMt/8ay4QKepVv3OrNMjO75XgQZaCaXb\nP95Io5UVMv0RqzNMDwgA6TOMR7QIMiBpN/uETaRtFA/SRQAqJgWNjv9IeX6I\nFwR4HSqN5X9SAhsyAo0TTn8y86mrmz/UcjcvyMsQiFCgn+seOOX5UNGjPsL0\nfD9t3XkBtc7y9I9ydVC4HWCpU6z56Ha6HCi+wJ+5dVjmCDjYuwnRrWP69Ifd\nsJSyY1dfzTK43v+nwWCmTdCfvH75NARBPql36WHiuu+YFJTLT6puXSNpX5Nl\ng8h3eugJ1np4JaKVfq7Ahc1iZygqrXVHsryj2NZF0czzqsrXQXbEbs4csCXN\nAQHM4vv+Q/eK0TlWqZ3eeiSSWnEy5/FinHAQAn6/TdxX5LaSC3ES/N8YfLx2\nNYvySJw+pmBg2SW4QfqEHzDzzZxzyI5fGT5qKYiKgJ+UE8VYS0dPM8IvhMVg\nnQUSCrGsollh4odX+wDlPeN7CIxFJQe8UXaBobFkjySPLyh/c7o/Wg6BVjL5\n7tb5zyQOlwAd2k0qzLuNhD0EAhbvNPGHn3s9xmabE+40UL6QvuPw3dkYnwUU\nbOOkDUpUMrL/D8vt7Hs1z7mz+nYPd5EiJMuRDH3ekN74EsTWH2W4mqYoHzoU\ncjrI\r\n=O5qY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCqNA0zdeYSJxW2ALZ6JeWdiCyNmNIxj0BVf1PnYSCZMgIhAPwYgdqglatCTCiwHVLi/kydVEjKERXI5wSmO+6wShHn"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.0.6_1557249623330_0.13217207707516487"},"_hasShrinkwrap":false},"0.0.7":{"name":"@react-ssr/express","version":"0.0.7","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/classiii/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/classiii/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/classiii/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/preset-typescript":"^7.3.3","@types/express":"^4.16.1","@types/node":"^12.0.0","cross-env":"^5.2.0","express":"^4.16.4","npm-run-all":"^4.1.5","rimraf":"^2.6.3","rollup":"^1.10.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-node-resolve":"^4.2.3","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4"},"gitHead":"bd66b8a6a13d1123a32154251a30e9fbb780def5","_id":"@react-ssr/express@0.0.7","_nodeVersion":"12.1.0","_npmVersion":"lerna/3.13.4/node@v12.1.0+x64 (darwin)","dist":{"integrity":"sha512-3QsGb9roPzADburk/aRJ7lvt8xiZG7fIJ2m7/xU0G1ece1pGqQuln8MzxgATl2j8nZn7KuOOq2b+GbFmXh1IJQ==","shasum":"6161007713350484bd11ef42848254db110e37d9","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.0.7.tgz","fileCount":6,"unpackedSize":4551,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc0cBiCRA9TVsSAnZWagAAcakP/3wmPfVL15d32/bRAEUv\n7Gcnss3IatHXUT7beDksK8Xfr1ooyKoOcL6Nej+Y8DHYpnuPl53bqJf1qY7+\nXkOj6BxMhfwP2Mf3UssVVc8Le09PAf6oOtjikfEnNX+MSy6Jg1w1y4zNs0AA\nFOoDHRNg97eaHEakvR3n3cLiTuOiK7loye4rZcJzpPoIZP1yIKwW2R6UPyig\n6xKJ/f6n5+Fg5qA6fblFzynamN/fs7DWw6eO/ax+ZDb4dQ9hMhyEViDmwFk4\npE9tME+sK/Z3gIlS+VFmrNGtUPT9aJP5+q0WdOsJ5hsgarbpBN2/5jRxB+VD\n/SnvRDopt7Jusv32upPcDr4G+niQ9mwKO9mv2TdnbTPDXLqPCQPy4LtDrl8/\nguv6PUPuwS6cJZHVPMh4lIv+GOmVZx351gCSchj5gVr08vLnUx6Z3yf3QNrH\nfLbvyCajpRluWqDQ/r4h1bs5Dmu38ACkqemLnf0kpT6K5WCASvJRZ52uyafv\nnKFDPJTqljWfoPah6RgkGhwvGz0EnLdX0Hnl3b7EFDgBmFg8mNHVJnRnCVB5\ne6qaX1qY5LLCEY0vULOtssWPX+2iN87BfElVahpXOI6yYvopRCOstg1yO5XP\nngkid6ZQ/ceZfR0Z/k7f/YNO8DpKOyO1kqx5KlJeS1LPZcdhcB6O8UxJc11k\nmuL9\r\n=7n7T\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCYWA8H+rYqeCv1k/rkSa6oTaF4TxIoQ68y8cec8EXkiAIgSkezFXG3rnAUL8OXGDdWaeR4idAa7m9eIbcbDPmHOik="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.0.7_1557250145967_0.8740941605513874"},"_hasShrinkwrap":false},"0.0.8":{"name":"@react-ssr/express","version":"0.0.8","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/classiii/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/classiii/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/classiii/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/preset-typescript":"^7.3.3","@types/express":"^4.16.1","@types/node":"^12.0.0","cross-env":"^5.2.0","express":"^4.16.4","npm-run-all":"^4.1.5","rimraf":"^2.6.3","rollup":"^1.10.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-node-resolve":"^4.2.3","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4"},"gitHead":"9f3867f3c8f145ec3d49d4f67634f2af60adb1a4","_id":"@react-ssr/express@0.0.8","_nodeVersion":"12.1.0","_npmVersion":"lerna/3.13.4/node@v12.1.0+x64 (darwin)","dist":{"integrity":"sha512-UZbToSQH12Rab8V1dyt4/4M5HzZ6RbrGEyX2yI+/PcRHXVmznqK5q5KN2zOcI9doFS5u/2wvwlpAS9NhZwpEEw==","shasum":"20a00e387a78c3cb7e489c61c516731c79d3fd8c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.0.8.tgz","fileCount":6,"unpackedSize":4551,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc0cNYCRA9TVsSAnZWagAArIUP/ieSLt5QF9NVsaISvQ4k\nYZvIyuzUE3AWuA3UE+GCpFoDMO1INMoIdPq9k4ycR4Ot79u5pdEACX/bKrqp\nmhD4xAU8T7aGh56swT+ftJHj33gOiHOs53EmbkiX9zT1QPoaBHGnqcEKKwQx\n7d+WOux1VHqPusKon0GAjfmEBNbY7F1frPZK8dvTB7SFss95qpU84lBjGzPx\nv47l2I7MQzx52XywkJkeH3/HOShxMAGWeYUjZnkJeow9CS7OmBbSTDbb2Nrp\nX5W5ZLnYbg+yZ4NbpLwF+hNGcmFLFJQhzNv7zeGvNAt4PK6mnUFpAOp9TC5v\njZnOePt7dqo86zSuJ6UMm6Gu8rs9U+cuOrF8fgeKwhFJERDstQU1RDuADI5n\n0dbt1wZxVHxfTZkbY1Rw4zvEobuMTHuPI5b8oGlsHpSvpULlo9Iwe/Prlqak\nA7n+Pwn+ZxAvrAtOljO7HJpXsq45zDiLOqP8tiOrFWA2TIKYiyOUskE2CvFh\nCDs3IZZEioazidurkhVfMltyDAP2Nm4gFtHV6jMlsiqk5hnyoYI9VO+ReJ3K\ndMRZ0gT7Ko4XP3vfAycRa10McTzyulB4z16XOuR+QoFPGjRdF+TCg6+GWtni\nh3SARrF3CcEy7xneQTui6TIHlWGRfSzhPND6kMQJ9/yFaf2RiVzpC7yPkMFs\nAr5d\r\n=b02G\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDmAfEr6XWCYmmN+s0YbZMw86dEYCBxb+MAd9j49ilF6wIhAOod0IvHlHc3FOFS6m832AM5nsN3t1ktCydvaM45hagW"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.0.8_1557250903529_0.800668633933405"},"_hasShrinkwrap":false},"0.0.9":{"name":"@react-ssr/express","version":"0.0.9","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/classiii/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/classiii/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/classiii/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/preset-typescript":"^7.3.3","@types/express":"^4.16.1","@types/node":"^12.0.0","cross-env":"^5.2.0","express":"^4.16.4","npm-run-all":"^4.1.5","rimraf":"^2.6.3","rollup":"^1.10.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-node-resolve":"^4.2.3","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4"},"gitHead":"a8cacfc693a116ebcf68caf087e9ad0a9f2086b4","_id":"@react-ssr/express@0.0.9","_nodeVersion":"12.1.0","_npmVersion":"lerna/3.13.4/node@v12.1.0+x64 (darwin)","dist":{"integrity":"sha512-9gNqtoi/X1tpvoyZXM0O2o/JG2RXDeGIsyzoApOV3R6EJ0tfDPgv1HLPaUCsrMVL2nTsG0rQmZ6+tmIfqqI3ig==","shasum":"fbb49ec2721b6d4824ebea695222df35c3978b2d","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.0.9.tgz","fileCount":6,"unpackedSize":4551,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc0cgaCRA9TVsSAnZWagAAUhQP/izfjddolH1fIuiIBFJp\nlqwKqD1MXkyzVw9CP/NGy56QTy6IZRMA2A/Q0PK8VAKrBTiIKVqrumJGv7yx\nDPFaO6JB1PHcKcwAP2milOKwSOmcRtsFqfPcc85whhys4SiX7bW9bVxL6J9e\ncYv9dQ6P/wcsvcgYCxYq8nauEtyhYmK0TFTO6i6oj+KfqUaxcB5pPObjPFBq\nr+iXkPFu5/+5qDRUiAg0/PKO66SYFYh40aQ0lg8/S+DWXXPNZK7HOeoXUW5Y\nWLFIO4bnxIQSgg+cschKBzs8jqgB3NuvDJdWrvjneUUlaEc+eBuVHnnHPwb6\nggy9Ku+p+7Ob4r0FTQVvD4u6MFAn9RbmqovWbmhS6H/mzCbBSZVjVfBsRwRa\nhOECPna9Ad6tKliTBLUxOVb6+6ZQA2fB2/Dn749+smB7LAhdvaWxi7F4ayPF\nzu9RHzQ0dg79PWfOPgIHb/iotShmWqW+qLKvRb/QukLRTdAr6RuxltFMG7PQ\nMeybzZrgIxRsd7F7KBYszrjldFBrxALR8EN8qeKv6MkNYH2mxZ8yH2IlDb3A\nVL4bVun+ObXhmhrSzyAkq4fbjv+omUVVfWhN+bC+E0QnfOsln3w3KgwKCfCw\n//YvCD7Dv08uW2TB/GD68KAtucEVE6Sd4PPIFcLOS/xzHPkg7vXM6qVqN/03\nhiBc\r\n=rny2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAULx1/CpWKx28tu0dJzYpWyN5cNx4pOqSwnmk/PYuJzAiEA7//FIegbpGIRX4Wntp9hzfTA1dwokF+aHCI7JCWP2Ww="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.0.9_1557252122111_0.12516663560141716"},"_hasShrinkwrap":false},"0.0.10":{"name":"@react-ssr/express","version":"0.0.10","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/classiii/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/classiii/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/classiii/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/preset-typescript":"^7.3.3","@types/express":"^4.16.1","@types/node":"^12.0.0","cross-env":"^5.2.0","express":"^4.16.4","npm-run-all":"^4.1.5","rimraf":"^2.6.3","rollup":"^1.10.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-node-resolve":"^4.2.3","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4"},"gitHead":"fc8c865cf3c1fecdeaa86d5207cd516ccde4ffbf","_id":"@react-ssr/express@0.0.10","_nodeVersion":"12.1.0","_npmVersion":"lerna/3.13.4/node@v12.1.0+x64 (darwin)","dist":{"integrity":"sha512-dP8YP9pfxfQ9mRNiUhWfc6hmzqnPeGLgDDE5ZL6/9+QMeMzQo7bIfYV75kfNd1mMtA1ZY+WSzZ1q7VS+eeEl5Q==","shasum":"d7b7452b7e99d37c1165229229b7d6bdf401a664","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.0.10.tgz","fileCount":6,"unpackedSize":4552,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc0cpJCRA9TVsSAnZWagAA21MP/3cgxkPrbM9icDC3kjHk\n4+qkudz9e33jQxvNWqviV1hL9kg9sjGTpztFQMFX3rq5teer4fl5W3WBlq6+\n+/vtZ2ADfn447kWcYUf+fY8OpxkQl08375KA7XoZhyAEmuB+KCxHXLukSWMu\nDnUEjKaKyzJeVnj4FH6xbY+Yr2Kjo8hwOGaM8UzXDsDXfyzVJecmeWKqOqnN\nBq97EbEj2jOdfQol+FhjqoatyLq38QAcomnZzIoR+O/mXkwdYZWaUxsodB1v\ne2w+78rN9WuKTSJ9S/2nT6ITi49pAsdz5/E7Uuik8q7UniIiGC602vUltIQt\nhzgdToGbj2POR2Mj0nNi5OqqiUsFu3R1CpNP52qB+pFsl107ENxcHZmYTT3r\nmI0BO1hiQAAWr1++p3fuMunvM+Pxlsyk86gMRlJHbhcn/cUGfNsWRPIUYVjk\no0WX7KnZdC0ktTcwhYufwSMoAXQCAyRVVtcTGNzSASMsGNiwogVCWNAERGJs\nSUwvPI9Tze+fC1B/jDJ7TcWeCkgAk/IE8I3A4pF7Ol0lvOBjYjeDsPLfAJd2\nUgG6KdYW2VzVYac1sEVnkLXYu77LTZ2F5PFuMpbd5SU6cW31dKrHfPbxwCLH\nE40ORTCmegZnmOKeQnDVUhAIhI7eYOf4yR1sWvP8VKVMRO+B3D5DQXgOlqSi\nTlUP\r\n=m9yW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH/EUIztopLbDHwNzfdKxQJBdx/hSR76hpWXpYDqtG4YAiA+bxxFCY1ju0jqHOBI2v8Qoo7zrpF/3oE78l7srU1azw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.0.10_1557252681053_0.278790468002043"},"_hasShrinkwrap":false},"0.0.11":{"name":"@react-ssr/express","version":"0.0.11","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/classiii/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/classiii/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/classiii/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/preset-typescript":"^7.3.3","@types/express":"^4.16.1","@types/node":"^12.0.0","cross-env":"^5.2.0","express":"^4.16.4","npm-run-all":"^4.1.5","rimraf":"^2.6.3","rollup":"^1.10.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-node-resolve":"^4.2.3","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4"},"gitHead":"d04deccf2be1936d20afcc615dbd23046762bafc","_id":"@react-ssr/express@0.0.11","_nodeVersion":"12.1.0","_npmVersion":"lerna/3.13.4/node@v12.1.0+x64 (darwin)","dist":{"integrity":"sha512-/I74MGhd+JYcLVUH6Ev+epgnmBxPp/F+DOyIDGBuH3JIbcg4DV4HKyAE2JREwo8uA4v2vlYG6oMYr51KGVdFUQ==","shasum":"f77f58e6123a4db7291cc25e6346c0dbf2b3ca21","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.0.11.tgz","fileCount":6,"unpackedSize":4552,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc0c/8CRA9TVsSAnZWagAAaaEP/1h7GoDDgAiw2RNpySj6\nqy7VhXW86AhY8Z9PhXJ+H545h2hD4K1zazSf2rfYJfXreXW5aPNF+RIaHZo4\nGVru9d89N1ZZxq3Yym2+hUHp9QXIYkiH00XXwdtMmhwW1OprfZ/vX0puAHfH\n4PbDMgnil1vrEYe+bVeptmjWdptgjkSZXIQWBHuL9tdS8Ek4gdVBqWjXKCpe\nU+O+X677HI9W0/rRu69gLicyEz55vQY3huoRTA54RJd8Zxf5VaKrfi7+pcLV\nzl0/ctezbAmmE4YI+ZUmVbQCM8ACk3Bky7+mHERq0SgiZ0WSRsxKAAdg5lfi\nu+DKDAfYngzMOjq74x+b1d4amVuCztzvuEEb/c5QtfrkB+HPr8b5qMhSI/Db\nCxb53LqIleSlS/H/gR2CeoQvYgNOFKb4vIPvt/1r4UZN7/7IyX1hH7IQ9Cpj\nuLA6x+Yx2klaBV57gld1cW4R4f5DSPwdr4Xd3SeenWHp9vMVNaBy/EV0eQhw\nY+eQxYbPyWIfmy426+YfZw34uqsLqo/gIU7RJoGM5cFxHYxE8VYs88D3Cc1v\n1PLH29HFoKN0TfDrbtlKw0Eu60NmVGLhYzFa/MhZL7fhzpKjo7SFFJOiBZ07\n1dMyDYlK9MlmYbgagyWHhs/CCB9EfpqNBA2G6W5nS7lAW+G135Zh1quRr9n5\ndTdJ\r\n=e2TC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCuk4+nzBfi2YNM+PYHYAyxfACduWK77fTtdUNai/p6vwIgceqRd3/mF9qfDFXT+gp/NRq795/Idn6f3rRU5nM02S4="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.0.11_1557254140041_0.18304614649401652"},"_hasShrinkwrap":false},"0.0.12":{"name":"@react-ssr/express","version":"0.0.12","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/classiii/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/classiii/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/classiii/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/preset-typescript":"^7.3.3","@types/express":"^4.16.1","@types/node":"^12.0.0","cross-env":"^5.2.0","express":"^4.16.4","npm-run-all":"^4.1.5","rimraf":"^2.6.3","rollup":"^1.10.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-node-resolve":"^4.2.3","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4"},"gitHead":"d003eab4eaf7a1cc525f10ba6c230e93066ec4fd","_id":"@react-ssr/express@0.0.12","_nodeVersion":"12.1.0","_npmVersion":"lerna/3.13.4/node@v12.1.0+x64 (darwin)","dist":{"integrity":"sha512-nq3l/Hil1l9hf5wd0Ymyk2Ud+ByY3Uy+KR+ncP85MeN9k4mxPA1zGzpcokeV5TkD/sw4ilEVpL6IvwfQX6Xi5g==","shasum":"be145ca56ab058171ea4267113270e520d5fb1f6","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.0.12.tgz","fileCount":6,"unpackedSize":4552,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc0dKvCRA9TVsSAnZWagAADqsP/3wKX8B611yFttFVOlzb\n/ZrVYPKNvsvWOiAVZVwVMwS8nXgAq2qALbB0uHRFOqUosfH8EwUtx6mlPB5K\nz6aro2JtSQYVCazu6IBu9krPdt0wdlZDDjnWTPOv+dYzctjFPi6UiomsgJhl\nxSuCNTLD/e8RiiI8oxUNnIhtiOI4iaZFgrUTGq4zG2J11n4JgPEarudo7hm1\nHBPZ9C0G/xpMIbhqtn/gUmhn9vWq2dOq67cKSaxDC+5GuEJhUpqQmmGmGhkO\njlVeIhP++uXYD0708DN2UPkkXAGp5hCPorANiEVQXwI6OiPltGcbL+EtXROl\nKWh39M7jOHtYyN1C/Emh3Nn6bSj3RTb0dMJNf6rmmAX7Bg1YnUUNXU0AwYMi\nSDq7m1KRe82kYp6JUSU1dc4yJUZL65z+CJDaKlp/VQFI+pNGFEzBxRnYxGuu\n4APNdftumcfeMPBj7sZerrC8uuG1B2BjG3yFPYzkJSeKk1iUGTJ3Wn/uXpf8\nnoCHglY/4+zzLB4wMMZmiNdOm/koXijTkImk5f5628K2LZWXcQDd8l43ASRS\nsyFj6woy0lUgMjlVuqCTV51k/pjaMcFaM9V+o9ZtECE7HWO88ygYXtYwWp4C\njo4N96JZ1eJI0bTKJYjOCRMmd0NzVuq3D6y3J8Vk946dCr0BxP79G7kXyTXR\n8YJ2\r\n=Eo10\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDZTt2SgW3xXXvIF9WXa7NSFHZ+bRtPF8SF1fcCvlFovwIgCBUAiu2CB8/6At3kGaOov6x9MjMf2hn0TyVF6jCRIJQ="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.0.12_1557254831098_0.45099258712523427"},"_hasShrinkwrap":false},"0.0.13":{"name":"@react-ssr/express","version":"0.0.13","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/classiii/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/classiii/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/classiii/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/preset-typescript":"^7.3.3","@types/express":"^4.16.1","@types/node":"^12.0.0","cross-env":"^5.2.0","express":"^4.16.4","npm-run-all":"^4.1.5","rimraf":"^2.6.3","rollup":"^1.10.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-node-resolve":"^4.2.3","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4"},"gitHead":"7b637f631cc31bf425a645305719547437cb303f","_id":"@react-ssr/express@0.0.13","_nodeVersion":"12.1.0","_npmVersion":"lerna/3.13.4/node@v12.1.0+x64 (darwin)","dist":{"integrity":"sha512-o/nKC/9ZfCvb8ZLoOYedfA7j8TrTTmP7tjk58O3du0iHhS1MCQlQ20gP4NphZPqU9L8H2JNYFrVfcBTlOaHNXw==","shasum":"e9ff5766ef9407abf8f6de59b912832bab8d34bf","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.0.13.tgz","fileCount":6,"unpackedSize":4552,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc0hIUCRA9TVsSAnZWagAAKlYP/3FEvWPBz0giztkXFJMa\nAK3omD/Hs3aLLL22m+WZS/82JmLoZc9sCTUzvWz37Au68LG+6WHb3f4BpNLb\nZReZhbLZw1gHpKFWyyDviLbgKIyUE59igomIyi5x8ra3sJGMQMo9Pz93+8QM\nPAeELDa3fBnJeMjAV6DEtmnlunZITNFENySskCnXSqrXnVj9x0g3KcZMWOhO\nFkQPuDl+20DikZEvkKuPYNvtlKwBfmf4jeSg3No/Wx4MVIlCJ9IRyHD+FbYK\nY4jk/VOBJNQbGMN+/UFDfDefEii+iDCbWVN3nP1XKxnCmSjGW86KQc212wrq\njucfgum9p9EvjzjPE4m7JGkW6oWWWAxS0UWHudvHkV6wAzOztzvb3bT1PPF0\nS6EAcHIf/Afs8R2b48M2woX9tVOXbc6TZ3dxBRzgqChBn6LcwMJxU0j0kEeg\nnZdyq1Ab53xLPtujx5u4YmqbZHxrwpwxL40nsI20ZOyBNjGuIattHNwrE0fL\nLNv2zE8zwAmgH/cB4okWHYLZpqhlXnu8dwJu+tkbg+F6tyjI+fXtT4TEE+DC\nOKIGfNvAUhy/8htVYQD9+YDJc9MxMyFifJ8bi/I4fU4xsQgQErgoBlB/+Wzj\neCihetBQZNKFqXeznwSkVrQjkJcfPXwVLknE0Tdhe97926jcSi2HqE0c4PqN\nn+ct\r\n=zRA9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG61HaMY3AX3ACOzA1YhiOcwPndOqfuPeBX128YuaROwAiEAwOS5LzCJtautrm4SUfIWjI+RIEuDNeeBECDEN6pvpl8="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.0.13_1557271059144_0.9306846113095704"},"_hasShrinkwrap":false},"0.0.14":{"name":"@react-ssr/express","version":"0.0.14","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/classiii/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/classiii/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/classiii/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/preset-typescript":"^7.3.3","@types/express":"^4.16.1","@types/node":"^12.0.0","cross-env":"^5.2.0","express":"^4.16.4","npm-run-all":"^4.1.5","rimraf":"^2.6.3","rollup":"^1.10.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-node-resolve":"^4.2.3","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4"},"gitHead":"977c4c7201a9df0eed302c9845cea58b88ec8fa8","_id":"@react-ssr/express@0.0.14","_nodeVersion":"12.1.0","_npmVersion":"lerna/3.13.4/node@v12.1.0+x64 (darwin)","dist":{"integrity":"sha512-4GVBdP2E1vdOVGEsrKAomsEDVUWMucieguckl3GnX0qN8BVs0cqZYwhhOWaEDOY4jlqSeZguRvVFCh7xD9pSWQ==","shasum":"2e91494bcb5708afdcc6d59e68a916b7467f61b5","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.0.14.tgz","fileCount":6,"unpackedSize":4552,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc0hQ0CRA9TVsSAnZWagAAaKgQAIqPbcZuXyKlzJgrqtHz\nCX7vtXvVwQnnMTQOpmP4S1LxCGPzW//DV2X6i1v+q+Odl9SCThyS5ur4F3Zk\nyz2qKD3QTHuHOUMtG5nK9AJILW8tr3xprBR8gnVpa6/Dinlap7uYj89NrJQh\nGrXV5Tb4/fONs3p7pG3DfFk+TYzgoLsZpptNVrDeFnqdhrK7lOGsDkYyCy5N\ngpZbo026dXLle/uLMv8DApcEwzB8EETwKz5jTGEWNEz0DBZ2lrb9upLWvzR+\nVc9jD8nopM5FRxf8DxL08vY8KDfkDzCOhqSP7lB3IpvriiMTTVLhY+ErBxzE\nRGJ3ZY8+lPv4ajKihQn53f2dlatvLgFKqirDWcS7mvHC1orlYJX12gtD5Okw\njoU04Wz7OSHX3Wn4IwenKmBKVv2a/Ec8WHoWBvA7ftGkc3KwP3C3dsLpA3Ke\n1kmLmFaItlzUJddbHhcDP2uXokVBS2XU6ornTldXGnI+A6HpUBmZY1hpjdG7\nlWAmPTIIV1EA5NBY+vbglHdbky5asS11eFYMCHF5ylySvO5RGMM5jzfBvn0J\nVv91BkcGPrWeVujuYsf/sCHEM66Es5zwYmj8xXierD7gGjSc0dOtAQTZf2gw\nk4nwvKIkdv5vy5dTrbn5rNRRfltMQqEDbwB0DacgDol9zxJFGGSAqUl+nSxD\n7ryq\r\n=TVWi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCtiZIPWOxs8zWCQx5Z3qUd8zz+iMDz0HTHc36pFyt+EwIhAIrJwNUwNtntBl0+YByqxwqKiUoXrF+b0KzkL7HSSVm4"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.0.14_1557271603601_0.9363910132497764"},"_hasShrinkwrap":false},"0.0.15":{"name":"@react-ssr/express","version":"0.0.15","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/classiii/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/classiii/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/classiii/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/preset-typescript":"^7.3.3","@types/express":"^4.16.1","@types/node":"^12.0.0","cross-env":"^5.2.0","express":"^4.16.4","npm-run-all":"^4.1.5","rimraf":"^2.6.3","rollup":"^1.10.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-node-resolve":"^4.2.3","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4"},"gitHead":"edd4591f74365321f72653b4306e9fe5d31c7aed","_id":"@react-ssr/express@0.0.15","_nodeVersion":"12.1.0","_npmVersion":"lerna/3.13.4/node@v12.1.0+x64 (darwin)","dist":{"integrity":"sha512-C87+qAYRCAm0yEe/e5qEFPP/e4qMDqBhPVSjnNkGOBxK+mygEByFxytxiYMYl49yvzqh81TkcIlinqxkkmHriA==","shasum":"486c449dad997d500b348529bfa27bcc48795226","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.0.15.tgz","fileCount":6,"unpackedSize":4552,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc0hcLCRA9TVsSAnZWagAAmbEP/1263/8e0matkmYwWFt9\n2jZMR9D1HWE53mDS1Y8KKBrig98dr+UU/If+phUWP69RP4wd9tSzXzK4Fnyb\nAvVLMR4A75LJYgysOGxfTMXBaPLxgp3qjAAsMz+La8kh2GQ4CQz98SrS2poH\n43sKWTMZYVx2+ljojDhqJ5OGlmCRY/CSmoKUUnyaK8PAJHGq+o8qfV3N7iBj\nYbiraTwPcaUA1J2kifgECK0/1Rabn1Y8P+N9kxtE2HmAyfMvdc4ASZaq20g1\nY7qgxbQyQRUSixBT8MhgQgU4BTyqpaxZHWvyIk3IUuEBuNAPX2I6flw/s3bo\n0B2aJUNxL8WNQRv1AC55ILwyseMN9oZsk/wu5hFFem0YboU/rZistodK+9Tz\nd0X3j1j7NWjnxhfItYScBiKJB3rgGROUzswY4EhOeuBMbIBOG9GlAqaynD0v\nDAGFqJMpsC/WrrHy5Ix0Z714vlO6QU0ZWqL4W4gCGGg1F5c5LJ1eO8lHGHKa\nxO/NYVqiw0cOCwDh8sK39Vgjiox5paUJ8l+igF7s00Iq5FqXu4YbcoupBjYG\nh9SXDmJ5Nk9YscGur9neW8gXaVf+TPIIdsfLJjKTBKMKGO1FRL+emF5OhCy5\n3HK7qNlZp+Ifz5b+k7E+malA16b+DKpXYgILHRrA+FCRNL8VgnEZpCc3XGNn\nNUdd\r\n=3eC+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDyEzHje2cgW8HouN2kZSxIJFjIQkkqksjR84C+UNkIiAiEAhvSk1rC2sSunb4Ud7vnndQMm/K9FoB+q+XfFCr4vubs="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.0.15_1557272330878_0.08347132442142091"},"_hasShrinkwrap":false},"0.0.16":{"name":"@react-ssr/express","version":"0.0.16","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/classiii/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/classiii/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/classiii/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/preset-typescript":"^7.3.3","@types/express":"^4.16.1","@types/node":"^12.0.0","cross-env":"^5.2.0","express":"^4.16.4","npm-run-all":"^4.1.5","rimraf":"^2.6.3","rollup":"^1.10.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-node-resolve":"^4.2.3","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4"},"gitHead":"52105370bc382913fbd77f0c5d42d78e54226ad4","_id":"@react-ssr/express@0.0.16","_nodeVersion":"12.1.0","_npmVersion":"lerna/3.13.4/node@v12.1.0+x64 (darwin)","dist":{"integrity":"sha512-dJlbDU40fCAFQlZ1jCQuSbp5sa5MaicrxfC48vOyZZcKtARp8OilGPIzIFAOyvWnVnZDVVSFzFaDKTF8bT0qug==","shasum":"fdeef9bf9695d9f7f5aa0871314c21da01b6da06","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.0.16.tgz","fileCount":6,"unpackedSize":4552,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc0higCRA9TVsSAnZWagAAmcIP+wdh/W4N8V0pzxyFhuih\nUx6Npg/tm9ogm+0MBmTBf7EnYpJ3UHc6OmspJYHJS8HJPuL7uI1Gv7BzwRRp\nV1sZR2hmR2OXB4vkw7/x4AFfqg82yxJGVlwcE5b0cpaLkfOJ8T39fL2ZMOyG\nqF6FMCCLoLUNQdxBLZqC+yzGGs/ip4x8rrq08BU6iTZDDWN9k47bZGwtmUEX\nuikijhb+WLjUToBHQ42i45UfF5i/4YAet/UZ6HtEhD/EMpYx037pXroDmZq7\n4wr4xTdXCG3Sl53rapTUsooIM2Z/3nkX8A83Esc7rQyGHuK3x3mPbJ75IR7d\nfbhgf+TtLcb5+owosOMqujxYfI+MSSZ0iHeKmDXy+3R64fOZOAwpsKFtvjF0\n4DJq6D6RIftmDNLZXj3AOhRZ9sEK+gvelr6HKBiom0D9TQ3nLLsRq91aSZTW\nIVxp6GVxrfXabnTX/9kOg/PNEes1e4cb9VDcn7MXK6e3H9uW2S2sNor4exsX\noqlLGDcR/yvxsAt8M/7yWYpiaOXce5zCdAfQPEp/FljPzZsT762nP6uEW6uV\nTLNd2GY9MTVlqW6gZ1YLLWz6zhimYgs5reuAMfdWWyqe4ONmDmbMWijugI7G\niNKxV/bSgmg3+IFa/fX3GGNgATTJZ6subySqT4jsVP6hen8eTCRZ88cKaAXR\nOlwO\r\n=xvCI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCa4hL1UpcMlV+mNCtl3EAle0AiM10QuULF16MWXaWt0QIhALXPOuLbNlIDZ1keWdSjsVWnGSujZC7rmIx6MCNwI9uy"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.0.16_1557272735988_0.38519606033046294"},"_hasShrinkwrap":false},"0.0.17":{"name":"@react-ssr/express","version":"0.0.17","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/classiii/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/classiii/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/classiii/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/preset-typescript":"^7.3.3","@types/express":"^4.16.1","@types/node":"^12.0.0","cross-env":"^5.2.0","express":"^4.16.4","npm-run-all":"^4.1.5","rimraf":"^2.6.3","rollup":"^1.10.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-node-resolve":"^4.2.3","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4"},"gitHead":"7ac0bffa336e84191578c1b84db96ce6fda0355e","_id":"@react-ssr/express@0.0.17","_nodeVersion":"12.1.0","_npmVersion":"lerna/3.13.4/node@v12.1.0+x64 (darwin)","dist":{"integrity":"sha512-VQG1PqmNaQquowyMx1IoolVetvJrR8NEvxD1eoUm69bTPfUrnOXrsNIl/Kdd/8acXnF2+Eh8SfvWY5o+xKGPxQ==","shasum":"2ed2f8bb2077d9bb93a808d007850325c3529beb","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.0.17.tgz","fileCount":6,"unpackedSize":4552,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc0hnFCRA9TVsSAnZWagAApCkP/3rtjT3lnEwoFk4iaCDI\nwTfYAySA8+iCnoh0dedm9Um4gt4N+hc6VqvM/o8vbtfdAjzp9XBNWzj7umqm\njCayvNfgT395iXlY1w6AlirYCIC+PFslos+cB/iRiPdlKzn+CoGH+N3d/iQl\nSSx5TbpZTI0nx0Ax2GdwQs7MAZ5yNZX8NruOy37d4fGmUiebkJ0xcDwBmZEa\neJnQlZUdCcrWLSsI2645ZzP6oZmGANNNtesWaQ3mKsvNgW9XArYNDAjDr3NQ\nAj9d+fauXQ5eI4ZdTBZM+t8XxGrnIw2jA8u6VNtPhzsKz9eYHpuUE7Sj0xFF\nTrMram7FQpddFNBVWhakBlb8DxXQCDP1PrkKEGejgSVq4/CV8Gg/r3vcGMDa\nEkKKOhAAPgIzT48VM32DYvEAApeU62Q0Pz6F+GhHCbdYb2m6Wkj7xud0M19c\nxMWVqWMifUfWbVnu/7lQ1ZtzVrg5HbEOs/FzVqSgYaYr2+j0Z+1hJDPOTtmU\no2kiDgVO7wBnljU7zEzxaGzZEqAvhdRNdz6/8cfiBwBQIVdvTB1dLKZcI7XW\nxJTljoqFF6DHgNs+39qoL0A7Ib2tEDTQeIHdPS0wYHPNSZWiZm9cvC42JpoZ\nrt8fPikDtayakZI9i91KE1+ZL5ueU4ywM/W5W9aNZ+hXEMdJyPk75WVId9eF\n93bG\r\n=5kMk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCGhFOavjMdQdzvkDqMFTZNk893EkGig5qD+iGFuIt1WwIgNyGL386KKnI4w6Ivt6biZWKQGAGhRdAdaCifc7jLES4="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.0.17_1557273028473_0.2608454929167878"},"_hasShrinkwrap":false},"0.0.18":{"name":"@react-ssr/express","version":"0.0.18","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/classiii/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/classiii/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/classiii/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/preset-typescript":"^7.3.3","@types/express":"^4.16.1","@types/node":"^12.0.0","cross-env":"^5.2.0","express":"^4.16.4","npm-run-all":"^4.1.5","rimraf":"^2.6.3","rollup":"^1.10.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-node-resolve":"^4.2.3","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4"},"gitHead":"ad9a1b0b22ed5affc2dddb1e5d3597f4de5486e8","_id":"@react-ssr/express@0.0.18","_nodeVersion":"12.1.0","_npmVersion":"lerna/3.13.4/node@v12.1.0+x64 (darwin)","dist":{"integrity":"sha512-LS1PRKlLg09pgOj+0zMBqtsR2bwV+8xLUGKHtydq4OZic9rBByBKHL8eiUw7iFN79BWyIEwkwqwd4EIWJRN0WQ==","shasum":"1d8bcd2406885f7ecde53d972e0b6ece9f992d56","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.0.18.tgz","fileCount":6,"unpackedSize":4552,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc0iyDCRA9TVsSAnZWagAAtrIQAINshHtD1FpMRUuVuHqH\nXHCTPUH9bMF57opk48NpFITBWwxVjeYh37NjJkI0ZmvnuWcUwsCJWtKkPNln\nxHwBn4Qbv7+WoVLNM6XxkFUqhYUfL+ehixHS/vjPMfNs8APaIrXhSmoQ1qw6\nAKVz0DdbvQe9LKEr1eetQhMbcJlHMEe4fPvOQKQ+cDPWrAogiC6lur/F6Vi4\n8+je5HfPlDg3CHoNXeuq+EaJfF9hFcs/EplNgi4nA/DOx2A7nT8oaMsKCC0U\n7bPLIrJUNO6m9dLFWH2l+ix/g0H4s1Eeam8AFYmtOAoMa/yWtNlafFFSzIvh\nrTGe49iOr0PYRfpyyl/ojeRksIyvMsrTX9inNtnSnsildbtPm14eIZLoXzx1\nzHD/0hCHhtuETCQRXJAIte2yPdUB3le8GqU1xmBPKlcPUZ9HJz/9scYycNSz\n9OSZUra/Vf0jw4r22peuUZ5IJHkr0eoyOnvB6qnUc/ILv/P79Pp2hu1NKits\nBxODpCpVEwy8tk2QIYGRnFINbHsCeSFSt5ozEEjySjPpHIoKhHrFwv6dEWbe\nHiCmi9m1qSlp7mvUZ1grTr/3kzAtRrTITobgyrH/UA3PypaE+7p7lh7GZ+CJ\nSEOq8rZXGk4O/sow2ppzSZBuqYQG7gzyz+VCfejCmgvC4lV3Z1KWEK5mjs5u\nnu8X\r\n=F8FN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBv4r3igNHWVOge+ixP85msgzVSVmATwmBh2ptNfub0AAiAL69IqEisLXSOvJeJuVedIEGihG99e+rjmimFu9kLglg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.0.18_1557277826727_0.05416242247116965"},"_hasShrinkwrap":false},"0.1.0":{"name":"@react-ssr/express","version":"0.1.0","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/classiii/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/classiii/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/classiii/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/preset-typescript":"^7.3.3","@types/express":"^4.16.1","@types/node":"^12.0.0","cross-env":"^5.2.0","express":"^4.16.4","npm-run-all":"^4.1.5","rimraf":"^2.6.3","rollup":"^1.10.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-node-resolve":"^4.2.3","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4"},"gitHead":"c773b357ad9eb826a5c8b9ebfac5f6879d595f82","_id":"@react-ssr/express@0.1.0","_nodeVersion":"12.1.0","_npmVersion":"lerna/3.13.4/node@v12.1.0+x64 (darwin)","dist":{"integrity":"sha512-L1wgLQED5JM0DnPcQxyzMKcLs0EfASCkF+2yGi0jI3FXUgr7S3DVmsmNwNgUmbDlsZ4X0VfrYsfkm/Gkb6oA6A==","shasum":"11704461be385238a4e3d183317e58f1ee1be14e","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.0.tgz","fileCount":7,"unpackedSize":4947,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc0jAyCRA9TVsSAnZWagAAzEUQAIYptTqT8wc21wcrYM9A\nLzYVrxEl3nW6qXf0uCBTvh/FrdsWyj6C0d8Y5+EiXWISyQBj/Wm0sQ1H0nNP\nW3P9SdClWbTQ58bMMxERQVftAnn7zW/W0E8uiWMRqn/W7Ovd4lMUefj0iKhq\nyi/o0MSctZ92wh3zqxlyjrercIgeWxyp1Twtfpr9TpxTqMeIr0t/WphnW4FO\nbeNhaZiLZZAi+0LCyZjPvRrc2FGhFK3t+3HK5sqjy9UY1EUhKE17Tu7EcxGx\nPVLw83mc4hedWzCF4EFQRKqNoODfIROAZ5viYzFWnOW27NP4TJviDi+tyDMz\nUx2PYF7TA9K2IzixUdNQVcBkhf8arMsxJCzcfIi4P6a0bb4LuaoZ7s8yTTQa\n2TsuWamJ8yBQgRTGy5Y0I1SmWpbX3L2pLhjtiqvACU8L5bmsenLT3FAupsc8\nLTJ7GwLWFGO4XqZCdWQyPwHjmsxNCVV6ikPW8bKi5upjZA0Hg4okw9rnn3C1\nhU0lAL+u1XFbUSPtDn7hyoN/2iHmfTJMbLn85vL63DNw9IM3MV+B1l3csaWm\nDl0xSLoQUTnHn6FistxBuVbeIghvBKR+l3E1Ew8xDgPPfJzViEY3RQ6PF1UP\nrymJm059MOZqEQFYBAMuFKQHqWDNJbwuMjXg4UdRA4hjdlpg/Y6Cn39Yqz7F\nCy6K\r\n=s2E/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFhImONcV8vHV00XbriaDeuVsEuQJxhBs5dmU86WQoBOAiEA+E4Ik+fbEPZLAAXES6mmM7fpOp2OWhqPH4L6TFcXn7o="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.0_1557278769708_0.9276958047817494"},"_hasShrinkwrap":false},"0.1.1":{"name":"@react-ssr/express","version":"0.1.1","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/preset-typescript":"^7.3.3","@types/express":"^4.16.1","@types/node":"^12.0.0","cross-env":"^5.2.0","express":"^4.16.4","npm-run-all":"^4.1.5","rimraf":"^2.6.3","rollup":"^1.10.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-node-resolve":"^4.2.3","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4"},"gitHead":"7bc126eee5b2cabf548f14b060fade6f75499a6e","_id":"@react-ssr/express@0.1.1","_nodeVersion":"12.1.0","_npmVersion":"lerna/3.13.4/node@v12.1.0+x64 (darwin)","dist":{"integrity":"sha512-kjzIGXR034ze6QPf7di4cAyrfOzN/jg7xgy4JSKdb4nXKMk19xCeADy+lUZ7WNDKlCPUdyx8Jb+9uUbgrV/OqA==","shasum":"3243947fc189771c9210be89bf2f316ff7ce0196","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.1.tgz","fileCount":7,"unpackedSize":4959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc1GiSCRA9TVsSAnZWagAA4DQP/jU29jGXslsQWymDm/n1\n6KxzI+GpGsIXd28wL6QN2iZUgjWvamPqoK/NFymXXZUtml/qz2ZtD1oAiUaV\nz7Bf5Q8OeDXMNmhkhEkZIqYgp9eH7QbMuqDI4l1c/8b2rOEArmnwIm8Djm+7\nEN1fvaaqF0ulYWvwG6Htlf+A3ZQ5L6Mk828SvhxHS+//jjWQQxgWhTmvXWSs\n8BtE2nVaMvfXXnAloqAa69ZAa89zJeQ2mk0b1Y2Acgegte07uFy/Voy7m3KO\nXt4uBQ7T8rVeCf6to2dRvhTF2WM++3psd2rQDkVydix7uhj1pCNM9gEJy3mZ\nthVkdojZxEm5pc4JGi+h0AU8A65aAfWIBcSCbtTqTMH+hYcTgg7ttoNkK1qL\netzSGHMgZFUb6z+UW4VjbyTQ5306Culmx50klOQ6IR9CF6aD15xN+vNPjwch\nuuityCECcZiIAUtSqyL1XGeUb4BdB4OZr7eEpG4tdXPQcYH6dou7hDVEkDna\niobPr3eI9/mDs7OXtvPGjGL16xVPqBtxoO4Rsxl3s3ZUq+LnA0yc7FSqIu5I\nkWO+9h/BQkoXIWlkyg/3PUm3cDyLcuf41OHmcMLcQCMkWy+PsKhmwhKfGgto\nL22S5ihJ+80PdenE0GSwHdYH4/L2xLS71ZL6vUfzkxAWUij4kdjEWJJaqOAn\nNx5M\r\n=/b9U\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCqQ0tNVlpg6OmB9GmhQjcOGDdElRIlPeBCKBI6ik51vAIhANuEcCdyJKqUfx/70lmh7u84WTLcXAGwOahmdyLPvFuu"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.1_1557424273574_0.824875298304462"},"_hasShrinkwrap":false},"0.1.2":{"name":"@react-ssr/express","version":"0.1.2","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/preset-typescript":"^7.3.3","@types/express":"^4.16.1","@types/node":"^12.0.0","cross-env":"^5.2.0","express":"^4.16.4","npm-run-all":"^4.1.5","rimraf":"^2.6.3","rollup":"^1.10.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-node-resolve":"^4.2.3","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4"},"gitHead":"2b104741ce883aa996cdda94afda81b2bda463d2","_id":"@react-ssr/express@0.1.2","_nodeVersion":"12.1.0","_npmVersion":"lerna/3.13.4/node@v12.1.0+x64 (darwin)","dist":{"integrity":"sha512-+giZOJXc4MZWQfGYr+wbEW4kHKPcEgHUK0BQ01mh7yb3PjZGZdcmcq6Kp0L898LQ0mzK8bhobmfgh3NsPCIdHg==","shasum":"449be2a87f18c5d1fe1e453145265d6e3e7a1956","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.2.tgz","fileCount":7,"unpackedSize":5544,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc1H1pCRA9TVsSAnZWagAAuYUP/iqq0hKZr7i8W6SOmBiu\nZMvXw/yJjHf2ihI4wbByS7jaF2lTr6p3F0xJm8301hqf+cTJUtZVn4JBJTr0\n///SeK7/+pBJUEYS3zVVlGgeX7YUBZ5MLLyo3N2RaBEwCpKTynrlw4wDdeEe\np8aNyNSZ11qGPm9R9zlyfi0uOeHO+EPTnXF4YyhvV7/iY8j4fzREtmy3ZWPE\nCMUdqAW0GJXt/3nLJNIHwS1QINFiI2RrfDgsfUOXQ8yEh/4wMCtaNQkB4Jcw\nUERvnOXVsjSc3D5ZESmgeEeFNVE5xJjIcznCIOZs1eKgJzcaaEQj4nQTh5A0\nT3C9sC0BubG8xK/Tzxi/gFJtQGHKVu5kflBnmssPhtn+iEzxTZkD91lX4CtF\n82S4Pwkfc5MSIFc/TmGqlWVSbkz56KeJzMhvFigLi2DNC4ArL8wuE6C97D2Z\nHtfNIvWml1Ub/HjnM/64pVd4qN31CFcrxHJq1W5fZ6KcS8j/fCvYK01qaQs3\nSR5/SRUXeO/5Jpy/aqG7UONWuZhWlheOr8SPhNHd0MOrUAE0hhi76rWcf33+\nOfYiuSiASbxi4TZeYeDQqdHpoIP4nsGU43jmtSTAatL4Z8crlevoTN9q3F1P\np4N56ShQNAQGy0J9HVHAKWtWVaB+5w0Be9vX7+fiF4UNEgYN+jdq9Lq5dnHq\noJFy\r\n=fFEy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG/x5xa9qujeMZ1ZD0dSpiUNHngW8g9R7vzzAmLCSdqgAiEAsEXXSVHWd6kakgYgzwccGLEzYimAntUTyZkadgJw6I8="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.2_1557429609197_0.7016799379513896"},"_hasShrinkwrap":false},"0.1.3":{"name":"@react-ssr/express","version":"0.1.3","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/preset-typescript":"^7.3.3","@types/express":"^4.16.1","@types/node":"^12.0.0","cross-env":"^5.2.0","express":"^4.16.4","npm-run-all":"^4.1.5","rimraf":"^2.6.3","rollup":"^1.10.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-node-resolve":"^4.2.3","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4"},"gitHead":"16d388695caafcc85ace7e78dc50b4da0dc4086a","_id":"@react-ssr/express@0.1.3","_nodeVersion":"12.1.0","_npmVersion":"lerna/3.13.4/node@v12.1.0+x64 (darwin)","dist":{"integrity":"sha512-g2c60bfwECDbRCroERrpC67EaDPcqlGTJ6w72B7+OXvM85b5rw5KUbWQZguJzohelB50anRJ2XTZOyHT0Oog0A==","shasum":"0683957455a121aaedbd89c7074a83af2212b2b2","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.3.tgz","fileCount":7,"unpackedSize":5173,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc1IGVCRA9TVsSAnZWagAA+QIP/RReG011qLgIyfWH355A\nffh+lCTyI3YIwZtkr5AH87spcK3Z4E8DkaW4LTMX52SujCOyEkFrIEPyEXIL\n7Lb/LOAyjaidtxfj8N41d3A1o2OvdeTDeyObzFWKljRm9pgGOkaEm7uC7Hnu\n+Hx4bHhjcHvjp3zE1+ZmDApKVBEHd5mT0LFA7ruNqI80GxI8nrs2NQuZnQ0t\n9LhCznQcRDMvjnWEgRisHf5a84vFmKqZbwILW8+Zi9RVO4ckTRXeP2GKwauz\ncotxjfXn6sfu1ge4Q4jGwVT4ddBiR0V7pux1+sbAZfyBeItC9+B0ly9o0wlG\nx7r1Ie9QQ9Ybjlvuj/MDN6VVKxFnT8GFhY/NeoY+9DAfbB2xYw1gOsOYlKg3\nUi29Nli70BPht4yWPknt/59ArvkMicsAdFlVl9xL96xJMv0V5+ZRHVvKZuP2\nuIktBr7aU4b9wOx5kbii3fIAy23xzXG1xlC8WWLrpvOx/LslCbRNQhstPjeV\nR8acYmEMBQkBh8RpeKAlrsvy+W321JIofikbsH5gWIQFasiA07SrpWKkKXkj\nEKMpyJJe20PTOUFFhZ9v7s5EHCRN1sLsC16MgEzi2OeaLK9FYzVZ++RJ/j/M\n8yQZ+sIs/v16yDXpeeXOqQJ7Kp2q4i6wY7yb0Tft2Vtf/LcoqDn3vRJFphY3\nKRcf\r\n=vyv0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE709YEvI0qdwQvMz6dLBAoJHKDPs3irSBJX0+Jr9/DRAiAJQ1gx1XztvG+s4LudpGIDCcQQXk4nyBk1Wo4B+NTXcA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.3_1557430676817_0.913866361862252"},"_hasShrinkwrap":false},"0.1.4":{"name":"@react-ssr/express","version":"0.1.4","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/preset-typescript":"^7.3.3","@types/express":"^4.16.1","@types/node":"^12.0.0","cross-env":"^5.2.0","express":"^4.16.4","npm-run-all":"^4.1.5","rimraf":"^2.6.3","rollup":"^1.10.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-node-resolve":"^4.2.3","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4"},"gitHead":"71bf12a9da3e504ae0b4e63dac73bba5414405be","_id":"@react-ssr/express@0.1.4","_nodeVersion":"12.1.0","_npmVersion":"lerna/3.13.4/node@v12.1.0+x64 (darwin)","dist":{"integrity":"sha512-WQQ4u9XzuadqsQ2HbRBoEyW9/d4Tf2XW+yrFAG2210Y5tE0DNZbjtYVYDKRlsqDdRWTzwnQfAO0O2VyJ4ZDiug==","shasum":"a5e3c04594688f1da16688fcc9e92c2690fa27d4","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.4.tgz","fileCount":7,"unpackedSize":5296,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc1IQXCRA9TVsSAnZWagAAvTgQAIXDZYbiwwpAHRExcjwb\n5qZACPLEQiAOmDPwb+WOAXLWhXhwuRtCUOM9hqOEHYBYJYBICsPbtyPu44en\nkREYIGJr/NdT2jtpXdRTHvMGO2DSORgKbXHGYN9HPuMEGGzLMkaVOWaYrXnz\nFPLXETRUL9PIhJFGHBQvQy+B7nKy7atECC0DcxJNMc0m0Vljx3WNJM5pIIJY\nLZoD2nizF56gdIZow7x1F5wji734wtUizHicnKmZqjYMB61SKeH8yCJpQVNl\nO2Jb55P7hap8Bz7OCFlyOJ8kZnTnac31bQcv4M1nW0Yv0hlhhVsuqkp1lwXr\nvvsRbwQ1lOTKYe23FUxUdbXPe+jx412TLBgXv94sH4seNb40Uu8FBHUTDEBI\nHtlEjyxLda496dUy+auIvi/2YcTFwYjkjyuxfp+pH0G2/bmXHSVurw7W+2Vc\n4AVBJkwfKdf0xjMl8PtR155VmZHImi8I8NdULfRAZNi6bo5OXYC9BzK4Fba7\nUG/D+de0+VrzLA6NQiQYIkdV8yLxCc+IYusim+/IqVug8zFdfs2p1Ri335pW\nrD+ZrhZJqVFUmaC+zfqpmEUPTV83rUGZiLey0ig0D/GPJCOYew1wJsKe+Euh\naGIwZoelYP1BfJ9lA2AMgus0Ikmp4yIOGc/OoV7+60Msit0H+v8aPoBVO+Jp\n5Zro\r\n=svYM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICYsbWayo4aJKYP7ulS+IcmqQW940jJ2RVugIV33WA1+AiAQgf/NpQnxC47Wz1NRWi00LpcWdjRQXWVQIjwM+n6taw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.4_1557431319155_0.6641701011756564"},"_hasShrinkwrap":false},"0.1.5":{"name":"@react-ssr/express","version":"0.1.5","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/preset-typescript":"^7.3.3","@types/express":"^4.16.1","@types/node":"^12.0.0","cross-env":"^5.2.0","express":"^4.16.4","npm-run-all":"^4.1.5","rimraf":"^2.6.3","rollup":"^1.10.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-node-resolve":"^4.2.3","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4"},"gitHead":"0151b79e435503bd2745288ef05d7c40ab568351","_id":"@react-ssr/express@0.1.5","_nodeVersion":"12.1.0","_npmVersion":"lerna/3.13.4/node@v12.1.0+x64 (darwin)","dist":{"integrity":"sha512-CQH0UikEjQCpbCoYvSCUx7uCGB4c1TA4tAmLC8nq+N+xtjKVD1U20OSTQ6PuCGzofvh/YJcyOATBxyAwBRTi1A==","shasum":"72b9a287624c1289c6b4a9dc5601e2927b34664d","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.5.tgz","fileCount":7,"unpackedSize":4959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc1ITHCRA9TVsSAnZWagAAB7YQAJqzm94ZhS/LEhPuWoeF\njoYh3mffOeDad5AHuSZTGre7dB5tKRtLO/yLzhHB6fB6vVKAgmKoTpXq958Z\nI5HXkQd6cRwfv53LY9q5INAFtuqsK2zKRiorI6LVAvdwQ4wXMDnD0fR/DR/H\naR+bxJ9/gJbOka28ptYwNJ+qjIXtQeUGnccKhqesBfVPxGEA4FgUwdAPAenA\nYTBWZZDI40ypiz/Vu5XnE+rjzCSFqCed4NM9s9MLzhK551er37Lnc/4uoG5b\nkBGzOJsea0Y25DcwEa/3hKv1FCQBZ5g3epHmHE5P5GKr7Ly5+leGLBKwW/Q4\nS8YvS9tB74ipX0AmOj3fQIhoxjKnjybmprWya1TJ1QbUurRAWltNxyrXASVY\nCb3wBjIq1ckbofktrlbuqrJnSyVwMRta1xrOkzftgDIUd3klD5UCS8sq9uWM\nUyS2sro6nXSKo98h+Va0Xkq+bvHBB1iNxFK808xP63lfESTyDOlKS4rJZ4Gk\n+AHBJ4zqrxzK4pzh7XUZVIgPQBhKqEucId4lWSnO5mwyiJtUHfXBVDDYvhZf\nLgqgW9ADZc4dOJZ/48ULpALUL9Z5OXDvLbtxRz/ywLaFkCWNuuRUI31E2LzF\nxQFHBI1clsqaq+I2Xd/q55sEeL1u5XP8qNYoLMLPP8XatDXDi2JvAiQx1VxY\nkSi5\r\n=H7qL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC0pL1RnCnSz4JOX1MJ1dCQJ9s0G9kkNJS3xX/PtiOkqQIgENK1lPWeWvi2Skj3u2a/8Y9s2VFPCuTuPfKCqxlXHFE="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.5_1557431494788_0.5251031433272257"},"_hasShrinkwrap":false},"0.1.6":{"name":"@react-ssr/express","version":"0.1.6","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/preset-typescript":"^7.3.3","@types/express":"^4.16.1","@types/node":"^12.0.0","cross-env":"^5.2.0","express":"^4.16.4","npm-run-all":"^4.1.5","rimraf":"^2.6.3","rollup":"^1.10.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-node-resolve":"^4.2.3","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4"},"gitHead":"11bdeec10d7b240be2c9df0cc0d08544379b1100","_id":"@react-ssr/express@0.1.6","_nodeVersion":"12.1.0","_npmVersion":"lerna/3.13.4/node@v12.1.0+x64 (darwin)","dist":{"integrity":"sha512-rE53E2xfjgjI6BIwmCxzPnnIX6vMXgbmtrcHs7Gitjs6WgKQxZBcwXmrlVQgt2XDr9G/c3zOhvdmRyl+5ad2ew==","shasum":"24031fbd2e178e8882a7008e76f0b6f392b10428","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.6.tgz","fileCount":7,"unpackedSize":4959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc1X8lCRA9TVsSAnZWagAAzUYP/2ywShPPdy4xKQvxxux9\ntqcgus5T1eCTA3XAjQcqoNndzx5P4Ne6dYwuKI6vFqSay/olVKW6TVjV5fF3\nSJjh04d41y31nPrMaen99xz7bJ3M5JVVXy6ql9fyXBRNNojN22YRJi4ta8hr\n5uMWMCxvPUyJHNAc7bsbmVomo7aPTQyH5F39FRkEt86zoC5sg1gx/wrSPmsS\ncegLx+Q3nPZegqt4Ynrlg9f2vyn4fUGim0VvgTDJe45+9ytuUG3xpaCtVLss\no9YHU5aibmJt9nFZzbAYZ52wI0XXrkZuI2YnrWaiXNSlde2NNL1PJHxBrbuk\nx4PwjRA2l6HA1DksK7OspoEGRdxlcDeKYrX6ZfKLYK8kfMooewX2D5oVYBby\nQ6neo1FCtGicrFc0hZkPOSZtsq2vrKRjqbSAArv78a9ixMMRCPkAxzSOphN6\ntfY2KrVNpCkMJJlxACmzZ59XaFh9bAgXzmqrHI+kAmCZEyyDal8OE3IM0SHM\nEA7a6UeanWOWMK/6xkeDH5nmKGb0sVZIetUrswDF+S6Nt6JtMDtOB3joQBe7\nmVWNbLwp4jDYZ4wGIeJJOi0y20juEu45eMhKXT5Y5fsjjU5vmfMHwl4HDDxb\n7O3e5WjOSHEO/AvNaj2281V7GTukPiGDmOAJbS0fjIllA2H9NsHOhyhy+61A\nsZNc\r\n=lHEe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDlaAlqtM2+MZ14iT1syNCvr49lDsQpPUCHIDcmz1VbIAIgOFU2lE5JeFA9i1/oyyeVLTfR8AzJyk8lzeUxNbVDYSk="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.6_1557495588961_0.59884994619824"},"_hasShrinkwrap":false},"0.1.34":{"name":"@react-ssr/express","version":"0.1.34","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/preset-typescript":"^7.3.3","@types/express":"^4.16.1","@types/node":"^12.0.2","cross-env":"^5.2.0","express":"^4.16.4","npm-run-all":"^4.1.5","rimraf":"^2.6.3","rollup":"^1.12.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4"},"gitHead":"a27e86296514a9b97a2c2dd563d28c014e84430e","_id":"@react-ssr/express@0.1.34","_nodeVersion":"12.1.0","_npmVersion":"lerna/3.14.1/node@v12.1.0+x64 (darwin)","dist":{"integrity":"sha512-3l246oV8Md9XHQ7NOHqRgQCls38ddgYYY4Rt7gkfcRcPMKGRzVapa8So6eVk7GKmCniyvDvVMaW52N7+KQ7q/Q==","shasum":"05c931254541915bc4023cef124227460f7dcfa6","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.34.tgz","fileCount":7,"unpackedSize":4707,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3KVKCRA9TVsSAnZWagAAzQAP/ievBI4IZm3EWIWvqHTp\nsXjvIJ42Mri2Oyzo5jssptUm9UooEtsSlr1ixK0N8K492Nsbi0t91jk4GjDe\np1DEsxiVSEmoTa1XMSiGBmAF6tqoLM1yTwCW1X15xtgmg5as2Ok2Z3pH15ZC\nuiVtnBXLwgFCOCMx6B2fbh2M1pa6hrSfqPpYs4mUPxQJcFZ0s7A8qQRx4cOA\nUm9wC28ofTXp3CzzqpRi/dJ98F9qD0rkn1ql3RwjLZ5/71NlsiT1D1BbH0dy\n3IhWoVcVoP2HDkA+765TAnCY0qjtxw9tCjJhMQE2qISyRP6ELm0mUdSy5YjX\nR5Dh/pU7qUwOt6GLHXy/GLqYDvj9ap66dKzJIihsikkdphVsV1RepDhjhgUf\n87NBmTd+g8IRrSNDbig+AMYY+/hvCW41irO7aSdd+7Rw44V+c39sUqcFjc6q\n55/1I9FI057ZCDfu4Pwq31FnexW6lfoN5AQh3tLQV4m7MFwcKoiHSG46RTwA\nMBzXdkn5IcplsSMz0kA5AZL9XDEKFwQW31BpGhs8h/AdKs6jvmsK5m8tsFC3\nrhXgGzZFtSdg0eOS6L1UXO7ZKAjgjuffx1h+/hgCDr+pRREBqv+/kNoOy3tC\n77DMNEgMcuaxv4VpJccqkPAyUWE2S3IGd79I+2Ym6QKl1RCbGn1TyzMPLins\nlDH8\r\n=A8yr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDfNJmE6+Zapx23jEQyApl30KlgOOsN7bKmE9EmLo3n9gIgMM3PFUFEf7zWkbePTZHRqMS3Q5pmfu+06rmefXjkuQQ="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.34_1557964106153_0.6286317600391178"},"_hasShrinkwrap":false},"0.1.37":{"name":"@react-ssr/express","version":"0.1.37","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/preset-typescript":"^7.3.3","@types/express":"^4.16.1","@types/node":"^12.0.2","cross-env":"^5.2.0","express":"^4.16.4","npm-run-all":"^4.1.5","rimraf":"^2.6.3","rollup":"^1.12.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4"},"gitHead":"eca3aaba00e7006330533267db5591b658baecdd","_id":"@react-ssr/express@0.1.37","_nodeVersion":"12.1.0","_npmVersion":"lerna/3.14.1/node@v12.1.0+x64 (darwin)","dist":{"integrity":"sha512-ylNR8XZlbUC0z3zJ++Pvb9W1oPrfWvKJrDH4uzx4q1SblKy2YD7LtZ2aOadsx49+0LScxHkEY/yYWNFRqsTFvw==","shasum":"5a55d2ae7355e9ba97af0a10b754a9749fc16169","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.37.tgz","fileCount":7,"unpackedSize":4771,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3N98CRA9TVsSAnZWagAANt8P/3YX4yvRCgrjfiUCByB/\n1UyVr7QL2JWb98NunzZQ9bg67dN9ceeyjdDCyJ50Cc2id7b344hVTtjbJH6k\nccTgdmKRDw8y3ZB1V66AIaokQXi8GGfOnmOTGd2iwUqCrKdB6Fg5tXhK+2Me\n5SH8yQBbFdRbuMTEpjLKiy4pR1+jOME8DSKBC5fGFJYAgkNkl2/gi27MUJHB\nodda2GOwkU8hxaa7k/Qb0Nnm2k8TB1GhTiy2NsxZoUPoggrNGagwukpG/VE+\n1FzKgLwg3wzEJd+y+gkmJWTJP47rqPvAs69aXvscO0o8dMvYNdsQJ+XPgg0L\nmHkp06glDYMws7fqMpt3Avktx3Q2Ja7xfdN19hTfaIDnifUR2fMVZWwpAtWK\njP1xAd5XRRPf5pF1hwDtlNcCACyt0LsEeJctkCT36Pey55uty+hPpTJXu65I\njQ6LD9PBPE/nK53BykDoGHw4pfnwsQv8O8jr9Yhz+RWko4Wjb5M2KUElPSyf\nEsYNIsO7fneeZ1NQ7WoRl0C0VaAUp5zkHaRdEBeK5olGI2swV5mJRPaDDQVa\ns+sP7Q8jE8fzLluSnOiz4WipmnywoWTYZH/9PYVGSqL3AbL5gPBvdy/d3ySn\nDI2JopP7k1VeFuSIQ1D7yTRSfKSwoeoxiOMU28v+WOtf5kR/YTqTkT6smR5/\nm6g7\r\n=AvHs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEOag9Lu+t2nPvbEvbTSArYRCTSSD8QYH0p9orMYbO8uAiBZvdLOPUJgzVihmmANwONf4OZOt8Xm6AdIPiPbapC+2g=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.37_1557979004133_0.02636500573070566"},"_hasShrinkwrap":false},"0.1.39":{"name":"@react-ssr/express","version":"0.1.39","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/preset-typescript":"^7.3.3","@types/express":"^4.16.1","@types/node":"^12.0.2","cross-env":"^5.2.0","express":"^4.16.4","npm-run-all":"^4.1.5","rimraf":"^2.6.3","rollup":"^1.12.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4"},"gitHead":"1413525bba7df13538d33c5931fd2f550c66c2aa","_id":"@react-ssr/express@0.1.39","_nodeVersion":"12.1.0","_npmVersion":"lerna/3.14.1/node@v12.1.0+x64 (darwin)","dist":{"integrity":"sha512-PkWSkkhTKnS711s4StyS3KXoeTuRgsNAZBm6d7Zq9tpgeAHC8h9oeT4JgCeazl7eFNINcM+JFxMeWG/xXvptMA==","shasum":"183096cc9b0ca7f55781d562280fa7b24b303962","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.39.tgz","fileCount":7,"unpackedSize":4776,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3OMACRA9TVsSAnZWagAAEDQP/jv9U/fRGWCf/v9KPYjf\nlHaWpciDO0E9c9klpFZNFRpbpyge88mqHh87df6Qb1DNwMDWxrXnnH6nXaMp\ny0jKnzHdI/DySpypYLqgrgHKNRC6TcGrfI+TXzyxir073adGTrCY5T7zIALv\nNcU7a6JNiK4kpF6QCa/6XdtMaEsc6X7gzoOqTYDa18gVrzTLIFTD4B3iBUAa\npsLBmAc6309CclqFXh/k8J0iyXyph3dLvUMmEBcxuVCd1id87G21dqtSDnxn\nXF/Xey15u+/fw3eoMxD4F//C7SKCA+PsEt0bAYB07VxZv42yY2vTR38Y7xww\nqTSXbecGH6Vi1QvIjaYMvrbvLqSPjq2ChItVMFTjYRH/Nb1XRbNgYLY0FBEN\nLqmIYGzepoiNdn9kZ0pv8zpDx0gCmCnjaEFktAk0zecCibahK5qHzsNP4UN0\nhzdZ/VZWO6C1KTwNInGoktE2p1eRLd2gmb21n+3BPXNANRnBFFvuZs8Y7ahK\nb8MlY9OHs+uWAJacnY3HYumVegZPO1otQ7KrQ0q9NjC+GqXpktzfYBly1XKH\nqmSTHdc/tMXxQq0rsknBTw6RNhvEG8+Lc2X0gG1bC7yiwVJtGh95UCa3bfTz\nq4UXg0VX/XQ6qdRd4R7oDcCMj6e16BRT/coHN6AteJXxmSDSkqWlSh9C7sy7\n4rVl\r\n=V51N\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDAofsJNJMfn/64dUD6ZsdvrwMCjDtlwFSYZLzpmzwiuwIhAKYZPrEZW000H77B2aZmhSIEbBIUHNXGFUZbiwh4s5s/"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.39_1557979903499_0.5125600426522787"},"_hasShrinkwrap":false},"0.1.40":{"name":"@react-ssr/express","version":"0.1.40","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/preset-typescript":"^7.3.3","@types/express":"^4.16.1","@types/node":"^12.0.2","cross-env":"^5.2.0","express":"^4.16.4","npm-run-all":"^4.1.5","rimraf":"^2.6.3","rollup":"^1.12.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4"},"gitHead":"402099f9d40992498903b2662d91dd4cd079e75b","_id":"@react-ssr/express@0.1.40","_nodeVersion":"12.1.0","_npmVersion":"lerna/3.14.1/node@v12.1.0+x64 (darwin)","dist":{"integrity":"sha512-yIGONCXWfvqEHsVt9inxlfnnChniISdM/5UbYYa/+p27E4TxCwQxltJ+GwASiVSroD5AUEDihpnAJaQR9WTqFg==","shasum":"bb43d629e494fd90f53b9a2e2ca74da283f4b564","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.40.tgz","fileCount":7,"unpackedSize":4869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3OU3CRA9TVsSAnZWagAAv2wQAKMPzWYOFJT+3YzIEBZs\nwf40MakQUQbLHnXxsm3AtS4uK40lZr3fle8KR1ul7Mb5lfyIB5vXHYPLMBJh\ni1YWfIF+o2lLOeyFO+REsPlgx3TtC6eBTZy3YIFMP6jV/l0s6gjxmQqf667j\nEFrU3CTfHuWy5BSkp46eU2alBQEU6RiLtDQzCTeLm0FFb8fe9om1nBohet6/\n9Uds9nmvzzqJqYNHOMFVyzhCDctMDuxknJD9QL8LwUOgWop3YwoEvzACYr62\nWIO3KkmjrzgVLXnbVajn2pTkzqwqBtLuQ6SwR/hDV2fclaZ37l7iNT5tQDof\nr1cXFYjMNWuvziwnOfE9O2fFZ7LL2SRxnzHMPWF2S82+cfGcYHyb8DdJcmW7\njKVVFqIqScfge0TE2t8OxgvpvpsnVSgcoeP9Ppv6BDE7bfo6FBox2gcY8ue0\nqcFzodECcYxLm2lEs3aXiGsjtLVO+nRltMi2j7cxnbGn9HKTk/M2VwCdZfzn\ns1fHn4DiJyVyAX2GU072Bq2l3ES5jaoh/XDH06lG4M+zN4qAETAuKb+9jqqu\nvVwUOT1qf2iOuiMQXlarNewahjrk0aHprzlGZuXj8o5l697hM9yD/VJMrz5r\nM1GvTirOcbB55OqgCoQEIRqcTI0qEUQsUqCd4fkl0WUEU//1K1IokmWlABv4\njbR4\r\n=IrHx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEdapGHoqGUvID+fDypwAeN/5bguVtZNaoSHjeHm1WDiAiEA9sP0+M0E1u5Nq7Q5FpkTiLH5USACr45P3LaBXJbGDow="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.40_1557980471263_0.22590533121859369"},"_hasShrinkwrap":false},"0.1.41":{"name":"@react-ssr/express","version":"0.1.41","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/preset-typescript":"^7.3.3","@types/express":"^4.16.1","@types/got":"^9.4.4","@types/node":"^12.0.2","cross-env":"^5.2.0","express":"^4.16.4","npm-run-all":"^4.1.5","rimraf":"^2.6.3","rollup":"^1.12.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4"},"dependencies":{"delay":"^4.2.0","got":"^9.6.0","ora":"^3.4.0"},"gitHead":"c9eeab18e825c82f31bf6c909920812831615381","_id":"@react-ssr/express@0.1.41","_nodeVersion":"12.1.0","_npmVersion":"lerna/3.14.1/node@v12.1.0+x64 (darwin)","dist":{"integrity":"sha512-TZM2C/xP+crzNpIBzd+0W7fLej7eaLK15k49qjUX7xLhbfCfXVRfElYNk1DeEOsgzAIcBRYEKI4BJ5P4Dd4wmw==","shasum":"b3210b6109182e278d43bb1df1b3184e6760acdb","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.41.tgz","fileCount":8,"unpackedSize":6168,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3O0yCRA9TVsSAnZWagAAgykP/0W7IpVQTx1Nnqf+vES6\nqo0o2CbG58dOsaDsxBV3KfSjJYxEYu14EKlypOnkafBF0orJnBG6Jauv65Ms\nSLyVnzsbkVjvBhh0/xjVG0y/osbjZYWVPmu3GoEkJbRE/mQ7uD7Hem8e/8yP\n9qAkDTqCjoTeIB3bbLLZZv7qwYbrMs2o6aLDQCkA0Vf0ghQSgnqofD98uZd1\nbEwG44v1pgQU5GkRD0EJyQimxx1oau5yUpBMMWZfx+sMX1qbAzXKiIjltLNY\nwPbaItWrXRxJSxfhAcUW+jL21R9PMeUecUAPya+WyPcIWK21EEtz8sHyHCP6\nSx/f2t7ZzGjc++NFTCYeJIaMGttnupIj6Ae80OttaHYzOPAk0y/xmllx8Qyq\nee0kvv4k/HMLJOVDOPOYQnDYqyKRYpj3uIjUw8gbnd94SsKgL8lyBpTR8IsE\nfkpoDH6d70bXcDyy7STjhXhUSjSyBX5AXV+S3Ogy7wHc8GDxkRfIN7d3Lwrr\nbpwtGx6G+8/bgo/Qi53zKulWPCtsGZBbUCFYb5pMOLhyo+MU+4M+2laGAnf5\ny8JmG+2prgkN3ghCk/FdmbStM5X+GjqPhezuDIVjzdLV+HYWxFDyEcWWxbkD\nj7K2RF3QKbulqZATFYjxVEgrcQLGnNe7y97xp8rd2Eidfk+7LHU0AfWgjZiJ\nx0BB\r\n=yZHg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDRZuY+UljkoOlPOqDs4MLCTGPixnsQO6GZt/IvWH9NtQIhAIIU3xEkQ+QU7/z+IQJyUyTS4IRoRVUVLuivC7Xcz1Hg"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.41_1557982514209_0.6010025858023593"},"_hasShrinkwrap":false},"0.1.42":{"name":"@react-ssr/express","version":"0.1.42","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/preset-typescript":"^7.3.3","@types/express":"^4.16.1","@types/got":"^9.4.4","@types/node":"^12.0.2","cross-env":"^5.2.0","express":"^4.16.4","npm-run-all":"^4.1.5","rimraf":"^2.6.3","rollup":"^1.12.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4"},"dependencies":{"delay":"^4.2.0","got":"^9.6.0","ora":"^3.4.0"},"gitHead":"82659ebbb580468770ab949bad2c46cd3dc5502d","_id":"@react-ssr/express@0.1.42","_nodeVersion":"12.1.0","_npmVersion":"lerna/3.14.1/node@v12.1.0+x64 (darwin)","dist":{"integrity":"sha512-YpNYhs5KSFZoOejTrcxplzBLUi5FrHBJXyDIiOMo2PbJouYbiKdI7yaf8bwIkmalc7OroVGiXZgS00Cc/aP8Mw==","shasum":"ce01b2510fa82ec28085d1b42cfc32f8c021fbf5","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.42.tgz","fileCount":8,"unpackedSize":5166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3PECCRA9TVsSAnZWagAAK9cP/0KgOdATc6zFzbf0vzSJ\nfcBxJtX3DOxFSJ+KFLJ8CFnfvYWTQ4BQDMgEOnyRBZwGJcz9DZkcoX6o21qz\nhIILpOY3U1J3lnz1Q7ef6+dG0x/KDY2qGSVs4t4p0syu12xUC2zpGBH4w2RG\nl6UvbEm9HYD0VdIpCTOwA/OmL8dtPky9pOFqgghwTKYjQrtFz6XhKLen+kjL\nlG09ng9EIBjOOD0ur8PhoBrRGXXdO3k4/HgAdmr08DgaX5Ie3p4luTKVeH0+\nzHKAwOXMkcRJjKU7I4meVclo0KQTspkWby//AuYI8/eOvsmd3lbDdV1ao4Wt\nwuw642uI50TpCrfnG/lxsb45XNdGDmLh8GcW5JbwAdhcG7Pt+d9UGfPohdJM\npm2OETiowrJ74rk/OSfd4Fds8iKAhH5TOtjLu7gJ1HTkYjJq4uDEBhLAnlpq\nIeAonVN6IS8xbdzOKnb85+cGI2c1CKzLeE3ALqsGdHazKUrODC2PEkjPZdJs\nsxJrryUbCV3mxIRG/tKpMRMz52anf9I2perntLl73R1w7elXX/iCb9tVKuT0\nxdGdObSYm+W7WlugEsxvQgvJF7Ngrv8sooU38XoXU4xuyamMXPCQLSvfyrZZ\nnweeCA6mFyJz1KS7Ah6to1Xk5/OAZpeu8i3S33kXLPzQLAVd1aiUz8te7vjs\nwqa7\r\n=tUMy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGdvoYrD7q3UkIuf5uG0Aymt5AMTcAwcNrjiWCB9NuM2AiEA99vsrWdkrkwbqbPzPGUj2ZkmA2/694hmyv8FwegKUQs="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.42_1557983489914_0.7780523273476683"},"_hasShrinkwrap":false},"0.1.43":{"name":"@react-ssr/express","version":"0.1.43","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/preset-typescript":"^7.3.3","@types/express":"^4.16.1","@types/got":"^9.4.4","@types/node":"^12.0.2","cross-env":"^5.2.0","express":"^4.16.4","npm-run-all":"^4.1.5","rimraf":"^2.6.3","rollup":"^1.12.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4"},"dependencies":{"delay":"^4.2.0","got":"^9.6.0","ora":"^3.4.0"},"gitHead":"5a024793841c1b974f304227bdc8b90c30096616","_id":"@react-ssr/express@0.1.43","_nodeVersion":"12.1.0","_npmVersion":"lerna/3.14.1/node@v12.1.0+x64 (darwin)","dist":{"integrity":"sha512-0SkNcvsMnJZPMsWJSzUZi54alPM+2f8cDrW7FMTxxfjItmvb0eFAN+scRbubc+GDXmjwriNtScSLJPB0YK7S4w==","shasum":"57b4dd54cdb71ada6cde2221faebef9bb08e160e","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.43.tgz","fileCount":8,"unpackedSize":5235,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3PVsCRA9TVsSAnZWagAA5dsP/jBiBm/aR56DapwjBjSg\n06Dffvps1CQlkZLuNZ3f3y1lOGAB9EnYrA4BBMggApo7faHrJh/XPwbWcAOC\niBCCAj7mXQBS2bKjcWXDHvyZmF/T1zcIxrMBTDxBaKRWrfz1lmVsP8mojOpO\nVJVdNJVCzNhG2hQgddgzfKz2bPHvS5puyYtmtvm2bXLoafsaMY8a9KqYFn21\nkzOaeihH1wQzarKDxBnCYBm21HYEHWgJzFf+YAJ6+qLmmMdV84BalfmB5Lj3\nEA7cCesfR2d2fz6eJSIxfy/ZEJa9z0g6tuhpJzAInEX9Y0KQUEkOIV9eEJoO\nvCas4zx74Rio+iDQ7qi8FGUJoIATl+fxHeO6hkk6SC18ecM9IKaA0jWrKIdD\nz7YZoxxGP3NoLrYZkDVIQKbgUE1UIXqdwcBGJb40q1vvzwqsaafK4ZU9KiK/\nEM+dYCyHq6988lzXYUCh6zwj8PxlOWv+Dd1zRZVmoY8OoriL6bl+aYjIIhf1\nTXs3G2iW/+nM0boh85hyQcVdZtw82BZ1pmYnClAmWaMThjJDDiNLkNbN5310\nBRuXYGXQLCFZTGNgxGSjGQ0Uv1OA3LQwqN2k/NOwvl+2rJca5/caXGERKNsc\nD7SztrPxBhw8VN5Cd9+X+7gFY9me5T1kpKsFG34AHEca3IpzYvK/9cx0yp6Y\n+CxM\r\n=2U3O\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFio0YIzTQI6lpEx8SLOtxr/7HS/VdcQchjVL+1gAWJbAiA6BQVAWvkub3zGUAfy79AYiGLwEBgHiU2eWK67lG9XPg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.43_1557984620351_0.02825972516200026"},"_hasShrinkwrap":false},"0.1.44":{"name":"@react-ssr/express","version":"0.1.44","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/preset-typescript":"^7.3.3","@types/express":"^4.16.1","@types/got":"^9.4.4","@types/node":"^12.0.2","cross-env":"^5.2.0","express":"^4.16.4","npm-run-all":"^4.1.5","rimraf":"^2.6.3","rollup":"^1.12.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4"},"dependencies":{"delay":"^4.2.0","got":"^9.6.0","ora":"^3.4.0"},"gitHead":"d100bb06cf3b1050127a865b8776a91ee7989a3e","_id":"@react-ssr/express@0.1.44","_nodeVersion":"12.1.0","_npmVersion":"lerna/3.14.1/node@v12.1.0+x64 (darwin)","dist":{"integrity":"sha512-al7an5urglxDv/ijSuuW/b4dS7/9jBZpFfy/UNuspxGg3qMVsoJ3IuoBDj+MlI/tGtCiBaMHiPhmOWWG2VEoBQ==","shasum":"2a677ed68b791874f38a894da2156e73a69037d7","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.44.tgz","fileCount":8,"unpackedSize":5250,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3PYdCRA9TVsSAnZWagAAHjgP/3Tor447v8rTf2KourVc\nrbBipAjrJy/KJQBvx7mmji+mUJ1ZN/SoPnE4pklJ3A3w6JnZf3epUo2MZ1NS\nkJEXfXgkovT9JcT2JcqgkW00o5tLnfInoDpTMs1h8QPYUvjbS/AFldtVSGgu\nYlYerU5nlBjiW2MS7hEI4RqVchTUiumJPUOdbyiOPw6jL2Fwx5NZNATK9u0W\nL5SI8WCK3NrOm+/bnEPGG/spOsXOOlM56kC3FL0+2I3MABbfwvZ4R2LsECPv\nvPV1QHEDUXoQbRqCxy/BVnm8BYAoOBC8SrBjSI9/UU2W/JPAreBmFwmuB/ra\nC6gn27T/iQZE56zVJcrgSjJfIpfONxphzY669odEmhpfETxTUgniM6Y2gP/+\n4kW7193jAX6mwQ/sisZo7qFq7UNRPMWVTmVkRiEc5pr1sd+DpIs7QJg9CWVJ\nqqkcoqPGav2Bj/sIZWyh7MK2M/hEhF+Lo6YbVqbYrW1fUzoabWjTVCYjubcv\nHu4lcm1tPVXx20PWXlEw/32juk6l5CIpwHlL1kRHYaSQtjBhDlBaWlqCAYir\nZrIil6bUhHW8NXJL+FPc16Q+mB74q+8VOsACAXG49mOcPEvY1GMgtXIJqm8R\niPDW1lK012Ih8rf1griMVEx65XIESplKZ7dLilyi10PW7ylNzQ+0fnGRyFMo\nJTyr\r\n=XLd8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEMCIBgHOpp0nVgGGpnJMU1ooNzL4SOCIRrj1Z9RP0tI7C9oAh8WCXEyDfXFHGHDFkwdZkyEPhafsOKwHyDN8HjLgHXK"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.44_1557984796650_0.48182254578942474"},"_hasShrinkwrap":false},"0.1.45":{"name":"@react-ssr/express","version":"0.1.45","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/preset-typescript":"^7.3.3","@types/express":"^4.16.1","@types/got":"^9.4.4","@types/node":"^12.0.2","cross-env":"^5.2.0","express":"^4.16.4","npm-run-all":"^4.1.5","rimraf":"^2.6.3","rollup":"^1.12.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4"},"dependencies":{"delay":"^4.2.0","got":"^9.6.0","ora":"^3.4.0"},"gitHead":"bd26972a35ff59bb7cf49930ead5dab921cbf6fc","_id":"@react-ssr/express@0.1.45","_nodeVersion":"12.1.0","_npmVersion":"lerna/3.14.1/node@v12.1.0+x64 (darwin)","dist":{"integrity":"sha512-rj1XURZkV56VKdCfkjHq1XfbY+EUQk2YOCuFw6f+ClL1BFUo+YmQlYhtJrBYI75HKKVGpccwiA8bwd69ot37GA==","shasum":"685c22971ddbbf5c7ae5b62eebe95c115d5a74b0","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.45.tgz","fileCount":8,"unpackedSize":5120,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3PeFCRA9TVsSAnZWagAACxIP/1Bx0DdaTTkRreRsnAgf\niL0RZlGMDKag55sYJy13QuDEpp2bfHeOERLgrRf9A2WcU+XxZ8xTE5WJiGje\nwSo6npyKKY9WQA7n858xkBiGzNgWPwB6PJHRNhn8IIHNsxf/hfVDZbjaMWFi\nLDxP9mgoLAIStnG9LUgNKHB+REMR5uIu5RS1q2cCwzGmMXcjx+5Sq+TUfAyh\n8R5yNyDut45h73go3Gm3rVps/fbGsB0Ebe2F8nKBC7gVOuzwYMja0hJKO/vO\nywJDq2H2nXwU0TCjZRe0z9Nl6n3H2BuReAwWaFOAej3Hv6ENkK7+C79DR23n\nS/71qv+ooGvQWty6sXpD5TgVOM+1iF3MpJahM7hspK21GhO3Fl+ndgEXA6Xx\ndGRm/VXjfSWXpHCKx2nJzpGKLUUSXv8MjafgXhD/iZfXZwynm2vhRinqSxBY\ncgq41vwlOJLMe+SGqld7nA0iyzI36jTLr5+Rr/TX/STQye04RFR33xF10Pal\nwlkEBC3/QsmXVyhR9yWS/eWrAIblOq7GuNRNc86pWd24ggsBq09DcqlEMtMR\n+bDCRq0Nu0IURZrTL+74pU1WzwINGWvBJpbIbSV/R360f6BXmxu3tQiaG9uH\n4diHyx6GIG1bQfCa6MPGufRPBjigZ0J72yuEX8hqzlFINBtgJWFYpxosHYSR\n8Gjx\r\n=nNAA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDVkLebTMcWC0SJIajgNXny83IZ2OdvKLq1+DyYvPbg1wIgMF5GxBMu1rRhxj3qHJ9I+fTfsqTU7CJLFLGVsHWXfMY="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.45_1557985156442_0.08186434345825955"},"_hasShrinkwrap":false},"0.1.46":{"name":"@react-ssr/express","version":"0.1.46","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"bin":{"build":"bin/build.js"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"arg":"^4.1.0","chalk":"^2.4.2","cross-spawn":"^6.0.5","delay":"^4.2.0","got":"^9.6.0","ora":"^3.4.0"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/preset-typescript":"^7.3.3","@types/express":"^4.16.1","@types/got":"^9.4.4","@types/node":"^12.0.2","cross-env":"^5.2.0","express":"^4.16.4","npm-run-all":"^4.1.5","rimraf":"^2.6.3","rollup":"^1.12.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4"},"gitHead":"11e11b019dfa0705fb24211df8c24a46a8ffca07","_id":"@react-ssr/express@0.1.46","_nodeVersion":"12.1.0","_npmVersion":"lerna/3.14.1/node@v12.1.0+x64 (darwin)","dist":{"integrity":"sha512-n74HpYneLfVi8jJsMTI3F4TlcVGOaAAyHAODkeI1u0CvrhKrS6itR9tAayb4Eu2IO1tnvSPes7O5X5QkAQsfgQ==","shasum":"3a9617edebf100e942ca123529e57da8cbfc4c12","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.46.tgz","fileCount":9,"unpackedSize":7910,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3QbACRA9TVsSAnZWagAALHgQAKL4lH5dOqgUmX0YtnqK\n2qiQtRz5ijfGjsds+fY/WGw20IPuz62+NVsvWraGqk+YyFVAfGTnZ+qYZ5YP\n40kEzHGCpjEJqvhHI0QfQUtFi+Pi9G/kCt9lNxUNVS0yas+DALKu7F2mtIIn\nn+1+6wTMyRRXoyKaHPyUKed2/q3dRoEyONgbb8qD/szb4NILH5VMk9peloel\n69ykgrh19mfo19svkAAmW4g3ekAaWbwV2IwGyJvv67wXh/02ppPw6+FH1daP\nBNgbtX6hYYYfEWN3FS6gxxZ7BC16/UDbSV+TITTbC5zmBR3MjE99oEVr8Eyc\nNdbSjxIhDVcMH8vq4R5czL8eaHe4UVhw6WeHCETbRgNIdbZ8E7Trk3w0BPYK\nMUagV2XhYUgYCqlrDCRdWxOCKeusL4I4iJgslwoGd4BK7Yh3wEJmgp6xEMBa\n46/Ac9Tt1XxAMYfBOyltt6symY8qVaxs8+yVZBAo6EdWngKLrRJWBThOhUUH\nh5iEQXkfEsYOMbC8ofr5/ASLAMRrdHFaUwdFpWbgjPhGqaKhtK8w3Y2bsleB\nfeydoze/9NFd98UjpMmW+Hj0COVQlyC4gULoi+Fh6JF6K6isRGo7nJ8IGac1\nspd/ws3KDWmzd82Rgj2qOiYx9RhsZUnxzhXPvHCtgcDU+68j1BX3tLGkhZJ6\nhxrN\r\n=HiUJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDVnkRDlQ2+6f2l78HhZqQvkLWqH1Ym+Fgu2GKlCHkPpAiEAxAJ7vONaGzynlZwm3SijzvNofjHFuWqKyP1j+7oobnU="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.46_1557989056340_0.38684358750766146"},"_hasShrinkwrap":false},"0.1.47":{"name":"@react-ssr/express","version":"0.1.47","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"bin":{"build":"bin/build.js"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"arg":"^4.1.0","chalk":"^2.4.2","cross-spawn":"^6.0.5","delay":"^4.2.0","got":"^9.6.0","ora":"^3.4.0"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/preset-typescript":"^7.3.3","@types/express":"^4.16.1","@types/got":"^9.4.4","@types/node":"^12.0.2","cross-env":"^5.2.0","express":"^4.16.4","npm-run-all":"^4.1.5","rimraf":"^2.6.3","rollup":"^1.12.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4"},"gitHead":"3bcd788de92df95c8b5494424fd238542d2bf9a1","_id":"@react-ssr/express@0.1.47","_nodeVersion":"12.1.0","_npmVersion":"lerna/3.14.1/node@v12.1.0+x64 (darwin)","dist":{"integrity":"sha512-ZYWCN2R3gr2ohLPsFRzy+EBOirWlEJwEqnNQWj2TSTtYzclDXIFjEa/T6AbNrCuu6yKQnEz6FeM5vmYao2Ro1Q==","shasum":"f6adb512b0ef0a8c87028ca6dcccff5ff43550b5","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.47.tgz","fileCount":9,"unpackedSize":7911,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3Qd3CRA9TVsSAnZWagAADdgP/1wcysTYXrPjX6Xt5VJY\nWn/YnLpm9YD3xwzWV4DqnA5qa4b5t2j7PtjI0imYWP6405YY1wrt03sfj/XO\n1ZpPq1Pd7wnH/5Yq481BdioC90b3vfGxUUVUGDGZEvzjYUlBO5KIKrpGQvK5\n5dxCbE1AY4e9pZfJ5jANF3V+rnbpnIhEmjSlmxIHwuEUg0TUmeA2niFIxAw4\nXwyMvR9hXp8VBKI4uO1h6vKHDumEWnPtSLa0xzk/9scFdcMpiUisx3GHrSQv\nXYdOpdca9DPCXL85LrrmH6ylHp/M1WHJK7Cr4QmG7oRNevo1jEvnDJOz/KU4\nXV/7CA7EStZjfyiitsEaLZR+kJfw0U5SY9P2CaZwSdV6CPJ8M+4H19AHoNIY\nVhl7t38nDjaHKk+1xoXXW0N8WrsOBblRJ0oOPjdUBlTlCLEGi21aOBQ6AixZ\n0h66l51FQ7mQXEUf0cKGHPHlEg9jUfdSAsoQNWUiNz06MT6o/uWgmRd7bv2E\nsEFoUxUJZXZEGcEXbQ+aRRh68f7DwjR23zVJScloZHeWYXGQZ9sN/ITHXcni\n3keDR8hcGzvVH1v2iPixMXz5wcgPJZ1PfdeEaV+Y+ke2tWnlwEpN9NaoeX8I\nMH7R7VIlIspYlnrhf1ivQ00JKoKlsrAZd8YpSsV14GoLQYHMTnSUOcAUK9Mw\n4h+S\r\n=ti1r\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCxvv9lVMQW1sI03UmuOPr3cP8slhfLHclVT+u5BHmD1AIgb3IGfQXwrnl2dqVjUT7alKCjRIZVRYWQdksRZpTkJo8="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.47_1557989239041_0.5618169589626751"},"_hasShrinkwrap":false},"0.1.48":{"name":"@react-ssr/express","version":"0.1.48","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"bin":{"build":"bin/build.js"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"arg":"^4.1.0","chalk":"^2.4.2","cross-spawn":"^6.0.5","delay":"^4.2.0","got":"^9.6.0","ora":"^3.4.0"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/preset-typescript":"^7.3.3","@types/express":"^4.16.1","@types/got":"^9.4.4","@types/node":"^12.0.2","cross-env":"^5.2.0","express":"^4.16.4","npm-run-all":"^4.1.5","rimraf":"^2.6.3","rollup":"^1.12.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4"},"gitHead":"006ac04832fefb5e11dff04fef26b4cec4d0059e","_id":"@react-ssr/express@0.1.48","_nodeVersion":"12.1.0","_npmVersion":"lerna/3.14.1/node@v12.1.0+x64 (darwin)","dist":{"integrity":"sha512-0SOGbL4Gg9fbmTS6VCQOzeLB1EUX1R/I4yTZ/WvleEvMyFGRwwzxN0TAknpisGARtld15/qPoxg/xy5oJ8AHBQ==","shasum":"d7ee9aa29dacb5703755cbf3f32452a3b18746ca","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.48.tgz","fileCount":9,"unpackedSize":7691,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3QtoCRA9TVsSAnZWagAAwd8QAJSckBRUA63pRThFOYo4\nRQsj9WzPYUrSEKt30bIgzoqCRXMxRHYGsR6sQg/viOFJf6RqA/qfr1NjNjKU\nnxzDNAPH/lpiHg+gdo401XkFyyGIdTDLCDHkqnkbN3KcjJqLiapdz0d0dggG\nQLZ9JFggv2NTGYDkZktNrAj2ug6GOnhqR0piUj1CKhGYXTGqswFKdchg/ou+\nXe3tc+ikYtSC3g8829OCW/Lg11YQnyGFuUR9j73m1xgKGtO2qhLjpGjaRBCL\nY6ovuV/7y2n+sVgRhyGNrNvZNfdTOMassuCKRVoqveJVgk+hzt7oalm8WtaW\nQrxfCRCFrYeZhzqeVn9xugdc3nRr3aFaEPw+9GkJ2g6kk1hQrU2b+mQq5NYZ\nHGXJu4fYHzlW9tUgOSoYNpqhkQ1CLHYYKcMn5RStFYP2gxhqg+caUvFYCvVF\nS2Yuy8FLMnFbPuRk+4kCwLxy5Jzv1By9wkhhPS+l98XcI0YST88Kq7a7vJtb\nkwUCGk/9/56YtTTEyg5K8ch1b6Cz2psr0ghkL+kntgWfuiEOBEJiDDR17jZe\neQSrrHQK7g24rFeY1RuX6FVIiFvNdEyeOJmIyjymwGC5ERCbTjHQNjAixAqU\nhJSp0B64T+8ZV/N3HsxXWk7lym1dFjsShpdnWZiOVL7flCcODa+7K6+jzLrY\nYzez\r\n=m018\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD8BWu9fGH/TvgeVDOosdc2M9Gil1kCY1SAp9Lq7j21IwIhALHXqWctCJBT01CtPRUPSVXIe9ZjbwDyxEDrUoFRFhKG"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.48_1557990248049_0.6281339502197911"},"_hasShrinkwrap":false},"0.1.49":{"name":"@react-ssr/express","version":"0.1.49","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"bin":{"build":"bin/build.js"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"arg":"^4.1.0","chalk":"^2.4.2","cross-spawn":"^6.0.5","delay":"^4.2.0","got":"^9.6.0","ora":"^3.4.0"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/preset-typescript":"^7.3.3","@types/express":"^4.16.1","@types/got":"^9.4.4","@types/node":"^12.0.2","cross-env":"^5.2.0","express":"^4.16.4","npm-run-all":"^4.1.5","rimraf":"^2.6.3","rollup":"^1.12.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4"},"gitHead":"4e2ef5c9e91d7cc99425d0e3f3820ec70c11a76d","_id":"@react-ssr/express@0.1.49","_nodeVersion":"12.1.0","_npmVersion":"lerna/3.14.1/node@v12.1.0+x64 (darwin)","dist":{"integrity":"sha512-yORdTQDNTtabdOPFBNK+6RWmxpJHsps01MWa3RHeGapGztRa6eQPBRG4yUV1LOcC+YiatnUXxb4J0zPK9TJHbw==","shasum":"8efe023b992d3078f6c0e75a57f168cda2a9733b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.49.tgz","fileCount":9,"unpackedSize":7756,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3Qv8CRA9TVsSAnZWagAAq4YP/2JdgrDL//5iFUdySQZ0\n5D6EbIU6tDUFFHa0VdhD+8KmC/4iCSRyvmJ4PwpECGqQDrtyVo3aGT94uSYA\n+oB7eBLHrXMH5mI4KNm0eAtuCwK6113jJEXORmMHHbfii6QZkUAbE0dODCAI\n2NFDoNtBkl1ZsaZqRG1LWUKuIHUjhkgS3Mcaoks/H7VzfqDjHYeRP5XvRf2u\n1B7D99XZJ1JBcOMe6wAoZC+4ugHjjFu3TqFwJS/oSSDVb0103vAe4uGkTYQr\n2fkGkC8Y2lXHtRlP9JWakHpy/ixpSPv3rTC59HLMtDkPcgbEu5q0UYgKZFBn\n4/ghB7yGqXYkj5BdOL0jUBmVUc8JZT7jJq5j3oW3EteM/3KN4tpIZ6pvlz2x\n3CAWCwgkn0B33H6PA8ij0JrVjNtUwRE4+bZ0qeF9Pr0Q+qqEtkj7H6KhVU1F\niva4Z/T8Qfwtb4ZpZ1GY97LHkoXtF2GrmDHT3T9ks4YIN1uhy28iK933bT56\nbtFeODhWEUmzeb9/hUtXzWGBxgaXEQIQ/xeTw3H7z8fOfyTdkUZ5vgnuubkH\nBG2RwUH7XELNIpHEsZDkjoTpQ6Y4DLbU+I8KJHvla72UK/TPxTwejU8c83E0\nl9ScV6l9kEV5F7KA/QbDRDzbq175QU5DGHvTQrxCeqTocAF4QFgzHlybavdt\nP9f2\r\n=4RXH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDtYQwXv1iudimIlWSgR37CGIq//ymoo+Kk1mje5SUv3QIgDM7CULeiF8mxjg8Blr24XS1tFyyhjQ1uhJDw3bIaUho="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.49_1557990395455_0.6826164417052756"},"_hasShrinkwrap":false},"0.1.50":{"name":"@react-ssr/express","version":"0.1.50","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"bin":{"build":"bin/build.js"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"arg":"^4.1.0","chalk":"^2.4.2","cross-spawn":"^6.0.5","delay":"^4.2.0","got":"^9.6.0","ora":"^3.4.0"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/preset-typescript":"^7.3.3","@types/express":"^4.16.1","@types/got":"^9.4.4","@types/node":"^12.0.2","cross-env":"^5.2.0","express":"^4.16.4","npm-run-all":"^4.1.5","rimraf":"^2.6.3","rollup":"^1.12.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4"},"gitHead":"ebe930e75a3122cd0832659630fafbf1efb44701","_id":"@react-ssr/express@0.1.50","_nodeVersion":"12.1.0","_npmVersion":"lerna/3.14.1/node@v12.1.0+x64 (darwin)","dist":{"integrity":"sha512-LDfq0jns+6dQgfeff8/Fa4qB4XwxXdouwYMqNhel0N1LucgoX+O2Kx012hTAFTgeRHownE5267oTEru37wSKgQ==","shasum":"8cece38ac1988c75cd1156b338f7c7ed160e9ca9","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.50.tgz","fileCount":9,"unpackedSize":7567,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3QzgCRA9TVsSAnZWagAALKwP/2xz3KrysMMPcXDPh3rK\n4/DZ9QG4WsJ4yJN/YijXFnJhHhYdqUcfUsDYaYudLzIXRyNAskHrveYelYKG\nFuXC4S2mYUCFoWDV641+Si07MLeIUDzK/Tzteab4rpuxiyXUDjY50UcdZAee\nSMgzWezj69QEfiPAUFSbb1bG4yICBvXjjCrZbO/ZiX+MIVwQbS9ucNRk1DuJ\nCbMVIsV6h/qn/74crdiomTKC1Ow3oGm/QjqkmUXzWc+liL23J04nkzGWioqG\nIUMl2yeDpycNHQ1EjrwOUjE8M4almB5ZlLlmLfogF8Mu+0BVMmSWPdSy1e+V\n4rohUVNSymHzjsiFell45Isn7WsNMDf+yi9b2MuX4kmLiM4sItwBkaQxQFRO\n6hjbiUnA4s7Vv5qYgthYr2faBKMeM7wVK71SM0sGAbxpKtlQw1GInMe1zAoC\ndBGBLqPt36pPPAl/QK5iS5MxdA9aXM5TjdgoV3aMgxaSPQTC1lrQjvCIiI9g\nu2A/9dv+JHPIoy6uFMCFs+6EMss3jM4C5E9fg/zTrp6ea5D/g2zOYZy+hXbD\nsuiII9im3MYoHfE2/Eu0RdewyTyANxd8fQVwtVmXPupxEh+KUMEmEzuaugJF\np8imVTeZybESq6n4XoKjH4ysE8Ad2sQnvbHmjH+xyOG7/R9tm9Qzg3rhQDGx\n+1eF\r\n=LMbs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDdO1r6lbWhn2OCkcPfTL0rm/+hAqqtZMPGTvfEluKpxQIgDNMor5evbuqBECwCIsNm6sr03iVQ1CQbjmb5ugdDLec="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.50_1557990623561_0.5351103031495068"},"_hasShrinkwrap":false},"0.1.51":{"name":"@react-ssr/express","version":"0.1.51","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"bin":{"build":"bin/build.js"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"arg":"^4.1.0","chalk":"^2.4.2","cross-spawn":"^6.0.5","delay":"^4.2.0","got":"^9.6.0","ora":"^3.4.0"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/preset-typescript":"^7.3.3","@types/express":"^4.16.1","@types/got":"^9.4.4","@types/node":"^12.0.2","cross-env":"^5.2.0","express":"^4.16.4","npm-run-all":"^4.1.5","rimraf":"^2.6.3","rollup":"^1.12.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4"},"gitHead":"a4eabbe2f20f28c14f1cc2ca6d7d816602ad4674","_id":"@react-ssr/express@0.1.51","_nodeVersion":"12.1.0","_npmVersion":"lerna/3.14.1/node@v12.1.0+x64 (darwin)","dist":{"integrity":"sha512-eMWm4l/uMTPc0wAeFSJ/ljb1m6sXZE93/7VJ71So2M61aDEWmjZ78nvGCjLU408cqF/g83nqav9NK6ZgbkI1Sw==","shasum":"b54f55b1e3bd826d0f823f0b4bf3b4603a1e53c6","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.51.tgz","fileCount":9,"unpackedSize":7641,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3RHiCRA9TVsSAnZWagAApmAP/1ZSfjsZFnl7takGLwrt\nfxKT5vxicmLU5S77RNh1ivbvrVRDr1aIVr1S2EeuGk2GWBIYP6oxvjnSMnCm\ngw/3LQNLdE0e50Du+b1acYuPS/w/JVZEKlPtpRCtyaEk+vXgVRXrZxTfcKW0\nKBk2v/qBKbbBeS9j53OqvD/iftvcUAyz5PbndApscvN1QOuwaHGDR2Yj3w+W\nSLtiwTJpA43jlinL0wP+XoEjQqKnCoNUVttlOLRDF3GYS677xDyzOC179KBl\nYPoGpivJC5seV8so3jw8j5O8V3rgBYatI6UU4+I2euBQgksZgm3saMXLebFL\n9xUbC2Rz3LMXdYmFZP9MePLZhB3nNawVyWBMSQTnZrujj20j4yWo3ZLwFeYl\nyuw56I+5QglsQJ0s6Trq3Cjps4UZmwwVj2TbC59/YSxySX2T7XM8sgtKzdYB\neaQgvfzRbD46m/2GrGCTbAAQ586XtsBvSZsZuTwjubwahYo7raYL6ggV4Cr0\nTUi2vRnhgKWhXROYy0YOHekATHc/AYnS9nvqY3kR3a4McDiw1rb7OSWevizt\nDZSvZU0a2iAsk/GmIoMtoNwQaiJNpjh8B+3c+b9Ef46kyyVo2iRjoj8X4m4d\nOk+fhsoM9ce9d9Z5Cc62gJL7DLtbNZIRjHEIJci/YeR3fg6TWXfokzwhE/U9\nk7ds\r\n=12+3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCZwc9G50fpvQO5BXQQPnKoiVLJDScGELF/hEKpMO7yFAIgFQHC+ssHf4nO45YwMGodQNModzN1Ks8z1E3pHhdkJE0="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.51_1557991905639_0.9677108296081363"},"_hasShrinkwrap":false},"0.1.52":{"name":"@react-ssr/express","version":"0.1.52","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"bin":{"build":"bin/build.js"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"arg":"^4.1.0","chalk":"^2.4.2","cross-spawn":"^6.0.5","delay":"^4.2.0","got":"^9.6.0","ora":"^3.4.0"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/preset-typescript":"^7.3.3","@types/express":"^4.16.1","@types/got":"^9.4.4","@types/node":"^12.0.2","cross-env":"^5.2.0","express":"^4.16.4","npm-run-all":"^4.1.5","rimraf":"^2.6.3","rollup":"^1.12.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4"},"gitHead":"8b8b27858c50dfdc111ff28baebf5d88418df98b","_id":"@react-ssr/express@0.1.52","_nodeVersion":"12.1.0","_npmVersion":"lerna/3.14.1/node@v12.1.0+x64 (darwin)","dist":{"integrity":"sha512-F6jIgIzevnfm7Lc/4pWtjZqCozBiFYfqzBTvUP9GjqGFpGogDoXu7NcHtD/8APx7c6uAOlqlwp9jis9Tn3LMBQ==","shasum":"bb23dc9081d5d6cebf4c36dd0ec3bff43c337c39","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.52.tgz","fileCount":9,"unpackedSize":7623,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3RJQCRA9TVsSAnZWagAA2rQP/3Zfbkviagus7OiZzjvD\ng0WQGNw552U1/OhiEqguuQs6XYQbomZ76JDpWfwSsUd8oZqPYI5NCrEh5gia\nAZhQpZAV311T7YOLxx0luFydJxwcjZ8/IXTuaN/p0JP4oQjIqFuS7RYGos9o\nYwzS0WLIbuVLfE8XP/LeUz9wDU1uREpZLDsm9wZ0i6Z1qSFH+8DUBd03NKmz\nfSHQJuTyoWvTZztFs6Xu89nzpa1KGfHZUBDhC0MX6E8HUAmv9ixlUuI/8hWf\nfB8SRV48eJn3Ran3op8KYVovpPGj+HJDab6KRCKvNzIF3Qs8xk3KwN5qi6oH\n2f1//K2stgch8Tg5hBY0IGB/oPsuBsZhidexCFMoBuEjyccuXMFIeoUymnKG\nAmlAVcFIJXk8eDj3qnx6OKKPAgzVfNvOwM+iB64brDS0giG84OzUrKTVnYcb\n4QIvEuMsTuU9mZH/ZIF6HqbyiD6XRwFwZxIP7AEsyxYKxp0J6/izwmq0EIWS\npW2N65Z4INXYIvT1JSOLLa82TTlWGSTYXuUGDldY7qqodKRyjv6E8ymjJ+D5\nbcX+acjCk7x9ah/tY1x7fOd6wwZqNMYhgxcIxgRLiJeo4ZxtWTuy39YQ85Lo\nw/bF4iV0u8S90woIlADczn/gbH386k8gjiT48J0bEseAS6+Z93Nj/F22uZ0m\nz9l6\r\n=db/U\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHqcBx/XAxhoLl8T3WX7fq3ISESCGL6hxW6A8nJmRwqUAiEAtUjvBO60UrmynXLexvxTxmxhMWub1CpEbAoMPlSHe68="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.52_1557992015011_0.40761036790486105"},"_hasShrinkwrap":false},"0.1.53":{"name":"@react-ssr/express","version":"0.1.53","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"bin":{"build":"bin/build.js"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"arg":"^4.1.0","chalk":"^2.4.2","cross-spawn":"^6.0.5","delay":"^4.2.0","got":"^9.6.0","ora":"^3.4.0"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/preset-typescript":"^7.3.3","@types/express":"^4.16.1","@types/got":"^9.4.4","@types/node":"^12.0.2","cross-env":"^5.2.0","express":"^4.16.4","npm-run-all":"^4.1.5","rimraf":"^2.6.3","rollup":"^1.12.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4"},"gitHead":"45168f052b4b83f3eb8b91109443191ca6cb231a","_id":"@react-ssr/express@0.1.53","_nodeVersion":"12.1.0","_npmVersion":"lerna/3.14.1/node@v12.1.0+x64 (darwin)","dist":{"integrity":"sha512-/CubIHascXB1X4UXNWoNpeRQePahg7DnfSK6nVDvi7fKjWbJ/n60ffHbGpYcIvuOWZM9AC/9+/A/GmvfUBNLoA==","shasum":"788afc6f645696c055d16dd68589c530ea1338a9","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.53.tgz","fileCount":9,"unpackedSize":7677,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3RPhCRA9TVsSAnZWagAA3KEP/2PYjKzM1LvZibPh+zuy\nYH+N1THBZMyXxEwLw9SgoVUpsogURVbSE9c0Jx+Q3aN30E/mE/sMX4tapy4f\noTEkgRbrF3H7raBos4jiiw/IM/L/uCDQUeAubJ2F5GajpEY9pIlPHqP5QmpA\naemCcARuCmVeq5/5Nxeb+pu3ixOvJPCMGElrKazrBQvacSOrBux91aeC7DJW\n6huG09qcvsPW1mVJeDakujSaxeAe9DDzKwAv3bscgfategKPp7DtxcHMsIRY\n/Wf9wwGrorY7Ruvd2bgUZwzRK99dDl1KsE+3NUx6vagb544sxpUrnq8nvDqA\nXplPMrewvRvIxggpCeEYFcN7lCetprfws5BDycDElr7YO41Les7Nw1i6B/U4\n0N5R+nrWZ4no5bOAK9PhfwXpdUxzhvyrs9SZw2AzNwzkoAk1oGeZvFRYUN8/\nqoV95OkU3Iy3YVXGGBdoz5it9uUKoenOkGQb2RuynEHNfc9W8I6R5VMqw+PN\nbh+wL7y1VtH9PA7qwgL2R0z7qBKn2odgTuO6HMS8uvBvJFZQunGnTolgGkY8\nCtNbrazzRrTwOo3GJHlGg89Y4UXxryWgqzGakyVnfn7xw055GcQF4SNVT+FY\nMYl6StdW2ANs7Ztsj2Kavff0k3Jl2KfJSmDexgiiCJcChVsaecZqH9kvE7m/\nUROO\r\n=wJbW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD6h4kqTYQ3KaK4hbq9AADj+EusC05mhO0c3dt1frA6aAIhAIbqS6xZIVJdRMCmEVUzIn/JYobeRUlLHawYNzVusibL"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.53_1557992416887_0.923723719253353"},"_hasShrinkwrap":false},"0.1.54":{"name":"@react-ssr/express","version":"0.1.54","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"bin":{"build":"bin/build.js"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"arg":"^4.1.0","chalk":"^2.4.2","cross-spawn":"^6.0.5","delay":"^4.2.0","got":"^9.6.0","ora":"^3.4.0"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/preset-typescript":"^7.3.3","@types/express":"^4.16.1","@types/got":"^9.4.4","@types/node":"^12.0.2","cross-env":"^5.2.0","express":"^4.16.4","npm-run-all":"^4.1.5","rimraf":"^2.6.3","rollup":"^1.12.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4"},"gitHead":"36266e9dba08c676b17b2e065a3f095badac87d5","_id":"@react-ssr/express@0.1.54","_nodeVersion":"12.1.0","_npmVersion":"lerna/3.14.1/node@v12.1.0+x64 (darwin)","dist":{"integrity":"sha512-UBZlzDg9zMC0mYSEPzKorQXM5VrU1Ms4FN3wysaVCrdfievIqMNbaMHXzXaWbQjGUk3G564h96g+0rGSKU6Ghg==","shasum":"b1fc905d18c99c5905ed88f05366f1cf7b91944f","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.54.tgz","fileCount":9,"unpackedSize":7583,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3RSmCRA9TVsSAnZWagAAmF0P/2EYK+TS0aoLJfFR7wjM\nr96oCX5C/GECKJb8nwzI2FqjGkyaRpW3vuZgmINNepf+Rn8BlhYIVS5mihj7\nylvqMpBjT1AQozXrmP6LfAKYcn+pgp2ZZmwpFutGhETqMXXIfLiungGC4Ndu\n3nbrskC0kjSSyULMNLeLSP2FzYxD7Vwp0EBbsk66LXdnxRezT7oF5Q3iWyGI\ng2yJXKjrHe9chTPVpu0JswI1AQl1Aid1UqvrJcbKukGb2Do8SEesW4fnhQqo\nojxRumQG6gIrxFDoeh7/LT+2DHO6ocyw6LC96Bkx9Vi5EtkobQFE/Mxnjz6n\nbWFsazi2nTXjVt4HhskP2c+F5UIyOT8DRU09UnEsveYhiDnvT8kVQtmtOw9x\nDS2enocIQc36LZNQrkkRhCTU5RYqHIxzPRxe7wBPGJgDwY6P985b8MwNwEKX\nDFTxwvZP/Gpic3z8qi+jyRomsx1uo62X0GhplYyAOteUml9sZ65RQUKPLxJt\nMmrsId0ayL3DXz5L4n93FNdRwvjFSzyP81vkOArQmB+NxW174/qqcHLxDM/L\npVLom1u4dU/v2HXbkJXWIQwYafIorFas2CEQcFU8B9SPBKLPJzGGE6FWvrSq\nyAC78b+Z8QtHdJHLmjuRVIrtPZ93Gc4B0dcth7Pe1oBXnu9u5XseAA9V9a/2\nW98p\r\n=MM1T\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCkk6cRhN35bBqIc7CazA5rCAhOdE5iL3i1LlPfGtcNBwIhAL6ZaPFGR42yuC6wnwfMoODsvBMrHdPcOi6o4y08qSaq"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.54_1557992613588_0.7408873097203652"},"_hasShrinkwrap":false},"0.1.57":{"name":"@react-ssr/express","version":"0.1.57","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"bin":{"build":"bin/build.js"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"arg":"^4.1.0","chalk":"^2.4.2","cross-spawn":"^6.0.5","delay":"^4.2.0","got":"^9.6.0","ora":"^3.4.0"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/preset-typescript":"^7.3.3","@types/express":"^4.16.1","@types/got":"^9.4.4","@types/node":"^12.0.2","cross-env":"^5.2.0","express":"^4.16.4","npm-run-all":"^4.1.5","rimraf":"^2.6.3","rollup":"^1.12.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4"},"gitHead":"717d35b0c88ca782eff80665e09e8327b16b6b67","_id":"@react-ssr/express@0.1.57","_nodeVersion":"12.1.0","_npmVersion":"lerna/3.14.1/node@v12.1.0+x64 (darwin)","dist":{"integrity":"sha512-t05PxYCfeAE2Ya4DOvu3ZGO8beYrKz07hmdW58FyvauJfsVSA3mBixo/AJxMkPy5KmTOy44F8XFmCAA/pSvk0w==","shasum":"ebe852efe0936abc48444f52d2fc7e4f5811658f","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.57.tgz","fileCount":9,"unpackedSize":7530,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3RnsCRA9TVsSAnZWagAAl2oQAJ/Cadthb0rZDmfq6pzx\nx7YEGO0KB/XWd/6QdFsctpVXbC8496dBy/Y15HgeAvVKnqKFxqIEOjgfpKyl\nSd9KjS+QnHaXdY8EPVtde+CAIgT0vJs4TKqguHNz2vd0oFLdfE6yp2Jgs8Ec\neRTsmNsPy9cH0b4wNTDQPuQNjumO+ZsimLm9tXnkZFMkN5m2z5AAUXtxOOpk\nN86I+BJN+az3jYg00aQYVFFsVmvFO9FQDf9qJHQDFe81dzJcj5/TZgEFxPFY\nDktsgtPpCS74dSRzblO7bQf85J5sJY8x2Spp/L3imVbUkcfD5fltL7cux/pj\nAznI3oK4mpp2qVv/M9JF8tCuLII3dxUVdCpySlp7umYQZfKs1rHUIIbFby2y\n6e1tM2WD56Bbo7rfLncSLdOTQ7mvEjKvs1TARL0o2fsuyHRAbsUi6NEr1ENe\nX0bTI9ldyC04k9QWAfjH5iDkG/tTxcgH2g/5nSxZ6lDAI50gwEzqF0HTAPkS\nzFi9SqnQ5sYlnf6lJC1CkAd4h0xC4DlUlwIprhT3uXa9i3nioaxfngOJfMTm\nBZS3lxLltjcZkzjjOqZJWDKceq9IPxcrKG4z3CxtT1fp1r2EJCpg0WBk6Vn5\n7pdZm3e7+MmIevXV8ZbBkqKYrRH3/5sF5/XYgPO4YTmdDBtADBs4dFSQyWNe\nr+ER\r\n=sgxy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH5FYvk8ZuFN0wq+yhQEcDWK6k1HrKmc4nfFREi+EsTRAiEAsEVoShPj7Sm1KUXEC/udTCEn6Puxl5ODJUJSccOkqHg="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.57_1557993961054_0.5919875242333792"},"_hasShrinkwrap":false},"0.1.58":{"name":"@react-ssr/express","version":"0.1.58","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"bin":{"react-ssr-build":"bin/build.js"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"arg":"^4.1.0","chalk":"^2.4.2","cross-spawn":"^6.0.5","delay":"^4.2.0","got":"^9.6.0","ora":"^3.4.0"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/preset-typescript":"^7.3.3","@types/express":"^4.16.1","@types/got":"^9.4.4","@types/node":"^12.0.2","cross-env":"^5.2.0","express":"^4.16.4","npm-run-all":"^4.1.5","rimraf":"^2.6.3","rollup":"^1.12.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4"},"gitHead":"d75d916c7416669cc6521a5e2fc16c46a2d55060","_id":"@react-ssr/express@0.1.58","_nodeVersion":"12.1.0","_npmVersion":"lerna/3.14.1/node@v12.1.0+x64 (darwin)","dist":{"integrity":"sha512-7xn8H0o9x85PiKoG6Vzh0NvWH63NLRqKLCzJu4rZFzqO8NZC6t1AJ0JgN4biKD+OwbZA60ZbLFgCtis2vGIXCA==","shasum":"d5c22dbd645e3d58f5caecdb4874cbf080d645cb","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.58.tgz","fileCount":9,"unpackedSize":7424,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3RuFCRA9TVsSAnZWagAApkYP/0eZkYpkxfaPIJy2aWbq\nn8DTKOvOudS/ZYBYpskOEea1a4gHSAutJ6hZJD4XfCx65UrQfEY8miLzb0Px\nHj6Y5fqkGW2uW+Oq1yu2o7AlSwz/pYZCrebwlFME/hP0sfTYidWHd/wrtuAy\n1gCbssK2ZUF3wBHrzMpqpUuS4htUW33d59qp1uD9wYoTEhiFZTQFSDxLERj0\n5Tm46Bv5hj2jtZgQX68jXR/vvoc/Y8Sc69rbQxI3cwdgwh0jhem3pMk2bDiG\nuzGaqq7E6FAcHPQVACVQNO6kQKs6yIWpZwpdyOUihVoPItypBSWI28SweSPX\nVMbj3SEBbYidmGnTMAFNVty/DFYx1IGkq8Dn0yeNQdH6Wydla3Rc4SJqCk8a\n9YOYs3GIZIFODIF9EfJBIqgskFwvOdQ4wsTJesOnN8eWdJMFD4Ze1bfx2Ka6\nUiO/241PD2Z7RaXLw/p66+JrKseH97usWMkpKTvE/WCS5lHnnUQQNic7jDIx\nYk9h0lRN2pCz2WzeLMDI+kFaRMLVVJW25igbjBcBCugUwL/rj+g+eOtoB4v6\nJ+I8TpiMU7H0uo5zF4lvvkrACvkSHE9m5LPfmogIkXIHPFi5zmQ6Q6u9FwVE\nwW4IPfETmtWaBO0EkkRlX87rOaCg3YoQcyt3BXjBhDwjZYQkLhI/9OcIebSf\nUblz\r\n=A0XF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHTcwk+R6EDKbLqVONL/yyX1e+R91PqyQLdwqSGLILyhAiEA0OJ0s/ctHBBYt5dFVaGOe59+MaDK2+kBV9VXmto77lY="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.58_1557994372967_0.09707051992880822"},"_hasShrinkwrap":false},"0.1.59":{"name":"@react-ssr/express","version":"0.1.59","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"bin":{"react-ssr-build":"bin/build.js"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"arg":"^4.1.0","chalk":"^2.4.2","cross-spawn":"^6.0.5","delay":"^4.2.0","got":"^9.6.0","ora":"^3.4.0"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/preset-typescript":"^7.3.3","@types/express":"^4.16.1","@types/got":"^9.4.4","@types/node":"^12.0.2","cross-env":"^5.2.0","express":"^4.16.4","npm-run-all":"^4.1.5","rimraf":"^2.6.3","rollup":"^1.12.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4"},"gitHead":"99fa4ffde355048b52b58244b3996ea434769399","_id":"@react-ssr/express@0.1.59","_nodeVersion":"12.1.0","_npmVersion":"lerna/3.14.1/node@v12.1.0+x64 (darwin)","dist":{"integrity":"sha512-e7Dqr0qfq4d7w5W4Dyk3ZOqq10GrGfGHBM62X+zzUR4OyEshBExPea39UJvTYiQufMKw2VlhbPi8DG1c19gFNQ==","shasum":"43ae8e3dcfdfff37c44c9eec86331315b096d619","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.59.tgz","fileCount":9,"unpackedSize":7440,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3RxZCRA9TVsSAnZWagAAWFsP/RTouYLtLSCT5DW6aDcM\nS0a8cd80FQpEnKH/4PXEIC1nEyJ4Avoz2FY6l+D4U0eMEs19hYBIkgMbpIGT\n0t4l7K5fitSMNScD9eVg6XewSjV1uNLQu9+PqlYJsIZN01IsSRoDcf+kovOD\nTHCft5hHr11EI9uVO1udIXq9kXdcQXW6lzbHUVVRY2KsLi1dLqaR6Y3K/mMl\n69ME8345i8ouAvjZBCnF1CgOKLYfx812LOFKXX5yg74+S3HunzCcyLzcjW1X\nUMGc5s8sLTjZX5GD3qElD0RKHlPxNwM1FtW8ilcEkyEX6h2aMxqX30S8Sp/w\n8+6Nvs5QmUl/FjD95kUFB5EL3AdvjVwxRXpzvm9KxutDzJ1oxNWUhinQJxZt\nAgpxqfuDKhC7ojwLan46Es1AnhH1bzm8gJOy/7HNeV7OEh8STtS6hJJVgu+Z\ntQvDUf9OCrJ6rSgCF/jeSfpHRwyI0PmVovOVk/65dANAMgfPgwBPorKIpNcr\nMt3Ap4iy07uajdBx1VT8oGhMYoC782/4gK6fbkFG0H3Jy4rq/b3FWd2o3Ojk\nFT+I6jJYFmewsgqjZSvEFuL9+Jfi1tebSqS1rPVP76EwaSgao0oH7hGdWWi+\nquV0Rsnk0aR9f3bzbrGHpbeMznn8YUZBl6gQrJ3ajLNs1uKAlIO84/w94rQn\nRiZn\r\n=dQaB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB6tO7u+Zt2qWKC+mXMfIrTnk0KHmrjFK6RxD/7cUEbdAiBs3mxewUF29e6XnIzC2sDuPkEyjtwqE2hD2w6iqDf7cw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.59_1557994584752_0.5311196168227101"},"_hasShrinkwrap":false},"0.1.60":{"name":"@react-ssr/express","version":"0.1.60","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"bin":{"react-ssr-build":"bin/build.js"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"arg":"^4.1.0","chalk":"^2.4.2","cross-spawn":"^6.0.5","delay":"^4.2.0","got":"^9.6.0","ora":"^3.4.0"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/preset-typescript":"^7.3.3","@types/express":"^4.16.1","@types/got":"^9.4.4","@types/node":"^12.0.2","cross-env":"^5.2.0","express":"^4.16.4","npm-run-all":"^4.1.5","rimraf":"^2.6.3","rollup":"^1.12.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4"},"gitHead":"28c1d1fd9feb5acf47c3418bf2a40b49b7d359b3","_id":"@react-ssr/express@0.1.60","_nodeVersion":"12.1.0","_npmVersion":"lerna/3.14.1/node@v12.1.0+x64 (darwin)","dist":{"integrity":"sha512-Nc5clGm544LgQ2cypRbCZtCTTwVkuyf6ONVE9VYMyr/jWQumGv5UP4Au6yTcF0fhLDDTqEPZDVDGJbgqoTZJcQ==","shasum":"7c33564128662dd6b54baa5c377357b33d565e57","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.60.tgz","fileCount":9,"unpackedSize":7440,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3R07CRA9TVsSAnZWagAADSkP/3CMFJ36QnfnDMPSWUQk\nifBBRDecJC9JIpbolEdgDThd9NjixE02aZMiWbxEZUbR/Ar25rVLZ9WEiMdW\ni3PAo5rcipM/fm5z3XEyyA1DX7wmJMn1CNPTeUKhE9L024eTYQsDL3rPX9++\nbOkmgHGduceheY5Lx2pnv5XdF4Dk8v8IUtB17M3zlAiB7SuzAiCHdLwKvcfd\n8F5XaAuZ8raSAcaRsQL632DDEFVNWJKOBaMej0PmxZjjB2xNMNRVwHch9Ab1\n3COZoePP2SPuG42R65xA/4QGLe1UFeZq8NFhp3Ge2z7JOpLpa/o2oT2lPTDz\nv1bHWI5QVSJnkpM6MDrdDjPpNwHrgIpOm155p8cR07U/ptRK42Y67EPN58Lm\ngwISTWmJFAQUFTYBuQ9UAdxr7TqU90eEmxOyRyM2RNrx3p9XG8ZGaFR2wp2H\niJyvqn1qpMvP5HYLYPrsiwxTM252j1FC85iDr6LAuJAq0OEFPLzuipV5JY/N\nhzK6OnFCZOugramcDDGU4/LVVABymxZsGztFodqB4KduYwC3rZy/jQ/Mf3DC\nJMDo+w85OvH+86EuO7A/AT9q5h9JLVw1eCcUINcYJ+ZdgNHcL3y3YitGXBnW\nzf/sRvdhm/kh4US/+o8HM48i/EQmQnQxl9c/wep3H0itjY+t0MHPbDZU3a2W\ndrTv\r\n=BVQi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIApc8sTn4UaiR/ldA2Va7SxtXvgvfZowVYUeE1ZDWPnHAiARMZeL6uBba33bhWq/MewzES1ZDgdVSEaZQ0OQsGo0EA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.60_1557994810986_0.10425570267161"},"_hasShrinkwrap":false},"0.1.61":{"name":"@react-ssr/express","version":"0.1.61","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"bin":{"react-ssr-build":"bin/build.js"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"arg":"^4.1.0","chalk":"^2.4.2","cross-spawn":"^6.0.5","delay":"^4.2.0","got":"^9.6.0","ora":"^3.4.0"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/preset-typescript":"^7.3.3","@types/express":"^4.16.1","@types/got":"^9.4.4","@types/node":"^12.0.2","cross-env":"^5.2.0","express":"^4.16.4","npm-run-all":"^4.1.5","rimraf":"^2.6.3","rollup":"^1.12.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4"},"gitHead":"656fb2661cd3177cac9fa9033637c20a2db065c2","_id":"@react-ssr/express@0.1.61","_nodeVersion":"12.1.0","_npmVersion":"lerna/3.14.1/node@v12.1.0+x64 (darwin)","dist":{"integrity":"sha512-lCMxjIb1QViR/qb5cT5Kjay9HZFumrMw0CUkPmAQ0gYFVe8VRBSS9rst/5mCT3VJ+h+OwyikVAuTRpJ0se582g==","shasum":"6b856282d11e7785813ebbd68aaf2cc2be385f6c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.61.tgz","fileCount":9,"unpackedSize":8568,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3SAOCRA9TVsSAnZWagAAhuEP/iKNbwdDWZrkiMupHm7Y\nei36wZDplJKvSMA9pz5TDNFUJdsofcGYIKbcOKIZcT3peMGrVdJ2D1Gru7AQ\n0orJs6IZhFW/TlEDcEedJCej5enzqaAbj5VVmmW42k075uymkM3B8J00veLr\nuG1raZb/L2gsSQ+O3PctKxMD9P6qWacQ9Mb1nn3n+uwA/QEwFGiJBrZ666xO\ny8zNOcfXWoDcYvW6tX1XTIqrqHBJ45ADKsQJRP1uNBxhrCsQUn91pFrimixi\nVC1tM9NcrsYe9cH6zMADATFrGalcuDEyLVWWeqfiazKwaQanZLoqzXM1pvi3\nyA5fPzIRoO0pZ7LPNS9hwKBrz+bqgtuOepOL4r+WiAmBOn8eVU5vLGNfreUA\nRL3wUoBT6tWsqB0QT7piZ0+Zx1HygtR2SX801jLMW06MzGGzQG7EDHpGTePA\ns8AcYNeG3kpke+6nRv5+Cwu+Lm7ywNN27WTFB+wYYWf+YdmuYzgb1xUq+S8G\nKduvQK9OOmT+jbYjMWaGXxbc7JeAkHfmxtZv8L1nNDXJD+bFiCsPAr4B32mM\nQbQ5vsNy207J6DYZk6bE764vnpPanuoD+Qf2xgkU9BJHHjBgKWpzKWfQhXG4\nCfWGuJE0p4kymrnkAY1MEsZ//0S+N18QTbL9c91na02V5Ax1EX6dos5W9qf8\n31TQ\r\n=maGa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDHMwTTpIE4OZkfKQugZkPNmK9FFYo9lzOmRvDe5RnWUAIhAObrTWpBPVkEMBcsNpvpRW22erRfBWIrai+bl8yyBU95"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.61_1557995533752_0.7411018919687746"},"_hasShrinkwrap":false},"0.1.63":{"name":"@react-ssr/express","version":"0.1.63","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"bin":{"react-ssr-build":"bin/build.js"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"arg":"^4.1.0","chalk":"^2.4.2","cross-spawn":"^6.0.5","delay":"^4.2.0","got":"^9.6.0","ora":"^3.4.0"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/preset-typescript":"^7.3.3","@types/express":"^4.16.1","@types/got":"^9.4.4","@types/node":"^12.0.2","cross-env":"^5.2.0","express":"^4.17.0","npm-run-all":"^4.1.5","rimraf":"^2.6.3","rollup":"^1.12.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4"},"gitHead":"18653704bff1e890d4f3c4913037142c6473fc83","_id":"@react-ssr/express@0.1.63","_nodeVersion":"12.1.0","_npmVersion":"lerna/3.14.1/node@v12.1.0+x64 (darwin)","dist":{"integrity":"sha512-Sof8kJpzVigZg/Etdvul3PplTfLBaU13rh/rAuUKn+Z0ny+ITGP1rUgPv+U2Bc0HDZHtJp2htnVCV1O+qbE6dQ==","shasum":"dbc4249e6913cfd22cdacb2284f90e514f7cdaca","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.63.tgz","fileCount":9,"unpackedSize":8568,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3sCkCRA9TVsSAnZWagAAa8oP/RA7ANqphfnHxFQDRM0S\n9Kn0Bb1twDPMx20uY2+LpizHLNBHQWkbrYI+A+fAFdABTrqD2wYpCMjFP9PS\nv8vOofyCmxvPP8ZbdFrm2zZL4lj/DF6CG9F/LfF4lYWMtuCTkg3CHNpjHVD3\nOoM+KoLYPqLCghYZcv7qDYd+8V+Q9b/7L+yFKPsMosz893QNjrkyQSrKJA0k\nryJV0czDJxR34iFrBPY2LBIPG0669iKjONDAK9t9rpVbaPfIHJ6CUj3JXE2e\nUtdoEsWmprQfFIZdH7f6+W0uM8NVFFmmDTV6lQf3Sdzw0/kNLhwcOGxhzi8/\ntK4NoEvhwIrtpQ0jjBTLzLEgIBb+x7rf5Cz8i1wy/+ebBZFbhKrmneBhWXWF\nc2Ue7/c73edgmTNbbn8OI5MLUoYceNrLgvUPag7fa48zV0OJ9FLXQoI2B7an\nfsc7CXesGY1aWl5+f935+UAhEhDW762Qh+2ZxVO/rDZ+r+M11U9B1PSCeWGe\nvOY2265+SoBCPyJiER/YLCAlAK/h5426rjCWosiTs4xSR7taUJPoespZxU3u\nIzt83ExvkGpGFSS24Pi2goOIPlaIj2vidDEHoBGVohOnVoNAtDIUK2pWu6rP\nV61Vec8RXEUIV6I5StzqEVG5D1hx/Bu5m2v/b3AtGwtBbyzJWM1XSiwRFqp1\nr3ND\r\n=bUXd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDyzIQZrtuJQDieNxjtJ6/COkD/qnJ0dgpK8QLLZiGiJgIhAPGduCiaBKFBhvrpNuoLc8hBmdEuGU9R7HgAXJl2P9/d"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.63_1558102179433_0.4529277820159954"},"_hasShrinkwrap":false},"0.1.64":{"name":"@react-ssr/express","version":"0.1.64","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"bin":{"react-ssr-build":"bin/build.js"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"arg":"^4.1.0","chalk":"^2.4.2","cross-spawn":"^6.0.5","delay":"^4.2.0","got":"^9.6.0","ora":"^3.4.0"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/preset-typescript":"^7.3.3","@types/express":"^4.16.1","@types/got":"^9.4.4","@types/node":"^12.0.2","cross-env":"^5.2.0","express":"^4.17.0","npm-run-all":"^4.1.5","rimraf":"^2.6.3","rollup":"^1.12.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4"},"gitHead":"64ab5d8eedf1c3b2a6369cc19047b5b8fd150ff0","_id":"@react-ssr/express@0.1.64","_nodeVersion":"12.1.0","_npmVersion":"lerna/3.14.1/node@v12.1.0+x64 (darwin)","dist":{"integrity":"sha512-AfW+xIdvVZhExE8e+pANB8oXA82u37hQAe1o5ERk2YkSUJ97Aks+wo4zbzGRC5yCSoUV3lEqO6KTBbglmkQLzg==","shasum":"1eb0dbac0622692c7d7fae79450ac353f98abce9","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.64.tgz","fileCount":9,"unpackedSize":8547,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3t8kCRA9TVsSAnZWagAAg9sP/2CSRogZNQdbf13+jgyf\nJ10PCZhEvgTvSs/Sv7XHzq+987QN04l4aB8gA/xB9cgsiYK3hEIPeWE91mPT\n5pYVvsoTvN9RH5NxjvryTTab47AQNMzy4F1DmQ5ovyKHTYYv1C5+CdQ0C0NC\nw+jlKeaB/LiKNddR1LezEuj95AHADOZAPVmuBkZ9OGQYdgyQzwNwJ2mrEapa\nvo76TNG6wit4ViR90pXYlYDcZcoimYWn2ca1g4M7W4XF2rNHyOVUUDPa3aRs\nsd4db+zMRmQDjf4w1GnabpM+oia60+1WbqcYZ/GjdIWGT7M9UV7+EIvPHWz9\nXZ6e359GqKtwp5gc5Ut3aRFYFNbu4HGHGc1l3n3iwYB4JAOBfsEBJvpyGU3S\ntx4Vtvl9NSxR38vYnsO9dc8dL7uL3FCtZGLk4+fkHmf2kNv3ELOux7nCHo4S\nhMKUiS1iEUoL78x52HhX2RwF4CD35RSpNBgi1/I1DMkvbNu3e5zZh1Q9cetS\nJWpjMSWKUq/1wNndpr8TpUgV7pLKdUl6VJ4o6hZVNPjoGzc9+n23bfW25ZDL\nGHfhXQBFvUXlxtqiXafAa4br6mFQ69wjDV4h9uxN4qgNfZ5J7cjFxyH5Xy2v\nNNRifuM+SxHXs97Kx6mVH6/38739kA168eqTn+ngf3fUyNH4NSDGQ9R1Ebid\nCFqV\r\n=XVv9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBDGiJb/Ar/v4B6h0IReEhvSIJMXYxKfWGQPcnp2juWdAiEA73DDtev5kqZ3FQyPfcUp3nUUCUbKS18ukn/iwHCuP5o="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.64_1558109987464_0.8827213573011072"},"_hasShrinkwrap":false},"0.1.66":{"name":"@react-ssr/express","version":"0.1.66","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"bin":{"react-ssr-build":"bin/build.js"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"arg":"^4.1.0","chalk":"^2.4.2","cross-spawn":"^6.0.5","delay":"^4.2.0","got":"^9.6.0","ora":"^3.4.0"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/preset-typescript":"^7.3.3","@types/express":"^4.16.1","@types/got":"^9.4.4","@types/node":"^12.0.2","cross-env":"^5.2.0","express":"^4.17.0","npm-run-all":"^4.1.5","rimraf":"^2.6.3","rollup":"^1.12.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4"},"gitHead":"919402d8b9aede58b7f05d9d285d592f58eed248","_id":"@react-ssr/express@0.1.66","_nodeVersion":"12.1.0","_npmVersion":"lerna/3.14.1/node@v12.1.0+x64 (darwin)","dist":{"integrity":"sha512-Pa7LTeD846ruUa1ygpwOk3LPgKIIaHblHeTyuQnK+KNNpfNjAUQzKf34xOwb3U2JU7x9CenOSLmaNALbcQU9Fg==","shasum":"c9df6df898ae8ab247784dc6c8b1cb6a16199452","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.66.tgz","fileCount":9,"unpackedSize":8565,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc334QCRA9TVsSAnZWagAAZqYP/j+iOTrgLFQ3dluzqD0a\neMWvSjsPk6/W1we8UrdHsqV7AQ0EHoBZfYrqHPTEs5EGbkG3jluUBxb+vf1F\nK19agviYiEQMya7ezZqZYbHkYIXzMDvi6Q7HO773HfHmEhdp1YyLQOqJ51xp\nvsjHnBorcPqqQIiLF4nFxwLIPHCp7sVoysHhcYRwLX3qmYZRulTUBv1/B+qh\nvR82cwWyj4wUqUOtz5q7WLaklqpaYQc4RibcnMwpml1In7yn8xKO9K2/yNKq\n4PmWrDpxV+CVNlIS2do/la5M7q1JaWr8CmcGQusfJ8Wh8CWvZmOU5AY0OWQa\n3YhkGsbagJobnQJyH+Hd43nlm9i2ug+KSKFI2ohAqdn0FpWDOmgQdD+ORqwH\nbcqpKHR7eDtcYxlf4j1ex/2Q98HiW/B29Z+65WiLxjpHJNRXlbSPhWInFg4S\nEl6RAgCtm3+HMeoDBX3Qy3guME5UznXKGhqBCnRkvbf5kHAzLFxliHFn/QXQ\nbGten/9t/4DAGJU5WF3HWB/aKgN0lV2uPYPRZ9jBxpN24q9GvxyOcIQhgkKw\nPxKdtYk3QHkSjhF/p2uDHSD5rBYkUdUE5o0NrsPXEwJjqBpErlZTK8ENWk3d\nSO1Lp/+bLChQsdKxPZ8aTcn5rlg6qlhc2xchsSNLDgWjdA9ag5uobbQ49KZo\nmPPZ\r\n=LxQv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCcVkdRIw7AogaoIiYPAZLJFOL8WR5/GG14jxC+ILcwKwIgLtI5LALOh91+uaDfG0nW5gqT0zsfFH5fD5N9hodT0gY="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.66_1558150671503_0.3731378510239196"},"_hasShrinkwrap":false},"0.1.67":{"name":"@react-ssr/express","version":"0.1.67","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"bin":{"react-ssr-build":"bin/build.js"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"arg":"^4.1.0","chalk":"^2.4.2","cross-spawn":"^6.0.5","delay":"^4.2.0","got":"^9.6.0","ora":"^3.4.0"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/preset-typescript":"^7.3.3","@types/express":"^4.16.1","@types/got":"^9.4.4","@types/node":"^12.0.2","cross-env":"^5.2.0","express":"^4.17.0","npm-run-all":"^4.1.5","rimraf":"^2.6.3","rollup":"^1.12.3","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4"},"gitHead":"7c4505230be8e85074dc5209ffc9ac1034ce0372","_id":"@react-ssr/express@0.1.67","_nodeVersion":"12.1.0","_npmVersion":"lerna/3.14.1/node@v12.1.0+x64 (darwin)","dist":{"integrity":"sha512-fSaIHY1ffE1r1KgiGUrU1l0vp1HSCWNHoyjteS1QF23x1RgCg+nQrjw6Zs5CEbU5HE9+ptsMdTcUfzI+U1GFIw==","shasum":"2d2abfd5b1bfd0bf872df40ba67172ddffdc7c7c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.67.tgz","fileCount":9,"unpackedSize":8565,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc4qIjCRA9TVsSAnZWagAAX5AP/iHfLqLdy+7oHCH0RLLT\ny5pg/f7NEn4XOqsSu2gGqu9mDToRrCZw6K7bWPPx/omJlVHR4kOO69tWcg81\nuvD1Bxpwg3085kd0wxUUyvQ5urEM11lMyOOll5eFUq5Nhf+0ppBMyz9PpEOO\nJtWCvb8bZKYVk0kyqZKX4MH7A+xBzomAA0B2vYBO70Q+Z5Peuyw1zkkq9P2W\naFy0fWcnSbWd7jLKPihmxbve1eW43qbkga9EHYT9h7d85rdZrlTuZ3H5NpNi\nRAa/g5vm1MpFqCR+IgIIdZ4G2UOaBx8xRbngCccJb0OUzGRXThBewPPEvbkT\nv2Ctak+tJJIRYWzEkN/tK3YUfpIEFtXNRCxAGkIFcrAjy3xFufwVFv2nKkns\nFBLH1tAwxdGQoLvH+FY+rPRipbGpKF/j6h/lM6yM9Xdpjfc1mtZYgg5B3lqi\nLCTJzXLW5BzCgVyWofdGZcPdQI4S/XOj+WHRrt4iCnuCo/x4mBdef3dz23RS\n9htbYPkemSgX9sq0dPfmYeiGkR/nsrKyZrVQakjYWbq+UGWVOHhhYaKr/Yuc\nNZ6FVHhdZn6h7jZhk2ccG2l0rlX0Ap81A7HzbJRogB1BxZwFSWTK0+Tii3f1\nsJ4n1Ru09gDLrKQyyd6S2ZBOvNniD4GBolIbnrNjjOnNoDjOAePhtot/h8dN\nTYyL\r\n=TNCj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIERGbA93ZeHjaCiiN4EQ5ZRPETVzw0G1+9yObbOH3HzjAiBupjm+gX+mwK6j/qncetx7N0p16arQ2UelCnbAeGX+Sg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.67_1558356514716_0.20350055196226302"},"_hasShrinkwrap":false},"0.1.123":{"name":"@react-ssr/express","version":"0.1.123","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"bin":{"react-ssr-build":"bin/build.js"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.4.5","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.4.4","@babel/preset-env":"^7.4.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.4.4","@babel/runtime-corejs2":"^7.4.5","arg":"^4.1.0","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","cross-spawn":"^6.0.5","delay":"^4.2.0","fs-extra":"^8.0.1","got":"^9.6.0","ora":"^3.4.0","unionfs":"^4.2.0","webpack":"^4.32.2"},"devDependencies":{"@types/express":"^4.16.1","@types/fs-extra":"^7.0.0","@types/got":"^9.4.4","@types/node":"^12.0.2","@types/react":"^16.8.18","@types/react-dom":"^16.8.4","@types/webpack":"^4.4.32","cross-env":"^5.2.0","express":"^4.17.0","npm-run-all":"^4.1.5","react":"^16.8.6","react-dom":"^16.8.6","rimraf":"^2.6.3","rollup":"^1.12.3","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^10.0.0","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"5666754cc9b5d860066e0cd6af480fb8688a48e6","_id":"@react-ssr/express@0.1.123","_nodeVersion":"12.3.1","_npmVersion":"lerna/3.14.1/node@v12.3.1+x64 (darwin)","dist":{"integrity":"sha512-yq7DSyPvU6cxbyDx+g7KSzc5c/3HvPkiICg2S5wvWQOOshCwr3b5e6VKmlxBZZz45gJWpgyrLjzhKrp/lGGibQ==","shasum":"b1af3396174b9144076f4942fed5d29c64795db3","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.123.tgz","fileCount":15,"unpackedSize":13279,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5tauCRA9TVsSAnZWagAA9/4P+QARKD9bn3GhIsD1N0QW\nQjUwdwBtrp+Ak5X8TBAEYturyaNEPJ+bVrpmEHRz1i18Gje2RJqPRlPcsqCk\nHvkcXgbeCOZ5mWO4khz+Q/Jo3PH3AdCTO466rJk0BJlebdFMMjoyTRvU2pem\n+WH4Ox4PtyNr0JQ8oh0pWd4fezwEFyEe3KEN7KKBg8d/Ug93TUP++1IXckWJ\nhaZwpqg4JLXiiPPVbHgGlyCP5Du4L/1Gag11jIXHNNR0Rx+ZvAfqrNon2+gK\nunDFwDO3xlJk3Eb9ftasaAWPTsYSpMXrdSe6RDbOf1M0grECkwhA59Mrnt99\nr368U+BJ1O9YeRMh6riRVyRAu/vrWVNenmHRK8V3tDCpt/AfJi67XvpzuMox\nFPPJQBIaua2I3Nk/07e7Wl6h7jJCwY/Q9bE50/1SZFF3c9ga9xAjvOW0CjvG\nM0vgqLttxVzKch/dxFGhPINwJuG3j44Z4xXDo2B80m+CLB3qexN2Lgd8A2GG\n4ct1fNXC8/zmQEoI4kHhwPuOOWdtNHbW4nqahbkvq7ANXoEL7ZGtygi2hG/M\nNrnS6KvpLHGBhATtHHcTX8bc5pjBLHbzBn8XlwVokMZ8NoEvHf5hLj7aFgTD\nlFb9LORO/V1n/U6gjpzGCR79bO0IOaB2DTsAEp8OzCQvDcm/QeVB0H/CLceX\nNiyG\r\n=uaQN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDn4IQMiMfKRcl/Ie8ODO2BZ4/3VRB46WoMJEzH8y+LlAiEA+bIkP71cmZWY2oHspa/GJxIzjJHGwaE9hn3Ha6bjJkE="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.123_1558632109796_0.8493371332310404"},"_hasShrinkwrap":false},"0.1.124":{"name":"@react-ssr/express","version":"0.1.124","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"bin":{"react-ssr-build":"bin/build.js"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.4.5","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.4.4","@babel/preset-env":"^7.4.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.4.4","@babel/runtime-corejs2":"^7.4.5","arg":"^4.1.0","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","cross-spawn":"^6.0.5","delay":"^4.2.0","fs-extra":"^8.0.1","got":"^9.6.0","ora":"^3.4.0","unionfs":"^4.2.0","webpack":"^4.32.2"},"devDependencies":{"@types/express":"^4.16.1","@types/fs-extra":"^7.0.0","@types/got":"^9.4.4","@types/node":"^12.0.2","@types/react":"^16.8.18","@types/react-dom":"^16.8.4","@types/webpack":"^4.4.32","cross-env":"^5.2.0","express":"^4.17.0","npm-run-all":"^4.1.5","react":"^16.8.6","react-dom":"^16.8.6","rimraf":"^2.6.3","rollup":"^1.12.3","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^10.0.0","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"543492e83fc0841e83e54477aab1c50bc881a2d4","_id":"@react-ssr/express@0.1.124","_nodeVersion":"12.3.1","_npmVersion":"lerna/3.14.1/node@v12.3.1+x64 (darwin)","dist":{"integrity":"sha512-PaV2JJOZ3YnaXi8TxxlIE13F+5KougMvx9lBkSfq3x0zYYgeH1x06KdG6K4R3N1j7gFZZx9vq2P6Egia39ILAQ==","shasum":"431c99e69f97fb563ce911d999f8d1ac05fca170","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.124.tgz","fileCount":15,"unpackedSize":13288,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5tqQCRA9TVsSAnZWagAAekoP/RRg40Y2zF1Z9hrpIkb4\no/bxq74qjjPNg04Sq1fMFTBIU9JONsNZNB/5MLYm/i6mJb338S4IvtXcdfO/\nkvETjCGe71QcuND0MQ/0NkN24Fk4AqvlRWfy/mWqpJn5z3p02qkDTRDv5oZn\nQdBHctilAhmx+qCdMD4GofgKBknmENZ3GcK58f/m6gBPb7+Jo9b+xFTt7kmU\nvu+lla3Je5dXKT9WlRdcbk1elhS+p7/CT6bFsq5zefA2gQWDvLDnZ8PtNsS8\naY0KDKSi9rMt3TvBQ1Au3KlV2zIspYSW+YdguzIJCYVcSpPuV1vABz8rNQGu\n5Kn+eN/ORwsLrBtLHs/htvXNOad1JTMKzmw+DD8G8swp4vUdbnOb5PeNFkxs\nOn/Jrd6cF2BmZ0zTh4Tgv42iMWkbgvDKYikitFwCp3l2quK7gtxxZRVQLZVF\nxNtnChQWlFh+qu1RjFpSsfuvB87qXPRz8SUQHOq+D1IM+3TBhi7dDUMo/ikS\nvmyJInRdlV8zKu8ub0dpHE5/ffy4BKjSgAnFuBIVXZ6UrkaBzh/8WlJEjjN3\nYBZf7aw0NJ80LNB9gouDH7MTAFoP9WW3mBZQWqdhORTByJxbxo0k22b9llAT\nfBDr9ucyvr43uTof6XKAGEEGuIpVK3SxPXeKTtXji0qup7fMU3K7VP6vwR9B\nhEPw\r\n=BYih\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDMtVTKmrFy+XfB3EMkNjxiYCpBJmQbqW9Uimi9CYLF/AiAwitDrU0Cy77dKLMqMnVNJJJyr9ljk06i43IM00wpMIw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.124_1558633104217_0.8465461222494035"},"_hasShrinkwrap":false},"0.1.125":{"name":"@react-ssr/express","version":"0.1.125","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"bin":{"react-ssr-build":"bin/build.js"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.4.5","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.4.4","@babel/preset-env":"^7.4.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.4.4","@babel/runtime-corejs2":"^7.4.5","arg":"^4.1.0","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","cross-spawn":"^6.0.5","delay":"^4.2.0","fs-extra":"^8.0.1","got":"^9.6.0","ora":"^3.4.0","unionfs":"^4.2.0","webpack":"^4.32.2"},"devDependencies":{"@types/express":"^4.16.1","@types/fs-extra":"^7.0.0","@types/got":"^9.4.4","@types/node":"^12.0.2","@types/react":"^16.8.18","@types/react-dom":"^16.8.4","@types/webpack":"^4.4.32","cross-env":"^5.2.0","express":"^4.17.0","npm-run-all":"^4.1.5","react":"^16.8.6","react-dom":"^16.8.6","rimraf":"^2.6.3","rollup":"^1.12.3","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^10.0.0","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"129a4ca2692f58e04d7123ba5af05576e6df474b","_id":"@react-ssr/express@0.1.125","_nodeVersion":"12.3.1","_npmVersion":"lerna/3.14.1/node@v12.3.1+x64 (darwin)","dist":{"integrity":"sha512-EiLctxCur8WzY+sty7lYTn4LWXhBs1LjJlAB7ucgr/cVxTLnCSRWdcUhV3HLA7j2sTV7RvhxhfX2Cse1zh+MiQ==","shasum":"5a334e66ad50e859046e98305dcb89a1bf78c539","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.125.tgz","fileCount":15,"unpackedSize":13274,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5tu6CRA9TVsSAnZWagAAH+AP/1nBNv5l+s/MmcU0CxdU\nlLcYraEiVZ+3kPjP8GXw+MjEjy/GB7mCT2bjx/igwT2s8H8vx1sTtkHcK+V/\nSx+ThnBoRdTPIJkw5K4RfJsocKrRMBM0G5jvz4QIRNzGqHFwWMmEviS2cVDr\nmvNnGJ+Pfy9VVn/8fZXf8Hbpxgt+7PdGbdO73kqQTbqJWGDNq367thSAFVyL\naxGe90ghG6Y5avz6OBng1YPeZnESqaCieyv81nEVoxtJIE1ioboQ/0kWqb1x\noFmG0toIDx8b/4JuNfdy4GJ9EIX5LcyV57i5MAqQoAOuQLNsgJCLus6schsQ\n9eJeNaSPcHQPLCCIn4mvszuhRthFXU8mVHYbYdInWf7PJYkGKBMAplWZ62rj\nxYOU77rlGj2ZX27hd46s/ExxzigELL8UStgtHA+4rob1iylLUh8BSPcDMolZ\nmdEgKhWhEvS2LMZrs3jabkvxmld0njRkPc+4Vz7kXU4oeBy/5UwwkB1Orcsl\nyqpBA60Wk930pXppvaWL/42OYa3Q/HB99sBHIWpcMUUBOMGWk+o66cNHjSIw\ntZAB+60MvcTCKrfHtlehbqzlggv9alJH1u3aTUtZ01H4ICjoLgHLa9YwSxA7\n5KtS0WKXEjoh9CNdVEjMHLo/otgE9fi7HHFyCEWBRSiYkOinni6Kxjn20R0b\n5H07\r\n=Xzq/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCXHRhroZ/OgXWRIqTn3y2U0YYF7phtXN7h2lxj6Ns9PQIhAKOoJ1AGa4VrI5TWLncAOGhPW9KJyTFANnsryI73iCKE"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.125_1558633401833_0.310686718579527"},"_hasShrinkwrap":false},"0.1.126":{"name":"@react-ssr/express","version":"0.1.126","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"bin":{"react-ssr-build":"bin/build.js"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.4.5","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.4.4","@babel/preset-env":"^7.4.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.4.4","@babel/runtime-corejs2":"^7.4.5","arg":"^4.1.0","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","cross-spawn":"^6.0.5","delay":"^4.2.0","fs-extra":"^8.0.1","got":"^9.6.0","ora":"^3.4.0","unionfs":"^4.2.0","webpack":"^4.32.2"},"devDependencies":{"@types/express":"^4.16.1","@types/fs-extra":"^7.0.0","@types/got":"^9.4.4","@types/node":"^12.0.2","@types/react":"^16.8.18","@types/react-dom":"^16.8.4","@types/webpack":"^4.4.32","cross-env":"^5.2.0","express":"^4.17.0","npm-run-all":"^4.1.5","react":"^16.8.6","react-dom":"^16.8.6","rimraf":"^2.6.3","rollup":"^1.12.3","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^10.0.0","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"73a2c94415db205fab8c06e8157247d3bb72ec7d","_id":"@react-ssr/express@0.1.126","_nodeVersion":"12.3.1","_npmVersion":"lerna/3.14.1/node@v12.3.1+x64 (darwin)","dist":{"integrity":"sha512-82sCeoqf5GWCwBriqRbfvLzhay/Kux80LlBtXldgSs4iAbzFL1V339Av8HihDKNn9jDu1yt9Jgyr9F6sl6Fbqw==","shasum":"9ee4304e616addd60d2877f62644c34188eb738c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.126.tgz","fileCount":15,"unpackedSize":13325,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5t4bCRA9TVsSAnZWagAA0Z8P/2BZ7Ss38HNTIL6A+dL2\nn3CmnDkIMhsfb+wkHZYlSgJpM0kza2AzhvpmpPkL5xfuEgEKQQuZ/3S6CXuF\n8tjKng1GPj1bJbS6wYlSIY0VbKSQC8YybrTmfVGJ66QvD6vphkg+/4eFY4Mn\nxb780DHMLFH/SJIbEwnl5m2a7u/Dg51AnrH9ezizpHAiNBIuawyhUfYkXt0O\njKaub6AM6s07ytsBAyYdcldt6xvTeUmuy/Bxrx/442n07IDmhjgcFp7GMuRe\nCmjn9Mm6RZWIAPQqJ7DJsRZmHV4+yj5yJ+IltHnzlx8lN7zFG1ynTmctxIsQ\n8d+yChyRv7s1RDIcOKwo7c6SZV1+ybblVUWDubnguBB8ETJPc2srEEIHxfEB\njDX4IYJLB7QrY9F3I5H2AYeQNE43eX7ncniDhuMnHX4SN/uGFYXBdB0tuKQ/\nVN8Mm+UZNRnwUcZ+GiyqBVFxim/B+DQ5eaeshJ3RROrXjcjMV2iYo+j0UK6k\nkzAe3DuK4kpVr6s1C0kq2zhCaSlDG9qmMvWLhyyyVaPFYVx0svoTvPoLDSGb\nSQmkn1vWkuQsnoT6vdwkPwjpNg2AbO++jyv6WbpkW472tJVqPCCL8jH0eZxV\ngR6Rz2EPRBTSJCbOP7yqtK4f7JIGvMJTTSAQJJI32okStxZReijepbOT2hDT\n+80B\r\n=OUOl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD7VRI6QgZvQXKNIo784TAx7+HFEaMDR6marbCKQWOdAQIhAIjfHtGDYMpBye1ZJnI7rvRn0K4eJqg9whEWcWGc9iII"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.126_1558634010581_0.7118956639262004"},"_hasShrinkwrap":false},"0.1.127":{"name":"@react-ssr/express","version":"0.1.127","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"bin":{"react-ssr-build":"bin/build.js"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.4.5","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.4.4","@babel/preset-env":"^7.4.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.4.4","@babel/runtime-corejs2":"^7.4.5","arg":"^4.1.0","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","cross-spawn":"^6.0.5","delay":"^4.2.0","fs-extra":"^8.0.1","got":"^9.6.0","ora":"^3.4.0","unionfs":"^4.2.0","webpack":"^4.32.2"},"devDependencies":{"@types/express":"^4.16.1","@types/fs-extra":"^7.0.0","@types/got":"^9.4.4","@types/node":"^12.0.2","@types/react":"^16.8.18","@types/react-dom":"^16.8.4","@types/webpack":"^4.4.32","cross-env":"^5.2.0","express":"^4.17.0","npm-run-all":"^4.1.5","react":"^16.8.6","react-dom":"^16.8.6","rimraf":"^2.6.3","rollup":"^1.12.3","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^10.0.0","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"a1d09c44195225c4a279dff0c558a6550e0c3468","_id":"@react-ssr/express@0.1.127","_nodeVersion":"12.3.1","_npmVersion":"lerna/3.14.1/node@v12.3.1+x64 (darwin)","dist":{"integrity":"sha512-RhAyw9fqXtUnHAPSD9C3sEdtN7WRbHs0ljddsUGEvbk1HkV2QLQFSMSeSK6obDHae8ZY3FgkAX8k3QwiojKe9w==","shasum":"8f5915d561886cccb4a9903521d704c05cf5abf3","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.127.tgz","fileCount":15,"unpackedSize":13323,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5t7CCRA9TVsSAnZWagAAoGYP/A7QJyWdP7KMnK77DqGF\nwXETe5Ig1g/kgiMY/AZrMNT2gxNrPB634Avc+vT4OWifS2GoKvRJJPCembn/\nOLaaPRT5oA4xVmQS3DqF6acAg4n/SK4fvEH5xeqE/Jz/yumcVjDn7tYQtEsc\nyAB2VKQe6i1SooETm9e5L/fuanwtJLTX+f2HnIXhETxZgWCKConFVjPr8LJZ\nmJX6580P9LVfQ4lTqb5Z69xEIYnaj1/ZPKXM3pjOp/g/5xbG68PsCRPM1WYP\nqjSLekq8k4Wjaij9dToEsxrHAgZ3cxcPA9KcJmO5lZpeDhqDVM12hA6fKbuX\nQ+6RHhcroJQhl60VP+1W7gtzBpLRibk+7DCAR9G5n2YYt6BjCzaSUYqZKeNf\nphuqVQXAwd7LcUYwN4ez+IJSdGToUZ9UgOA52YfgMHq+KlIWODAWkWz/9IXu\nTTcteuML312y0rrOi6Y9T5WylXttk4ncXwSjoXRDYF7fLaaR/qIU9qSYZjox\nkIjp3O5X/wXivPzV9wp+5YopD7rjNxGL/CgdJj2g4BfXAC6Y/cwZJdUi1HLl\nPeh4t42J4MLFX8UtsuXuqCoSvd7hY1IuGifZ9zPP6TSxRz9zsZ4EvpydGlcE\niqSkRsxXPe44WDtElLrlNqwrWmoWFgV3bIX1O70LHTs4yEANKbNuNI3fsO7z\ny9BT\r\n=mqBx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCTp146JTE9jorSWf0BtqRqdzXfM4aWvp9CNXhh6FLgxQIhAIHtksfjsjr8FSRb/xXa1RxDgfX7OeIJhkJJferQZmGZ"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.127_1558634178208_0.37624120700253294"},"_hasShrinkwrap":false},"0.1.128":{"name":"@react-ssr/express","version":"0.1.128","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"bin":{"react-ssr-build":"bin/build.js"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.4.5","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.4.4","@babel/preset-env":"^7.4.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.4.4","@babel/runtime-corejs2":"^7.4.5","arg":"^4.1.0","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","cross-spawn":"^6.0.5","delay":"^4.2.0","fs-extra":"^8.0.1","got":"^9.6.0","ora":"^3.4.0","unionfs":"^4.2.0","webpack":"^4.32.2"},"devDependencies":{"@types/express":"^4.16.1","@types/fs-extra":"^7.0.0","@types/got":"^9.4.4","@types/node":"^12.0.2","@types/react":"^16.8.18","@types/react-dom":"^16.8.4","@types/webpack":"^4.4.32","cross-env":"^5.2.0","express":"^4.17.0","npm-run-all":"^4.1.5","react":"^16.8.6","react-dom":"^16.8.6","rimraf":"^2.6.3","rollup":"^1.12.3","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^10.0.0","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"afd38d5065313f69a2557f65c4a713c475faf2a8","_id":"@react-ssr/express@0.1.128","_nodeVersion":"12.3.1","_npmVersion":"lerna/3.14.1/node@v12.3.1+x64 (darwin)","dist":{"integrity":"sha512-Jrqq8NYXwdnQSDXRsYCKdqgDGbkNEFgKFgwI3s+BPrCJqhh+2LUFJGi5h6h6oYAzWnqG/gRWmb44MXWbgartnQ==","shasum":"6930366d375338df2bca586f5b5ffdebb93a7b53","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.128.tgz","fileCount":15,"unpackedSize":13364,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5uBkCRA9TVsSAnZWagAA0X0P/2b5loqwTB1syczh2ig5\nCbFWh4iTVwx0GSLD+aBYW3sAqmlHJrgG9yGOs1jYtoyGfiVX8uiWPSLb/kd2\noKpRnP0N5ih3JfcHtJM6EY6k711hOYd2172lvPhHcXCWcmjc2jOb68izeuzb\nyLufB5ynwM5YkXb5e5hEvyuwVFlBzYpS46FECHVZ5XCkF5/tOKAqSHsjVSV+\nYTApMH6AikgSGhHHxNTOQTQvYtzwspH31aSbcEcB/5gWZ5anpd9zQSbbZQ6B\nYMylT8YFIIAYKXeIAUUWgOh8wBomfQN9ZXt0pa326f3U2bfBwzLXHhL2fYOI\nM4m24izGGoNIfm4hl2KugYMk5wX+0VMWXA0yv5xmkWHmKPw9XVihXCmzKHrv\npE/D9oRB1sEHHaSIocOXA3iRsFYmN8X560RF6mPOZ3bDMLZpNY3UslbIeq5a\n1KxehsVIfxy+Q156VtZBBFGjw/Snp7rIkumXWYxZUeJfGOi0tvJrhP5RuXB5\nSXJfj43LamCqSQK6rVkPt8dG941GHZySOFCLLFBQo0pc0DUCL3ndwUm+m4Bo\n1zZG7fHxgzs5dfUN9WJlVCqimpXGCgnb5ayb4TbS3LaKWJTyEt+fvSeddNj8\nk0aZQfTFFbLILSV5yESogSSyMzM8aQOTpWo3oiDKImmfkb4ai+UWxEWRmdc3\nvT7I\r\n=pLln\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB+KTmUs3bLHc6Zl6XRs3ZgMyVwADgX29fAIdq2CuVtyAiB1MJPjUgCRJb13L/tc35Rz0ylD4+FdH7+/6uT2lJ80ug=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.128_1558634596221_0.10661814058454189"},"_hasShrinkwrap":false},"0.1.129":{"name":"@react-ssr/express","version":"0.1.129","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"bin":{"react-ssr-build":"bin/build.js"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.4.5","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.4.4","@babel/preset-env":"^7.4.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.4.4","@babel/runtime-corejs2":"^7.4.5","arg":"^4.1.0","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","cross-spawn":"^6.0.5","delay":"^4.2.0","fs-extra":"^8.0.1","got":"^9.6.0","ora":"^3.4.0","unionfs":"^4.2.0","webpack":"^4.32.2"},"devDependencies":{"@types/express":"^4.16.1","@types/fs-extra":"^7.0.0","@types/got":"^9.4.4","@types/node":"^12.0.2","@types/react":"^16.8.18","@types/react-dom":"^16.8.4","@types/webpack":"^4.4.32","cross-env":"^5.2.0","express":"^4.17.0","npm-run-all":"^4.1.5","react":"^16.8.6","react-dom":"^16.8.6","rimraf":"^2.6.3","rollup":"^1.12.3","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^10.0.0","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"0119f9f2fd7d2dcfbfb1e13a2bb2cb35337f1f1d","_id":"@react-ssr/express@0.1.129","_nodeVersion":"12.3.1","_npmVersion":"lerna/3.14.1/node@v12.3.1+x64 (darwin)","dist":{"integrity":"sha512-2Cj6vf4nMandVHcX9rjfqVpvF7sW5/8bk9JaG/b71zJdx4DFO3GawI5nb00fmMpeuRhmMVDsGosO36vfNPI2PA==","shasum":"7d6949390925c8ee0ccc7c4aca49b9aafc9b3fca","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.129.tgz","fileCount":15,"unpackedSize":13812,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5uI8CRA9TVsSAnZWagAANvkP/0dh98s/BFKpm07yoYD9\n6mEaI9NLwz4tvBjSUGxsUK+GSIzghTSShcYBUosnnM5EmiS+HSyCn0lhxE9U\n5129zfIV61aiSFzXLwjXwpI8s5a4znlTZJAO+2SE53d/NEAASa0+kVo+3MOF\ndFR8qYkqObNCdZJcfGaGkHJsAsf+UctjTDMwlHahdlQzCaagsUapJ41wAnM7\nP1yhNdeE1nAg/aadPpLwE3e6ThDJo8lq530ch7ZX4HBvTMbEhWkO2RotK5WA\ndXR5Y6pM5ETs19T+oov+zDS1bmEC91pg4sfGfawgPb0N1fg0syRTqMwisNoV\nj/duRQdVVEDlnXUn/iJUNaHC9KiWH5Mfu4pLugFk8a1Dxb4hSoh3674M3FQi\njnHf/IcC1+YHDzz80qTM6rw6p4kumRxZpFxiEaqhUQCeWfCIhR82LEFO56Ft\nlo8CNNaqH2fWh+58UauVCJ9KFA+Rwxhy5EdKIsWCUIkVDkI5VhYDb87rc7iF\nCoJRKopdaqOjDPqVAtSxCvnBKOR8BCwKtGCikx9W4IIxXLers3uf5w8xZAVF\nhFH9TtCn+7CWx90vYQaF3zV4LgmtwANnZut7qc/4tHp7JUizyoQ9jJRmR1wk\nI48VS4mJO8rGV4Fxf7ZRA4CvCF6VpKw7eHto83qU0qhUfolIC+53j7I2cwus\n/3Ni\r\n=p2w3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDSlrRsT2jq9eEaZFTw0Nb4d4jZbMDZWqnDU2iTDJ2/SAIgE3VL/g6XXYFz1a5RNL2ZTEA4CCGuq+yQ0n/qGQ8Yl/s="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.129_1558635068209_0.815768500571391"},"_hasShrinkwrap":false},"0.1.130":{"name":"@react-ssr/express","version":"0.1.130","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"bin":{"react-ssr-build":"bin/build.js"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.4.5","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.4.4","@babel/preset-env":"^7.4.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.4.4","@babel/runtime-corejs2":"^7.4.5","arg":"^4.1.0","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","cross-spawn":"^6.0.5","delay":"^4.2.0","fs-extra":"^8.0.1","got":"^9.6.0","ora":"^3.4.0","unionfs":"^4.2.0","webpack":"^4.32.2"},"devDependencies":{"@types/express":"^4.16.1","@types/fs-extra":"^7.0.0","@types/got":"^9.4.4","@types/node":"^12.0.2","@types/react":"^16.8.18","@types/react-dom":"^16.8.4","@types/webpack":"^4.4.32","cross-env":"^5.2.0","express":"^4.17.0","npm-run-all":"^4.1.5","react":"^16.8.6","react-dom":"^16.8.6","rimraf":"^2.6.3","rollup":"^1.12.3","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^10.0.0","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"bf1538404a047d8caa468263c165436c7289a341","_id":"@react-ssr/express@0.1.130","_nodeVersion":"12.3.1","_npmVersion":"lerna/3.14.1/node@v12.3.1+x64 (darwin)","dist":{"integrity":"sha512-Tpk9TTxsLOssY5a6utuwK5nkwDH5+BxQql0zyBcPm8S9kZVSNgX5hjtxB+b6KGBx3GMjm28REWOrr/3nOJYPOQ==","shasum":"17f7ce2b9d25012ad55aa36d7232a9f815ef172e","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.130.tgz","fileCount":15,"unpackedSize":13778,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5uNxCRA9TVsSAnZWagAANbIQAIfVYjv8C0s942mQpYU/\nTjWh9sAYtRI937LNTsAajNT48aFozm6DxOMW+/tWkwp80sgK2Off9jguqjj4\n842f/BQsl1bX3d8uWKPkmlXQ6TZHJKCQPv+0eiUt2qUiZ7M2QzDGEBsPFaf2\nw+KWAb7zd05A2GV3+C5/d0yaQY+sEQU6hox5qdYwmMGbxJcbrrHoFkewCOCA\npX0/NzREgwHA8ot3e2WZLRXzEio4JdBokGSza8IImTEjA0nbDtfk/tNN0ogi\nHDSCJFH3DEU1ChFwKdXjhM8dHeCpR4W0hEqtE32F86vCmoDEP6q5olgzJMpB\nlTu+KpEX2AsK/wCDeffryil5hLU2a4+Vkh04zBwmrGaAYhVUWMnl0DwJt8Dk\nYP3NKMndpsjXGB7BV6p4WM+t5W2XhsGfnshGwCbt699nQ4Vs//SSs2zt8xky\nth76SCzF258xOvJVG+O3tz180m/eHypmBIgbg4nijEYr56IomPUJ7b7ge+Pl\ntHzT6RbCOgFib8/4nPcC48RG7roVPFMeiqgIkAAc9xoDtxIMX0zbdEHwCS8U\nhL3hS8Cd0Wyq9/47XZXXIatKTX42qv6TFU8MPVsL0m4+z0wsIy8SCcyl9m/I\nOYt8RuhZsjgB7cplGTJ9jRnsUIATmrp58PnFowFnj5XQi7D6j3CTAkP8cw+i\nR6sD\r\n=Udi9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCNRnlph/Kmg8Iy5oG2u1JGlaW3s871krs2RJ1Ps/gA0wIgTFxG7FIn7hqEzw4eDkVnxbFO93TO4EjMW/hORuQXFm4="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.130_1558635376861_0.10924534492569071"},"_hasShrinkwrap":false},"0.1.131":{"name":"@react-ssr/express","version":"0.1.131","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"bin":{"react-ssr-build":"bin/build.js"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.4.5","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.4.4","@babel/preset-env":"^7.4.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.4.4","@babel/runtime-corejs2":"^7.4.5","arg":"^4.1.0","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","cross-spawn":"^6.0.5","delay":"^4.2.0","fs-extra":"^8.0.1","got":"^9.6.0","ora":"^3.4.0","unionfs":"^4.2.0","webpack":"^4.32.2"},"devDependencies":{"@types/express":"^4.16.1","@types/fs-extra":"^7.0.0","@types/got":"^9.4.4","@types/node":"^12.0.2","@types/react":"^16.8.18","@types/react-dom":"^16.8.4","@types/webpack":"^4.4.32","cross-env":"^5.2.0","express":"^4.17.0","npm-run-all":"^4.1.5","react":"^16.8.6","react-dom":"^16.8.6","rimraf":"^2.6.3","rollup":"^1.12.3","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^10.0.0","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"a65a52b1863463e7161475cab4d4916b63a6fce0","_id":"@react-ssr/express@0.1.131","_nodeVersion":"12.3.1","_npmVersion":"lerna/3.14.1/node@v12.3.1+x64 (darwin)","dist":{"integrity":"sha512-07KnetH2HKTXHnqAHYCjAx9TjtoQJgUqtiN4e/iRzZ9DoJ59LIhkgU/mI0vPUPyJ9R0Fpe+srgyk7nZng1Qeaw==","shasum":"3126015422d3db5f71abd4d14569ed80c7fd8c84","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.131.tgz","fileCount":15,"unpackedSize":13433,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5uSmCRA9TVsSAnZWagAAdvsQAJkHKRx/JMPBCWuT8i2n\nLcwd7qhkN83zHQwcgSLT7jtyz4zW1qUrpZijwivv12CLlEg8iC8yyC7Sa4zX\nFGJGDqqBzSiKvc31zkz8xN0HG7JakqVtWel3h68AFivGefHtfN32wX0lZRB8\n4Ju1VdWVvXqNy7x2S7jHPZqBJ1xY8IDKYmr9o8eUJc4MYfrdmeTI6Uh6DZHU\ngRp/9w4fl8FOZ0VkuHqlmqirxXGUtaY6I8MBhM33m5BUDTJnPADJ4d6wkCAA\n17JPBpsz47YEomd3afHqPR28G1v+wSj+lPEMXLOV0w4kqruqs7Y3fC2B+0vt\nfFJl7H3qfynogtWhflNm91Gi5zEqw+orIBk3F5+bPn1IiysWOExiYD8Aos3P\nRFuHFOEHc9LoETM0KjsBR5qVYWGN7L+6qbtrT7bQfP9IKpyDEFc2+BIc3Dvj\nXErxu0jprLfk+NLHdGQUz7CVM/bKyL13jTj+LECktI+qJg5WeCJgCJxihNkl\nBIpKtVyMT5kVF62RGpNKB7KiYaH6NbK29xaOv14sQxWlm5Maru42Zfv8jFOs\nV8IZUkPp1BiTJvDpBR2D2VR+qCjhZNh4dxbhdGhQqv6Yy7BrPXzkBDeAaoL8\nKITEKovfpl/euyDVYW33b6fDyU4ESTL66ZO5U6yLzNXveBApNeM/s+qT8SQM\nOPrA\r\n=S7V+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCDcmYh/AWIRwH8+LfJuzbqySUj0Xhzhj2akFir654IrgIgG/Ms577yPi6fKtMvkPMjVQ1H8XanXHcZ9JAoqlbLv9w="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.131_1558635685800_0.3435839938565024"},"_hasShrinkwrap":false},"0.1.132":{"name":"@react-ssr/express","version":"0.1.132","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"bin":{"react-ssr-build":"bin/build.js"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.4.5","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.4.4","@babel/preset-env":"^7.4.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.4.4","@babel/runtime-corejs2":"^7.4.5","arg":"^4.1.0","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","cross-spawn":"^6.0.5","delay":"^4.2.0","fs-extra":"^8.0.1","got":"^9.6.0","ora":"^3.4.0","unionfs":"^4.2.0","webpack":"^4.32.2"},"devDependencies":{"@types/express":"^4.16.1","@types/fs-extra":"^7.0.0","@types/got":"^9.4.4","@types/node":"^12.0.2","@types/react":"^16.8.18","@types/react-dom":"^16.8.4","@types/webpack":"^4.4.32","cross-env":"^5.2.0","express":"^4.17.0","npm-run-all":"^4.1.5","react":"^16.8.6","react-dom":"^16.8.6","rimraf":"^2.6.3","rollup":"^1.12.3","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^10.0.0","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"403ec77765b3b5b3546a581f4c425e9f48f5278e","_id":"@react-ssr/express@0.1.132","_nodeVersion":"12.3.1","_npmVersion":"lerna/3.14.1/node@v12.3.1+x64 (darwin)","dist":{"integrity":"sha512-TRq1dRtg/qpUDklZQhiZjeM02rGyrjIvM+c4RzkCU1K70+NJDLfPy3PfgTWAxGI8rhVnG/3DQlgOBsBsEnIsJg==","shasum":"1758fa47d6a5d526fce4d2e54d063cc09adee6b9","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.132.tgz","fileCount":15,"unpackedSize":13436,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5uUGCRA9TVsSAnZWagAAPg4P/R6EiFfRLAS85OOqSd6e\n9Jp2ZpLLbT1xBhPfwN2vkblC5kA1M/dCgi1I7ODV8Hp7nuCZX0bI6SjgCV+V\noTrpP79QjpPBK20sAtY4ZKYlYcZFxXJTqcNjhHfqs3geo0dyykWpQwKIK5+0\nep7rFHOMnxrMZcVu1jIpsuTeJMuNy9IRl6crg2YY02WN8ODyDd2pYEnFSqui\njLEcZY6qtMnUJ2Kt7XdStZc+RLwMe7o3F2kVVxca7gAmeSAtwcaeL6mdAmxA\nu7LYGSv/SK7Lbg2MNt3N+8prr+bRP/YudslsGY3v0wn1TfCFr/BdVdXVd08K\nGWkSeZJ013aSIEEz3ptLGbG/J6L+NORMDkouYbpYReN+bB29srwei6xv9s7l\nYIsot/ma62ufepRcVcLwP21c5fabPz28rrfZfxTFqvwnL9C8P/kV1b0czj72\nmaMDDKx1mZU3GjCnziyKc11gSCZYLuBo7G+W4UqrGoWHYkOBfgKB7CgSBROU\noAIS4Ejjc7e2FUUOXvxKaFzRT0Q/QnvwaLT/O37CGJlWvMg+pzvnd0O/EwTD\nSLwG+QpJ5VRLXjAKSh8T0WJwd+mZevtmNhqn1ctl7A4luUNX0lOYsl3hIm/t\nhpmqeyxcpsQ3HjtUOn6vyO/zeZo/0ZcK5IrdFooZgXPqbbnaWYmaClrBmFPZ\nF5NK\r\n=gQz8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAUARJbK4MGZRRQApfigtiwmeM/mEkbiz5mw0X2qSgozAiBlrIJkSPd5SxV7l0y6YXYkQgLj1OcU1WmrhpKRKMp8xQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.132_1558635781988_0.5734786208001954"},"_hasShrinkwrap":false},"0.1.133":{"name":"@react-ssr/express","version":"0.1.133","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"bin":{"react-ssr-build":"bin/build.js"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.4.5","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.4.4","@babel/preset-env":"^7.4.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.4.4","@babel/runtime-corejs2":"^7.4.5","arg":"^4.1.0","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","cross-spawn":"^6.0.5","delay":"^4.2.0","fs-extra":"^8.0.1","got":"^9.6.0","ora":"^3.4.0","unionfs":"^4.2.0","webpack":"^4.32.2"},"devDependencies":{"@types/express":"^4.16.1","@types/fs-extra":"^7.0.0","@types/got":"^9.4.4","@types/node":"^12.0.2","@types/react":"^16.8.18","@types/react-dom":"^16.8.4","@types/webpack":"^4.4.32","cross-env":"^5.2.0","express":"^4.17.0","npm-run-all":"^4.1.5","react":"^16.8.6","react-dom":"^16.8.6","rimraf":"^2.6.3","rollup":"^1.12.3","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^10.0.0","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"7b102d72f2f57773507c9b59dc3f7af528eb78d6","_id":"@react-ssr/express@0.1.133","_nodeVersion":"12.3.1","_npmVersion":"lerna/3.14.1/node@v12.3.1+x64 (darwin)","dist":{"integrity":"sha512-aGfjbn7LtWNQIKcujTN8pnq6Se0VZ5GK+3Hvy7ExZUXxoqS2IL0q1jm6YV6iqaiNqyqPaIOCxLk83jBRJNfLpw==","shasum":"0bb5ec93dcc17ed306660e4d2d560edc53ab56df","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.133.tgz","fileCount":16,"unpackedSize":14130,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5ub8CRA9TVsSAnZWagAAHMAP/31S+Lo5ZEnrLO+eQTo9\njfkgmpaC/GuusgmJK/XMqopwSVPMjh/S8x/tlkANCT34QHgcMhECsLZQprEL\nmXZMd6mndQUe2cUEtCkKgEXLsfOKFPqQGD1LDidvPWaFQzcTqbZi44f2W9Xg\nNRLgThU8xMtw1KVI1vJo2NMoO5fzpMGpR223uWGc3yAA98WD1+B2ioW3cQE3\nd6GqMf+VlpecZf2oZpuIfMpXhcRaH3R+PSb8JWgXcwvSoe23Ode34NzXFmg4\nYB2PIA31CtFGhfv9btropV1KztOH2kRLcDUIsBNEJf+C09QI8s93EdA+jYIg\n0W5URSwV/PdsWBnLUcRtqegYkCbgcJhYYMkmBMmJA/PKkvn8VJHUZIfGJnqw\nlwhfV3yljpWJhYHcIpxX7mmonzGN6/mTbpaS6ksoeQFtuWDb2GnnzNfjcFw1\nsVZuPhWDKztZmqEqG6i2ysQZwNJYne3QcIGMjWmWT7CCkTbCTb18YcdCeShc\ndShlERBUs1gMmpA9/fvVYbXx5XIiA597cn5Ojh03rPSzDGz3xzYLn2tNOZK4\nkNH2r8oWuKXF5V7RnPd4o0a/xjk/Jrk7U4cGbfqC6KGJoyDm1RK7klllP/uw\nku8yoCqRuAEsUGLsMk8iRvNrZ5UyDpuT9am8gK0YisUfuyeeVdOyOVxA3G8H\nsGgl\r\n=+/xK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCxYp6+lOCNRBKIDvdPpHrf95b6VsupwSka/+gTgi77CQIhANM67mHijcCS8aNjeSrAwaoZUxuKkUC8y+C82ADyqx7b"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.133_1558636283586_0.5010064041581459"},"_hasShrinkwrap":false},"0.1.134":{"name":"@react-ssr/express","version":"0.1.134","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"bin":{"react-ssr-build":"bin/build.js"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.4.5","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.4.4","@babel/preset-env":"^7.4.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.4.4","@babel/runtime-corejs2":"^7.4.5","arg":"^4.1.0","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","cross-spawn":"^6.0.5","delay":"^4.2.0","fs-extra":"^8.0.1","got":"^9.6.0","ora":"^3.4.0","unionfs":"^4.2.0","webpack":"^4.32.2"},"devDependencies":{"@types/express":"^4.16.1","@types/fs-extra":"^7.0.0","@types/got":"^9.4.4","@types/node":"^12.0.2","@types/react":"^16.8.18","@types/react-dom":"^16.8.4","@types/webpack":"^4.4.32","cross-env":"^5.2.0","express":"^4.17.0","npm-run-all":"^4.1.5","react":"^16.8.6","react-dom":"^16.8.6","rimraf":"^2.6.3","rollup":"^1.12.3","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^10.0.0","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"58ea4c716717949735b5160d115cfaa0d0c5998e","_id":"@react-ssr/express@0.1.134","_nodeVersion":"12.3.1","_npmVersion":"lerna/3.14.1/node@v12.3.1+x64 (darwin)","dist":{"integrity":"sha512-qHY/g3cHPCO1A3w5odD0WLXaA4hdhctp9jp9e8dksf861gUpEtVUtfTgL1tLibnKCKtIbD9sDm06xiEPUTwh7A==","shasum":"3a4ec89669ab81c8ac9a0434c41e696a49a3bd52","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.134.tgz","fileCount":16,"unpackedSize":14101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5uevCRA9TVsSAnZWagAAgnQQAJyKpYWRU8lsHC61MRo7\nTTWAhMzye4nGUsFsjBrLAdL0b5v0ArCzbVs2aW01plR1nM/mk6Yfjp5mu5QY\nizc2IH8109YuqSPCGHX2TQnJ6NR29OVOTRGUF9etx4aUgwSm0CwDXbyr1T05\n3LJPzBSyab1rRRKob8fmbE1UjftsUxloQMv4EcwE8S3gaBoEhLf1A7Hhh7ms\nQ/ITfK67NsKjQr6Btc0RhhpH/gaETszZO6UeG3yvS/zZfO/19tYTN/DiZboI\n7Myb6ECtZIYmvTTk8MajY/55ae8RnSwEJU8DEYe8NgC1mlcOBEHoPKyarPXB\nxcemyTG5K9s+qUjsoHLGZ6gtmKCywfmHbVlPaMspbXueI6DHs4VNPEosLYK8\njIlsdUWS3vATSHfPpxV6orBeYLGLtA+dYZSB3fVHsXC3W/uirvaYgZMxiCwU\nwHdrH+J4dUvsSgYEWUvr+D1mLBmsT13l5rKmsbpcbKvo659IjC6pnvec6gAm\naFD9rkS5Ci2RLjueTXrsIkuHmZk1I9wizMofm4ZY5w+j7eaZNy/bJpnPAcrr\ndv9mfdrG9jGJv78Wf4Rde1+U0mlkut1A4j/awD33DqInQG0wl9QYZabB3+df\n7+I4NDwsnbJ739RMX/68tydc0UYcgTbz3M7cX8mFteG5ki4PqhWlMWwZcHBS\nKky1\r\n=4cSi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD6tnVnM/cPJHUaive13gAVctpaVWzz13/s7iMRkEM2kwIgHH0LPVlngIGg740+ZYtAmund4ByhnlkYIvNKSHsO48I="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.134_1558636463294_0.4932026325859684"},"_hasShrinkwrap":false},"0.1.135":{"name":"@react-ssr/express","version":"0.1.135","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"bin":{"react-ssr-build":"bin/build.js"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.4.5","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.4.4","@babel/preset-env":"^7.4.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.4.4","@babel/runtime-corejs2":"^7.4.5","arg":"^4.1.0","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","cross-spawn":"^6.0.5","delay":"^4.2.0","fs-extra":"^8.0.1","got":"^9.6.0","ora":"^3.4.0","unionfs":"^4.2.0","webpack":"^4.32.2"},"devDependencies":{"@types/express":"^4.16.1","@types/fs-extra":"^7.0.0","@types/got":"^9.4.4","@types/node":"^12.0.2","@types/react":"^16.8.18","@types/react-dom":"^16.8.4","@types/webpack":"^4.4.32","cross-env":"^5.2.0","express":"^4.17.0","npm-run-all":"^4.1.5","react":"^16.8.6","react-dom":"^16.8.6","rimraf":"^2.6.3","rollup":"^1.12.3","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^10.0.0","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"396a19a5f1fd400993498855b5be5d621da0e456","_id":"@react-ssr/express@0.1.135","_nodeVersion":"12.3.1","_npmVersion":"lerna/3.14.1/node@v12.3.1+x64 (darwin)","dist":{"integrity":"sha512-gjlxJo0Wl+u0tIX2ho4wdhnFOawXrsiuv3dvqvn0VayRen/mqPx98/Ec8xHFB+EZ69TDum8T6CFgfPsR7FgoKw==","shasum":"d5e4b193ab9f7858d94fc04397af3351c65435a9","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.135.tgz","fileCount":16,"unpackedSize":14192,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5uguCRA9TVsSAnZWagAAB9IP/3Rxkmmgf9UkdcIUxWOH\nGouEbSL9S8I3fQ8L3wOm5vf94naGPjMxCPj1nSCLfvaFuC1RmllHp/kyQ6bd\nbQ+23Wh50294sQuy1+9TE7/Qg2aEa85Lb5Jb0BmqhAuiTSHETRRb/zG48oaf\nR4N11usPJJ2RiybstNzWKB0VLpd3yBF1Y/SOzNE3ghBXV4yX5gpioDGeG50e\n54bYFn5xfaU0XTg7mDBStZnd0QvzZ8hzbZYYWbtldRc3AnP4ueCvg4ue2W+2\nXjgpDRkXLzEYKnWTbgzrCGGm0DSbv2XxaW1JCjDjIs+ImYhdTls7vXcvzHHR\nfxmyjvOf4zthLbZBijqMmygx7rgdGWOnlFLNM3Z7qeK1C4/4ZnriLPX0NOyX\nbrCr8NyRD9lTqdwDJ5uBJRrGS+F457eJwNIgeDIgw7cbCsY7LFNn1e/NgHXj\n6R4ankzbxnfMbIvvDSpqceO7/V9p95Z5AUfPq0yHTQ1pAo+6tXek+n5h34Ou\nCUc9JnEPSle55qjSa6SB7s+1eMoTFQY0RdRrObDvLdNhJGJ//W2OptWd4aUA\nmKQFhnQIJ2J21qwHOUl1ItnQFy9ivDP/urZt+u/UZlmeThI9EgFzmMB+yLSr\nK6CG81dH4BeDgeuO1XEWuKbjtQP2AZiIccDg9Nxr8ki4fzfr0n3oLcTejQa5\nLzpO\r\n=mvW8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEonGZS8sShqvp3cTxB1Vh8VW9gHIv02gbdJwxxIsQN6AiBOJximQ4eliySOIoc7Ylcs1T2GeShDANkLYrXb3ymNwg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.135_1558636589964_0.09493468867002419"},"_hasShrinkwrap":false},"0.1.136":{"name":"@react-ssr/express","version":"0.1.136","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"bin":{"react-ssr-build":"bin/build.js"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.4.5","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.4.4","@babel/preset-env":"^7.4.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.4.4","@babel/runtime-corejs2":"^7.4.5","arg":"^4.1.0","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","cross-spawn":"^6.0.5","delay":"^4.2.0","fs-extra":"^8.0.1","got":"^9.6.0","ora":"^3.4.0","unionfs":"^4.2.0","webpack":"^4.32.2"},"devDependencies":{"@types/express":"^4.16.1","@types/fs-extra":"^7.0.0","@types/got":"^9.4.4","@types/node":"^12.0.2","@types/react":"^16.8.18","@types/react-dom":"^16.8.4","@types/webpack":"^4.4.32","cross-env":"^5.2.0","express":"^4.17.0","npm-run-all":"^4.1.5","react":"^16.8.6","react-dom":"^16.8.6","rimraf":"^2.6.3","rollup":"^1.12.3","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^10.0.0","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"51ad3160b838e835a18997ea948b6ee0e90e868d","_id":"@react-ssr/express@0.1.136","_nodeVersion":"12.3.1","_npmVersion":"lerna/3.14.1/node@v12.3.1+x64 (darwin)","dist":{"integrity":"sha512-sHKjTWEmuFuASTgXVb8PGNEn5ysbwZQod6GAzLmlxOTepmObHxg+zPXuVu9kLZxMIipbtYdAS0ytt4Yf59Yxjw==","shasum":"254067424918a9bbca54cc47e97e6bde980effef","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.136.tgz","fileCount":16,"unpackedSize":13567,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5upYCRA9TVsSAnZWagAAuKUQAJvE5UQ2S4+YwbN3oFZy\nfzbXFeMKnKQKhkP55lG5FrhL8igoTqXaHutDRkg/6/ekl3KyPaP/TSYPYYOR\n/y3nZ5oltQN/fMKqXqHDhB6fxwoPV+sPBZUBbRJbV/APZUpQDmi4oAW2AbzH\n6AM77Mc/34rM+TRv09ZafTvvwEAg/V6bt9sxWdtvo9z9ncCePhq+M2lBK7yV\nuh4h/TTZ30cgydudAw2EonsUdQaV54yCpvdbtaWa7rtk/vVMHfOw6+U5+dO+\nHQXaOnhZo97KWPJJPQxy41gH/wNp2GbvIZ1rCzttcrVIgRjPT4cB5a9I2u7y\nUzxkszhlGe77K4cGVO0Af0FEUC9tNyHnlxnpY/CT28zPiNEa86k2CpcifoZL\nYwUMpheuy0Z+qcXg5NEdQ5U3Ova5XWYGZeJYRMoJjwC+YH/CKmIlJ77l+O1+\nBqFTUjysMDex9lax0QO7kyehjWDSPCs/rshzHRREuI6fDYtroqnvMvl93RYF\nOE2cETZSfNYz/9wBuiT98QG2XiNRbsSG1KM/bpnt7AnV3/U+I/OQxrsvp1LX\nWYmg6WAfRtr6L+88ZhXZZnkaBhYPZFWE1c5gNzeIfSuvYzBrHcThIs5XOyri\n3wgreUk8feV9+xebkXHJUBrQLzA0aEn5F54CLnH8gJfF+Dj0BxtrRGA16wVM\nqmsW\r\n=LLwO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFnwcmylfmWhPc6hNkN2xLvP2652wsYQNmVkuHaMZ/AKAiBCtDO2OMbm7kgGSBXYk7oFxDJjpLzOY/4JkNVloq8org=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.136_1558637143456_0.7106871225695321"},"_hasShrinkwrap":false},"0.1.137":{"name":"@react-ssr/express","version":"0.1.137","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"bin":{"react-ssr-build":"bin/build.js"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.4.5","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.4.4","@babel/preset-env":"^7.4.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.4.4","@babel/runtime-corejs2":"^7.4.5","arg":"^4.1.0","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","cross-spawn":"^6.0.5","delay":"^4.2.0","fs-extra":"^8.0.1","got":"^9.6.0","ora":"^3.4.0","unionfs":"^4.2.0","webpack":"^4.32.2"},"devDependencies":{"@types/express":"^4.16.1","@types/fs-extra":"^7.0.0","@types/got":"^9.4.4","@types/node":"^12.0.2","@types/react":"^16.8.18","@types/react-dom":"^16.8.4","@types/webpack":"^4.4.32","cross-env":"^5.2.0","express":"^4.17.0","npm-run-all":"^4.1.5","react":"^16.8.6","react-dom":"^16.8.6","rimraf":"^2.6.3","rollup":"^1.12.3","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^10.0.0","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"2afee99a7edce4f2053511d30d7f5791637e4b5f","_id":"@react-ssr/express@0.1.137","_nodeVersion":"12.3.1","_npmVersion":"lerna/3.14.1/node@v12.3.1+x64 (darwin)","dist":{"integrity":"sha512-kbvtBIv8w8GoA2w+p1o1GuChU9KpMe81qqRcEpz4U0JWTLbtoCutL3RoGraJPCLbX2L+I3g5WGUUGZ4bQwVfQw==","shasum":"535e8eb6dfe6a746891f87b588a5881bedf8242f","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.137.tgz","fileCount":16,"unpackedSize":13549,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5utKCRA9TVsSAnZWagAA3TcP/RbBBN7Kn3b9cwaIf+Px\nQVRBiGYutnNRwy2T8TZY2qH9/YGkm0N2r/MMwHwfuX7C/7z3yLNurIAHzcwU\ncBqVI0+sW8OWULncNUPSmUL2vwDVfzbanBw14WntjDi9GwPGj4uX/2thCIDy\nf6tB71rLR00l+g1/w6WROGQMXnLWehjW4/4sL2WhxCYo0BIYxtxyctBWvGmZ\nHFT58OU66rsX9o9yP+S89dyVAGoHjnV5Z/LY97RyOBNFAKbzPbIfIxSSQjsN\njtnfJ2SHzhCU1yaPI4beJ67GdESAXPr2iJQXjmiqFgWtiFecARVaGGZoooNT\nzk7JtPVy7G3pULSz7+FksEwLMvpSsMaIcu4KqhDRzue0zPvYOlBlL4gccPfz\nlNP2z6IRWYDwL9za8YF+oL82buyQr0kxZLPimUz+YgaWvVrlx+uHCtDh/cKh\ne7JBHxLSM/LcyHvZ0ytarRFDgx0OwgLplyjMQKlPr4hB4qdhAeF4omp8kFLL\nRQlZluB/W52yjlLcWQ4Cf0quEx9SVkVtB7CSoU0XLwHlqsyt2tsUYHRb8ri5\nHFdBal+8eWGx6r6WaENf8wuvcKATUA3BiAwsYEi1Ggx1K86O5kOGFAebSYIK\nqRBMd8knqEP5U2MQ7vqzrfDTfGK6KYzhdrr/kCgXIGOPOsmMYlsSHOCT42tY\nLj5n\r\n=iaGQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD8qjH3Txe2rTLbSfCeXZtJGxiYF9ynZAZg8yy6W+oEXQIhANmgjbimJIGc6Z6yxTlrvwHaHMMBrb2s2TAu4J1o1Ikt"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.137_1558637385810_0.20477377531722962"},"_hasShrinkwrap":false},"0.1.138":{"name":"@react-ssr/express","version":"0.1.138","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"bin":{"react-ssr-build":"bin/build.js"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.4.5","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.4.4","@babel/preset-env":"^7.4.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.4.4","@babel/runtime-corejs2":"^7.4.5","arg":"^4.1.0","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","cross-spawn":"^6.0.5","delay":"^4.2.0","fs-extra":"^8.0.1","got":"^9.6.0","ora":"^3.4.0","unionfs":"^4.2.0","webpack":"^4.32.2"},"devDependencies":{"@types/express":"^4.16.1","@types/fs-extra":"^7.0.0","@types/got":"^9.4.4","@types/node":"^12.0.2","@types/react":"^16.8.18","@types/react-dom":"^16.8.4","@types/webpack":"^4.4.32","cross-env":"^5.2.0","express":"^4.17.0","npm-run-all":"^4.1.5","react":"^16.8.6","react-dom":"^16.8.6","rimraf":"^2.6.3","rollup":"^1.12.3","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^10.0.0","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"6e28d6825fecd8bf51a15ceed39773aa77fc18a1","_id":"@react-ssr/express@0.1.138","_nodeVersion":"12.3.1","_npmVersion":"lerna/3.14.1/node@v12.3.1+x64 (darwin)","dist":{"integrity":"sha512-TtjMuzdvZ1rI/gOuXwF8uNsxDjIk4wybtn2FDxL9+dZHZiKg63jlp/tnYAzQC2Kb3w/36/EzDxdFsgV8eDIviw==","shasum":"898a5e5d2de7be1c7d48860c13841c8aef62aa9e","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.138.tgz","fileCount":16,"unpackedSize":13970,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5uzsCRA9TVsSAnZWagAAh5oQAKB6HaPHF/pXG3OGNzKR\nrhN+7PxjNcX7X5uO2sOaAEB1tpPAEjW7e62Eyata/tP1+v74dybLdeGLDeCV\nMDlqlmwSSD9baIZ/nShxPUl6SM+BKs2ezpnDF2dHkkhq1r71H604XHRqk4fJ\nQ8KRBxKx8rwZSLsN7en2FLsDTNropO3QSJuMw8/S79PY1MAoErAp8weR8Xjv\ncYWmZbFqVf6IuHMmtKomsxH2yib6gxNgM88zGI8jW64/58050RusiI8w7yiy\n9IY4VciyjjL2cOmQmOFfNcpWiGtKYzznaZheAt2ux8fV9KQ8/gRgV1CPzCHC\nBidp7B1+ZabYRc7+egn/X/qkzdjzNmbftCsbtJqjegnRr6IxjEpdY7190hVw\nAJrb+vGteHzDMzuRp9+w0ssZrpgafGcoCisvR1sn8kFAI+t/NweVX4yYOFXN\nkCGvT/lodCU1hptb0MVs6chIaYBmGL/uZglr8kfBUPueNqji4OvBj2mAlcAE\n0+5PKGA3tG5VBmeHJKKl2VVBsrap6xyTJ7thdvbjxmSOnuWI12W9Z/fAtEv+\nISRrKtdTgZjCr3Vm3qRZxuv10OAV1ySfMZUpZP+OCDp22p47F9G9EeB9YJmE\nfuxj45OSN/Feb2nvg9vG5agp8OTYT/pIE87MiTY5m5fMzg4QlGpOqHJLF7Fg\npzZx\r\n=D2RK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICFXvlz7PxgPWdV+re6278cbvIPP1fOXWFTfWvtJ8lurAiB9DR8+mmkDMhcouEotsgvjDJBabhFfLNh30tUG5gH5iw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.138_1558637804037_0.41437038021247075"},"_hasShrinkwrap":false},"0.1.139":{"name":"@react-ssr/express","version":"0.1.139","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"bin":{"react-ssr-build":"bin/build.js"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.4.5","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.4.4","@babel/preset-env":"^7.4.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.4.4","@babel/runtime-corejs2":"^7.4.5","arg":"^4.1.0","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","cross-spawn":"^6.0.5","delay":"^4.2.0","fs-extra":"^8.0.1","got":"^9.6.0","ora":"^3.4.0","unionfs":"^4.2.0","webpack":"^4.32.2"},"devDependencies":{"@types/express":"^4.16.1","@types/fs-extra":"^7.0.0","@types/got":"^9.4.4","@types/node":"^12.0.2","@types/react":"^16.8.18","@types/react-dom":"^16.8.4","@types/webpack":"^4.4.32","cross-env":"^5.2.0","express":"^4.17.0","npm-run-all":"^4.1.5","react":"^16.8.6","react-dom":"^16.8.6","rimraf":"^2.6.3","rollup":"^1.12.3","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^10.0.0","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"48ca5dd4e5cb0202a9eb1ea27939c44047ccb699","_id":"@react-ssr/express@0.1.139","_nodeVersion":"12.3.1","_npmVersion":"lerna/3.14.1/node@v12.3.1+x64 (darwin)","dist":{"integrity":"sha512-Op5ZDG6p+G3690aW7jJ507zqFFqgolZS21bLvkdO8crFPuM7Sl1rPkAN6gamgIjHwGO6+SC0bkYAAh8Prqa5ww==","shasum":"30af3c6974657c242c2bd2bebb52348b0f15d297","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.139.tgz","fileCount":17,"unpackedSize":14254,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5u4GCRA9TVsSAnZWagAA3kgQAJMQEm1tQoBunHLkvTOO\nYfhsCGXNA3TlslyEMGSueJClzQgeb8N4AQSucXKY7RgPna/bVcS6nMFpr9Z6\nIgfLrRQ6H++cHK/WUH3dh0Af6M20Q7cv/bfRtR6WQz1qJbQCfbYlJ/Bq+lfc\nIqcscDTJmohIkGj0xLHo87TiBmzSxkHLq6NG0PkREHi78TBtNJKVu2RjXDlL\nvwPH1P1Beik3PcWMNkmhi6cicfNrV6yky/1uH+4V9Y2AtmJS48aVQ743OdLl\nQmWKXWgJY+0f3yKPfz4PIiT4xU6EPr+ygITyCX0b5g2hDi8z5Og9sykIejd5\npiPYualHA35xI+z1wACAMZuBwi53QdkVEPpYEHPm2stOI30B/9q+V3ytI4hf\nHLsIOkZALbASdvnHh7CLXiXRoyG6LTaHgNFD/zR/L3FNu1w45n2vqxldF3iC\nnPuFy4uLqL7mIygP0Iw30iNdnHgturJZcV8EoCnFdwwJ/Kd5xZ3or6FQ7tzN\n6U5yelMeza80TF2jvdxDQO3E4xBQp/YOo3JgrRb7AR9fBqO18COHEJ1rr/Vc\n/J9TywW792mJ+FtRP1TTexf5gV8tBeQhj0apoYjqN93z5E8m1XRSdbx03Ul2\nfdb/0PLCdFzCOIPtrKqE8IicknJjDS5VLiLMBPnCewb+bsTF3CoPax5aYNJt\neTIs\r\n=UKjX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEsS20YmB7OrC8rkTOKoZZHCaege7imnRkQHyL8wOS7jAiByQ4Mra0Xev3voMqOLGEGgtQZLTGuHyvgi5qjvg8Kx3Q=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.139_1558638085981_0.1322035075289516"},"_hasShrinkwrap":false},"0.1.140":{"name":"@react-ssr/express","version":"0.1.140","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"bin":{"react-ssr-build":"bin/build.js"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.4.5","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.4.4","@babel/preset-env":"^7.4.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.4.4","@babel/runtime-corejs2":"^7.4.5","arg":"^4.1.0","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","cross-spawn":"^6.0.5","delay":"^4.2.0","fs-extra":"^8.0.1","got":"^9.6.0","ora":"^3.4.0","unionfs":"^4.2.0","webpack":"^4.32.2"},"devDependencies":{"@types/express":"^4.16.1","@types/fs-extra":"^7.0.0","@types/got":"^9.4.4","@types/node":"^12.0.2","@types/react":"^16.8.18","@types/react-dom":"^16.8.4","@types/webpack":"^4.4.32","cross-env":"^5.2.0","express":"^4.17.0","npm-run-all":"^4.1.5","react":"^16.8.6","react-dom":"^16.8.6","rimraf":"^2.6.3","rollup":"^1.12.3","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^10.0.0","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"e9d18e410a4e69b989e36759cc39e8a36c963376","_id":"@react-ssr/express@0.1.140","_nodeVersion":"12.3.1","_npmVersion":"lerna/3.14.1/node@v12.3.1+x64 (darwin)","dist":{"integrity":"sha512-+wJ2QWMmSahp8Oyzk8FpBCf9OdrGyz+k5pF84j/0/WfcSYjrr1I/BeHFKEOt8fqbuNospRpJZhTmTW7vCga/Ug==","shasum":"3799cbc019703074cbe442b79e2f3779d504ee92","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.140.tgz","fileCount":17,"unpackedSize":14237,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5u84CRA9TVsSAnZWagAAEWsP/2gHcSxerys9Vpoz9oiW\no0jYRhsBOzw/E666QzxNnq/f0+JJNIEVqH0xMpAhhdn6Q2UIROXyHdULdTXb\nrJlHLj3tKHkh/F7Xa0EvspBl+nDQ3+mDP1Qpd/GcO8LR1zc4XL0pXjjF9OZi\nVHtEo6lYjEPULz4Z/Y6g17rKDaZ284ATnIU5SX9zItsUC3Fd+pCqdBqBUn/0\nJi/Exkq7Y6otcj8cdcZPJN5E3Iv5xjSA9MxS6pwShhuYLVBC5N5AKL3B6t//\nWsTK5CNLfDW6qZWeKWo7NzSpB0dZaRAE3jYbZqbx6zmaca84Gc3RZRWoaWoV\nc8xllb2QYj43YHHV0H28QGSvjET9hp6+MYZJgyHBeyLqGMnGiv4SuP1Jzozs\nQCE8lNFdgSYINsY3D8jb2f4+6cjU5O4NZ924xyJHINHWa0xX3aGU3Vw4vh45\nQ0C3bT6a7rqz8yzzIeU50N3GvgKthaRaWalHBBOdvXWzVymt/8OWtaUAn8E0\nwvsQKVnmv7BZJ7y+WbKsjMFblZVGXZ7mDQgNaarovx/erEeSABS8rt4diyZa\nk6/pq/y1ZD7Zmdt+srNqskHbAARGM1+pN7joCskoYy4svmzDWkFQQPCDX/Jn\nshmDhrxQl++JwP6aPQ0McxjtK/ku/YkJ9b5OU2by7eeqW1B+XrnpbPN7Z02M\npPWg\r\n=QWDn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFT1aKKu5YGY5tqkOiFrDN9jyUsJ7hO8OsmVzfWi7HZuAiEAjCdoqun06wgz4bTjz1HdRAUJGGwhLzXSBGMUHWtK6gc="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.140_1558638391531_0.8642241570132316"},"_hasShrinkwrap":false},"0.1.141":{"name":"@react-ssr/express","version":"0.1.141","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"bin":{"react-ssr-build":"bin/build.js"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.4.5","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.4.4","@babel/preset-env":"^7.4.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.4.4","@babel/runtime-corejs2":"^7.4.5","arg":"^4.1.0","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","cross-spawn":"^6.0.5","delay":"^4.2.0","fs-extra":"^8.0.1","got":"^9.6.0","ora":"^3.4.0","unionfs":"^4.2.0","webpack":"^4.32.2"},"devDependencies":{"@types/express":"^4.16.1","@types/fs-extra":"^7.0.0","@types/got":"^9.4.4","@types/node":"^12.0.2","@types/react":"^16.8.18","@types/react-dom":"^16.8.4","@types/webpack":"^4.4.32","cross-env":"^5.2.0","express":"^4.17.0","npm-run-all":"^4.1.5","react":"^16.8.6","react-dom":"^16.8.6","rimraf":"^2.6.3","rollup":"^1.12.3","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^10.0.0","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"8d405913c127fa6a6a589bd9b44e552f91a4b019","_id":"@react-ssr/express@0.1.141","_nodeVersion":"12.3.1","_npmVersion":"lerna/3.14.1/node@v12.3.1+x64 (darwin)","dist":{"integrity":"sha512-W/2SxbkQvm3GLLVRQdWJplJieOUADJH3L9wVp40BVlf3nWokLsBDPlx3Nc3tlI+vcZoEhJgJDN9bFRUQ3EKlfA==","shasum":"3263d3cbf34bde85377ff24eb5198ce3553b8938","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.141.tgz","fileCount":17,"unpackedSize":14296,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5vhyCRA9TVsSAnZWagAA7LEP/jtp+CFqhJE8f542oq5P\n4nlf1ce587Aym4hSOkMHuHH1AcMZt3L0IUwm30denB2xF8uPZND65S+xlreR\n4oqAlzP5aDgUpInaXWcYYX0QSuUgBukRnYg6iNt0/Mz00lqQOXm3TeoMpQyJ\nRyy8n++tUJcMaFkXCx8TjDqUahL8gISCelNugar+5M5/Bc2BEKWHjFu3v8kC\nTkpoJODbIzsajxmpmtqE5vN6LyqMWuVx0SZUj/SFvPeLAXKCwelbK+Mo4C7Q\nhl19zIxdAiGkZOvofqjzl98FrLK+c2d1BIJay4Q9TADTrftYafyROIahVu62\nAlb37HIHG0Fug9ZTFuPI0cFlsJzK0sgXuIqgElMpPhnWHcYZ6hNU3UV/eqs0\n1c0UbB6nT5w3UltwyUZxSePlskOeviTUPN/mwZxNhqis7Wk2o7Rdnv5rRijj\nvdplAOWV2e7JTCqLK3Ge1LCQ6HmJFtG7DN+4TJdgECD2JuTNyQCLqpIpugql\nYzxxpzdMeBFq8f3XO8xgri5Y+K1OBCuevpqL9s5FEUv59xPJYc+pkCZt9Z7H\nWbIvvVJylW3C01VCfL9CzZzhMRYcUFeGshNzMXFm+N0AUTdTn+yKucNH4euf\nKQtduB/9H2Ft3exQhfrQpro7aPCcR3ApVvWNwppMo82UKRaBtCcHJBAMwSju\nK0qy\r\n=+k3H\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBH2Lsl5Kg36es0PDWwL+CCEWhgBj87d447fIKHDfl2qAiEAuP3MfS09M4lZdaMq3D71f+ml/ObJUz4s1PQRCUi5ta8="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.141_1558640753866_0.694016927897442"},"_hasShrinkwrap":false},"0.1.142":{"name":"@react-ssr/express","version":"0.1.142","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"bin":{"react-ssr-build":"bin/build.js"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.4.5","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.4.4","@babel/preset-env":"^7.4.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.4.4","@babel/runtime-corejs2":"^7.4.5","arg":"^4.1.0","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","cross-spawn":"^6.0.5","delay":"^4.2.0","fs-extra":"^8.0.1","got":"^9.6.0","ora":"^3.4.0","unionfs":"^4.2.0","webpack":"^4.32.2"},"devDependencies":{"@types/express":"^4.16.1","@types/fs-extra":"^7.0.0","@types/got":"^9.4.4","@types/node":"^12.0.2","@types/react":"^16.8.18","@types/react-dom":"^16.8.4","@types/webpack":"^4.4.32","cross-env":"^5.2.0","express":"^4.17.0","npm-run-all":"^4.1.5","react":"^16.8.6","react-dom":"^16.8.6","rimraf":"^2.6.3","rollup":"^1.12.3","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^10.0.0","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"fbc3572005f8b76473e0374003ef1a19edd166da","_id":"@react-ssr/express@0.1.142","_nodeVersion":"12.3.1","_npmVersion":"lerna/3.14.1/node@v12.3.1+x64 (darwin)","dist":{"integrity":"sha512-5IQca1+mVXQC9iewg9ISMN3ccKzeaoIZkpbVHz5kak95Q6M0wZvlshCcI/p4fSOXiEoXf7UoErcHASJhCXkO3A==","shasum":"abee9200a56a880994bb5e7b56b2815b1c640208","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.142.tgz","fileCount":17,"unpackedSize":14326,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5vpPCRA9TVsSAnZWagAAEv4QAIZrdjYMVNZLwGVVAlTN\nSkHbwAUf2Eh3RifUP4kqJAnZm2wYZXps233M/LBuoQ1Cl4DKlJ699ww7WYc5\n4vD90Fwb3H9DSWQ9ty9SqnB+syxztb0FaMpPiaCsSXpja+mgC9KxuhWq6MiP\nnUxCYzWqrtbOLe92uiHKT5wi769tiekD4UALD6bqKbVNWFLq9XMA3nRjIs+l\nxdFX5Tzk6M9t9VC6dJ6b126xYDxzWd4wwJBmIX6LPVmNYv4N8JB7S1be1q6p\nTxta8mOGjtHg2jX4ODV9PIVmUcF8wyRXAbO05Yz5e2AwFTm27b11XHI9HzxT\nkbVHQ1zBDUmneA3QGVGSyJs11Gfr/qaXDxe/n0RaQ4BwA1BZpOF9+0j/gu4K\nnliFU3rDEtdRpVEeXGhi3gJpvO8bOi4k4SXTPvEH9RPZeAaXZBgG0QYPaibv\n0egqChJyhnrg4xoVuW4gA3crwppvWffz+SEphz8HvHX+rPd8vGzcCDgp0IBW\nR2ryZfqaUVur+qdLNeT2eAszeBkiazPb0HgRQlWzqnA7cCAlfcEUZDqhQbiI\ngPjO86e/8wDdDQKfsQMQaFGtbC2+KacugOh4KcwfDfEqZBSxw12M/4YOen4E\nwf0aL2YyhFgrYswEriFAotJwPkntPe/BarmCAb74lH9RJe2wCrKu0EbEsv0Z\nqXCQ\r\n=gNq9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCPm5OoQdBkGGyTJooi1VYOEEIzhOpEY5kA/EROjJkKywIgZmJvGyDMpKOdlMPMg3vmHDCru0Gt2YOKV6h/OB95Nac="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.142_1558641230815_0.005665643205335691"},"_hasShrinkwrap":false},"0.1.143":{"name":"@react-ssr/express","version":"0.1.143","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"bin":{"react-ssr-build":"bin/build.js"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.4.5","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.4.4","@babel/preset-env":"^7.4.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.4.4","@babel/runtime-corejs2":"^7.4.5","arg":"^4.1.0","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","cross-spawn":"^6.0.5","delay":"^4.2.0","fs-extra":"^8.0.1","got":"^9.6.0","ora":"^3.4.0","unionfs":"^4.2.0","webpack":"^4.32.2"},"devDependencies":{"@types/express":"^4.16.1","@types/fs-extra":"^7.0.0","@types/got":"^9.4.4","@types/node":"^12.0.2","@types/react":"^16.8.18","@types/react-dom":"^16.8.4","@types/webpack":"^4.4.32","cross-env":"^5.2.0","express":"^4.17.0","npm-run-all":"^4.1.5","react":"^16.8.6","react-dom":"^16.8.6","rimraf":"^2.6.3","rollup":"^1.12.3","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^10.0.0","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"c92b9193bff12abfac71246741744a4c247c5124","_id":"@react-ssr/express@0.1.143","_nodeVersion":"12.3.1","_npmVersion":"lerna/3.14.1/node@v12.3.1+x64 (darwin)","dist":{"integrity":"sha512-zDlsugbFJVgY3Jw0h+bWYzg5Mx7FaL9+88mUe06Bln4Pj3Z4sYQtENzUzIiE3QQBXyHTdh9emLyC0oUFrEGJSA==","shasum":"70ddeb0ece9d73f6b120f9e9c9b740904c219da9","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.143.tgz","fileCount":17,"unpackedSize":14282,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5vyKCRA9TVsSAnZWagAAVhoP/2lP58Uf1pmkB+SQl0kT\n2M2kfvLNPq1LykW7FgMlO3VzKqifzM4axtn4MHH3E6ci7U5c/cjCRC93UC/4\noyTDWZMkKarEsLFz1t7a0ES0NnUXaGN7QrgmD4Msxp76E9F63n6TKJKeeDDO\nwy0NR4a+zKbIMahX8H7t/dJJL0h3C7sTLrz8mcLZwkyB6iFsVYM9n6EWht7t\nTPubCv2s1DboLAWXlsgyCbKZmxbrSEmSA++vxFs+55fC+t3bdSq1fHINZ7EV\n7E12w76TREdkF8A7stjubl7/wremLK4QCH3Vg1FuNNQuxekZFs/BhzKpDmk4\n02sM6J2p7pq6bN+/+WPNzM7vmCaqr33CvlnTaRIRXVz7fLZJ6bZLkSxQC82+\n8TNhRsItjYkcUN36ptU6OwsgKp0UYa7WJJzyVQj1GqNOqNAYR5G4ZrUBN7+8\n6nOxDXQPGVMy6vNtvS50mubByl6LX9bZya+AjEOacTpbS21wE1qUV3Q3HYsp\nVLBGPsMkG3tL+07rU5eGpY76s4N7/JrNZ5t+1NBwQAIKRNkKJEF+tnBGcmGE\nYVPgZcWwPyN82ExCOlIpCbIPpfwqkSax8SnpbdZ2WrHm/KDUIEIUcGuvaZmA\nSwOgqSWMz/nPZfeZpnHycPShmytwdnkac0qspveSofHROEflmg+01eUkMmAS\nO8Pb\r\n=XEm9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFBYMtRKDJgzmwB9OfX21YEAEzMLFTFM7H0RpWjLzXnaAiEAu/smHYY7ge1hIIm7V0hwxgN75uN1nJzrnLpyLhVT2S0="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.143_1558641802261_0.3669196763865614"},"_hasShrinkwrap":false},"0.1.144":{"name":"@react-ssr/express","version":"0.1.144","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"bin":{"react-ssr-build":"bin/build.js"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.4.5","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.4.4","@babel/preset-env":"^7.4.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.4.4","@babel/runtime-corejs2":"^7.4.5","arg":"^4.1.0","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","cross-spawn":"^6.0.5","delay":"^4.2.0","fs-extra":"^8.0.1","got":"^9.6.0","ora":"^3.4.0","unionfs":"^4.2.0","webpack":"^4.32.2"},"devDependencies":{"@types/express":"^4.16.1","@types/fs-extra":"^7.0.0","@types/got":"^9.4.4","@types/node":"^12.0.2","@types/react":"^16.8.18","@types/react-dom":"^16.8.4","@types/webpack":"^4.4.32","cross-env":"^5.2.0","express":"^4.17.0","npm-run-all":"^4.1.5","react":"^16.8.6","react-dom":"^16.8.6","rimraf":"^2.6.3","rollup":"^1.12.3","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^10.0.0","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"c878e5bd203d9ac4af94e8916b79942b10197d6c","_id":"@react-ssr/express@0.1.144","_nodeVersion":"12.3.1","_npmVersion":"lerna/3.14.1/node@v12.3.1+x64 (darwin)","dist":{"integrity":"sha512-lP2V0A2Z8pcwLIqovdWQ8gDMkvKXiaRL8ZJFjFgh8vGpeOmt/2BivgC3x3lPlj7TODHH+HC1dluY5VaHYqJiFw==","shasum":"485ebfe20844eaeb6bd75f64e6c8d3f6ec23d351","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.144.tgz","fileCount":17,"unpackedSize":14279,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5v0qCRA9TVsSAnZWagAASugP/RCN+hOUaMzVFN7Jv0iA\nHgbQKe5rcmfco9aSbvRfj+ygP4MLcbn9gAeQtn2PlsI8L5UI611wb4r+7UVH\npG+M/maFwVlSkRGK96UXTHNRkG089L664F+OQS+bmjOXJ8U4lZvLrtWR0p+4\nTkuASrKqRnfrXo4tILv1M4xm4Fb6vED30xz/C5IYkpcgDL+RGe12G6LD+sdo\njWSOsTsFWSMtCoxGOfxbIKbbx1CC6TlhWyEp4URVKQL73JXaaXikX64IuBwp\n2bd53tyGw7JJL5IZ0IXpEWWSYQw9gxzOMGW8cc1OM6QJLn3EGjMB+fUwdjf9\nw+3O6HdhcD8MQ4XIavrrg8cgXHzoq/Y++eXTxMaxGkYBV5Dw8JyO030BWuVx\nL7sY06PCeorHM4tg3qZiquCHOaCc5I/2Pd9nmiisdUyHDmDBBj2HkaPfIlRZ\niZ6RqhFJLzECfAD0zQWGujiNDT74qs9Zc2sdwz0p6RWvKQi/bxATqjRMxJgI\nVK9wkWJ2VQ6a569azuAZ/QZuMhxvEUr+a6e+wmhq4rTZGfMu/ZYEL8FaCpaX\n6K6SDoGDQ/I3DOgnfLRW3Hihw2soQ24mNQvmJp/4R7Wp/1mk4ip+O2lr4BNJ\nbTyx6hcH+mYjZmCZfi/IxhEjNc7pUduPnTs2Tx2QhIdF28ZqvZrUSzea3KKn\nhlyW\r\n=2Smw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCI+LiB/kI0J+ZnnzW208WlTgrZh8+ozTxCZxB/XUA6AQIhALkl0SmJoY9OJJ6gT5ZJMvtupPfodrf2raDIIwExdnr5"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.144_1558641962352_0.6238965201699957"},"_hasShrinkwrap":false},"0.1.145":{"name":"@react-ssr/express","version":"0.1.145","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"bin":{"react-ssr-build":"bin/build.js"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.4.5","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.4.4","@babel/preset-env":"^7.4.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.4.4","@babel/runtime-corejs2":"^7.4.5","arg":"^4.1.0","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","cross-spawn":"^6.0.5","delay":"^4.2.0","fs-extra":"^8.0.1","got":"^9.6.0","ora":"^3.4.0","unionfs":"^4.2.0","webpack":"^4.32.2"},"devDependencies":{"@types/express":"^4.16.1","@types/fs-extra":"^7.0.0","@types/got":"^9.4.4","@types/node":"^12.0.2","@types/react":"^16.8.18","@types/react-dom":"^16.8.4","@types/webpack":"^4.4.32","cross-env":"^5.2.0","express":"^4.17.0","npm-run-all":"^4.1.5","react":"^16.8.6","react-dom":"^16.8.6","rimraf":"^2.6.3","rollup":"^1.12.3","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^10.0.0","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"26846920f2b05aa43f8fca514959240bc644d867","_id":"@react-ssr/express@0.1.145","_nodeVersion":"12.3.1","_npmVersion":"lerna/3.14.1/node@v12.3.1+x64 (darwin)","dist":{"integrity":"sha512-BSxn2tCzuYVRc8Lo2TZ2Ix0BLhfTuNe+qAMofhRQJA78tG9e0Ti0fUg6FcuAAkecZBzizXbBgcUXqrCV0Xt6wA==","shasum":"21f1092cee8485fde926271df8b6cb15bbb8abdd","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.145.tgz","fileCount":17,"unpackedSize":15167,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5wANCRA9TVsSAnZWagAAiTQP/06S+icDQLrdoWUU55Nn\nQBL6SsA5JT8uVn2SsE2igmkEhYX0eS+tnfOAQ5AT/VSNUmNYl4Ulh4x/6xZA\nDhErRN2dZOI0iHE3aELxV5nozXhK3IFDBNBK+8/BllT2aalss4NTSatM3kFo\nfpae14fvVpMuyJTDwG3+PEL/PizT6PRPCaafuaPmfGEvoGC6emAsx4CA/pv9\nCrr3DRztvTcXbHsdf9GvdBjOdEDb7Ct0UWwFR/ZARPUCcNhSeiG/KKugIlJ2\nXK+SzioOUS9N4BF9rYZGKNy+1jnGC8W4xP1wEiKYcDaZl7Oe6UpktRttqzdS\nuArNaDqAH/IsMUDXw+EWo6hG+3P2VHwHx9dle2deizskxm4Bims+yCJRn8nM\nf/Ny0rg9kSsgMV9vaEqGppKZNChP2i7qucRMweYrvclZALXZ8QGZGUxjZ7VY\nLxVNZD/5mQmhXxrcqKmUmSPDjRAIuQpxWDjeUSeVNsN0XWfK8p/zRR5O5Ryk\n2fxsRFEa0dZyMJYhk9mbboch7YLoDyF8/LmfrnjZSbgsTO52kxTqI8EAKXRp\nXA/N4OfHqPgycCeKycjCcn2DOBPxxQuzcgPnjvQPOLmY3QbFxLxKIr5GGCs9\nluDGXLVpJVy5Qhi9pIBAOEyo/e1W2Uv1PExUhfISRIwDczWgfmiI3L+hPGEA\nET1h\r\n=dKKf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDCgOz3Nsq6uFQfQ0sIjvvccdXS7DiMOHTUhzx/+lLtBwIhALkYNFKsRqszknvqMyMraweNl0U/VdZ54Z16PEHMDKS9"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.145_1558642700431_0.06206668080499633"},"_hasShrinkwrap":false},"0.1.146":{"name":"@react-ssr/express","version":"0.1.146","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"bin":{"react-ssr-build":"bin/build.js"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.4.5","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.4.4","@babel/preset-env":"^7.4.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.4.4","@babel/runtime-corejs2":"^7.4.5","arg":"^4.1.0","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","cross-spawn":"^6.0.5","delay":"^4.2.0","fs-extra":"^8.0.1","got":"^9.6.0","ora":"^3.4.0","unionfs":"^4.2.0","webpack":"^4.32.2"},"devDependencies":{"@types/express":"^4.16.1","@types/fs-extra":"^7.0.0","@types/got":"^9.4.4","@types/node":"^12.0.2","@types/react":"^16.8.18","@types/react-dom":"^16.8.4","@types/webpack":"^4.4.32","cross-env":"^5.2.0","express":"^4.17.0","npm-run-all":"^4.1.5","react":"^16.8.6","react-dom":"^16.8.6","rimraf":"^2.6.3","rollup":"^1.12.3","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^10.0.0","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"013ad8c346d527f6ee23e559be9a1b6a5a058624","_id":"@react-ssr/express@0.1.146","_nodeVersion":"12.3.1","_npmVersion":"lerna/3.14.1/node@v12.3.1+x64 (darwin)","dist":{"integrity":"sha512-PqHwjYo5nqjQsgZVPsLVASE0uWq9jjUx7eNtHlKt7H+WGvUyv+zSnc9hYCzbPaJsEcdGQjrVvGdoNRAfPiB2kw==","shasum":"f3de6b250f396e71ea1c654c9eb5f4d59dcc5b68","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.146.tgz","fileCount":17,"unpackedSize":15226,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5wJ9CRA9TVsSAnZWagAA754QAI6U6lECHqjzftN6moSt\n59GFHm7UFQMK4dXozT+DLUIJyq45gRT3TMcaMlwzwB9tJvd/riqRZmMa+2l2\noU8W08UivvUB5kf5wo7G+9YPHUg3F+so40dFvXrlsnN4/lheV5CdWDObGtF+\nKWhHgoM3nGe1dkGdIL2vsr33+vQrmu1akC1ckp8QKKHMbmKi+Y6sIR3DOkA8\nNrITvMNpnRtBDZkMBZ3A6a5JX8iHzXxCVQaEBa7w3GCRcyL/o0alGujSi29n\nR9wI7y1olUCIWjvwQomMRIBIJbxihIl0UDPQqGol0x7LlkPa2oV8P3kDx322\nKcc4VkMbwQy7zmqRjYnfHsdQ3QB/hcBtSmycI8BlSt5M/E4KuU3rFXsv+vEE\nyPgyyt0zwfPtkxmxVElXYk4lfYyw/wKqFmuBg5zIYpXs/8VLJEvUIT7B1nui\n+qrdBhH+1ZRkNXb31rjQNsMDpHdhOuB7GcpZnr/67I+2snHDqtaIN/dgqnlg\noZEY5RUR1JE9AuZnMB7tvf8Yu7pLDN36lOhQT3Anbn7V5PWdfIG2wgGDpduo\n2yw6S5dQaOIOqaKgpTo+T1qtTVp5mQEu8IIazChrGXSau1AIliQicvuhP/w8\nLk0hwvFNXkTf7C8YpstuyUKEqSkWunasOT3/Y+YKgSO9/ccfXD2kXn7ouLly\n74MB\r\n=vpww\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBlAF1sh6ZUSYfWRbW1qzx+kmSbpaMl2grTA1pCKkDgKAiEAvJ+0aYfI42zwZ4kb0/bCUYI1x0UASkv3rvaR+sibO4g="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.146_1558643325324_0.8719059632338324"},"_hasShrinkwrap":false},"0.1.147":{"name":"@react-ssr/express","version":"0.1.147","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"bin":{"react-ssr-build":"bin/build.js"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.4.5","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.4.4","@babel/preset-env":"^7.4.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.4.4","@babel/runtime-corejs2":"^7.4.5","arg":"^4.1.0","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","cross-spawn":"^6.0.5","delay":"^4.2.0","fs-extra":"^8.0.1","got":"^9.6.0","ora":"^3.4.0","unionfs":"^4.2.0","webpack":"^4.32.2"},"devDependencies":{"@types/express":"^4.16.1","@types/fs-extra":"^7.0.0","@types/got":"^9.4.4","@types/node":"^12.0.2","@types/react":"^16.8.18","@types/react-dom":"^16.8.4","@types/webpack":"^4.4.32","cross-env":"^5.2.0","express":"^4.17.0","npm-run-all":"^4.1.5","react":"^16.8.6","react-dom":"^16.8.6","rimraf":"^2.6.3","rollup":"^1.12.3","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^10.0.0","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"ebcc6e62bf090f721233a0ca26aefe9ff9a400d5","_id":"@react-ssr/express@0.1.147","_nodeVersion":"12.3.1","_npmVersion":"lerna/3.14.1/node@v12.3.1+x64 (darwin)","dist":{"integrity":"sha512-cxNWr2iBeyBkAYbquF+dsEcE9j7/4plHeG8H4NikfssofR/Wx63TC+ztucM6LFFduc1dqTHBab6jodXyEu8NKA==","shasum":"69b0346ca9a1caef676cc55364da3fb3cfb88c18","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.147.tgz","fileCount":17,"unpackedSize":15225,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5wNDCRA9TVsSAnZWagAA1VEP+gKmQQbEm5wx25MTmZFz\n21lX6QVjzhR99p2TEsmblCoeYO/uXeQxRQHTtfcCoTfQxtK2FvStLos8nInZ\nODV6DpTCSdvdCvT9KGazI0GncWsk81S6N1pfrqjXf2R0fcGOAnBVDtd0nLYc\nxm5EQ6GGQoo5TeNgmnFTGFqu4U9L87/qOrJ5jhMdZou7aPeo8Y1I4k3oYWvX\nS16yLjZxs2Jqgar515oMzRT/i8o9bx1XHY5+MfO8aCvEAlJyfpD1/23T5mFz\nfh/nk/db4pMGvFCT7SfKBAFeypzBv7hng+Vln567Y+wqbCxWPQ1Q6TjBQT1s\nE1qZXRcbb3oZoUzLLJ1RjjWLVRM5brjCFtwQGPkrXIxLoD9JSco9pKHTAawB\nqN/sYiyPZvpbBPoIWy4/bzSW4l4wDZRnl4XPAHgYA1VlwS+Gr6Gm7IblOkqq\nn4yJvsUnJFr2uBBNIqA4aBhvHpYbDjEhXwdqVAIfLydAOFNENprYFlJKvUrJ\nV10mdmskFeR+W+MqhRMp2SS0ids43e3FKC3je/Bl58KAC+fjZyainrcRB8d4\nbrtr3xYQNRE7dYXMF8jZo7TxQIryDyO6C6NeVlVznrNCkJJ+xu6PIdhthOW1\nzcl+XVhC7quVgQMPbzM4/Br3qbraP5K1gwmjP2fPI8R95xIRPrtPkm8DmDY4\nht02\r\n=FXzp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDYvzDzt+wRNO7VTLjVXvD7WsIyzMKdtZ+jTEYEhikBnwIgQnRkgf9cfrxtqQ/fcsj9PRXokRZ+A8mPecEXyG7Qm1M="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.147_1558643522617_0.11589665975682872"},"_hasShrinkwrap":false},"0.1.148":{"name":"@react-ssr/express","version":"0.1.148","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"bin":{"react-ssr-build":"bin/build.js"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.4.5","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.4.4","@babel/preset-env":"^7.4.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.4.4","@babel/runtime-corejs2":"^7.4.5","arg":"^4.1.0","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","cross-spawn":"^6.0.5","delay":"^4.2.0","fs-extra":"^8.0.1","got":"^9.6.0","ora":"^3.4.0","unionfs":"^4.2.0","webpack":"^4.32.2"},"devDependencies":{"@types/express":"^4.16.1","@types/fs-extra":"^7.0.0","@types/got":"^9.4.4","@types/node":"^12.0.2","@types/react":"^16.8.18","@types/react-dom":"^16.8.4","@types/webpack":"^4.4.32","cross-env":"^5.2.0","express":"^4.17.0","npm-run-all":"^4.1.5","react":"^16.8.6","react-dom":"^16.8.6","rimraf":"^2.6.3","rollup":"^1.12.3","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^10.0.0","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"377b5824ccb73c6a68038529900e5eeb73d33182","_id":"@react-ssr/express@0.1.148","_nodeVersion":"12.3.1","_npmVersion":"lerna/3.14.1/node@v12.3.1+x64 (darwin)","dist":{"integrity":"sha512-CjvfOCiKp7838b/CI6LBtCyPEladSr22ndpCYzdUhSasR7kS6LySzZjW0LfIuwyfxqnGlVZEExPd++ApAFjTkQ==","shasum":"bc113794f9789ed41efa9a68a8b033d8d3ccfef9","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.148.tgz","fileCount":18,"unpackedSize":15108,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc50+kCRA9TVsSAnZWagAASroQAI/jE8Qx6je6ol2KiboV\nFQ3MfoCSLqWmUbNRpqzQ0uxEUNQlCwkqb3DnJDcr5llE/VTY5BYVXEfo11yQ\nrIgoxwH7HAH/oG8Hgponlno+jilXpxs2VxmcePnGgDjhTq/4UoAvhNEMb5aU\nn/l+gLUhf11wgzarVOxVwMxCzWpqJ1GvKz1QrcRXKm2ojdZMhWPamxPPCqiC\nxtLEtRRSrAm6MgX+UxkZcur9ufKJPkObGuhfLmeocgMcUgAkwb+thcnGBNEC\nxXa0ziBCHyKC8jO0o3ERXI2kk7SGLpy8x6Cy0eJa77kiZmVug6Bv20R+eMGM\nfFDXO/fVk+YZ5+gpDBjsNK+qMf58kd6aizCUvug4Olun0PPrgFIzaDMAANzB\nTF+yROMVSOH/jNGVK7+N8J0978/nGQMGjqK/D7bRGCwDB0u3rJ/+2roAsjLa\n5Nv1QK27ihxFLhNwHDH/2KJ9vxY2q4GnA2gMh1RlIrWjECedJvcxPyTn5VN+\nnDtrh0mCnOuZ8mDkepG4EJmcbWoxCdwCnL6m3Qyzu63dZucToezZW0k6m3UL\nu2xPDpgG+pdR8Sq0EDmGzopk7HkdAVVL+wsMVv7vOOWKneADvO2LiR3hTI9O\n5KGdEINizE0kMCBibwLJ5O08jkzPNXbTskXOUjq5f7FqAn0JkxO5INg7SNm0\nj4If\r\n=lTM9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFI682TvXH7JftZeOuMKnrTRWYr8AV7PHGNzOZs0lEymAiB+Y1rKgRqZT0FLJzl2h9wlH3gg6Ius8eY4TjNhTwS+/g=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.148_1558663075227_0.6406535369349962"},"_hasShrinkwrap":false},"0.1.149":{"name":"@react-ssr/express","version":"0.1.149","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"bin":{"react-ssr-build":"bin/build.js"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.4.5","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.4.4","@babel/preset-env":"^7.4.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.4.4","@babel/runtime-corejs2":"^7.4.5","arg":"^4.1.0","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","cross-spawn":"^6.0.5","delay":"^4.2.0","fs-extra":"^8.0.1","got":"^9.6.0","ora":"^3.4.0","unionfs":"^4.2.0","webpack":"^4.32.2"},"devDependencies":{"@types/express":"^4.16.1","@types/fs-extra":"^7.0.0","@types/got":"^9.4.4","@types/node":"^12.0.2","@types/react":"^16.8.18","@types/react-dom":"^16.8.4","@types/webpack":"^4.4.32","cross-env":"^5.2.0","express":"^4.17.0","npm-run-all":"^4.1.5","react":"^16.8.6","react-dom":"^16.8.6","rimraf":"^2.6.3","rollup":"^1.12.3","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^10.0.0","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"33ed86d0a08bc1ab510e0cc576131fc2a378732b","_id":"@react-ssr/express@0.1.149","_nodeVersion":"12.3.1","_npmVersion":"lerna/3.14.1/node@v12.3.1+x64 (darwin)","dist":{"integrity":"sha512-xL6C3DTFLUuFFz+6oTUW3kceel7G2zM9/SIQFlwK3HTyTSHzQhlVBZEOAY9rkPs3fRV600yljNJydnHyrtY3qw==","shasum":"e6e2132482d49b860f1fe22e8640d218cc5c1724","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.149.tgz","fileCount":19,"unpackedSize":15298,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc51MkCRA9TVsSAnZWagAAgWEQAIKYQ6CECP41zwnv8kk4\nEqUvZMd+isaY+nwZw4gEx+FVbUmdLjeXgcnfbY5GUVsSM304qCwrEzrNmKBP\nRx7Ilu4i5lgIsVW9uK1cVlXH5ZAIk4IAvSv9kb2Xokth2gLuqhWNkvyLeEF4\nwUh51zEhZnTb5L0EqM9lkT9chPzrCtMMjLSSEj8LZnWk0mnqAls3jkyEcpoC\nJaOzD7DmhwPR4LYL/J6qfdS4anhrERPwpGyaQr6bEQU7cWxPWttCIjgKVPLs\nOiyzCLBJDVRKjPksKjgoHFg2K3NQbdXSCruf+yR0F7Bf1F3PvuP/ZopHjrep\nXB543IuXqLiRysS/UW+lEDTNSwG92lh+/GX3mABP5hzcJjFLP4LzCq/1Fq7p\nyYQvFfBgf1H0PjrrrugP6X3jx/HG0BAgKlyknIFpKQeyDA1j5hwrT9pRBk1O\nhlwqtTYJjEJxPXTsOyl0fm9IUgxv4Cio5v4ZViU5k5ZZy9s8CgAZEPOa8Dfq\niFNEwRFXNZkGRhWdJ8122JKJGOY+YWol/6tzI3mP05G+qxvE1BJdzIY4/Nl/\nVq+jXLecCbgr/46KdM6ZGUYq6GjqKF3ln6eqEle8UDR8wfHGdMyF2AazwAlK\nK+HkafepPWYTBIATlPZwiJKrFLONMTSncLXZkKb1BmNIauLD7FMPzxp2/vpO\nDPq/\r\n=vAVw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD1eqVamX4f/q6lh0K5jF2uRyh53gQ3pLQ8EZsG7nN1yAIgEAsH62n+hA5DglIF27RG2T/W2Pwx7S75cEl0GwMBJNY="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.149_1558663972061_0.6732338877395083"},"_hasShrinkwrap":false},"0.1.150":{"name":"@react-ssr/express","version":"0.1.150","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"bin":{"react-ssr-build":"bin/build.js"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.4.5","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.4.4","@babel/preset-env":"^7.4.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.4.4","@babel/runtime-corejs2":"^7.4.5","arg":"^4.1.0","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","cross-spawn":"^6.0.5","delay":"^4.2.0","fs-extra":"^8.0.1","got":"^9.6.0","ora":"^3.4.0","unionfs":"^4.2.0","webpack":"^4.32.2"},"devDependencies":{"@types/express":"^4.16.1","@types/fs-extra":"^7.0.0","@types/got":"^9.4.4","@types/node":"^12.0.2","@types/react":"^16.8.18","@types/react-dom":"^16.8.4","@types/webpack":"^4.4.32","cross-env":"^5.2.0","express":"^4.17.0","npm-run-all":"^4.1.5","react":"^16.8.6","react-dom":"^16.8.6","rimraf":"^2.6.3","rollup":"^1.12.3","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^10.0.0","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"7e108c87572772cf1ebba0bdc92330ed4b41a2ae","_id":"@react-ssr/express@0.1.150","_nodeVersion":"12.3.1","_npmVersion":"lerna/3.14.1/node@v12.3.1+x64 (darwin)","dist":{"integrity":"sha512-Me4jZzRg9a8P9Jq7AabgYAeT6SVJVj2ACBKdFnGgCUEJy0XscQrh5zhyGwQZBqY2fxnWVfDJJr/W05gSjxpL+Q==","shasum":"acf4cc124166c5e9b049d2f1822a39c9fb4353b0","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.150.tgz","fileCount":19,"unpackedSize":15322,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc51PKCRA9TVsSAnZWagAAJQ8P/2fCMJpXCOgOzW90oXu5\n2SW/TFSFjD0QzALHDy+WdJHFhenJy4OJCtru7ooz3PQb8nP+VW7GjxMd+zjG\nFeBfE335iG5HR02Q7aWjA9HswWKUYpsgaLzHQQ2xdubwPD3QyUYEZjDWlfCG\nzXsW4ziACuxitvOTP3hiojux5wFiXmp+k2nBG2qQyHtdE3cM1q7HRIsWPTPD\npRp5sABHlC/dO/VlcmtmrsnS8J7JQJpqzipXRX+VcO92J3w7crg99owxFhcZ\ntVurtkzSHWqaEJvQ4DasdJgs0fOevt7UkyWzp7uChNVu+4VRKPQC2pLqdthQ\nWwRHFWBImydWkjcb5/ACZaR2SKnLqJlfnWsIaYM+NX8nDVlZsH91wtjzBLg9\nUl9b/IQdZh7+JTOSKXiSrcRQjlEtPPFAkKACOHruHPG0Lme42i2Z255eh9fw\nPhsXLJ+2VLfg5sh16NMEuI2RNShVUFndWgbzr2GgRCicPyvrGV6Sc4B+rVus\nz9eBQuxHUqzvKicxAN4WmOfwhmfUnUJDTrvlXGW7QZf3E94ILehLutUXXamz\nq4LKu86iaMB9eEkuEKcJ1J+aYojv4UdaIbrHYmno4e3nwMr6qAroBNecbMIq\n+o4clBsMlsxXHFtASSAfw7ZVfKSYe0Tdnq9X/O9X3A7uZQSjKfKzqpe4qDkE\nD38z\r\n=IGPv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC1noVw2/5AOSigUFfnMqQQmwuy/C091dPurRPSLTZiwQIhAKS3K1jD69IXhpSEvWyD0N1RwgWTzhjysSCdy6bmAj9l"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.150_1558664138401_0.0143856490705776"},"_hasShrinkwrap":false},"0.1.151":{"name":"@react-ssr/express","version":"0.1.151","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.4.5","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.4.4","@babel/preset-env":"^7.4.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.4.4","@babel/runtime-corejs2":"^7.4.5","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","delay":"^4.2.0","fs-extra":"^8.0.1","unionfs":"^4.2.0","webpack":"^4.32.2"},"devDependencies":{"@types/express":"^4.16.1","@types/fs-extra":"^7.0.0","@types/node":"^12.0.2","@types/react":"^16.8.18","@types/react-dom":"^16.8.4","@types/webpack":"^4.4.32","cross-env":"^5.2.0","express":"^4.17.0","npm-run-all":"^4.1.5","react":"^16.8.6","react-dom":"^16.8.6","rimraf":"^2.6.3","rollup":"^1.12.3","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^10.0.0","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"6ae03b16f3378e9a25ebb099d75770cf47e80e2a","_id":"@react-ssr/express@0.1.151","_nodeVersion":"12.3.1","_npmVersion":"lerna/3.14.1/node@v12.3.1+x64 (darwin)","dist":{"integrity":"sha512-an7vqBPRSs1t1Nj2J3a1HO5bJX+dWOMnvw3Wn28r0HS9nt9UhNDHtaOrj4mB16gb3VH/YhcIrx9lSK/AHIBgBQ==","shasum":"97424d0be5aa7f6994f2748630ce8e196f323ae1","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.151.tgz","fileCount":17,"unpackedSize":12543,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc51ZICRA9TVsSAnZWagAA7pAQAJP9mWn8DTpI5AhcUpNo\nv20mBexq9iq8WFjJBnEjxd+VnZZ0qrxFVmYWo99JkNN4b/A5Nlc2EQkVEoBf\nA708o06kp8xUad6xMM62io+W4aizpKllwf518a+T2jE8zHW8lI0/fcs8XVvp\nfctht/iXcjKxpiyl1gsyLO9EsNI/VaoC8+tSOsHGEaRcv2ZjxiWNLwOFgwv+\nUzuqzEXN0w+jGij4XmokAa6PBqOqC45cqYds+eoU6+zd76bfjb266I0EUXD4\ndPyAY6hsZlrQXYjfvTezGpX4xCtfoEm10ybV+hwe4tqqG5kRODuaYKG3bomj\nf07boLhGi4CyyZXcPbMZvEZUYOyKEnhrJm0S4wfF6BiPQxOkjJTkmEu7H7tt\nI7/i9SVqrxSbTFR64vjAW68/DajFDsJhvcrYQyd6pe6Yy1P3B/oVpx66SMJs\nvJJqWxWPsO+9dpKkk2YyBLipiT2SzDjBp7m9df6CcRSGvyeeLB0v4IBn5Hnz\n/+UA8xshGjh/y+UebqXayHaXlIXJ7iMfvW7NusT4estp5IDbALia/1Id/N9N\nHa/miC384vow/tcO6d8+ymnxQm/AlnLTDV8tpZLbgphPGRbrQAaV8SxoYte+\n1T570D2/2c0xg/XAzKXKzdbp3xElE9F2H2XWYPqQh6K0vN9BhXtSsluV6RXQ\nA4Es\r\n=SIlV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEXdQ5OOETRkYwgA+fxIf45urzGT0phPBkxyUS7Xukp1AiBxoO5g0Sh4QyHUTNwReD5hxfOpsgwUF1+1PIzC929lpg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.151_1558664775990_0.08905774228282759"},"_hasShrinkwrap":false},"0.1.152":{"name":"@react-ssr/express","version":"0.1.152","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.4.5","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.4.4","@babel/preset-env":"^7.4.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.4.4","@babel/runtime-corejs2":"^7.4.5","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","delay":"^4.2.0","fs-extra":"^8.0.1","unionfs":"^4.2.0","webpack":"^4.32.2"},"devDependencies":{"@types/express":"^4.16.1","@types/fs-extra":"^7.0.0","@types/node":"^12.0.2","@types/react":"^16.8.18","@types/react-dom":"^16.8.4","@types/webpack":"^4.4.32","cross-env":"^5.2.0","express":"^4.17.0","npm-run-all":"^4.1.5","react":"^16.8.6","react-dom":"^16.8.6","rimraf":"^2.6.3","rollup":"^1.12.3","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^10.0.0","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"58f987082cf9f4de9b78c6084efe4672a381b5b2","_id":"@react-ssr/express@0.1.152","_nodeVersion":"12.3.1","_npmVersion":"lerna/3.14.1/node@v12.3.1+x64 (darwin)","dist":{"integrity":"sha512-pmMszVbTGvdYwtfyxbSwcjpBJ59MpKsw8yvX4x9znew5iDdNT0SgOD3GoGuukTP9DmOeXSr62IaBDiPhNhO0Ng==","shasum":"02b1f21807e640bf84bcee99a24d41472497a629","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.152.tgz","fileCount":15,"unpackedSize":12723,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc51nZCRA9TVsSAnZWagAAmm4P/2XGg4Y2BkSq+Xv2NJts\nUTmH86SML8iI6hTW7a08Zl+CqnXoQd7EVPNNYx10TXG9ko5/Pl9doJg1q+87\ntDJ5HyJxmGTtzhwC5qiGxRWywGl8pdwJBj5vHMQJTjSmTTGkoqG/v8Renndw\nhQToh5/AAOrtAfU9YzskbU67+kmFagRzo4IWJSeZVYUQAUOQELii+3/zTPKB\nofI1NF7Pr++yFsRkthK2mKhcik30Vjb479lxfV2+62+IVaAd77o1JCpC0UBw\nPqffrzsl3N/sayd5jKEUiPZjxnDaJcieOPY4DWSpujuEYZWS3HJQAdShh/La\nvY7V6M5JYj9oc6Uh3G3b579lnV06rwM2O6Lix8aF5yuI6CGZtbwac3hBNiis\nrq8Eq3xqRbjky2MlDBO8Mge8hnnK4fZbaIVLMvrpU4lb0RSweKWjUSAvPxYM\nWaAavMlX5zTuODo74P2L7ja50D/bxjbugazcCoCtO5by/aq72hvFC8R+x+Ad\nG8ReyGTscf0uLiHDAvyj2EM3FOkXsawvHyOvLD2aW3WsZJL8rG8L1gr471QD\n6SXjx9wvcBKXltrgp+ARb35Q5KqootpVknusPRT/uHBNPfwFDbW3hJ9f8XY0\n2emvbTZyVilkMjhbiFdWVGxvao98X6fjYvaYYb+j0XmEmmTCKlG3A+XimCxQ\nekOF\r\n=Ukmi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDQ6XoGDdfB3nCcF6PkenRp3dm5SICbUW4raBVybgqidAiAbuTDZsj5PyltQxUdBZOvTWSct3Md5Ygi0xDhSnboeZA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.152_1558665689274_0.8821095064176601"},"_hasShrinkwrap":false},"0.1.153":{"name":"@react-ssr/express","version":"0.1.153","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.4.5","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.4.4","@babel/preset-env":"^7.4.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.4.4","@babel/runtime-corejs2":"^7.4.5","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","delay":"^4.2.0","fs-extra":"^8.0.1","unionfs":"^4.2.0","webpack":"^4.32.2"},"devDependencies":{"@types/express":"^4.16.1","@types/fs-extra":"^7.0.0","@types/node":"^12.0.2","@types/react":"^16.8.18","@types/react-dom":"^16.8.4","@types/webpack":"^4.4.32","cross-env":"^5.2.0","express":"^4.17.0","npm-run-all":"^4.1.5","react":"^16.8.6","react-dom":"^16.8.6","rimraf":"^2.6.3","rollup":"^1.12.3","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^10.0.0","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"8b640ab2e551ec41cdaeefbc84d35f586021751e","_id":"@react-ssr/express@0.1.153","_nodeVersion":"12.3.1","_npmVersion":"lerna/3.14.1/node@v12.3.1+x64 (darwin)","dist":{"integrity":"sha512-iGqk2oFr+XCRnN+UIO11I9nQTfmmlFqj+Q+TxXkK8qkyDiuO18MOX/3xa6gUYBynP36Peccap54VpFUktf8F2g==","shasum":"33f2f17e00f52180552aa2f704c33ee88567185c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.153.tgz","fileCount":15,"unpackedSize":12677,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc51uhCRA9TVsSAnZWagAAuDkQAI0i/yJ7XGwozf8rLMnA\nJG0Mo2RWyErHp65qT6ZSSjOKW98P9hgVw4tRZiwMabZdA85y6yoW5N4SKrc2\nYahXs66SDWwrTtl+hM7yAMqc0RZ43g1IQlJ8QE8zEIqznrBXvQR4OLbwZgEQ\nrSAiflZWHYJX0dp0WByfayE/t98UxzyCMB9oVxtf3l6fJTJr1NA+qc6tV72G\nS6Q5XWGn6njz7C02GtygscM8FbkdtE9ARclTGYh6fmd6zLHYLAugUaR3SsAu\nWtttDdFe8l2+vuo7UzratHDoT6wfjy3bvP3ilxFXyQmjFdFMGgQLo6qhZt9+\nr2z0Z/win1yL7b9QyWJGto4T9iYMAM6LCiryE2avOhDq6kTU7USnBvQ1Q7aA\nVQ6z0cbCm+RtzpyhvfAlokALXdTnoaRVCHA+iSOxvl6wXRXG+9gLhlDnpsrx\nTXNn/HliYgyd87NX/58ISTYJIkz+9lHy5cJWPW/XTG4gUcc3CeJyJTz9lh7h\nzqWyPtkG1WTwsHaL8PJqCP+tjpA6MKV5rzdSEKWo30ENoHDbL+WfyIJI3eVi\nGCm83yVTAh43s6pInvtr0tz6eCGHchw+x+h546hAdk03HcIITvHzKyNGCNZs\nJQBGObGftX23D86t+IyWOTzI+bFFEWtq6ss0fah2fs1uC9fTFkZaNB/BtUDe\nGtrL\r\n=s+tg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDe3VTeTvBCtUIdY1RV0T/T4iWIM/Rqstu3mMw7s0r/wAIgG/Me4b3nMPkX4MWYG9glR8nGyj50im8qmHU3B1G3w08="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.153_1558666144573_0.0258748852341788"},"_hasShrinkwrap":false},"0.1.154":{"name":"@react-ssr/express","version":"0.1.154","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.4.5","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.4.4","@babel/preset-env":"^7.4.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.4.4","@babel/runtime-corejs2":"^7.4.5","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","delay":"^4.2.0","fs-extra":"^8.0.1","unionfs":"^4.2.0","webpack":"^4.32.2"},"devDependencies":{"@types/express":"^4.16.1","@types/fs-extra":"^7.0.0","@types/node":"^12.0.2","@types/react":"^16.8.18","@types/react-dom":"^16.8.4","@types/webpack":"^4.4.32","cross-env":"^5.2.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.8.6","react-dom":"^16.8.6","rimraf":"^2.6.3","rollup":"^1.12.3","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^10.0.0","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"7cab7dc9ca18aa6a39846c872eea8e136a495258","_id":"@react-ssr/express@0.1.154","_nodeVersion":"12.3.1","_npmVersion":"lerna/3.14.1/node@v12.3.1+x64 (darwin)","dist":{"integrity":"sha512-euWdLAK5zfoP/u1yZ4I3j/I2EVojfBy8d5p/50RmcivWPAxIwQzptSgLMovbCFnhinNFJo4ghUCXzxnfQRpFZQ==","shasum":"06732245cc01ce28e3288bd052cb759318b1a111","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.154.tgz","fileCount":15,"unpackedSize":12677,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc6v5eCRA9TVsSAnZWagAA1MMP/ixZNqJL6OV3vw7KxyG9\niB3PLdwe8WEJj6mhhr10lbZKKMPc37xnBUstDfgbJZxTeC5U4NFy+WTkWs4P\n1cUX/kSNABGOO8AzYDm/3q+fPoJKpnyRYCp3TCiZODJBGtoq5aMzIn4SKjv8\n9KEnSJEOmexFe0JfFwezMcVCDQkg8almEt8pIXmwLnxH7E/Sws/51/7lOpVe\n/TU0R5cH6uJzTuzxjl1NZ7BlCkCmSm8WtalEeeRaBXXxUlo72W5acKLFM4sA\nLAv8oq83OE2HsncjsQKa+wRDZYvb9M3eDhEkRMBRHkUtjsMvZfLGpOc+7Ajs\nQqXnzk7An3+pGvkFSJTXdQAmLG5buoRdTKn47no04LR0Swz/8zC+PaWap3uc\nVYWpcyDMUVd4JnaAceC5sVFVEBkDhn4O99dHU1o8L3ksoOrTPj6dRGR5egGK\nrgxtMtsoJBX91op+ONdbFSTEKdvzqOi8+l1S6jCENR3YK/58XE5uFTUu2c3O\nc30qo7+Gx7k6OQmbg3uSNxCJtgER90yYyJ2S70s2LKd5nBcHHvqzLUmpVche\nNu1wE3I1CH9fk9QjT/pCyfo2jk1DCqG3j2RH0c8wTYHVTXfych9Vcv1Drh6Z\nbjHDX6LT1ImX7Ltxj/1yohoKYaqaTBNXjg8kPk7LRJlkECLESCYBB5hR1tkK\ndk6W\r\n=yPOs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDBD9a2FEpVB69pC/q/aT+y0uFdtmEHs9HmIGSKRMXWRQIhAMxGdgKW8EUwlace/Ql6toMGsMUNi8U66SAL5qTaF7cQ"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.154_1558904413387_0.4042454666384949"},"_hasShrinkwrap":false},"0.1.155":{"name":"@react-ssr/express","version":"0.1.155","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.4.5","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.4.4","@babel/preset-env":"^7.4.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.4.4","@babel/runtime-corejs2":"^7.4.5","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","crypto-hash":"^1.2.1","delay":"^4.2.0","fs-extra":"^8.0.1","unionfs":"^4.2.0","webpack":"^4.32.2"},"devDependencies":{"@types/express":"^4.16.1","@types/fs-extra":"^7.0.0","@types/node":"^12.0.2","@types/react":"^16.8.18","@types/react-dom":"^16.8.4","@types/webpack":"^4.4.32","cross-env":"^5.2.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.8.6","react-dom":"^16.8.6","rimraf":"^2.6.3","rollup":"^1.12.3","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^10.0.0","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"a8b4c6d386875fdaa9f2bf097a24f6c498144590","_id":"@react-ssr/express@0.1.155","_nodeVersion":"12.3.1","_npmVersion":"lerna/3.14.1/node@v12.3.1+x64 (darwin)","dist":{"integrity":"sha512-rauZc0OWs+AUMuph4PoAYnsjVOGSqEKujg8hvAQzWY9ZnhVt9414s7rEawy+Www6gH97YqfQ/N8QYG3PCjEUtg==","shasum":"b074d9b362a16f5bc69d00f25e075e6251201860","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.155.tgz","fileCount":15,"unpackedSize":12916,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc7U3ACRA9TVsSAnZWagAAZMoP/iAJgGfs4FUdr7pmgSH5\n/ElEVMYQ71F9DAfz0sq4hVM6nR7CjyXOcCE02aSET1dVUl5Z+1ikR8Y2/m4f\nEIhfOXJRGHUhIDEF7wOyEQD1MlsYeu1xkF1J55ulhAE/vUycvQp6qnkjBUky\nC2ftTPZHucuCpbjdBIUsT9jf3OXYqR0656HWemikl6XBunsjNSjveHqZvmww\nplt1fa9f20TZn3b8BXt9WU7h5ellpVjfsQWytVH/1q7Dta3DK5BudlYRb3Ie\nDa1GPOd4hBbYRw2iKU1HX2OqMCijCcS3aAXlSQKreZS6jBRsC0rANyPK4CI9\ngv51ATooecKffDDSBdjKL4S1W1ID9zruLYQk9KpXrJS6tYXWjov94DnbGGjQ\n1WY8PhgZiKp/rUqzJScFpL94IgFDUMad/AUzxsFR+KV+Ab39nOaSIGWpW/Zj\nB23KqnRXKW92cuRLirU9xTOJs1oTh58h3hgFihixhb9KstSF6KyatFO6UH2Q\nXmN9CIHqdT4I/nTo1soRzRCurwa8blE55DMKRGj0pYtFlvHb4QF/qLAqrDR2\nlaA6urpz0sXoC4QXjbXbY4ueJZy8hEwvuOVG18H4vQJwd9ukK02pwgmJ15Ax\ns3VvFu2qPq7RKcWCux3giNUI5wWLVy9o4bc4MocZzQeZDaf8VmbWdiRWtM5G\nhgWa\r\n=sNLy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDjIag4nBQ7URyAIyADVN1/ZUMBDd7xxZXKVPnUO8HhowIgPGGLm9E/IFINJQhGmVelDySZ9nUNTUuiqw3QZ9Kg5FA="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.155_1559055807590_0.6238980296600518"},"_hasShrinkwrap":false},"0.1.156":{"name":"@react-ssr/express","version":"0.1.156","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.4.5","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.4.4","@babel/preset-env":"^7.4.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.4.4","@babel/runtime-corejs2":"^7.4.5","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","delay":"^4.2.0","fs-extra":"^8.0.1","hasha":"^5.0.0","unionfs":"^4.2.0","webpack":"^4.32.2"},"devDependencies":{"@types/express":"^4.16.1","@types/fs-extra":"^7.0.0","@types/node":"^12.0.2","@types/react":"^16.8.18","@types/react-dom":"^16.8.4","@types/webpack":"^4.4.32","cross-env":"^5.2.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.8.6","react-dom":"^16.8.6","rimraf":"^2.6.3","rollup":"^1.12.3","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^10.0.0","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"0d9a4efe347909d606bc27cf7fee7e0de94e19dd","_id":"@react-ssr/express@0.1.156","_nodeVersion":"12.3.1","_npmVersion":"lerna/3.14.1/node@v12.3.1+x64 (darwin)","dist":{"integrity":"sha512-hkAGD0sRca2LG4VjNYfvzlZnyHt5u2KVQrC5RYsB9oUVCxtIAJWc7oF2DnSZgnCJGvy4FJRNiUctwVVmshvbmw==","shasum":"c3aec85904c2d3f97b3656574442aeace5a3b464","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.156.tgz","fileCount":15,"unpackedSize":12805,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc7U9yCRA9TVsSAnZWagAAIuMP/1Q3lVEFxWkKjup+skHd\nVf3PqU1oOuiCxaMgSXIkSXIQFTAV92+qoIjstwH9lUyFsGBXlMzGJ4myPPx0\n81/QUTFt8F2t7E0KveA5Vbe7u40LBZVDQkx1R0G5svA9FICiNKWI0WZ7m/FE\nxzrZqXeXdsRtgxzyVSVQvroRRE2YjwBHlJYe8Pj4StoXMPoM+RVkNxdtpdry\nc7Q33bvgs9YqU4s7Jcur+1ibquSBk+bE2nsyL5OnhhE6V2sQuWV6lcotSat8\nVoMnL3e4IeEKK/+j76DFN7RqE0yzjwPhzH3UgClJqBTQVv0LYj8jTZGiQKT7\npDUAIrdUbqgYXTMsG3p6gLncpZSHPf3NYIV4Z/LKTACngThv0tINy1x2fA9p\nk5MW5e/ph2qoLOc9Thx2Czx+5UfidWE44WCbzWYnivEOcecJlvdEukQSd2n/\ng6OF0RWsBRSK4kn1V4e+l56jP6M8VrrsHYpVwQeGT7fB21BoltCTAQcvvyuU\n4wZrDke4ITWYXC+yhQk3tGnCSI3Hdo5NLv2whYFyocyFiaPOhmch7t7hwfrY\nts+JeWgnQuv7AWaDlNUNBcsjc2NRgMP65FsrESz7xCbS4l+YU+0WwByFz/L3\nu8uzBvsjPjBtdDenMcQR9wPOCVDPVk8QFXFeS+VY5zXtB2VK1zpk8kJhbzPc\nYVGo\r\n=YQBY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFAl4ODlIh/MlEUgSk0LYXDV0yvuBrgs8Vl136t4LjvkAiA+kwkf1ks5wRlR5VBbcXd6XL/ZNN2uuC1k97Ka9M8aGg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.156_1559056241584_0.0431717994727685"},"_hasShrinkwrap":false},"0.1.157":{"name":"@react-ssr/express","version":"0.1.157","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.4.5","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.4.4","@babel/preset-env":"^7.4.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.4.4","@babel/runtime-corejs2":"^7.4.5","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","delay":"^4.2.0","fs-extra":"^8.0.1","hasha":"^5.0.0","unionfs":"^4.2.0","webpack":"^4.32.2"},"devDependencies":{"@types/express":"^4.16.1","@types/fs-extra":"^7.0.0","@types/node":"^12.0.2","@types/react":"^16.8.18","@types/react-dom":"^16.8.4","@types/webpack":"^4.4.32","cross-env":"^5.2.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.8.6","react-dom":"^16.8.6","rimraf":"^2.6.3","rollup":"^1.12.3","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^10.0.0","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"824244db59cdf5c7560195b03c43b0ce130145ac","_id":"@react-ssr/express@0.1.157","_nodeVersion":"12.3.1","_npmVersion":"lerna/3.14.1/node@v12.3.1+x64 (darwin)","dist":{"integrity":"sha512-37bopESEG0YRx6P5vjf4UlJwzdNk62mv+X+9y3ylzbwSbwewSvCGUyR0v4JiOjMY7+UbBn0CEejUarjM/9rC8Q==","shasum":"0fe3771ec012ee88f3ffa97eb8728ab30fb6db51","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.157.tgz","fileCount":15,"unpackedSize":12637,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc7VFKCRA9TVsSAnZWagAAh2UP/1CL1rCgICiPcPI17myJ\nQAqHylEI0+4b2SrGoedMnIAZi8oRoCvPYZsNkPCIuGSLpQTbH3MWRo87BgIp\nKV64NK609L7/9diQVAmO+8KIz+8O9M0tLmmiIV0FaybG7gUeft5FsxAkkgeB\nEV3j9YwZGy2ooDITv7qS9fnCCfmsf4If/GUidUZ+htmSuqysjOCCqeWwRpQb\n7dK+QqVjxiwHqw2tuW8ORj4298jWOQOS1WKWy70eHLSQaT4AKtiPKCnmcD//\nHIFli2yXnyM6EG+qmXnPBoElN7grTH/vNMianqsz9LDAxDpJaMqzNK0AzrWJ\nhRwdW2/SSCn1xIeXqusPdWDJggdGUr4nbGGsRQ8OmxWqPBgZZZTMxmxV3Ktc\njn+eRHqBPrG2tmd0JMScsf16fFyMkFbppHAgg9nuU5Az2Te/O/hI8+M2qUVd\nD8GK38hnKl2OU0/Vd8Af5RtXDp2LuuaRJr+0vQzUjHgCIAvx1JqihNk3ePkP\nA1yBJfS/5gIzDltYfrvY/R/mT3E8HUMKk4jLSgzTQG8DfD5rCCjesplAfUxR\nVAciQLdiylYTS5QAoMlxmDcKqQ4H3jm4sb2hn5f4qigleRGVDdIZLPr/Ifnk\ncbcFrEsD3uhecVdKon4cKlVy2SrCwPdfHZZWpI+F5nggfmQvIfMARWbwW2kG\nWhbP\r\n=+8DR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCh8IOdf3goVYM9VY4QeNxZTCtBB5bEZq+Mvc3nWgdAaAIgHGyacNhWg9OuSZXqha6L321vAF8bn6YK8n/RSIOqL0A="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.157_1559056713427_0.9280792495465853"},"_hasShrinkwrap":false},"0.1.158":{"name":"@react-ssr/express","version":"0.1.158","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"build/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir build","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.4.5","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.4.4","@babel/preset-env":"^7.4.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.4.4","@babel/runtime-corejs2":"^7.4.5","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","delay":"^4.2.0","fs-extra":"^8.0.1","hasha":"^5.0.0","unionfs":"^4.2.0","webpack":"^4.32.2"},"devDependencies":{"@types/express":"^4.16.1","@types/fs-extra":"^7.0.0","@types/node":"^12.0.2","@types/react":"^16.8.18","@types/react-dom":"^16.8.4","@types/webpack":"^4.4.32","cross-env":"^5.2.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.8.6","react-dom":"^16.8.6","rimraf":"^2.6.3","rollup":"^1.12.3","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^10.0.0","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^4.0.4","typescript":"^3.4.5"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"88127eccd8d33db7060b0a91b66670bbcaf1886c","_id":"@react-ssr/express@0.1.158","_nodeVersion":"12.3.1","_npmVersion":"lerna/3.14.1/node@v12.3.1+x64 (darwin)","dist":{"integrity":"sha512-vpwNlXZ4uozGLMrFxA8lBWfF1xImHm86upHNhHt7+/pJ7/a7E18pGD7jpN35OiIo2JQGhbjkUtMtNOJQDWu/sw==","shasum":"399338c899921863c1b07f6238c029e02ec0e526","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.158.tgz","fileCount":15,"unpackedSize":12583,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc7VWSCRA9TVsSAnZWagAASz0P/21rsfUb06z5qRbi5fug\nf/B0V/UaTrx/HgPl7U5DZI+ZgD+1Fkb6d/nXmsBHlIxkWaG/ZoG5S+DU5L7+\n8AttGDP0htgyb8uh6HBq8U1a1brzdDgD7lDjVOqOZvAd/KUgaqimUjSVsGIS\nxOLGIqdLasTXTY2c3xXY8pdfPHG6AVSiPBcJP1t3RjqfnWoYk40+L+7Z6XdK\nw+ZAeFn3xxaLaZauKjrAqcygfS1lIkYVl8MI6djXjQ6JH3j4Ctm1B228ZQYd\nXHJ53w+k1PlCM6q8zKEpsKq1FTlXIlcg5JK/V4n99ygSSMuKNN6ZJl86CN7y\nD3aF5ZENjIFZvDN6tQeAYmQWWvem5LrMZ7ZpkiMUCSkKRc/w8TgSfxGyQqyD\nvYWuxmPz9pVa48W7byArIvHL82xSke4NlFqvkUim3p5RHUC8Wi36fxIE3rBp\nFlCUB0B+tm+uXXca4ZHFm8h8xZiSb06fozyFClndv8gNzeDXOn6uB7iw/fVU\nzH7EZaOaJk+WJZu8/WEwfxNSYsgmGLob24hwYRMNN6vcpyrRPVGlqLkuX8XQ\nagFqumGnzJRtOYTghlA1Le7DH8ogehRnxn1s0129vGAQ3wHV5lWQGqZs19sT\nPofF2V17zkfHv6ss3uHeoHzRB/ouvORdVnxuaghfzglZpEiQ6apfuVSLrrO1\nGu/0\r\n=z4Wj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFAKiz8hbhOd9eGj4sm661pPRbU40Y9VyWlLqUcvyBu0AiEA9EWCoG+c9u6Almw5zHcMRVnw7O8NUYavElIZUZwGcHU="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.158_1559057809972_0.026126924965227172"},"_hasShrinkwrap":false},"0.1.159":{"name":"@react-ssr/express","version":"0.1.159","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.4.5","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.4.4","@babel/preset-env":"^7.4.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.4.4","@babel/runtime-corejs2":"^7.4.5","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","delay":"^4.2.0","fs-extra":"^8.0.1","hasha":"^5.0.0","unionfs":"^4.2.0","webpack":"^4.32.2"},"devDependencies":{"@types/express":"^4.16.1","@types/fs-extra":"^7.0.0","@types/node":"^12.0.3","@types/react":"^16.8.19","@types/react-dom":"^16.8.4","@types/webpack":"^4.4.32","cross-env":"^5.2.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.8.6","react-dom":"^16.8.6","rimraf":"^2.6.3","rollup":"^1.12.4","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^10.0.0","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^5.0.0","typescript":"^3.4.5"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"e02016810ee232d4b4205a82066ea4e656e0ec5e","_id":"@react-ssr/express@0.1.159","_nodeVersion":"12.3.1","_npmVersion":"lerna/3.14.1/node@v12.3.1+x64 (darwin)","dist":{"integrity":"sha512-iZTRMzirQY6JCrAA6/Wo57+DrMJg9BFdjzGFE1zDIStudpKz/SnRg6e5SoD1qhf0j5gsYSV2fCM8CcAmyzk2cw==","shasum":"9dbc354b74bc98dcf51cbb64b28cab040c1229aa","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.159.tgz","fileCount":15,"unpackedSize":12580,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc7pERCRA9TVsSAnZWagAAs8cP/0bD3ZJyjkItTAz79p9A\n7kcdqcIGPytX3xeNkpEx8GAHm5K/RV0ZaqgrI5Njuk+EbSN4hbFj14rd6sK/\n9h7NVuWaTsJWfVrtNkMyHR9P4V+lyTEW3P0Z4Bfnh5EWrjy0PAy7cYG7SEBy\nlWM15mX1P2i4xU98iny2G1czRXMJvAjkqSqbDONObW2E9HQgU6cryk/cIgY3\n99hBMxP1b2AurIuiCir89xKnG7sywOjNMOjD0tScC3MZshDPjkv6gXb+dWym\nn8LD5cMwrgkBj9ZDeXqmHXt1ZMPl3yzT9Y1AUlJ+thR2Dv7K9H3WTZNUCE4Q\nDN3ntKuH0g9VjlPM8lS7uvjbpcI/eHVyGlVGaaPaejwRSlJu68LtWZss+vFm\nhakyOpUF1uHFTe46BF0Y0Xngi+3QZFQwuXpm1SeQhmWdm1CJIVFDiQokIr1Q\nJ9TSb5yKAuqKFmVcTcB0/455lhj7VU/kJ29LE8+LbdXY6nMWh8WDKZ6oEfBE\nX+FHIw/2qKohrs4xzukEb3ukMhJ8NyWjbeyLCmHREQS2MffJuR4J7Vf+CEZh\nnL/yAXllIlf76dUtGBGY8I1avd0Pi28ez0aJX0Cft3eTBL9fJTyo7vDRUbsQ\n6KztnYM8zaR4mUQqVkMuHd4k2qMh6+fDTbBq82K4UUEYpXq79PoGBxCLtIyT\n2PYt\r\n=Csxg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCELoXVywQlAPjoAWu/YOZOhasHNPSwrJJm2XDE+1u2/gIhAPdKbkFT0GVhVYs3p7/cYQ4Z5izMAHJqxvWcEgz5JS4w"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.159_1559138577253_0.32746350710727956"},"_hasShrinkwrap":false},"0.1.160":{"name":"@react-ssr/express","version":"0.1.160","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.4.5","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.4.4","@babel/preset-env":"^7.4.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.4.4","@babel/runtime-corejs2":"^7.4.5","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","delay":"^4.2.0","fs-extra":"^8.0.1","hasha":"^5.0.0","unionfs":"^4.2.0","webpack":"^4.32.2"},"devDependencies":{"@types/express":"^4.16.1","@types/fs-extra":"^7.0.0","@types/node":"^12.0.3","@types/react":"^16.8.19","@types/react-dom":"^16.8.4","@types/webpack":"^4.4.32","cross-env":"^5.2.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.8.6","react-dom":"^16.8.6","rimraf":"^2.6.3","rollup":"^1.12.4","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^10.0.0","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^5.0.0","typescript":"^3.5.1"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"1e8eca77eecf054d51b9e1b6837fce9cdd1db0eb","_id":"@react-ssr/express@0.1.160","_nodeVersion":"12.3.1","_npmVersion":"lerna/3.14.1/node@v12.3.1+x64 (darwin)","dist":{"integrity":"sha512-Kgj/ikf9hR+0n6WWwi4yWPsY1Rjopt/Jj2eIx/SMrwfdwWZ0cI3Fh/UpvW2npsZCdGo9R3WoGYNxD63cdPCsHg==","shasum":"6e12a21f078c2354aded809e5cbb2fc60f8ae874","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.160.tgz","fileCount":15,"unpackedSize":12580,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc7vWpCRA9TVsSAnZWagAAvM0P/2ha8jNTNV4IFDA7TGhB\n6TH8x0FvtyAVoXvy0vRwkAZDU6NuzP3LELzlaaJDLGJlyWu6+u5s+VHWPopK\nfpWbKIf9llaAtUqd3OyYoeQjs+BV1YyfK7KzFRpgUvEzn4JGpq32FlfaHtbA\npfWs0NHjBU/UelIj8SSprgGzMAkzG77By5U7hIZIlr3PhUOQOOxHWiKTreS+\nwKAY01GDEpbl8GJci0bwPb2n/zYEN7bWAgWc601htDcnlbwq9/Fgxt5OxagL\n+lo5g9JqwpUZfHR7gZl0lVqUwZr2FFeVEMm1N8stkKK6JgB81Ns+eG5kDaXV\nFg2A4AeIH0H7fjLBz/4Y21EAkPhmWD3FGCLf107i5adrB8ATnyoU9i+DGlbL\nbMyqu9xX6gW46VujjCqMkxCxUWNPWAfLUm99rphiT8gdLUktbTZscn0IuEwy\nyfstCdbZ7WSTPpzGYIXt8Py08dgfwlKdC0JBGZjMSDC+cO+XjcFugnvUnP5T\nqOWM+b8HZRdDbaWZgDxk7xRfwrPCmYWCBfsah0W4HkAAN3Z1X8z1UfzAv0Wx\n1n1+4zNo1tnKfmHAumJZESx9PHnJ+0aTX82LC85CM8NJmUNUPQ+qs2S3jS3t\nENnTeuJHpYhjyT3et7Q6D5FV15THzmP5jar/PrjFCjko5EiGzUJa2e14eoyf\n8dQc\r\n=6XXQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCDcofeOSldIId8FilAhFsXYBi0ivgpVv+ffCbWPwzN+QIgXxH9txmMK26BCO32joqIjfrbLK1eG3WUIy+XX0n2XJw="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.160_1559164328818_0.016505492268276578"},"_hasShrinkwrap":false},"0.1.161":{"name":"@react-ssr/express","version":"0.1.161","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.4.5","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.4.4","@babel/preset-env":"^7.4.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.4.4","@babel/runtime-corejs2":"^7.4.5","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","delay":"^4.2.0","fs-extra":"^8.0.1","hasha":"^5.0.0","unionfs":"^4.2.0","webpack":"5.0.0-alpha.14"},"devDependencies":{"@types/express":"^4.16.1","@types/fs-extra":"^7.0.0","@types/node":"^12.0.3","@types/react":"^16.8.19","@types/react-dom":"^16.8.4","@types/webpack":"^4.4.32","cross-env":"^5.2.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.8.6","react-dom":"^16.8.6","rimraf":"^2.6.3","rollup":"^1.12.4","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^10.0.0","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^5.0.0","typescript":"^3.5.1"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"1833bcb29b70ca3997d441016cdf1d9c2f2c17c8","_id":"@react-ssr/express@0.1.161","_nodeVersion":"12.3.1","_npmVersion":"lerna/3.14.1/node@v12.3.1+x64 (darwin)","dist":{"integrity":"sha512-wcMC0m4n4TRWnJD7ID/IzENKElPSLPX34YpAHNj/p/3d8dLG1UwZmtuBnu7OzOU+7UvRUmzaAtTgQ/ZJCKkBqQ==","shasum":"5c95c96245e7f437f5805031055bc43098912d12","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.161.tgz","fileCount":15,"unpackedSize":12587,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc70AsCRA9TVsSAnZWagAAThIP/0mTnBL+XWLaRCqaoY5+\nLS07r16J7RCz8rjmWV0oc+EHAntE93ruHcHaIbwx82lE9vH9IDMwUdGATRQs\nYASmd9CDJDGvJ9wx7PdXbxye/52tMN/ggw7f3HbYNlysyQjXDtlKO8DKBUt/\nUmFzYJbIU3LcE5HxhU5A9U3H4dyL9iy1kfpQttOTU4vZpDwDr2VF6H+t+Oq5\nYpq+3AtPCkUXeiQPt09jbbmhjMbAecmqsgPSiCqMhUdS6DB0uPw4+UPK5ycS\n0xIelr7ZNL3NhPc9OASQGf/duu5MMxgLMtPLiX+bfYYAXD67ANuNRBCksKv4\n6UFGXYJ+GvVCfV7roibW2ZDgPF4PNZyk0l88Nt+EqQdEx4ztIbiJoflTIkIy\nIY3fLZrK4/C6f8hDSFcTd95uz6uCVSWbzCiXszQhTmHSl0JtbSZ07ZhwkeHt\nrv7FDCaXbfjK29IzCQgzvM5XX1zqZb25eZmtYvwIXFYSd/mfDO/Ta7huIFUu\nUfCX2TjScc5k5vJRoR28bA5wX6HpbZAlaLBbstBmBq1542WSeJMn3fyY+QjQ\nWNo2fGYMvaSYDjsGcEXBydlPxBJCl6B5M0FRE9JUQKDoxt6SwNTGYyA1+wQH\nwNEGgzBgAbWaS00Da4TOXdCWCv44HGrnrxuAUgWKWwbr0UUqQgxFyQPDKOwk\nOFzx\r\n=ImcG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGXGhtZ/7EsDU+e5jEOpfVcU23N7/AaThO+VV/vSqg1sAiEAkDWI7bYDDmzygaKlx/7n3bugMQ5D3o/fIwoQnDwfl9Q="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.161_1559183403972_0.7738341780302349"},"_hasShrinkwrap":false},"0.1.162":{"name":"@react-ssr/express","version":"0.1.162","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.4.5","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.4.4","@babel/preset-env":"^7.4.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.4.4","@babel/runtime-corejs2":"^7.4.5","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","delay":"^4.2.0","fs-extra":"^8.0.1","hasha":"^5.0.0","unionfs":"^4.2.0","webpack":"5.0.0-alpha.14"},"devDependencies":{"@types/express":"^4.16.1","@types/fs-extra":"^7.0.0","@types/node":"^12.0.4","@types/react":"^16.8.19","@types/react-dom":"^16.8.4","@types/webpack":"^4.4.32","cross-env":"^5.2.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.8.6","react-dom":"^16.8.6","rimraf":"^2.6.3","rollup":"^1.13.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^10.0.0","rollup-plugin-node-resolve":"^5.0.1","rollup-plugin-terser":"^5.0.0","typescript":"^3.5.1"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"6f91b279860ee3ef1760ba0d80031c50a4736256","_id":"@react-ssr/express@0.1.162","_nodeVersion":"12.3.1","_npmVersion":"lerna/3.14.1/node@v12.3.1+x64 (darwin)","dist":{"integrity":"sha512-wzP1nS2Hb+FdfRzwGCBhxerwAaOdfFEvYxTSMFpqHIMWOKHL2nWrOfvGmhew/+K9hKzYAj+kneSwSZWQ8quO9Q==","shasum":"0c9493c11124b03b0232421d8ea13e3a9b3e21b2","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.162.tgz","fileCount":15,"unpackedSize":12587,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc8cAGCRA9TVsSAnZWagAA9nIP/2NvI4qcjfigBRiWxjMG\n+GgvfLTn+nhkSU7NESU83F7VNxeGGdYyu+1j3d5deKXqo6ZZOFofxYAkYvfS\n6Y074rT+7a1V+9uSqKVZ0V2YqW4vCJV33uLbSNT2STuOR6gNtNXM9uNzovqK\nR2llt2pjt9/R5CsayS4LpmKRe7H8Oc7EMmXdAdULIrAkypmvCSbQ8iME3gFW\nTeePJ0qsryZhshe1KIImhd1R4vIk0RUInAOtIX4gFvz1dHvlo8kbEudRj7fE\nKTHZYkLGx2OLmVd+7si751UJP79nHZ24ZRHz+/r3JpmAH0FTwo0fLQKTr15J\nRk7OFlFIeu8HcSAnN5/oUcbj24Cc6JsAgojc9cVGqpzAB5JCHDmMyUy4BOs6\nLu4vivQDMdtBpjnZ+7ioW1SAW1KxavjKC5DjXzSEa2ZjCou+eWsa+m5rNz2+\nz32/VY1Xw3PqvJ7XOb2HimkS8dq9SzAfdwrcaN/CpydZF+QdQMnbNqqmSHtJ\n9/smtAWLDDm2zAjFfryvGJiIJjpixpdzqAVI+vyymyl3bmjjjnQacwgboRxl\nFvey9Uzt4vZbT2v4Y8CZv+1MMcet4ndW5ngv+HeieFgDoFCBE//VTgQQJNl9\nLzy3uROMgvfU5sThSwk4dWlSowRvJ+lNPCY3VgonHz1JqCA7yl7gVxFziiyK\nPVlt\r\n=chw3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCwAu5is0XrfjKrI0dihv+5StQyngahChyctJTjp/c2KwIhAI3qcXHos5QzOR3EPIKlXkgw19j+syRuYJlxjqlFheoU"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.162_1559347205513_0.19924008609589539"},"_hasShrinkwrap":false},"0.1.163":{"name":"@react-ssr/express","version":"0.1.163","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.4.5","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.4.4","@babel/preset-env":"^7.4.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.4.4","@babel/runtime-corejs2":"^7.4.5","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","delay":"^4.2.0","fs-extra":"^8.0.1","hasha":"^5.0.0","unionfs":"^4.2.0","webpack":"^4.33.0"},"devDependencies":{"@types/express":"^4.16.1","@types/fs-extra":"^7.0.0","@types/node":"^12.0.4","@types/react":"^16.8.19","@types/react-dom":"^16.8.4","@types/webpack":"^4.4.32","cross-env":"^5.2.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.8.6","react-dom":"^16.8.6","rimraf":"^2.6.3","rollup":"^1.14.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^10.0.0","rollup-plugin-node-resolve":"^5.0.1","rollup-plugin-terser":"^5.0.0","typescript":"^3.5.1"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"c8623b4aebc210e25ee78fe0b23303f5f569782e","_id":"@react-ssr/express@0.1.163","_nodeVersion":"12.4.0","_npmVersion":"lerna/3.14.1/node@v12.4.0+x64 (darwin)","dist":{"integrity":"sha512-kMDSRG5csEJvip+jeCcrVP4iuvi5isIdEvrLWnxLWQ/vwrHFro/PUS/xR3ALL7GnFHT7f1DJkhfSuELTW8Nsaw==","shasum":"8d0080993798e373191e944cd79d2ce91d4e41c0","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.163.tgz","fileCount":15,"unpackedSize":12580,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc98/rCRA9TVsSAnZWagAAzrUP/icmabGYUp4C76l2Y+3F\nlbCvEZiqZXOrXpRQHZspzJATxyj9WcKS4gAqCIJcKldNe0xzoRAuTXkoMCie\n8fpwxoupaqOQ7oBb5B0dCAvJzROxHiFk+3jvN+9ZcFihddzLN3CUzF8aqEjz\n2O18nBycaNvJUDNYNT3P9uBijRaT32i3fy8+akPIMI+oMR3hRe5G1Gmg5OwR\nyZQcCKot1FPK5XAWJge3DD2BfvRfvAapPYLNQwQ1d2X5T6Fp/N2MSFR9slzD\nq8M/hqB5R7ut8BOfjXCSzbR7Vy5t1/gMRcaq5WzTO4d8TcKGTUiC7msy0Zgp\nOk+YhYV2jGwMbR4avmD/AqAaWbFFV41u6JC2BRxFViw0+9KJzbghUGbJVpWT\nMm/OkhuXtUBXK4259m3VyZN4dIVF/HUNg+fOnVT+MDX3QFdSsEDN1/gj/Xrj\n8Qi8ICWR1DTQ/khxqT63/ZThf15J6Bdg4hWWcy6f/1U8xejVeMoA85PfOrfU\nyoUGp+aoMZTl9En2RiVLLwnT57XThsefKtHalhbN9h8Ni7z8+tvpQHnuewzj\nCQdG45zKk6sMdR/KIQfZLBxM/8M8mshX2+ZDlwTo8/Ycyl/Vg1v2vtt/BIKr\nJLaiRS7mzYlSYI2B6v8ZlxnvNQYfkCB/f3GXb0y0y4NihneFzE3XToyeGhZC\nP144\r\n=UUIP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC92hZlHlv9q5qhwg4NdCCTO8S7kFrTWUTO+Hz61yzj0QIhAMjdXxDHv2vixYDXN3BxW+ECcSkrwz2+8+FwGz+FBxA5"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.163_1559744490330_0.8889563517216772"},"_hasShrinkwrap":false},"0.1.164":{"name":"@react-ssr/express","version":"0.1.164","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.4.5","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.4.4","@babel/preset-env":"^7.4.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.4.4","@babel/runtime-corejs2":"^7.4.5","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","delay":"^4.2.0","fs-extra":"^8.0.1","hasha":"^5.0.0","unionfs":"^4.2.0","webpack":"^4.33.0"},"devDependencies":{"@types/express":"^4.17.0","@types/fs-extra":"^7.0.0","@types/node":"^12.0.7","@types/react":"^16.8.19","@types/react-dom":"^16.8.4","@types/webpack":"^4.4.32","cross-env":"^5.2.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.8.6","react-dom":"^16.8.6","rimraf":"^2.6.3","rollup":"^1.14.4","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^10.0.0","rollup-plugin-node-resolve":"^5.0.1","rollup-plugin-terser":"^5.0.0","typescript":"^3.5.1"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"faa4eed600ccf681e76e8ddcaf4431aab51614d5","_id":"@react-ssr/express@0.1.164","_nodeVersion":"12.4.0","_npmVersion":"lerna/3.14.1/node@v12.4.0+x64 (darwin)","dist":{"integrity":"sha512-HAB3stSDmAihOwgZeA4dpKUI7+AO2xk583Zd7Kw+un7XDqUoBNFO1i9pgjd+bY91i3z2GmUzfw519z33GKervg==","shasum":"8274d2aac7fe6b253944e307abbd24c02d3cae64","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.164.tgz","fileCount":15,"unpackedSize":12580,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc/KShCRA9TVsSAnZWagAAiuYQAJjYl2fyCCXYVoOC1Ojf\nSLSAQkJUABkSpinrgw2dKPDYBDGRCftQJZQh+IQZMWmLxuSz2Xw6SKOVGzN9\neqdXj1OoZlHK3bOdTXvFybFe33dkrG4wq+FJDogvLCi+hc/CuPAi6vwZXsGu\n6J5Si7AdJu1mAIt7sWfARgU7BZdOeFhMVkvrnvnNOOmMSXQvk2U1YR0CNGVQ\nx7vQvs7XB19D1oUKkRoXMYytD6TVVP6s+DNPCnCkVDGlVj0n0C2hfaIgnIz1\neCu/oQUQY7vCKNttavbkjbx6+t8B9greTD/pKKjUr+R8GTgRZ0b79OfKpaIZ\ne2l/vkBL8V3g50f12OrVFZz3vsYeIRBPmbakzfx+80mVojmMoYbs6yru2BYv\nMyzcypUhgq2bytuOuA+L60VdHWAb429OMj6JGkiVHa7rXNx3KVsxxq9uSXHz\noumkIsoThUA2hC24K0W0c/dKmL4Lbac47lMSKsOeb7N1Ox1XB0UXIWGmrbpc\nk60C4jU7NjYKy290nSf+VaTBYutcKgAPTMEWZK+jcC2VL2sdxiBCOE2U2jJ6\n/X5ETbebUINJjdfS7CaRff/E3KbWVUXPyIrRiqdb7Gs7pxBNWyCuwB83lbF0\nWHKkMiUvB3vXpcnhnOkBdShnASWxGPV8XIHa8VAtoIWPjWLzQg8MOqcWgPJ6\n5knS\r\n=UVIN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCnYcPkHkw1zB9NZCk2PVQ65BT7AmTulrGn0QNUhp4VfgIgaIDaD77ZX8YPz90SkQkOXO8MIAB91/VuLb1Jy6TWEWg="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.164_1560061088467_0.2739650797699431"},"_hasShrinkwrap":false},"0.1.165":{"name":"@react-ssr/express","version":"0.1.165","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.4.5","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.4.4","@babel/preset-env":"^7.4.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.4.4","@babel/runtime-corejs2":"^7.4.5","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","delay":"^4.2.0","fs-extra":"^8.0.1","hasha":"^5.0.0","unionfs":"^4.2.0","webpack":"^4.33.0"},"devDependencies":{"@types/express":"^4.17.0","@types/fs-extra":"^7.0.0","@types/node":"^12.0.7","@types/react":"^16.8.19","@types/react-dom":"^16.8.4","@types/webpack":"^4.4.32","cross-env":"^5.2.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.8.6","react-dom":"^16.8.6","rimraf":"^2.6.3","rollup":"^1.14.4","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^10.0.0","rollup-plugin-node-resolve":"^5.0.1","rollup-plugin-terser":"^5.0.0","typescript":"^3.5.1"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"5b90e13bee84469dd431b8f1602629db9f8563c1","_id":"@react-ssr/express@0.1.165","_nodeVersion":"12.4.0","_npmVersion":"lerna/3.14.1/node@v12.4.0+x64 (darwin)","dist":{"integrity":"sha512-EPqIZFKhvFLl/lxhxn+uHYNM9xdp1Ml2JouM7sqVWfegMv/OLQm7dV0+lU6r5vjR0MW5tyDRUV9fg42K/ReCNA==","shasum":"901bd047592fb6bfd6f7c5ade321bf580f3f4f03","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.165.tgz","fileCount":15,"unpackedSize":12734,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc/L8mCRA9TVsSAnZWagAAuEcP/3pTxb8Uj5/Sj95yBIKI\nk7V1H5E1z+iVbAn2P0iJoGdVmSuuK4+pgi0ibJQbsa3FU1CfCu/1mxh/AxFE\nvJCFiKzZXs3auIR6FVXSaL7f66wkZ8NuFwdeG/jMBNRPRqe//6pSmOcWXI/f\nwRd+BvUvqT13uug55lXa5edLAPTc48sX9XmErToHf4aJn6XEWnqWirluL5Qo\n9Vehfz3/gvsPHXv7nel5Y8b49CpJD5DIrfCg5HRWaDkzadK5XVrI3crhxr7w\nh95IuVsxcuRT9xAOKzlnsnXto1yoL+4UlfO9aEtmnEPf/nNJ9MWMJLrx5i/e\nN7TV7sDeq2UA8rWJAKv4dSc2zNVZJVkYr1ry9vD9CsoFkNjoK1dlJ3Y1tbA6\nmBt4xEKUMswHzwTe9Yq8M6Dmc0nxvHmenpL3hrYEaOM2WiXIyIJ+pLMOd3rj\n3WQXV3Ykj4LKjom5jqi2mFbJaeepi0YSFRSoPkBvwpLuCrCGtteLicCKx5UG\nFXaH1OHIk7vgQyKzHv/PL30+/sAGRYn9witn5tcKvaJfQqEVIDUPu4es22OZ\n6regH45mvSo5S3X2telQL9gUQ6HImAwAUtvsp7Wvs8laqk14U/lftHl9EyID\ng48drcrTh8SG8YVaxomTrSNFCtZLAWSHe8xILhImn+44uRpma9F2BOF8uQyn\nmJLW\r\n=GH75\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGuatg1i7L+7zUvFH6P+OomO62Gzck1vC6Ba779Zx1P0AiAxPj3euaqW1N11XYfzGWKfhel85/1IXGW1aKfWgZ9bLA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.165_1560067877983_0.9479667330324233"},"_hasShrinkwrap":false},"0.1.166":{"name":"@react-ssr/express","version":"0.1.166","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.4.5","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.4.4","@babel/preset-env":"^7.4.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.4.4","@babel/runtime-corejs2":"^7.4.5","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","delay":"^4.2.0","fs-extra":"^8.0.1","hasha":"^5.0.0","unionfs":"^4.2.0","webpack":"^4.33.0"},"devDependencies":{"@types/express":"^4.17.0","@types/fs-extra":"^7.0.0","@types/node":"^12.0.7","@types/react":"^16.8.19","@types/react-dom":"^16.8.4","@types/webpack":"^4.4.32","cross-env":"^5.2.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.8.6","react-dom":"^16.8.6","rimraf":"^2.6.3","rollup":"^1.14.4","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^10.0.0","rollup-plugin-node-resolve":"^5.0.1","rollup-plugin-terser":"^5.0.0","typescript":"^3.5.1"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"35111a505c30e9a5766a6703dd0a66eb03117c1f","_id":"@react-ssr/express@0.1.166","_nodeVersion":"12.4.0","_npmVersion":"lerna/3.14.1/node@v12.4.0+x64 (darwin)","dist":{"integrity":"sha512-PoTEZa1b837+VyQgCvzGv8UWMrSgsa3ynXoVLkq2ldFIuQK5LQQm0nPsMJoD5pMfVN72rDec8q3v+rJaNBKRGA==","shasum":"cd69586049e2ea6a00f613177996f71b1a983ac9","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.166.tgz","fileCount":15,"unpackedSize":12680,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc/MFACRA9TVsSAnZWagAAYoUP/iqrtGvtKoPUisy5PGLS\nMif8KjpkpZ8D3YPk+/cKMCYXxJ8ZXt09e0iJZ8abgPT9Jj/j99szgwjIwXn7\njQq7V8cV3wtyWwausIVtcZgiG6f1x3CXT10Peeccycwxcn3jGu46Jbf/V980\nH6K7D9fDQaL3wDB4H0xiT8ai152nd9Ljt4kP+wyPfN28G4dt7tDU4Dtli3+3\n42qzR6WLLma7IUmgH99nIWfoJDbxPSa39PMfCUrRA6NoPOWWs/o09Lw3oB+G\nixIUSEQFxBS9QXWWG5xiF/fLwC9fVqZKMBFirEETqFM+l8U6qdw9MaKaprUc\n6uo//cerTPG5/zQ6siP0HVIlux6Q7whqtxEP68VvxFyklgc6kDC613KtFecY\n/+AUJ0kd6UhvQO1IxwV4eFvw08F/U5mW6JYjrPCtQUW6wC7djaVvZt4ZoOMV\nb3z5tT7BJIsco3Mja+Bba2CmgQ3QiPLLdFLowIqyokfiXNTkx9qwWmiiq5OA\nwxTUeL7ASZUAsE+zwKc55DgAsba2xakbJtnDAHWowogYcKgT0bMhqk3pHmTN\ni6d6Osp+tSMo+n8cYV/q+ClrNVbL4mSXvChVzdKvjOP136ctB1VH4KGP16fD\nnMQtcpewEVCniKiz2DbP8WuimFwalF7g0s5oZld3XkiQiTrgH+ILyenni4UH\nkfS8\r\n=l8+L\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBkZl5vN+Zy761mQcoiGIXxruyTg06PjKc2dAAdCF/zgAiBgkpb5CfI/PjIunyDLN36I70bH/Q7RKw6xAOoCmTJIdA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.166_1560068415825_0.8626511164398443"},"_hasShrinkwrap":false},"0.1.167":{"name":"@react-ssr/express","version":"0.1.167","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.4.5","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.4.4","@babel/preset-env":"^7.4.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.4.4","@babel/runtime-corejs2":"^7.4.5","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","delay":"^4.2.0","fs-extra":"^8.0.1","hasha":"^5.0.0","unionfs":"^4.2.0","webpack":"^4.33.0"},"devDependencies":{"@types/express":"^4.17.0","@types/fs-extra":"^7.0.0","@types/node":"^12.0.7","@types/react":"^16.8.19","@types/react-dom":"^16.8.4","@types/webpack":"^4.4.32","cross-env":"^5.2.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.8.6","react-dom":"^16.8.6","rimraf":"^2.6.3","rollup":"^1.14.4","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^10.0.0","rollup-plugin-node-resolve":"^5.0.1","rollup-plugin-terser":"^5.0.0","typescript":"^3.5.1"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"961a372bed240a606bec9a8ce934c133bad18b4e","_id":"@react-ssr/express@0.1.167","_nodeVersion":"12.4.0","_npmVersion":"lerna/3.14.1/node@v12.4.0+x64 (darwin)","dist":{"integrity":"sha512-ccMMq0R0E4y3gp204LfFho5KtNrXUoWCZbQlYctOLTV6Q6FNVsLJVbEMhrDbNibP3dBN2TudXqIlBFlFjpB1ZQ==","shasum":"a59af15297c77c58220f79a535ab1d6d8e9d2460","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.167.tgz","fileCount":15,"unpackedSize":12703,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc/MIwCRA9TVsSAnZWagAAMPEP/1M/NGqYaZApuPjoKB6J\nmxT5iD0ydSaau7HGhLO8nL8H7F2JIO+QdAijtpXjCm46k8Co5WVAMuP1xwnP\nCqoPWsCt1u7j54JgCDmXq5PbIaY08rRLYjC7Urf1ZEgD/zn54Cv9vXbSpo1e\ngR0jIGULLKGt7EZDYtxeItfYAHnAa8yQrRI0iw3K/gJjJTyha37E8md8hPKp\nD6y9TapcSDL+TXQlMr0IKBJ0ruNhiA1oSnfHwnfo5sO+o13/czE/sT9ULc8z\neo6G5ngy5LSKn0hyFOHGdsWVYhGNaUsMLPV/5mgnuBmVY5y/caEdMjg4ibG+\nWkHVu+0O3Uj+3mM7mIoDyyl9TwcxKBfo2/IZXLUs2ghtaII8Dn8x4AVP3bCe\nFSVS9q44QgPUQhlaSAEEzqUFA7e6iNmA2tsJQFYl5DOhFMcMtp5wNPzBfuZm\nqsttZVVbXIHuU0gldeIesI2H4KBx+yXffGvhGSSbvF9asy3zj8GuuZXTuePN\nfO96bBJaSpqxy2N1VNltYcFVsN6qodqkiP+q9+tLi6ebyeqTJil3ORRJDxeG\nl7e2xN5Jeg+mK8LjVxuoY0SFekJ4lDPdpgK27AHb2vaHXvzv6SsX4N+snbGS\nyF7OklBC+DEd06DEJFs+8IzheGzxsodnvPetyzO2J4uXZPFN8gtBP8n+JSfh\nHsaO\r\n=bKtO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFQ6xsuj6ivASCWhB/pcHYCn06ZtMOTcUDIUnCdHvH66AiEAqKO+xQ7iGG7u+1zTmhWlfC4rswDZ2seqC/39GeoawIo="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.167_1560068655582_0.5350556738870742"},"_hasShrinkwrap":false},"0.1.168":{"name":"@react-ssr/express","version":"0.1.168","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.4.5","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.4.4","@babel/preset-env":"^7.4.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.4.4","@babel/runtime-corejs2":"^7.4.5","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","delay":"^4.2.0","fs-extra":"^8.0.1","hasha":"^5.0.0","unionfs":"^4.2.0","webpack":"^4.33.0"},"devDependencies":{"@types/express":"^4.17.0","@types/fs-extra":"^7.0.0","@types/node":"^12.0.7","@types/react":"^16.8.19","@types/react-dom":"^16.8.4","@types/webpack":"^4.4.32","cross-env":"^5.2.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.8.6","react-dom":"^16.8.6","rimraf":"^2.6.3","rollup":"^1.14.4","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^10.0.0","rollup-plugin-node-resolve":"^5.0.1","rollup-plugin-terser":"^5.0.0","typescript":"^3.5.1"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"2fac83ce3eb8862fd1bb8e12b2004a406b2d45d8","_id":"@react-ssr/express@0.1.168","_nodeVersion":"12.4.0","_npmVersion":"lerna/3.14.1/node@v12.4.0+x64 (darwin)","dist":{"integrity":"sha512-kdH0e43aIJ03U6dMS2RtI5+2GWFFQ9GUtF3VhxE03eJ+HG/m1YP/53N/oHluthTJJhCsClhsFLVF2uheyt533g==","shasum":"70260dc18d05e5c7d2c197fb9a6991d3dc43c4f7","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.168.tgz","fileCount":15,"unpackedSize":12701,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc/MMrCRA9TVsSAnZWagAA92kP+gKL48LhJjN+5CX7K2hJ\n7O82iQOtSYu5owLn2dZJ7wMrj0YPPyFJOHADewe3OdIqeZ3L2Tq89E0IGl8n\nWgLFKsLkJli1KXqBAFcuvLumBREVcExVrNMYOir6fAaZHbYW5JAtotFvUVRH\ngXcfw5bsvM9jMV5pvpApqIrIBhv4J/G2NqJprJtJfQxn6oY7kinvVYOLlNoN\nVHUDIn8DjhD+EObfdTbSLM3eCCvk7lU70qvqZkmWoGc6C7D9ZoicLD4xwj4l\n2fpcXAoNXIlqasGyMy8X5hwsHkttltbJOzWG+pQMYpOgJ/Av0PvnoJGaPQIc\nRBQlQChfuWZLSUnpAGmecs67Epmphky5FkM/80A5SRz90CDA5A3PdhrZAoq+\n8yq6qv2I9DPjPtliA/YQG7iENYE5gmSCvWK/RP5c/9BWV7sCaMHXaZLasAyK\nHiAiybU3hu5x08le3DxPjJH+H8GXH1EEo79n9NOh+getOjJBlKDb1sQK8gLF\nN+bxUSm+laoxjyfKGvsDhQvLHGLBeWNiWl5k8syRWa1YQY/igny79K6jYeuv\ngZPy0za174f5Gl1FQO21GUPqwR8Fg+4HaTNUGbQlv4mBBntd5Dp2VFS4GUf7\nADhgdwhkuSNQSOTMWYa0wXpglszc/KqgKpPJ1geY+WDRE95LFDZ46GX3VlN1\n4d2y\r\n=vFU7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEpIr4y5aENuW8AyGWsSdGe4sKGCfRPv4xHuE5s4ZNcoAiEA1ZobC9q6iw7oD3rxNQkSswovBU8pVXqtH+72Y1zi9c8="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.168_1560068907320_0.6973094820983265"},"_hasShrinkwrap":false},"0.1.169":{"name":"@react-ssr/express","version":"0.1.169","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.4.5","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.4.4","@babel/preset-env":"^7.4.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.4.4","@babel/runtime-corejs2":"^7.4.5","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","delay":"^4.2.0","fs-extra":"^8.0.1","hasha":"^5.0.0","unionfs":"^4.2.0","webpack":"^4.33.0"},"devDependencies":{"@types/express":"^4.17.0","@types/fs-extra":"^7.0.0","@types/node":"^12.0.7","@types/react":"^16.8.19","@types/react-dom":"^16.8.4","@types/webpack":"^4.4.32","cross-env":"^5.2.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.8.6","react-dom":"^16.8.6","rimraf":"^2.6.3","rollup":"^1.14.4","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^10.0.0","rollup-plugin-node-resolve":"^5.0.1","rollup-plugin-terser":"^5.0.0","typescript":"^3.5.1"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"a72d71aa81ee71366fcad46d36c2fe11b24c2196","_id":"@react-ssr/express@0.1.169","_nodeVersion":"12.4.0","_npmVersion":"lerna/3.14.1/node@v12.4.0+x64 (darwin)","dist":{"integrity":"sha512-1Z/WDACqu/i3qsfZ9o+yaCPKt5kJIZNUZOqpd5H9xkF/g99c5aHT3Ieq/cx9ZvSUDx2QWmPiZjvi1k7WiJxFow==","shasum":"058ce00f162f4b9c8b80dc062ca2ddcda9775799","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.169.tgz","fileCount":15,"unpackedSize":12755,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc/MRpCRA9TVsSAnZWagAAmVYP/RIY9HEhj69sKwT6FGeT\nyyAdWFxhnn7rg9R0GL5WERA3WGz2Nm8zWfjnY/mzEBFI5mq00wRwyuVFxXby\nAeUanEWnl+tThCFqLxqXCsRBp0UYoxaaAsu3RTt5E3cTiZQTABQGU5qysPIK\nhgw1IaBQfXSVdstpamlGi2TUvhefByuoSQWkvxLCxcTcZSEfSJWbGSYYBbJ8\nPDa/2VK7XnG9itbqZK7I9ckz38mmgX9P6f5acxv4430Hr9WunxAj8cVxSqQj\n9fixrPDv0g6SrbTQATUAaVKSg5qRmIx6Z/eN/mq7YmemhxwdnhLzTNqoFatg\nzNJ2rk+OShtHUR7d4PyS8nIiW5Zb6OZl2nRk2tCNf1Mzc1eZ9eENkXXOmyhA\nIMezqjL1RK7oHdXN3DZ5OqmOsQyHOLp/bz5rKQjAjXGw7NIpsA0eH649k3mU\nZqnhnXgkCFFDWaVVMjTZP2iyq0O7ZP6XTc+LTNEV/jC6Pj9qDqYVoFOotNy1\nMlUwJ7G67SDbuJ1LXK0enEESB9A4/XCDQk7CbfewMxbwxDNucxDbDv4uiUt1\npNgzN60kQHDJvBoa6X6N9opEK1tZHub2I1gxqCC6VbDTPJItNyFc0/A30h7m\nuubzLQgRYlsVxjRgOvJgkQ5K/x6ITPDiN+g4ODIy+DFquUR0ubUEGUKbrzvX\n/50j\r\n=Sfxg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA1voJETEUVZVDZ4jhRyjW6mP+tvBW1ZvO6qVZULFjD7AiAr9U51PP1stVZJsYoC01dTK4pEX0VL75baAe00KjB/rQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.169_1560069224754_0.465478534774469"},"_hasShrinkwrap":false},"0.1.170":{"name":"@react-ssr/express","version":"0.1.170","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.4.5","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.4.4","@babel/preset-env":"^7.4.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.4.4","@babel/runtime-corejs2":"^7.4.5","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","delay":"^4.3.0","fs-extra":"^8.0.1","hasha":"^5.0.0","unionfs":"^4.2.0","webpack":"^4.34.0"},"devDependencies":{"@types/express":"^4.17.0","@types/fs-extra":"^7.0.0","@types/node":"^12.0.7","@types/react":"^16.8.19","@types/react-dom":"^16.8.4","@types/webpack":"^4.4.32","cross-env":"^5.2.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.8.6","react-dom":"^16.8.6","rimraf":"^2.6.3","rollup":"^1.15.3","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^10.0.0","rollup-plugin-node-resolve":"^5.0.2","rollup-plugin-terser":"^5.0.0","typescript":"^3.5.1"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"9a3a66b1af7ea9cfd29847a3665f510e6806a1a2","_id":"@react-ssr/express@0.1.170","_nodeVersion":"12.4.0","_npmVersion":"lerna/3.15.0/node@v12.4.0+x64 (darwin)","dist":{"integrity":"sha512-m91PIPxrUF65I+FY3RhFzCkWtliFJIdFI74Iom28+tm9OqRuyVKqD/vbD75XLbf2XWETgn+TCIJ8BFf9ywN8tQ==","shasum":"813ac3d1c6a4c90e790eaad776e78120a9dad968","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.170.tgz","fileCount":15,"unpackedSize":12755,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdAnSgCRA9TVsSAnZWagAAaGYP/jz+IKqUqj61lCWcMrcN\nmOpIdCNm4I822YDziK6o5GFzIRH4MLmycM89z6xVZWh2IVWYtulj1xd/ohbQ\n7GL2UOECUEXnUKJbQitXU3MnALi8HPVz0z7Ws7TkRKVwxaCCtmm20aQva21H\ngzoF0p6uL3IbNXZ77btqXFpWDjWYujflgDO996je9xqu13GKZmECoR8qnlW8\naabZXiHRSfMA7xgCxzDZijMokFYybattV7FIcb888hP4T22bDHRSIVBR7wuP\nSJx4SnLCInVtXrKW5CP+Tm40uLiLZjRZxJlRvxY1uHQ+Biqrrc5MP64HyzLI\n786fGECndArTicVP1eIr0j7SP9KUOCxOw9xqPk3N55X/PvmSA92xB3yIX7PU\nFjkAJZqnfkoFsTaQRsx6Ciry0nC860GGRSaKlx4IA7mzEs2j2FqT2wPfveOM\nYlfC9Xin2/Nw+zuNHU0MLEF93Izjt7fxoSvFMit+EEO34ESA4WbQUwNg4Z/R\nmlYwrRu6bOP/RdNd5PXJS+Qc6+fKsDrAAS+7Bhjr6THD6dr3lce8jl3boDT5\niyBeOrtTUeFlDE3x92DHm8ZH3bFskt9OdaUYNKWBS0MAp1HhISc2dMs0QCGU\nrshG/G0DT53Hg4jcMQNmqEWCqdWicyvnqJPkcPnmg48GeCuF0z29qWOeGcoc\nIc+z\r\n=B2GG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAYJgs+LjFLDa4abZ6tHJRWhxNd5tDgPCIxVJueYQe1zAiAtDAkkKAMEu+OFEkC2Zv+UKqSc0kCTxjuiIlBBOCmQ8A=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.170_1560442015901_0.31981275145693844"},"_hasShrinkwrap":false},"0.1.171":{"name":"@react-ssr/express","version":"0.1.171","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.4.5","@babel/plugin-proposal-class-properties":"^7.4.4","@babel/plugin-proposal-object-rest-spread":"^7.4.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.4.4","@babel/preset-env":"^7.4.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.4.4","@babel/runtime-corejs2":"^7.4.5","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","delay":"^4.3.0","fs-extra":"^8.1.0","hasha":"^5.0.0","unionfs":"^4.2.0","webpack":"^4.35.0"},"devDependencies":{"@types/express":"^4.17.0","@types/fs-extra":"^8.0.0","@types/node":"^12.0.10","@types/react":"^16.8.22","@types/react-dom":"^16.8.4","@types/webpack":"^4.4.34","cross-env":"^5.2.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.8.6","react-dom":"^16.8.6","rimraf":"^2.6.3","rollup":"^1.16.3","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.0.0","typescript":"^3.5.2"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"24baba6375b6b409ddf7fc5024ff8eb7ace331c5","_id":"@react-ssr/express@0.1.171","_nodeVersion":"12.5.0","_npmVersion":"lerna/3.15.0/node@v12.5.0+x64 (darwin)","dist":{"integrity":"sha512-mdWtlhG4YgNBXEaOnFUD2fgwgPwnMrUsckx5WqI/tZ36MDP4SJZuuUKJZy7WR4CeNSaWwB26y2w5Fvpijei72g==","shasum":"ae0d934dbbb9bc9b14d8f2815d772f4efce98615","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.171.tgz","fileCount":15,"unpackedSize":12756,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdGN5GCRA9TVsSAnZWagAAuecP/jGl4Yumd1NuTO0ye6Bj\n8DG9OmpbqKRskIQCS5/7D8+Z5NxfLeO3L7TZiugZDPJfudvgBSiJr002gAy2\ncWVBvzDRgLny6iGi0yKalUFS/pQHuJUgnTxc/yvyxkis7kvuQ6Wp002VKINV\ndc+Y65HyEzuFmQgR9L5FRuMMfDctMQ4gd/GkT9y1IdJFNnzaGFzQCZOrtSBT\n0Kak9RlulZOrlg8nnSdruqW/DreaG01/GYVIgVsChxVeRfhQantDTBSzJMq1\nFUzONddmn/7tCogXPupJaC5xeHKIZxzERF/l/dsz/q41YGrRNSEbAKMF+b1u\nPjO8OodjTpIptvGwQsbuL0p0w+PFATQd6AyYMtIHILXZN7WeSXHVz8noOC0K\nu7skfTobQfk2f+1TCRLKlQaKYxV+Nak8KmyPzfJ1YXS02vKGDuagvXOQhi/v\nF+SAflrV3upCmwDku8DKJIvqdId/19RCHi0SWjh9EtgV8yXt2JntdbB4sdq0\n1sL1lQoY0Liw4XqrmbOnHdKXv9dFUaFz6BG+uiIq3K2kLhWSgHhqogXoLBfs\nce/cOE1vdf9erSZjvxBF2cm3ooBfkDV1q8AofmLS5uGU/Hy0RWT/MVr5tNxi\nvKQgqv7g6bXCeGdE76GuePOzMnzo/YKQTlquGw3/yJYrd7khNo6LA+Kplji3\nrxSH\r\n=cOXh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFnum+xiwgbkUm1A4gJvz5QmRgI6EbCJ5Z8/qILTHO21AiBp/kMF8VNtLXDJeGQj8THiz9Ifu355IhWgbbXe00ARIQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.171_1561910854158_0.8456767863599697"},"_hasShrinkwrap":false},"0.1.172":{"name":"@react-ssr/express","version":"0.1.172","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.5.0","@babel/plugin-proposal-class-properties":"^7.5.0","@babel/plugin-proposal-object-rest-spread":"^7.5.1","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.5.0","@babel/preset-env":"^7.5.0","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.4.4","@babel/runtime-corejs2":"^7.5.1","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","delay":"^4.3.0","fs-extra":"^8.1.0","hasha":"^5.0.0","unionfs":"^4.2.0","webpack":"^4.35.3"},"devDependencies":{"@types/express":"^4.17.0","@types/fs-extra":"^8.0.0","@types/node":"^12.0.10","@types/react":"^16.8.22","@types/react-dom":"^16.8.4","@types/webpack":"^4.4.34","cross-env":"^5.2.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.8.6","react-dom":"^16.8.6","rimraf":"^2.6.3","rollup":"^1.16.6","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.1","typescript":"^3.5.2"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"8b1aa5413c2e3d98f005d807c7c5ea9a812ab86f","_id":"@react-ssr/express@0.1.172","_nodeVersion":"12.5.0","_npmVersion":"lerna/3.15.0/node@v12.5.0+x64 (darwin)","dist":{"integrity":"sha512-OannhM307t8xolEPNO+SlRrVIYmbroiecRwcuKGjdQwdYG3LrCB7eF91HceUgP1PjT88ztq/ET33BY66oDIRuA==","shasum":"1d8033c06139359601098e6c2f09d7b450954dc3","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.172.tgz","fileCount":15,"unpackedSize":12847,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdI17dCRA9TVsSAnZWagAAPPIP/07Tz1x1TBenUCT5fmzd\nneoI0SxhIrbIl+vamexeRmQ7Er1OYPKjWuoCOpDaUezOuG1YZGcfJ9jgI5IA\ntJFTZBD6mjaPRDMT/cu8q2iU/NHuA/eNt8ZHkmIFrf8jx0Hui8Q9VUV6hecC\nAITb6L67fR4nj0swRJGvgD4t17HJlwOFOjjAkyahhXL7ExjQiCYAnqox685v\nZr1O00/ixChbvR2JiewYCXLKZGqJxAAFW6UoZBWjNNEvR1V3cnG/wLuTuDx0\nr5bHmurMNTz3GQvPHTi3h1PKli5X1B7DotPdf6nqyOkXl6TDPTcLPA0P/W6d\n9v4wFOxQsSjYlmgzXH4wSISo27rAhJKM826r426h/APLv0mYj/AOMqJoaKzB\natm4MRoriOywWuITfj3NguhPFBUvLqqxwK38sfyPqf+5W/616kl3C6sEpdMZ\nd0ggMA87tsI5WaD6Dja2lHEUMDdZY8uLguigbaCFaJdRT+iOflM07JYFIre6\nynv7SPJF4GWXcGrGSOXDbHU/OtvDmlC5LR11u1p6/AWBbzcPF4f4gKSJMdDR\n2hIhX57g/NNC9VUUxvIhFmRhOtLjp3PBYI4yY0V617V6XpSlTw6EnHx1Hort\niJmLPRBOYS93v2iMfNGjT9kYUEaqJVgfsfvkpjFZ4XSY4VDzsUp32LXMOFyw\nHlhb\r\n=GtGo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDt2Z6/aaTIhcA3ZzcGvjIJF+hiupo02qHMdaoQLt8iCgIgSSPwunMNclChZk7FzZ8A2YOoXFwjWQpQBJBUN3LElDM="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.172_1562599132465_0.3797113232163143"},"_hasShrinkwrap":false},"0.1.173":{"name":"@react-ssr/express","version":"0.1.173","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.5.4","@babel/plugin-proposal-class-properties":"^7.5.0","@babel/plugin-proposal-object-rest-spread":"^7.5.4","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.5.0","@babel/preset-env":"^7.5.4","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.4.4","@babel/runtime-corejs2":"^7.5.4","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","delay":"^4.3.0","fs-extra":"^8.1.0","hasha":"^5.0.0","unionfs":"^4.2.0","webpack":"^4.35.3"},"devDependencies":{"@types/express":"^4.17.0","@types/fs-extra":"^8.0.0","@types/node":"^12.0.10","@types/react":"^16.8.22","@types/react-dom":"^16.8.4","@types/webpack":"^4.4.34","cross-env":"^5.2.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.8.6","react-dom":"^16.8.6","rimraf":"^2.6.3","rollup":"^1.16.7","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.1","typescript":"^3.5.3"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"6a7c875c56d55d4e1d38d5c93321171a42fbab2a","_id":"@react-ssr/express@0.1.173","_nodeVersion":"12.6.0","_npmVersion":"lerna/3.15.0/node@v12.6.0+x64 (darwin)","dist":{"integrity":"sha512-FKIuXUNYaGioEc/fvOJd0eq2dXfmTScXc524hr4AE3h/cWVvIz9iCPpV/NERuFTkYQPbuYEEUa7pZqulwk3yBQ==","shasum":"f613d95013e283b65239ee6bad12e9e0e420a6b9","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.173.tgz","fileCount":15,"unpackedSize":12997,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdJ4CwCRA9TVsSAnZWagAA9NEP/RJKu8r/kBapoc+DRpaf\nNWKoWIHmWA3feI2LtuqtIk+xc006PDKh5O0agvHtqAgF0y4o2giod+gk7z8t\n4kuBkWtrR7DUYA+AxR+gIWsnB1quJjn1TRMpo2tdi58UbMunMAaz3ZYhfrF6\nb/oivBo/rwV6ydkqyZDgou1JgqF1vdI97w6YH7RGwd5o79kWPtVCpkCn7VxB\n9LTaw3BhTDCjBx7xcQJaL4W663wESAzi2E53I911yavjPcFuSwRCf9T93Act\nhCxIfsLW167kqMFP5o2zznfwp8J/ophEOp5tSFTiNEpDnTP6o9QF1UNwFUD3\n9KliLkxMniP6ws82Hh6x1Kk51X6nr5YwPKl15SUdV+2w0/ab7ebx0uQacTFZ\nEyd4ssUlN3P2qlpkjWAslGvGLRh4DIPgEuChTDt8LDm0jx8Mvfa98j397om7\np+tpbI52jkC8DrsAqpjBWOmD/b+ZPX7hq7Sp3H5JidXi4DlYlwLDcLF/Ik7w\nvfOuofSjDJwChTaL24DaHJx66txjh3vfg9bDV9U7pz28Gltd7MT/KEnnbANA\nZ8Mv/Ib/TZkLDhvddfAZpUSVV/blh0/OD2eUjH1z1gSh+SVRZjKoaaAbGsQy\nbgBgqyvj0HfhPWgt9fso/E9CLXpYw2S/d0cGIfIUKRPsWeazpz2fZsI4IOHV\n9o72\r\n=zFaI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDilP/UUH2QdYHGKABBf4NDYysR/ud1UKWVZpsJMiOsBgIhAJYh+QLOPpX6E9VZe3wLiD114hB9zLt6CjDhEuKKLkJK"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.173_1562869936100_0.11727006306690546"},"_hasShrinkwrap":false},"0.1.174":{"name":"@react-ssr/express","version":"0.1.174","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.5.5","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.5.5","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.5.5","@babel/preset-env":"^7.5.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.5.5","@babel/runtime-corejs2":"^7.5.5","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","delay":"^4.3.0","fs-extra":"^8.1.0","hasha":"^5.0.0","unionfs":"^4.2.0","webpack":"^4.36.1"},"devDependencies":{"@types/express":"^4.17.0","@types/fs-extra":"^8.0.0","@types/node":"^12.6.8","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/webpack":"^4.32.0","cross-env":"^5.2.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.8.6","react-dom":"^16.8.6","rimraf":"^2.6.3","rollup":"^1.17.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.1","typescript":"^3.5.3"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"bdd8e4b767d552d483755c12c63b70f24f22e0ce","_id":"@react-ssr/express@0.1.174","_nodeVersion":"12.6.0","_npmVersion":"lerna/3.16.1/node@v12.6.0+x64 (darwin)","dist":{"integrity":"sha512-zcP+XVunVYoYMoB1hCqHMw6Bqy99NOKDU8XfLuzWYdMKKYH3QeYJ2HOy1gS8zB6hjAYbyYfJ5yuRMjRLg7jitg==","shasum":"2b8e486bdd6d33ad31c19126ade685eb83a9f9bd","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.174.tgz","fileCount":15,"unpackedSize":13007,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdM1iaCRA9TVsSAnZWagAAzRQP/3g86mXD/9j9ttSCDlnY\nld3LLGzFl2165/ruKplQPBtzzrEgnJcT8lUQ4QySqaUtGi9tUKwJ0+yQgyxj\nFNMc11e6L19KtY8h3LoVLbiNkj5fLuQwK6FM5sapruS0QW7BLIqyyOc4ihYV\ndYhQd7wyr1L/IcOscJ44Bf0/3UgQEtc0uoF1Wb/g1vY0c1SzbZ0gxsLZ4C4q\nd9/l+uwcKhDk60qY8B+oX+jp1n/4ImnZKr+R3h3qTc7id9qeV7ZBT2Ze3tMT\nVCZ7S6/hdrWG9lYFznWwrVZXvh3U34CzbNqcq339s/0aqjRqKWlb5zRbD7aj\niBNx7OtIblL6F8TIf20CJpPSCWl/oaz5PfvjzxtgVeW6eFVppF2UlJ4/Av21\nhXNeIetQIoXY4eHrwFDvlPvfXOYCf0+ZDHlGkfC56cGf8JRWMVT8kuK0TvN1\npVr+8OiLj172oR2Z4W4yEPeaQtq3NczASYyqeXX23xZvqzy3nTuyS+pcWvV6\nrVsdV/cI9OdlYANHbprfasVKAQAH64AwNEyiLkRKp7fna6iFo5MMCJHCAGGv\nj4nF9D1hJoPOXhrtkA9ZvyaKI9AOqGMaDDPUMeTJKCCrtbK6QFJ7hTddFsYx\nWEI1K/sAhXvAvlJJyej1GR/S63YJJMfNxRZ+W8dvh5Qio85dFC5PS0vsS87s\nP1fh\r\n=13tJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCshkeRKb9CZV8EHQAvRzl0EAxUUTb1KYslwr3IBfZPvAIhAOXOb1cMv/+oiqhNQk/zZ1kGbApE79LPqfdkhSgI5SgD"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.174_1563646106061_0.4129435485594002"},"_hasShrinkwrap":false},"0.1.175":{"name":"@react-ssr/express","version":"0.1.175","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.5.5","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.5.5","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.5.5","@babel/preset-env":"^7.5.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.5.5","@babel/runtime-corejs2":"^7.5.5","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","delay":"^4.3.0","fs-extra":"^8.1.0","hasha":"^5.0.0","unionfs":"^4.2.0","webpack":"^4.37.0"},"devDependencies":{"@types/express":"^4.17.0","@types/fs-extra":"^8.0.0","@types/node":"^12.6.8","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/webpack":"^4.32.0","cross-env":"^5.2.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.8.6","react-dom":"^16.8.6","rimraf":"^2.6.3","rollup":"^1.17.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.1","typescript":"^3.5.3"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"b535d4bc6bbaf604db80f99943c5a2bada07a0b6","_id":"@react-ssr/express@0.1.175","_nodeVersion":"12.6.0","_npmVersion":"lerna/3.16.1/node@v12.6.0+x64 (darwin)","dist":{"integrity":"sha512-AevMD1zOjPXLdKC69WlX0MrrmDeUsosnN1S+PukG2dKZXznnlwqSv64h0yRE1nloi9TqfXRr22uFXkNFMAzNfA==","shasum":"77b5497e90f03a0f54c4a28984e30a50b21c7612","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.175.tgz","fileCount":15,"unpackedSize":13007,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdOJ6oCRA9TVsSAnZWagAAETMP/jLhrEUXJdNm/FYORdrt\nsAtnkg3ZS0JglqeIB6I6ZaDd9UiL1RLSe4ZGtcPcT+gMW54WrKtUuJRN1J1I\nSlz9G+o7BJIalPT+L7BbRHVRZRQCIUbcNQ/Qpaij8xaWT+sPehSbPBo/t2Q+\nH64EO01V9FX1DNx1mkOIUmVvwTc7Y+orxbPYqyNJq1n1fyHS66+pQKHje6QL\nxxsP3AEjBuf+HcnLyNyd823U2IbpIcCipopRGf9a9x7yhkOjip8vrFUEYzrn\nD63JKGw6mNhJlfs0qhgCag009MQVB/Kql0tHTShL2VohFMF1f3a2zb2hssTU\np1pwt+AIPSTDqWuhWS+Lgonc0yG8IgefaX5qVCp75pOfqCAthgnLze0jWjVK\nswYcvQq5RwHVqwZ1jBCUiZzOsv8wzihIs1VNYmoBKQQklctl5xmOTtk7nrEZ\nXxRfPYBGCe2pAHIvEC/lPfFJTiFGj31sHYc8faWtdG6DA/DBDaCBt1TcpVtf\nsnhjegK7n6v3ClnHA6fPrAGMmzEdXTwBW7zOwX7pT5IZQzRy/L5xEvcFdBEt\nPv2KYKcmgtOE0Y7fL5gQgyORErM3E+X7t1PQqRfTiKtrrkJIkn+vTXaG7Yha\nerAhIPas+Np7jcRJb9rRk1aeFfGtaDGk7hOfKCB2AvSlOZb91qhSUETbi3GO\nj1WI\r\n=3qzt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCWNPCDMlaUrPuj0CHNIeZXYaufiq8zdWgnopE2ncRyRAIgSY9cC6YWZ9wV/krQfVxapuD5H4zKFf9xKcv2gFaKArw="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.175_1563991718514_0.1453148582807846"},"_hasShrinkwrap":false},"0.1.176":{"name":"@react-ssr/express","version":"0.1.176","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.5.5","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.5.5","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.5.5","@babel/preset-env":"^7.5.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.5.5","@babel/runtime-corejs2":"^7.5.5","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","delay":"^4.3.0","fs-extra":"^8.1.0","hasha":"^5.0.0","unionfs":"^4.2.0","webpack":"^4.38.0"},"devDependencies":{"@types/express":"^4.17.0","@types/fs-extra":"^8.0.0","@types/node":"^12.6.8","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/webpack":"^4.32.0","cross-env":"^5.2.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.8.6","react-dom":"^16.8.6","rimraf":"^2.6.3","rollup":"^1.17.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.1","typescript":"^3.5.3"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"d4933577bb7bfea86aadc323eafdf71d5c18a6aa","_id":"@react-ssr/express@0.1.176","_nodeVersion":"12.6.0","_npmVersion":"lerna/3.16.4/node@v12.6.0+x64 (darwin)","dist":{"integrity":"sha512-9IQsGfVI3m/21yGBoKF/woL5S5Cls1Iy23j2R6iweKVFmDXv31k1K+x8IpyimdPhtJGGRKuWfR7fk7Y5JVfOXw==","shasum":"8ea0c6c2d846e2a36370aff822c6e44b7ffa95d4","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.176.tgz","fileCount":15,"unpackedSize":13007,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdO0syCRA9TVsSAnZWagAAaSoQAKS4bgWSlrE8w/AodZN1\n4/qlwUnX/rNmDb8av05hMQavcPSocIB194aB7b6KSx3OEY7lQTTUhrp7g4KH\ndfKyKwZvanejYjqTjY/C13P7Kda+7wojc/MAygqmm+0qf6VlC8EIUT7uoL6b\n3BFaBCzxOl3gYVUCbVer1EiUF7fjNfVFy84lTqoyjF8F3QZNhe9qb+vLb6Px\n3IVzm1g+QQ2cxtwjj3PMumVyhjqUpemAZo61V68bm/ZtRwyyZvfZ2Jho7YU2\n2nBdGRPHcSlJUKIU0YZk/b2q6m70A44u9EuzJHX0d0kE5Uty0Zdj/wxMwu19\nnIls4i0KMSW8pBbomMqbqLgTNv9nVQXSgsj/fKLmLnbH8v93iOPkbz1OPk57\nnMWSCg2YOH/TsTpeLeTambIPs4xoaIEoMDbAbsXlz9+9yoXydBxMQ3DiVfAd\nFm5Ex8cXyvlLBvEjNV5+/6l36P27vfi3ZqfYYnssxXNTVYAN+m/z88qo/tTn\nVIpX69cKa93OVX5nsk7aGI0Jr9O0biYLHu/XWcX0EzbEAlH4DvyUnlLFscgs\n03ab+oJwmnJ2X1dxDISZrdxzCeJ3mGFUpQuckkNajklYgeXAoggr4wg66V4t\nN/YuQbAJZ9hlKnQ2rw0SwZ9HT8BuCaIQxnCbGbofNUIGw38s8/k8oIfE32XL\nmqo3\r\n=9bI3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH2r+hTNZkNyzkRUt0k0wrVALRXcpqku/I56S7BEtCwSAiEAwT7MTc8BIhgww01W1U4ZBE9eF6EeDxsPG7m4bnG9aVY="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.176_1564166961565_0.11625562181802063"},"_hasShrinkwrap":false},"0.1.177":{"name":"@react-ssr/express","version":"0.1.177","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.5.5","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.5.5","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.5.5","@babel/preset-env":"^7.5.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.5.5","@babel/runtime-corejs2":"^7.5.5","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","delay":"^4.3.0","fs-extra":"^8.1.0","hasha":"^5.0.0","unionfs":"^4.2.0","webpack":"^4.38.0"},"devDependencies":{"@types/express":"^4.17.0","@types/fs-extra":"^8.0.0","@types/node":"^12.6.8","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/webpack":"^4.32.0","cross-env":"^5.2.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.8.6","react-dom":"^16.8.6","rimraf":"^2.6.3","rollup":"^1.17.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.1","typescript":"^3.5.3"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"b190873b5e7125ef9fac807d9ac2ebb22fc45c6b","_id":"@react-ssr/express@0.1.177","_nodeVersion":"12.6.0","_npmVersion":"lerna/3.16.4/node@v12.6.0+x64 (darwin)","dist":{"integrity":"sha512-eW3vkUXCQcpx6yKjUfKOjOCVaYmUoHiJFSf/06lXKj1+YWkyMqWWi4fPZQk27og8SjVGna29KJv5o2SE9j9PKw==","shasum":"cb334716ba124c1681b8b0a78ea050e699c93ea3","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.177.tgz","fileCount":15,"unpackedSize":12868,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdO1opCRA9TVsSAnZWagAAF/QQAJSqYWhFStJQ+l1a11Q7\nsgvFeYy3LIMI08H5mHDi4w1qlS1eiHBxN2XGuqy/w/CChzGP7z6ECWpnmH+S\nfM5NINmxMW4nFwGKraEdDB1YmFDYICVuiMv5LCgcWP5beSTd9nuTV38pkpYn\nHQYTksOjp1ll+a1N8IP9oKPryTJbi0fpZRvftY4Izd2xYrDXhXTN4iV39Yrv\nEICSFer9WbhmxxkyUIjb+GRN2K9OUX2VP1HMhwtRd6GsarGTAk4pFBvCd1Rx\nzyAV4LChBCv/g2QqM0+Z00TRaXFY9WTL5BDPhBj9l+absQWhXkn7psafG/QL\nbG2DQVRmk3iIeIIB329Z+N3tXmchVWXwAH3z9nbqOijiqBbrpSFCyeLTEdGD\n/M/Jgne4Dkx06f7g5HD5Fv+5xATG9FApe6Wl2E+A0L2CWcHkav7C5PgQKbMJ\nILC2fUoUXHW6ZN9Zs6axWBYN2r/MfbuIS3wICHpcI5HdXdJLfxsC0GSpemUR\ns46cbAPHX6LC/4CgsTVeroVMLPvntn1cwQwfmWRO53H4DRfGPYoa6TZBZupi\nGhNsc167A1TpzMbGfdeW2S0uwMRzNsupkF0Uk7LCqmfpcwFzXqGpWRlzrnHw\nXoaa4tN6o3O/jb6Logx1QA1QZUXG0Tj/iHYPB/j72IEUvPpHBTzZBXp/1Gml\nWEio\r\n=i1yd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD4uuPKTqOIR/wCWetn1iV/CjHlX8+DLaO2GmT6s/UhUwIgYx6fndGVC/Fes+zsadmvoAx1yIFJNaMTQaVLemb9jKE="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.177_1564170792121_0.2115147963416837"},"_hasShrinkwrap":false},"0.1.178":{"name":"@react-ssr/express","version":"0.1.178","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.5.5","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.5.5","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.5.5","@babel/preset-env":"^7.5.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.5.5","@babel/runtime-corejs2":"^7.5.5","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","delay":"^4.3.0","fs-extra":"^8.1.0","hasha":"^5.0.0","unionfs":"^4.2.0","webpack":"^4.38.0"},"devDependencies":{"@types/express":"^4.17.0","@types/fs-extra":"^8.0.0","@types/node":"^12.6.8","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/webpack":"^4.32.0","cross-env":"^5.2.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.8.6","react-dom":"^16.8.6","rimraf":"^2.6.3","rollup":"^1.17.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.1","typescript":"^3.5.3"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"dd12b1919313be82a72b9f3a7566861bb376d9db","_id":"@react-ssr/express@0.1.178","_nodeVersion":"12.6.0","_npmVersion":"lerna/3.16.4/node@v12.6.0+x64 (darwin)","dist":{"integrity":"sha512-ujNIyFzfjs7rb4oY9TJgEHNmHwrfof86MO9HaFIIvZ7amNTwypkIqFGXNw//kGTIDRH1FNFuIuCCapEgE9/cBA==","shasum":"3104d93ecbda3d5d0e0c7d8e497a128c75510847","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.178.tgz","fileCount":15,"unpackedSize":12935,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdO1udCRA9TVsSAnZWagAAtsAP/je+yBnCRVkYos3aTbLc\nohdGZjmeE3TYaIgo7VWYH69NGqlRMP+T7MdCMy/mfQwHI7Sqx4ygLoK5LlIb\n2PXR3WkEHKr3p6ApMM3a2v26liEq1XJW26FNBF3oY9rFHW1bbaaMLZd3ARoS\nTDDjKsIMFZdniv1gOrKK8BCmpwEn0NqRZLH2wkcSA/uUY3feCSvfeOCAdaMV\nmjHkSJrJH5lILUZPwc7Hy7ZvyI0yRtTFS9THqOsHjaZxG0L7vsovT95vEuZm\ng55VvUtoocQHEAdjXB2DtJAQlzuZt+WsfxUw47fJ3XSOUx+3CQDxKRymbL4R\nJurxG5Z2Uc4msQUEjuZc6HtN1cyQTvbfo7iZQEkSxgY3EquanNZGEZbb24G6\nTq/Pbs09WLWxUnspHtrUE2DRV2rgxOFrw1X758DhZfFW7EHdVZm6hSoqRAWJ\nuBPe5jhPbhN+pU0DrULmnKNwG+KBZE8uJNMAN56eqv9bICp26pZuLwk/Oh6g\npUxcSnrB7NRytXrZcMwVHGOY+RuihxVSEsPMSURBJvX/tqr+GmNme79dS/tS\nmBWQxMUFSOEuXscz4Xzf+etxPD9ywYoMQyfjhMeLCKON1/04AONCBcV77RXa\nbJIL2ko9nVP+SSgiKrVMmFnzgQyM070Bkopt//67SioFa7aENs9/2crT/GES\nZSu+\r\n=nmab\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD4g61nlfyFXKnJuYUY06OM3xkFJ6yCzzQ33NJvrJC9agIhAKiNY8VykX3M3XPuxwy71BrrEwM1mJNAKGakOnveaae1"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.178_1564171164376_0.2489529047297634"},"_hasShrinkwrap":false},"0.1.179":{"name":"@react-ssr/express","version":"0.1.179","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.5.5","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.5.5","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.5.5","@babel/preset-env":"^7.5.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.5.5","@babel/runtime-corejs2":"^7.5.5","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","delay":"^4.3.0","fs-extra":"^8.1.0","hasha":"^5.0.0","unionfs":"^4.2.0","webpack":"^4.39.2"},"devDependencies":{"@types/express":"^4.17.0","@types/fs-extra":"^8.0.0","@types/node":"^12.6.8","@types/react":"^16.8.23","@types/react-dom":"^16.8.4","@types/webpack":"^4.32.2","cross-env":"^5.2.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.9.0","react-dom":"^16.9.0","rimraf":"^3.0.0","rollup":"^1.19.4","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.0.2","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.1","typescript":"^3.5.3"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"b9c70d14c32658a1ece489124cf50d6622685522","_id":"@react-ssr/express@0.1.179","_nodeVersion":"12.8.1","_npmVersion":"lerna/3.16.4/node@v12.8.1+x64 (darwin)","dist":{"integrity":"sha512-dHv48m8BbPo2Y5Wu4K97s/VPYoYCPBghodqkKN3Jigyk/Wq3Ml+cR65Jo825NxDYe5gG8W96i7ItdEs4k2D2/g==","shasum":"78f9a3ac219232a1290746a26eb64ab87e4a3cf3","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.179.tgz","fileCount":15,"unpackedSize":12935,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdV56UCRA9TVsSAnZWagAAIR4P/39OmkKKnWg6378BGYHS\nBJ81PE9zJPuzy00VYY8V98/BQVsp8iBmAg2y1/gohwY3FBW6OIvYW5b3l144\ngT8QwLm0g+Gn8wf3zxmUvmINgxmPbrqFRoUeg1oxGDvmQMnc22jJVbXwrL8M\nu1QAL3WJz+n8M6bb2tIDDabm+jHNl2bzasCJiDGWUNuvGUchPpxNfKxJerd/\n/sjHQAlrQ8it2bAfKML7ImLue+HtYDVfZWMJvpsxqfyWV3rkQpYG0w158qNO\nzy648rxqNsJXobjmQ6wxHZjMtIhc8sPr9IojBa9FG/ej55v9Y/pyHTNLTU1s\nSIFvAFk/Cgx9AHy0zluvZmwUHv1jpRTyqh5YQhLt9x9VZ0XWei4aEh0C8Z1s\n8b3/bBE9UnIkNY3i6xk047TMEusd6l59YjpVD8YE85A56S1wTC8fgXqkVuA2\nW9jsXGvcXaxBh77sdHkHyzpa6ko6aIWfQ8oiPvIvWwpZ6HVSs1Ap7jLRQw3y\nTFby538JRUaGmrtbxHQ5ZtZF8C8kkUF4P7KY0UL9YJmu31TijsKPC804lxt5\nsiiyeAJ45+WYwBC/jFpouJ5DSEDzN+uXWAddB1vFGuM729bsANLgBeH4hQW1\nBGoLpyQUlFZ0g1phiT/yprGZvOq2V+7IHieyDrZWgh56FppIGfl8SXPfct7Z\nkmp8\r\n=tDDQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDY53dMFknxkt26V0GMlAHOt3jpBvt2Qtq3sWG2hJgongIgRNbJrZOvzC7AFWWsvp9ZrTSFUGtZw7OCMTreVf480k4="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.179_1566023315805_0.37726654745916277"},"_hasShrinkwrap":false},"0.1.180":{"name":"@react-ssr/express","version":"0.1.180","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.5.5","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.5.5","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.5.5","@babel/preset-env":"^7.5.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.5.5","@babel/runtime-corejs2":"^7.5.5","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","delay":"^4.3.0","fs-extra":"^8.1.0","hasha":"^5.0.0","unionfs":"^4.2.0","webpack":"^4.39.3"},"devDependencies":{"@types/express":"^4.17.1","@types/fs-extra":"^8.0.0","@types/node":"^12.7.2","@types/react":"^16.9.2","@types/react-dom":"^16.9.0","@types/webpack":"^4.39.1","cross-env":"^5.2.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.9.0","react-dom":"^16.9.0","rimraf":"^3.0.0","rollup":"^1.20.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.1","typescript":"^3.5.3"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"bde2f25aae0afae1575def57de5eaef1c607d259","_id":"@react-ssr/express@0.1.180","_nodeVersion":"12.9.1","_npmVersion":"lerna/3.16.4/node@v12.9.1+x64 (darwin)","dist":{"integrity":"sha512-MYyjXSbwdQ+77J0BDLmYQ/1kOLMmBAqO3aRpccJnGYNLZeX2DfbI4oceKvN5r5TOJl1s/XDdRL+YQAmXO+sl0Q==","shasum":"9a6dce6c4e9c197c63843e7d9b456eef82e4f7c2","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.180.tgz","fileCount":15,"unpackedSize":12934,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZfbtCRA9TVsSAnZWagAAQdcQAItkj7ZJVZ6gzJYmt3fO\nBzL7WFCIDptWwaZVMnrF4X9qqHNrwpmfsyTyZgcxZWfUpyTsAYsUXbcWM3/7\nt7m/75VAHEMIEMoQM+wdfuRwT26D/2JsTqFwPRa7ArL1QvzlteTRuXbIgQsG\nhZm08P+mK9MXzWq5nKqTYPabNNMt5eOfV29VwL2ZYI2jzRoc4wteaWxLvPKO\nRRvysJwIjxT/zyyG60jsHbCdXpT0xs4bVTIcYPIk8FufN5sYyC/1hLuWid9t\nSHVmAbMImrSwuYpq7JBK0E4hgjrVkbRFypNaZrvIy5ehHMCQvPnyUSYa5egJ\ngud4Kc8Vjt7z7IuCcMP/vkG0ZfNnMgJ/dsGCqmPxQhdYrkcVmwc2RGpkQjB3\neLbrRsivy/QilpXgU2ekJwI369up9MX67Tuerlh+RPjdac7pGja09jW60w+z\n2Ji0S9N9A5LBPrzHc7NFc9xA2h5PD4O8qwFw+aD38mUW56uzYijd4j7KxPIO\nixobxiC5aZKPobZMRuLnWkVSibnXtj/SSOy34MAYOvsmRnI50iZLBLIwLZZw\n/p2r7huGN5CY6GMSTa0drGoS4UVP003wQSJaAV5zKUYDUw7m543I0SIcLIp4\njz+Uij3p3CEXsOjrF2p8jhqPZtkFyYSa3VLk+OjrLMuS/knd1G2QY5NRLf7l\nyNjY\r\n=b+Q5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCbaKwuUuflBmKH7wMvwvVCOqBNLCLLIeY4IjMIZFlPmQIgcoVYpj5DjMAu+izQe3hfR3GOTxL74VzPrJUA8NYP/cY="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.180_1566963436396_0.3963296113666255"},"_hasShrinkwrap":false},"0.1.181":{"name":"@react-ssr/express","version":"0.1.181","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.5.5","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.5.5","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.5.5","@babel/preset-env":"^7.5.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.5.5","@babel/runtime-corejs2":"^7.5.5","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","delay":"^4.3.0","fs-extra":"^8.1.0","hasha":"^5.0.0","unionfs":"^4.2.0","webpack":"^4.39.3"},"devDependencies":{"@types/express":"^4.17.1","@types/fs-extra":"^8.0.0","@types/node":"^12.7.2","@types/react":"^16.9.2","@types/react-dom":"^16.9.0","@types/webpack":"^4.39.1","cross-env":"^5.2.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.9.0","react-dom":"^16.9.0","rimraf":"^3.0.0","rollup":"^1.20.3","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.1","typescript":"^3.6.2"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"8d1230c92f0bdad34c6697c5e926ccc1fdaa6c2c","_id":"@react-ssr/express@0.1.181","_nodeVersion":"12.9.1","_npmVersion":"lerna/3.16.4/node@v12.9.1+x64 (darwin)","dist":{"integrity":"sha512-LKGshloLkneQyXucv3zz3NbZ/tJ8r4qJ/kvx7X+s8XFoNnMTAp9vuPnZ6BYxuA0hnOvORmcNmptbeW0G+UA3rA==","shasum":"ac75f16eaeb0fdf1daff82d0c8642dddf1dea0b6","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.181.tgz","fileCount":15,"unpackedSize":12934,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZxf/CRA9TVsSAnZWagAAT4gQAIiIsfnN0a45EA8QTyBF\nzFOS5o9pm3frzx/Afpz13o3wT1NHDAHf5wqYCY115QYev6n5KPo1fJS5dE1O\nrOOdutqynkI2ZZnMQNykyESjkMwgiNoWQZehBVGrxZhZVblvjfDQQ82uXlbL\nNfexR6WrGZBFK8rKunliEKrBWg6jlG+AsDPpkHijo7all676nLFRpUZa4BDO\n2UTrdUXlkzxTckwqy6cw60ruuRmGmv6v46nHI6veSbhgLIrDVzjhjT1ZHhhv\ndi8xZFlatzymy2Lz9eXSEYD5La+6DDwfxoY1ylfAOISGqORYnY/9n7IS6kVy\nMw/LJgQ7UkVkQlhMo1rlz3kFEGzTKHfAJ7c4J6FKxgSk6Qxs9zQGeYtazMva\n4qnZJ62nz6v6eIxTLF/ulTlcWBdSZFwc3d0A173WlLlGW4i3Rv2Zrdj/v4Cx\nLNLGewVC8WcaECkLX3rmE9FAzusXuaq/vr0+c2sUDmuL8jnZp3FGI2LNr5sg\n+ZUNn44YsD1J8AGHjth/hwtOsrxnH82m+GGdbw2q+Kwd8kGGHF6EvNvyEboj\nd11yqtKkH5wtdP+MeBBHCd9eUPBq9S7GoXrrNGlp+3oehM6u+PXlsMNE3kDW\nMEod8dYfJYAsssA7f5xglbFAMeT+OZZCO0WnpEEGHw8WL1j3kkzpnmz5yxBV\nNYe+\r\n=NL2V\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEMCHwSEFb6/WBDxk/TQLnOBiJ3aTbZ6mt200j4qUxIk6akCIET983ktDK1wmWQrh8Ob8BCjKxmne6Om0E42Gj8zvlyL"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.181_1567037438833_0.44621010132021666"},"_hasShrinkwrap":false},"0.1.182":{"name":"@react-ssr/express","version":"0.1.182","description":"React SSR with ease","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express","keywords":["react","reactjs","react.js","express","expressjs","ssr"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.5.5","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.5.5","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.5.5","@babel/preset-env":"^7.5.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.5.5","@babel/runtime-corejs2":"^7.5.5","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","delay":"^4.3.0","fs-extra":"^8.1.0","hasha":"^5.0.0","unionfs":"^4.2.0","webpack":"^4.39.3"},"devDependencies":{"@types/express":"^4.17.1","@types/fs-extra":"^8.0.0","@types/node":"^12.7.3","@types/react":"^16.9.2","@types/react-dom":"^16.9.0","@types/webpack":"^4.39.1","cross-env":"^5.2.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.9.0","react-dom":"^16.9.0","rimraf":"^3.0.0","rollup":"^1.20.3","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.1","typescript":"^3.6.2"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"e51b91cb6a472dfb8de99a8567c762eb934574b1","_id":"@react-ssr/express@0.1.182","_nodeVersion":"12.9.1","_npmVersion":"lerna/3.16.4/node@v12.9.1+x64 (darwin)","dist":{"integrity":"sha512-aw1Uv/ZxmG/9PofqMLeQYDpfFSKtJChVi19hRdi8eg4RIezdcj/IqzBZSlHo8NQQKZH9vcyYOzrDxzHjmyqs9Q==","shasum":"4d5afff53f466e723982f7cf73f3f78365d5ca17","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.182.tgz","fileCount":15,"unpackedSize":12911,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdaQBPCRA9TVsSAnZWagAACGwQAKJfd9A9HtUOUPEtg/0t\nlsdXxJkIc88qGPLfuUlM9mYZ8edIzaV5irsRKCYSRXBh1TkIsB6HuhYP5R3f\noPXny8bjiftTJwfwN2QcdIe4SBxrHSv37mK74o1x4Df7z8DHFgq/rv4nlNmg\nMVqceFJiSYVco1p+2/6+U6hvl3WUmweI7+MQ6CwIj+vAwx12G0JZGcpPbvs+\nbj7g2U5IvlbBqMVBgQPCZtbn1J28MCB90d1ksUdxl1aKmEWp9xfb2OqM6ahB\nuynHDafS3Sn3uMnFQL64s9ZUYsBZW7TO1sw6la60z9mWmewlR843JxluoJr9\nVWCB+o+jtGgnTbBdpRyZEpDFB7db+GqoFffuYURzzPNtSAk4idIzby1sabeW\nnbuL1qEVTo2NMUd3kOGGVv1B96bRoRsRsq9M9wodtucABxh2CQaPvoDXMZdt\nEXkuo7ONsMJ6/8DfVAcCXiUignhu08g/wz6lvjxqsovuEPu0NWxsWPnoNVO4\nTGQNdIPFniQJEvf8FPNChIgms1J1u19ay3TDAeLM5uJT7jBLtVnqjY6jE8uW\n4LZdmPUDJUwmP9SqDF5aMuGsb8pp/8YlQQMi5ipALaT2BaipgOEYbBroRsbR\ncG1tc1N0eg3Za4n/+jynR3d7L1NN070jy82lt+8JB9/4bOR0igwoN4NMVAl+\nzmM2\r\n=ke89\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICc/LbFg5LpV96pJ4ZjvZbvxV6kXnmV1fZ9dxRB2wjBYAiEApWZigQ4Ehx06kHVOwo4KmG1wgZnWNaAz1IHjuGOhbjg="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.182_1567162447213_0.14708313131672646"},"_hasShrinkwrap":false},"0.1.183":{"name":"@react-ssr/express","version":"0.1.183","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.5.5","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.5.5","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.5.5","@babel/preset-env":"^7.5.5","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.3.3","@babel/register":"^7.5.5","@babel/runtime-corejs2":"^7.5.5","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","delay":"^4.3.0","fs-extra":"^8.1.0","hasha":"^5.0.0","unionfs":"^4.2.0","webpack":"^4.39.3"},"devDependencies":{"@types/express":"^4.17.1","@types/fs-extra":"^8.0.0","@types/node":"^12.7.3","@types/react":"^16.9.2","@types/react-dom":"^16.9.0","@types/webpack":"^4.39.1","cross-env":"^5.2.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.9.0","react-dom":"^16.9.0","rimraf":"^3.0.0","rollup":"^1.20.3","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.1","typescript":"^3.6.2"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"1f068d23d2ed25a51954c078a9a019ff2923646f","_id":"@react-ssr/express@0.1.183","_nodeVersion":"12.9.1","_npmVersion":"lerna/3.16.4/node@v12.9.1+x64 (darwin)","dist":{"integrity":"sha512-IU0PEZmwc8j7xqz83bPZzzdYoj1o+s43T3XKJtYkcdtSZaewi7iFeyvuNxcNwIggWBFxibPivcWxfeSZ8QFBUA==","shasum":"f66ab58a7ef2fc70583cf78c7e06dceb1ea51f96","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.183.tgz","fileCount":15,"unpackedSize":13036,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdbl72CRA9TVsSAnZWagAAa8wP/AjeFpTsbPRdIL+u74DA\n+EKtEHGpZ7nsS/8qx5YREaGtmZfZ8KdKNxbzwbcNE/zHT/MdD4/DQoruj5+U\ndQrbsv+umMrZ5SFmUEqC2EiB/VGbu7tNM8JLFGLq0R4LJ+33HusA458Nk0+z\niNuwHkOk4zyPjzi/cvz54tzZKELXbH4OtHubE/MviWc3589nPlK/0iOAY5Z6\n4xN9Ut0EgQ3sOCnSv8R/b8bkT1QQAChpjenEQ3XpXet8Hqxijd+wZGbJiUF0\nWDYQPciDPP3u+nIDW+ObgMWiZdlNGjbASRzUHBMdxjoFBM3LW5pZDz7beA63\n2vCtCRe2Gje/dAkYxym6vpX85bwX6G8mLYh62qOeBUdFIcngnk4SVZZIynJb\nfekHBzba06XqkEDZHzL2srv3Hj0bxOTWCS0mE7QZdtnemTepxHtMJqtKjEry\nemwGuR9rUFc0+Tojduo4SlemJYCEDPRxGA9yrhA3g48bKa3m9DO7BhHctGr7\n84Om33UD3d0VZ2WsiyFK8YKX3XOMb0P8pML3Ib0UBwAfx8vIcpnI1iM3ULcb\n17UzTEg3WcKRE6DNFdlZ08GoukCvccqOLoQpg+qmgnYUpeGy0hhF9ifNQIvH\nQsDNgbWR59qSMsh+bci8lUcvHJp2j4E56PZcmuyfebLYWNppYrdz3mhfHHU9\njCjT\r\n=kqFg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBkUV7kTdXLfUSS/c+1+qzKMWSf3zWLRJctv2H3HkY/8AiEAoR+dC8mDLz03Yt3GxJqYvKzbpFCmrCkVq0DlkWaTguM="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.183_1567514357667_0.45276615206854665"},"_hasShrinkwrap":false},"0.1.184":{"name":"@react-ssr/express","version":"0.1.184","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.6.0","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.5.5","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.0","@babel/preset-env":"^7.6.0","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.0","@babel/runtime-corejs2":"^7.6.0","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","delay":"^4.3.0","fs-extra":"^8.1.0","hasha":"^5.0.0","unionfs":"^4.2.0","webpack":"^4.39.3"},"devDependencies":{"@types/express":"^4.17.1","@types/fs-extra":"^8.0.0","@types/node":"^12.7.3","@types/react":"^16.9.2","@types/react-dom":"^16.9.0","@types/webpack":"^4.39.1","cross-env":"^5.2.1","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.9.0","react-dom":"^16.9.0","rimraf":"^3.0.0","rollup":"^1.21.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.1","typescript":"^3.6.2"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"432b87e5a1640d64e856489b1623c72bfba5296f","_id":"@react-ssr/express@0.1.184","_nodeVersion":"12.10.0","_npmVersion":"lerna/3.16.4/node@v12.10.0+x64 (darwin)","dist":{"integrity":"sha512-mSKWwLayQlITNlYvtG6CKT/+ka9pdKIwULDRPcJBlSL9qgH73B02bV8DvoGv4YrkX/dAhFz+a68l4SwFLWEh7A==","shasum":"0dade7baba02b54ca125eb56756635419b84fd2f","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.184.tgz","fileCount":15,"unpackedSize":13036,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJddbFdCRA9TVsSAnZWagAAml8P/iEzctEuxm+AR4Cojeqh\nvd53OY1sIADhcv2wd4R8oGBBnn5JG6FUFy86KsLKlnKfRzt5Vwk0UI0Nnj0T\nWiiv9ldJTaVwn8dmA6JY83jciD4lgKSINWoaEzCPyRjD5MDIKwXAfc2hqrLi\ngimfH8mfzrJrnhvJtVMYzEsNOKRHtjIl51UKd/xJQVXZzP8S4oC84/TttKVN\nXKkpjwinyj0cEImWqwRH790kRl2zGTrIjFXQKhr6gDM/E23/S+fYDBOeuH5T\nZZXCjMSeWX0ADXfOVMh1MjhH1/AjGzJbdFejMYAy+aqC8TwTgCmMCJzJCVS+\nCgCixLJjlkY+8rOsbrXyOSFJ7+eQHxK8vjXl6w/XE+zofsYnvmCr2xzwO870\nvPjzRQQx2+vJC8gYquXgGSfSeFsrXsAygczsj6QyY5uaSfMnBDcydui/PYBw\nniAvz4AGXtTOnlVBYCZM1+fobIF5tE1mUe5Qw6LqUsyAq8ArwGjpiwD4Y9m1\nqB0zl83cY35bIBETxvK5E9kwLMFpa7ZTYOG2IR5Oq+pC6njmKVw7NeGcVI9x\ntHb1NTsPUI+vhuMLuY8jsItHgbHXCcP1cbu16KPJBFLUlJPIAbkWv14N1hX3\ncrKkx5uVq3T2mM990Nat+9TP3QWuJIxUk4/KDh7wa599n/qLpy/Y+iMl6ojO\nJQ7s\r\n=3uub\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC91CNvgZWAZ1KizfKwpEYY4K6gtKMrEQcX4axIbsdUVAiAcVpjYmiuNinKhqQb0l6ltQnQgnWsMtBPxP3KhlCIV0Q=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.184_1567994205225_0.42608895311172046"},"_hasShrinkwrap":false},"0.1.185":{"name":"@react-ssr/express","version":"0.1.185","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.6.0","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.5.5","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.0","@babel/preset-env":"^7.6.0","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.0","@babel/runtime-corejs2":"^7.6.0","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","delay":"^4.3.0","fs-extra":"^8.1.0","hasha":"^5.0.0","unionfs":"^4.2.0","webpack":"^4.40.1"},"devDependencies":{"@types/express":"^4.17.1","@types/fs-extra":"^8.0.0","@types/node":"^12.7.3","@types/react":"^16.9.2","@types/react-dom":"^16.9.0","@types/webpack":"^4.39.1","cross-env":"^5.2.1","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.9.0","react-dom":"^16.9.0","rimraf":"^3.0.0","rollup":"^1.21.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.1","typescript":"^3.6.3"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"cd44a2a4357b1da632ec029a5831da09330aa0a3","_id":"@react-ssr/express@0.1.185","_nodeVersion":"12.10.0","_npmVersion":"lerna/3.16.4/node@v12.10.0+x64 (darwin)","dist":{"integrity":"sha512-3LhG0zuvtvwQCwzvvIDXdavDfW/ofPE78VJSHvfi0VRFsFFn4w+YBioMoWWXSQyCldnxAF4BTCzn5L3E3vHbyg==","shasum":"f83356b2a775b3182cf11777e79106adfb9b99ac","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.185.tgz","fileCount":15,"unpackedSize":13036,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJde043CRA9TVsSAnZWagAA2+IP/Aix+xbBNjOLDDkDnhBl\nU+SiwMkdgmlULwiNWwO1GLr6cUbdJiLg5CnsPUFYYqEtcKDls+wtSoSUUYkz\n77hStuA8aO5xsMnZUz8/itNTDwqrV3nU2pZs6R92+BUw4bix4EvkfsZIV7Jj\nM12hw5Z6G6Xow3M6bWfd0/GXoPQFRjJkBBze4IsLm5Cdgb76CK1pCPpMk2cA\nlbc/1XgW8Ma0iOBXUzzz2AXWZw4w6urndJMTlELW+01xBL22hxfvrfwiiw1K\nk4Tjx5zfKSPULQkEaX/4PxAXaHsSHwhk3aZKzdUKkOW5grChXu7+a8Ty3i2W\n8jahkHtpPJOp+idroxb1nAKCOTrIkpRasZAqY/ggPCRr9rzOMQMfFXP+DYsy\nyGScbUdLMRUlfpusKKnQebzR1i3ofKqrYtN0kOlWuhtKF14NyTV9RDwR2ZxR\n/B5x4TIOLlw/iJmNhgcxwl/Wn1vhXzqzhIuatzSG7qKMvo6L0FCx96cnHTii\nt3wXjq1s60EFpzbRbc1yPkdrG155cJxUCEPuTto2+U+qIE4RDIyN1Xyav+MN\ndSQ9I5FpH2JrlhMYMug6yi0PjwmchqV/NnxfPlZyDZyslMqdbTwRcpR+XSAL\nMgEgkJq4VzGrO0EXH43hPUmVnx8akvp6uKF2TCytfgtdEulUQCxthhwAB9fP\nM5YQ\r\n=/K8o\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD/eNA7XSjkmdZBc+sQfbSwXNhFCThjCaHnl+vFUY1PUwIgVzFhYNQI6JQzkzdyZHgquwIdagj2BPZuFCcPyWAMSOE="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.185_1568362038935_0.5882455014861543"},"_hasShrinkwrap":false},"0.1.186":{"name":"@react-ssr/express","version":"0.1.186","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.6.2","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.2","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.2","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","delay":"^4.3.0","fs-extra":"^8.1.0","hasha":"^5.0.0","unionfs":"^4.2.0","webpack":"^4.41.0"},"devDependencies":{"@types/express":"^4.17.1","@types/fs-extra":"^8.0.0","@types/node":"^12.7.3","@types/react":"^16.9.2","@types/react-dom":"^16.9.0","@types/webpack":"^4.39.1","cross-env":"^6.0.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.9.0","react-dom":"^16.9.0","rimraf":"^3.0.0","rollup":"^1.21.4","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.3"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"733c146c3ac52b34c0f1d58041c34987972202ea","_id":"@react-ssr/express@0.1.186","_nodeVersion":"12.10.0","_npmVersion":"lerna/3.16.4/node@v12.10.0+x64 (darwin)","dist":{"integrity":"sha512-cOfJTXx4eG9SQO99RCqIaSGIqMlYqAniDOZv3QJQxhXgdFwQSZzKAZdmqncgpnA7g3ONzFJ+p3vaWit4UmngdQ==","shasum":"dc6217bbe2ebf8bf373fdf109fa89f0ec07c48eb","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.186.tgz","fileCount":15,"unpackedSize":13036,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdikjUCRA9TVsSAnZWagAA6D0QAIHF5bYzZqPuxPGqC9K0\nqpRtL7CUDsb/qcwJMQhP4405GdjYpEqsYo+6K0yAwI4Kt4BOoDUhh7b1cF2p\nE/pYTieInrlQXYJUWbNCC2US4MuiYBbnREWXjTudSghNbEHsIC5WKb+SrM+m\nwEWTJY1MJkEiUqbf6YzixvyFMfHSqijQcfi9kktaJkK7fhReIKPW1nc1aVv/\nV7yUKO+HJyV/j8dxaNNeX1/dF0yz/Rtl+UCtAq4dPlz9p+Jo/SHJBFwbQ6PL\nHpiH7tneS/fwCgodFx8yN8BlFWgyuDH0fg4nYRBpyrYy98yvQZOTcJSKJg0h\nCyQ5dB274srVN1Ye8OAnw2LI6KHmGxktJJH+fmpKvA7S3RTSpbkaU/O7ChG9\n1JzqLD06kmneijbGig+MnN/9bByHTlTFodKxk5DF0UHr0UiJrfBJIbRuxLd9\nvHwRNBzp9SN2ceIdTNpoSlkATFRHgoGPETdsVSTQuevo9v6Xb7+imc8lqIV7\nvTW5cBkO2fr4mwxjJEj+kaXxdyIHUd6r1gjy/+HKout1Rlh29wtfyI2E1xQV\nkcdXc7w0vKni+mbEWLvZGJ/hEWQODdqoQGTYPE+xXMlydfCDIJGN2HBgt/ww\nhEjscszlBAkQyJbrCkr+tb5q0VGX6JG2c4ydda0x1X09zu1Q/eplFpE8ySB+\n3TNL\r\n=m4Yz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHnAp9FjLCDTQaezsr0x9XnZ+XNRwDCkDumMQY18gDZgAiARXhXiH0wh4SsII+8GKGbNrPl2IFkHsEZ1KrrOGt415A=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.186_1569343700070_0.12413752809713507"},"_hasShrinkwrap":false},"0.1.187":{"name":"@react-ssr/express","version":"0.1.187","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.6.2","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.2","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.2","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","delay":"^4.3.0","fs-extra":"^8.1.0","hasha":"^5.0.0","unionfs":"^4.2.0","webpack":"^4.41.0"},"devDependencies":{"@types/express":"^4.17.1","@types/fs-extra":"^8.0.0","@types/node":"^12.7.3","@types/react":"^16.9.2","@types/react-dom":"^16.9.0","@types/webpack":"^4.39.1","cross-env":"^6.0.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.9.0","react-dom":"^16.9.0","rimraf":"^3.0.0","rollup":"^1.21.4","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.3"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"924873be3945e30630c9e079908185cc642f4f67","_id":"@react-ssr/express@0.1.187","_nodeVersion":"12.10.0","_npmVersion":"lerna/3.16.4/node@v12.10.0+x64 (darwin)","dist":{"integrity":"sha512-HTGOtyC27lyt6u8WGWSWx6QVrN5uAGbbzYB7a0uoCJ+dVaH1qlfbK4oCX8wie55h99kQ21AsVoP65D2qvioBJw==","shasum":"2dedcb38fce2425331c45344b845e2e4fe95cdb4","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.187.tgz","fileCount":15,"unpackedSize":13036,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdimA0CRA9TVsSAnZWagAAdo4P/01D1QaR93V7CtU9B9u0\ndgkcCC4BCEJi1JemmQw16HL++/JXVdJuVuiJimc5w8xfWL2kFAbQe9N+aYQu\nsUp6Np8T1sIMo9GCeglWcoZBDGoJUBSEtD3i0rZQcxUL4avhzbwSwrOuf+Ie\nfdAoY4DEQl86mR8/X9iUeoStfgAYkUPS0tB2SPwCZiq3jmJwrQObOHhfLcv+\nKHOV4scwwTvXgJ6K+xAU095S4vOx7zF8TqBTdMnHZLTpj8pDYIqfZAQOU08w\nAQoEv9YwMbxH3KfNt8B38B0cwnAJHwGd4DtfJYYTfHV3ID29kzPJMJxw1G04\n46+FLffum2/rmRADNIzUNPO+nGlWOggmyKtRCBhix+nL24DY7T4kTqJ1+Tt1\n+FgSQDCcsuz/oHmJPIrsbztGI/8fss8OwM3ODYnzouY3oMqjCWNiDQgRVpDH\ngq1c+J1o9aYrH3YZx6jipHTPorL9Ul5Yc+Dyrn1W7Dxsn97HbHw6ST8MvWK6\nlEF/RrOT8A9FVeQIA61hQXlH6Dt+5NTZyEJr1O7cLwaaR7I2cNBBvv5HCZ9a\nRfmN1BrfBElWGXO784kM1nQO6fG3dSXDbTkLxLjscyyhtUPDOxziRAPc9gtn\n+6i5VsXRC0foE/FvtcrYVRpv7bUUw0vbRHxezBHRALDZ/Mds/oypt+qyK1AG\nvz6S\r\n=Z87+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGVIWS9kdTO3OzFFN4NwBF9ZuAQ1D7+cKAm1j3mC9vxyAiEA2UJ5ALrAJT7ZcTKtmYcJXHnCggQTcGX7Vbz9oVWqhls="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.187_1569349684067_0.2545948947134755"},"_hasShrinkwrap":false},"0.1.188":{"name":"@react-ssr/express","version":"0.1.188","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.6.2","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.2","@babel/preset-react":"^7.0.0","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.2","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","delay":"^4.3.0","fs-extra":"^8.1.0","hasha":"^5.0.0","unionfs":"^4.2.0","webpack":"^4.41.0"},"devDependencies":{"@types/express":"^4.17.1","@types/fs-extra":"^8.0.0","@types/node":"^12.7.3","@types/react":"^16.9.2","@types/react-dom":"^16.9.0","@types/webpack":"^4.39.1","cross-env":"^6.0.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.9.0","react-dom":"^16.9.0","rimraf":"^3.0.0","rollup":"^1.21.4","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.3"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"d06060b80ac6f77050151874bda4f958d968a676","_id":"@react-ssr/express@0.1.188","_nodeVersion":"12.11.1","_npmVersion":"lerna/3.17.0/node@v12.11.1+x64 (darwin)","dist":{"integrity":"sha512-d//KO+99LlFae5nniNtYIbsKAJtcH4riK0EKlaUEDb9zqdcqlBD0NU0LL0k6DscwJRz/0yxWAUTUvUDdgIAFPw==","shasum":"960914c174b375e4c7b7f35f225f8aedd6443883","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.188.tgz","fileCount":15,"unpackedSize":13169,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdo37+CRA9TVsSAnZWagAAuZgP/1eJ9MoFAtG+jUHUOymI\n4KkWs79WEHSPSYoB+iDdgwuBtvLNTKt0Ofq2IeL6Ljr9EnwzPYAitpymG4J9\nJyoPqFM+Gx1FJFcH88aVxI0/sNMQGIAsyKLiWSohFgl7QkxfempwvOAMcXoi\n6Hk9dyyiFadFQnEgA7PtsZzwCGe3tuy/8TMQaJEjIi4p4+mL8pg92e72A5gv\nFFfpn9ozi5mHX9rk9gqJWpI0mx8oelG744P+F3y1apFlOgkVe/wnhpWuci7J\nXTqfIJw22umXuJS/J3a/0cjycbYxUUsTSt+TlJsXjFEjkPbPPPfu2xGO17ln\nZmCueQ4ml9LikyH9Bt6xn8pjAsahm3+Nq8KnmKxEtVWmHin18lgb4JGzRX56\nvojuuOC1HYDX+YBXVl3CQY6EfCn7gb15tXwSWONHrS2+tZMhAoSxgXSm1UoA\n6JgLwneFSZWEzRpSRvblp4gCHXJ4lxcNz8MFwVi4II1T15tinvkAC01fXnqb\nBHqoUYGE5mG8u7CzZVNbNjUtcLsIl924hxDN4F0aMgoi8T7aRO/Y96Jsf1J0\n4bB0K1TDNYGYaRPHsxk4ZxNnKwVvczZpNnsLXpCmATuUn37w+WewHIAJFYXZ\nZ/b1Im2lZBf14nnBkrnQlJahZjydE4ltYpPGCL+B8cdESWkwGN4BYYuLrJWG\nT9d6\r\n=1URG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDvJWUnyN+xKKueiCrpa/ajuGci9q2P1H3waT48mhQacAIhAPlNr0xiDJUd1ta5I/s/sHsZ9mdEJGFtqlyP8fzfkoCR"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.188_1570995965423_0.016598368515570172"},"_hasShrinkwrap":false},"0.1.189":{"name":"@react-ssr/express","version":"0.1.189","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","delay":"^4.3.0","fs-extra":"^8.1.0","hasha":"^5.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/express":"^4.17.1","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"589cfa63e77ab35e9db344605a9b5f6a23f062b5","_id":"@react-ssr/express@0.1.189","_nodeVersion":"12.11.1","_npmVersion":"lerna/3.17.0/node@v12.11.1+x64 (darwin)","dist":{"integrity":"sha512-wvY0U8gurj0jTHcgNjfCCAotMoCVwNGog5R28kRNheNoPvU6Rzfbk5bcgxW82JxZ5kFzTQXmqMVAwBmLfVHjHg==","shasum":"6cf251fbf31685ef0fd29936e2843d9dccd95683","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.189.tgz","fileCount":15,"unpackedSize":13172,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdo4WLCRA9TVsSAnZWagAAQ0gP/i9TL9AVl5OvUotrIQb/\nXt57Q6P0i1sdhC+kgLfw1d+QCT3FzBJRF9OqihLaWY/TwThrfY5TU3P+XPm0\nBp6GvJmWLJnf1T159ZmPWT2pHc9aGo5SWLr2bPIIJ3g/h8bNTFOqje6k0bUX\nrXZwDC3Z4uBBLpumrdmQH6mBemYXJeUhT0q4OrshEidkUPB4yZ+pqMifUPZK\nIM8QFBAzL2zDRRE/HzRP7PgN6bW2vI+FgxL6IqN7Fqv+PmAKxJQwefTLE3fv\nx3fDKTI7YaS2Fw7IYEDBDJxghMMeFl+1L5YiRsklGkCTzK7oPZnGtYHofDJM\nzvhVwCgjnXHD4zvd1skPMf86YbnuAmFtWVWSxsFP5cradjSjh7UAYlSNqziL\n77ILYN4uL/wW6s7TQ5fgBC6uSOIM5BXagq584jByIi/ZGSgl7auk/UMQ5E/v\nerEDQBfmgR0Sar9jkEAYSb4L5QaTpOqzCNxPOZxK78n97ODuYrN2VscAtMrK\nzSEzC9gD0CzZVtCV0+CQbMz+5DwO0S39jGC5DJSZxakWPTsog3n7HHpHUgVN\nG6pgB8VMj0gui8yHNX8II6zHcJiCo2eF0I5jQb3fTvewWrLygR+CbKdpS62o\ntsyG2DZWuuWMIp83NpgjzS6N+dByK5xxrOKJSPZ9JQUZxjFzgYBrzTjoP4UM\nyDrr\r\n=SMrj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFuPK/C7PuSvgEMHimwXrEnEkObtR32yCtj73TZW3KMFAiAITjMStUkShdtzWheefcnhsNK77t/p5OuPRZMn/bnqzw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.189_1570997642371_0.17392445645059396"},"_hasShrinkwrap":false},"0.1.190":{"name":"@react-ssr/express","version":"0.1.190","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","delay":"^4.3.0","fs-extra":"^8.1.0","hasha":"^5.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/express":"^4.17.1","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"ccd54f14883fefee6bf88a40d367bbac1bfe01b5","_id":"@react-ssr/express@0.1.190","_nodeVersion":"12.11.1","_npmVersion":"lerna/3.17.0/node@v12.11.1+x64 (darwin)","dist":{"integrity":"sha512-dzpXhXwRlUQ9m64KE2MT+VudFiW6zyrABh7rEHW8s0d6Z0weF8QitMK/SDlPFeqwXwwZckfJg1CH+dpOLW27VA==","shasum":"a30b172d6fb16fc38ba70449a38d30ab077b9dde","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.190.tgz","fileCount":15,"unpackedSize":13288,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdo5AQCRA9TVsSAnZWagAAGk8P/i7TeooNuRFxERu1+BPr\nAbD3O0U4YuNUBJ7EiJoOZnp8RQDW5XefCV0U7xvYXE4FETsjJ4sRaWyG+WCv\nJY4tdg23fhgvdQetgoM0CWoNNPrPHUlOyPvfqwoaSNgXT+fr9effxkJk64NL\nusL+5MQhtsz1C6cyz60gxoBc3YdzNP2moSM/spDlYJyd0l0OFtrop12EL2Ja\nqhZeuE3KPgn32GrlpfNS1onrAOUtCUGdaMsIV9I+0Bwn0Z+Fjdaf0DWxSOKh\nyTVSlilL+DsXUrq5J48X0Q9GGgqyjdM/MmlRLy1fYiFHxdbVYtF94hY4s6F5\nZ1e1/atyxCCfi7xUW+Z8wxoUfNwiz2vv0ZwlOxEsvHNlCcYKoM8Vwh0uF7E6\nTRWE88RW5w/xX3JLMBOQLYowIJFPU979vaaTo8g6pl2jzOCbJM4X5Tnc5ozi\nIV55hxyzpJ7iGY2wVuyxJcLRW/+s5ccy9qt2ln7qzM6uqkCEs6SipnJzHNU5\n2w8lT2G1ZeMtqJ1Z2QbTEPWYPGn+QJsWQjkfdL5THKWjjO+0ad6xCkW/G/k/\nsycEks3QTvKc2aPM2R160iNtpdp4MpuLR3qBAYNHrs6ORBC1hOZ/Jd4m8f68\nMJ3xKDYDDyn84tfs9vZBTOLgjwWdhElF6Shv6JEdn8jXPTv8U3flBs3ivNzQ\nP1Zc\r\n=WgQL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCGki3nfqGPgZEaurfEis7h4Le6GtvlxM3Fp1jdW8KnvgIhAL13/pXfz1rJUBJTgZ4wR3C49gBcEHSz6ttlnDDn+9nJ"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.190_1571000335543_0.5797858805661569"},"_hasShrinkwrap":false},"0.1.191":{"name":"@react-ssr/express","version":"0.1.191","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","delay":"^4.3.0","fs-extra":"^8.1.0","hasha":"^5.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/express":"^4.17.1","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"3bbeeebe9f9a9c4282d89d8722b53c30c53134c0","_id":"@react-ssr/express@0.1.191","_nodeVersion":"12.11.1","_npmVersion":"lerna/3.17.0/node@v12.11.1+x64 (darwin)","dist":{"integrity":"sha512-Wp5zApgf9OAabIraKqlfVRLUsQlpMvy2QuLD8UB4HH+CEidRWmQVdk2N7afmDBJFhuW3GFLB6rqmYxAM3PEz5A==","shasum":"cd310d9185542917497a3b9b29137dc4383f2e39","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.191.tgz","fileCount":15,"unpackedSize":13270,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdo5D3CRA9TVsSAnZWagAAVkQP/2lAlsM9IJUKXhcDxHEN\n4C+Is/SxTdJ7OK5hOELjnofmfTIMIzoZGyGUbW++ZsecGIcomGjSuvNfl97k\nEBhA4BWFZAKod9zoX4VrhAG2cmxHKuGPoGw4z8MwWE81iXUVBbaO0QC7/uMB\nlwxstU9dZQKgSLf5ya/31jljLyJdE24ZZEYD5166ROWb1wuySqTLRuOfzr6Y\nSR1AamZtAbqqSrU/H8oXBJBZtrFfJyMv2FhlAdc4s4x+ozzebCjlUUXNdxwS\nib9WbOpoCrip3JwVOBmHrE06XE4gG7zjCQ8eNJjU6LwojAy3Ih/XeLrp35hZ\n8LWT8Jg68s5VvpQx3ibBPe+Dmf1jETADEFQxGp8uwNxoPEY8tlDlizYU+z6u\nF8NYDz2TBvPpBpZAjhkt05IAfnqqKi0tiAgtOYLJp43FoP13Q5tBIzv6kAt+\nlehNLwewV/z1+FWcIuXVFpP1tTiNI63MEiFtzdDLXE7N2lqGKIggJH3OdB+B\njETKKUX1IKRbC+HR8RUQtnHc9dCe7dgvEkS8T/8UW3iPhA7I+X/+xr07gslL\nkH3CZlFzxDRIO0snEayAUvkX32a3+qCXXUyJcOiVnx/iVsKw5rcrdFQiqexY\n1e6yNg31PkIpWKKIqmuLyGT6CQ6F/OpqGEMyuKl9iplvsjal6HjxlgFXZIuU\nuAMb\r\n=Ked7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEcFlWLGL6vwSsLZq49dsitBWHYCy1bPWwQNqDGE5cRDAiBO97WwAvAnvNCKOyXJWZ1TRbZXCo2TYmegJF4ppsqUEg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.191_1571000566535_0.1806500376938549"},"_hasShrinkwrap":false},"0.1.192":{"name":"@react-ssr/express","version":"0.1.192","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","delay":"^4.3.0","fs-extra":"^8.1.0","hasha":"^5.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/express":"^4.17.1","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"6ec5f03da12b7fd3cd575532d0f69f586b1ae330","_id":"@react-ssr/express@0.1.192","_nodeVersion":"12.11.1","_npmVersion":"lerna/3.17.0/node@v12.11.1+x64 (darwin)","dist":{"integrity":"sha512-J8DknQtGfauzsZCZwXR9/MNyfKFfJtxxIgJu05A5TvTM855wC9GC9Q1GOI6rt7wIbC7hIoHe4/4dSxlv8v690g==","shasum":"133d371213567857529d43e020b430b36c6e432d","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.192.tgz","fileCount":15,"unpackedSize":13282,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdo5F8CRA9TVsSAnZWagAAzy4QAIjdnhNvRgN51SYnI/vf\ngpnPirXCX+JH5/77yaZQbRVumFGRJbxMrpDxt6jLsD/EUiqvo6RmB9UuAkEI\nam4/fak9MVZ1gP/2+Mtvh4gmEDnfbVyGOF169B9cRW4kSdkbusexxpoATE50\nGyErKE9oHQoDMeE0U3Povdvm2YNNKR9gKFNHsX6cFUzswaJM8FMvMe9JuRp/\nA4lOOVJX/IyNDN2mfZcfRHMCl1hLPe+FIZC1pUK2KrJrUeCUNPHHzPwXkF9A\nfXppGU5VxYDujLE1IvpX+COOJ315p/bPcdDBCYoCzFtJB8RrKh7ulaC3GZIb\nAiayDNTQwBXecctnvtROgopb6r5uZoafANFOBTBwFQXrg8dbvCEezJNmH5RK\nCinaaNW1DJnP5eQtkCTYqUPNQd2RkjBD0azOhxbKqWp7wxr6t6CBEpbe6WBe\njbp4G7Xzk3Kzr+7jd3U12FrUCXXAFehhxwfk4XGcvZsGeyv02gKTAIRdlRB5\nTSz5jx0vxAtZaepvH99avsv5U9MS0HMfqaFaxlZFw/UuIfjDae2L+lWSfrSd\nedGX+1I7TSEr395OiUttnwo0GEkRpaX5BfjM/WAqMpV3XUgOPkhd4NSYsdnj\nfACkbTZ6UXLnXeOoZ9oV6UwV8TqsgnFp538Kt/a96pUKm3f1ms8RkLqxGh1v\nsc5O\r\n=GZi6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDe737Z2e3bF2a5Vk0hneqBrQqjUkvYsFisJsMl5XIJDAIhAMnZ0iYe4lmxhRhkIAYNSkSnd1Pg2NrUQHv3n+nOKsFP"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.192_1571000699491_0.598032888785115"},"_hasShrinkwrap":false},"0.1.193":{"name":"@react-ssr/express","version":"0.1.193","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","delay":"^4.3.0","fs-extra":"^8.1.0","hasha":"^5.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/express":"^4.17.1","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"f862329773d189fa0febce7868c6f864da6459e6","_id":"@react-ssr/express@0.1.193","_nodeVersion":"12.11.1","_npmVersion":"lerna/3.17.0/node@v12.11.1+x64 (darwin)","dist":{"integrity":"sha512-JNxifkfsbuDVR7aC0S9Ltdn5sDmmQz3VqpoX3tI0mzBO5xyuQFeYNWnqpYzimJGKhsG3iFb68DoT91kj4Ji5lQ==","shasum":"1a79f11110ed3d53be655fd88d383a85aa2dec53","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.193.tgz","fileCount":15,"unpackedSize":13291,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdo5K1CRA9TVsSAnZWagAAC1AQAJm/8g47/4x7aPdqO+Gx\nklp3sf2YYiayx9JNQjB4nmUpv1XwDo59D//XR2CyHtkonoOzPO4qqg8E50cH\n/Vq1YTVoxTmJjORmHvpxPnfbWB4to8dtJGCw37czht8IOsssCIT6Dhg2yDyH\nCBkB+jOQuwPGqf5LWWYT2/A0sszCfanK4phFCdZj4CiPsT/AKN/zZmnVAUDL\nEqXmpJFjElt2iK6dvHfwuqUDf6Q8P2yIjaNVcqMHr2J0cm+xolEH7syAowqY\nQ2GI809K6SYVb27gs2SHocbbHpK8mmn/ZlLIoiBsFm4uZyZg+WV/KZYKYHPt\nALeQ9AMexj1Ruxo9GZTpUPyeMobzs0StEaPnwQkpuLz6cQb+ewbg6ul9GnPj\nnlzpug6VLHX35UZ7lGBYrUWP5MU4KcN6wiJbn0v/iUkfoBMm1bId4DpPwZ5z\nKJ+NPx8/L8vqniXBTt2tbZ3OaF/A5WEhs5p1nZQ9/IRrh9ci+iC/8aNbf439\nVi+HnByFoersNCurVt8kmmIIy08eGTCXMPToLuNvi1F+8Yth1IJSWqF91KBn\nBLCQ7hHQsbwAHuTHlQqUQXt46XXWP5EwSWoFKB5vXTgGiYesrVsDlp+iO6yE\nLtZ6vEG2UGse7aB9dCMuPXRR9eSlQCHCVVC5e73lVUNbTEaBbjaX2aqLtm/F\ni3TU\r\n=3GEH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEDz/vaUescxxEp8O3FvJxqgjjtvjWcBQyf2AO5DRDjyAiBdTyI72edWDKV1WwZfJejN/k7VoJfGX/N0s10jx1Vr+A=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.193_1571001012704_0.5970879605650092"},"_hasShrinkwrap":false},"0.1.194":{"name":"@react-ssr/express","version":"0.1.194","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","delay":"^4.3.0","fs-extra":"^8.1.0","hasha":"^5.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/express":"^4.17.1","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"614a1912622b29b72d5f832d53b27741be095d96","_id":"@react-ssr/express@0.1.194","_nodeVersion":"12.11.1","_npmVersion":"lerna/3.17.0/node@v12.11.1+x64 (darwin)","dist":{"integrity":"sha512-yTwa+2m8W5bBnJThFOdZ8kX/HDLuy1arll4HFq/WK2p6jHSiJS2nuZ39XtU6LSsuvHGeBboh77UpZ088JnsP5A==","shasum":"9dde96222819eb2349d9453be76773dd84c72e7e","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.194.tgz","fileCount":15,"unpackedSize":13273,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdo5MnCRA9TVsSAnZWagAA+WYP/iF8+384/Khd79Ss58BK\ne2BLGRTzEvBuPOkqWw7fHYXdBdrKpmzDiBoIJ5dNm5wUhwwQv/qrRF39f2NA\ngpkfpS8UhuquGcDbXwKJCwjjRoYq+wO2zaXmbaF086NAhmIZ1CSkedzuWI9x\ndZsHGZLVVOARJnxSUwG+frZXW8iKHlWIXHC8co1nQi1QdeIABuYWFr/2XnjG\nXX2661iA8kqPx2vce4MTtQgIL3GoI7of8gDqe9YM4tM03olE7W2hDqg5f94s\nYvBhvIfYgISzqdLvASo4WqBOC/6aOEHr8mR9hZTZQ8rrPtOehata/q9umgj1\nOwYHgscfILZtr6soXBSWwCViIWd2x683dbKm0EQZLa1/HR548ixfztdDMjZz\n13nNmTHwojyxeklt5OMJrj2AihPp9TW+POsvxirgkgJXfFlcr0p5Pq71kpwL\nSDWyu1LV+2DHrK9STGrpk+oPBnUFDJC35hQ6hC7YpFplb4Lts5tPkPeuEJKI\nJKaFMa912VzuqKN8tpZjwo5a/POX476Fnou1D+kD/E9FIki7E7kzswOD232B\nEjWBC3uY8M9eZmk4ymNFfQzR6FG2AJUis6v9tBXfs5J1LHdsCQ9u4Wqw+ORt\nJhQhuqH1nj0jV9SIQCaxW1kSGUEwiP3165DjRi+D2ohwD6vnvXzzUhykcEQc\n49Dr\r\n=4zQI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEi3olyPLZg3juJ9p/eyKN8mv01TNDMvXSdKkCXFIZRTAiBbWUuPMW5nadjMSuLhFQMMrnlI1zRgqegnDNelBC/xVw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.194_1571001127239_0.6708190144294852"},"_hasShrinkwrap":false},"0.1.195":{"name":"@react-ssr/express","version":"0.1.195","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","delay":"^4.3.0","fs-extra":"^8.1.0","hasha":"^5.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/express":"^4.17.1","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"0c1890fac2947c3f8848718a8ac106029edd601f","_id":"@react-ssr/express@0.1.195","_nodeVersion":"12.11.1","_npmVersion":"lerna/3.17.0/node@v12.11.1+x64 (darwin)","dist":{"integrity":"sha512-07+xYVwLyo3nPPhjOL4KBMiO9avG98zPl2wftl8M/DC7NKNmDOgrfNWhn+4w4COvNfgsjl1JhYpbXBBYDDvzMQ==","shasum":"b3802bd92d685f3bd0a1812a5003cfd9e3b4ac0f","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.195.tgz","fileCount":15,"unpackedSize":13172,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdo5N2CRA9TVsSAnZWagAAGvMP/ivOwJvJ/GRFKFZxqc0b\nTnZa/0SOr/sLbnFliV2nKmid32veaWNCaVzROlziPMAe1UtEouH/EypxgQ2A\nRRuPMcEDf0RR+sDryNqCCKbTwYvvumfkx9N0xGZJJM2i++SssdmZCiSjHudw\nq8WgwesqQeXLwnoTQNfU3bb7UKQzUztD4pIDtWRBdmkoSab12MzmddZCy5UA\nGrPZAIhxEWglyVmcgrOUPMFaiWOg2EbJRvmzeKYqjN+98bDwPHwnPW1uTqE8\n2L/9ItF9zD4qLCrY0oQ4u11sBbF398SXZPpNLKaNhEpAPVrA4YmZe51L0icR\nuXpvXcLgzHCPsdeL3D8WWtTOtBJkfPgZgH1IozwG+nqb2xJfSv/SIdzLcrQ+\nhNKQB27RS4pfw+mbWMVTLpOG5+BMGUvRWKmfBf1uXde4CtMsB4JpE7S+DrEW\n8l5H344sQb8KuE71dqnhdjn9oYzDTfpGBWEM2SS8wO3fhKligb2336lZNG7L\nloK/OweNIYvZMHBPAYkMzd6eiZ2ZcYSaIUIszLuCggyxad5rf6h2gO4u2HGv\n8S4YhivupKubY2tjcuX84I0k90Hy6KYYCkrP3NaDD2+SnP5/R9g2E5Gffe2k\nUIGu6we1HoOk2NhUXIjI2ITomwZ9uZ2o5ZO58lchN2cZwRCBaH3AE0q6JX5+\nTTLh\r\n=a6Lc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHQ0Sz8pyU+NmmCousMSzYzXf1VxkDVFsMbtQykk2BMxAiBv/pXy71am8qTa2HDQE1nGQaCwYwKb2NxOO9V6+SvXfw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.195_1571001205525_0.6469064006887588"},"_hasShrinkwrap":false},"0.1.196":{"name":"@react-ssr/express","version":"0.1.196","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","delay":"^4.3.0","fs-extra":"^8.1.0","hasha":"^5.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/express":"^4.17.1","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"023eb03d5ab2cad7b169c30226dbd80d06647214","_id":"@react-ssr/express@0.1.196","_nodeVersion":"12.11.1","_npmVersion":"lerna/3.17.0/node@v12.11.1+x64 (darwin)","dist":{"integrity":"sha512-uxGb8SqvFojOosm98BbPPXulpFn8UhbBST45tUP5A9VGYhG63xJ410eq2yUxU20hFrIeVhaF/b6Ei9J3aQ72og==","shasum":"3336ad22279d2cb1edd750015c0078db80d3d63b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.196.tgz","fileCount":15,"unpackedSize":13208,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdo5RxCRA9TVsSAnZWagAAUOoQAIzDJydH1KvV6QwnkORl\nXfieXjUHYwvkoCyn6v1l3UzeqNZOFGqFMrMC6Kwa0X2J7E9yMORuuNMJUAn3\nQEahQzk/XWrvUUtmG0Bs8mlHGFO11vXuZvNM0J3RWxXI/ADflGVzpKkZnPSk\nVcDVSmho0MxJ6Xq+u6ej0tgC3GuxL1E9xyeb9wVcSV5NIVq3nZ2rQ066hA+S\nr7KTD5pcNQM2LbEwb8hyeUbJAFLZpR3wmVZm5n/sXY8t2itkLkWIYJWpXo/h\nFjSZZomXkHba1wNq5+NSGz+kyQkjdhv1+eMU5N3s0rSdffzTWXRLP05U2NTj\nztX5huTMdx+vfJ4kPc5eZdf8GuJZoync3JqjxyvmTBw6eqNv7v7E01MQFhsk\nNHGFGuCH4uhoScAuppJwPoasvKqhuHw74ErTvYWlRUpPDydO6QWBNxV9zEmQ\npw1IfwWiXaVYSzdKOgy8i4oNb5abrlYMRBMo6Q416YA1M9unlNNx3401P721\n6v0WAVppC/ui+uB+2gnQJJ1IXom7s55kTIYPp6rQJpNSNt2QW9i97DPZv0tc\nrAWuMuygbbXDLMCnOH3YTqIY12QfETWdhUw5DqxzRWNDOidBAwlQXVO3Nwzb\nV4zg17mZyEMxX96GRkCfbsEbp9gRl0Fn7PDmBSnLprxmk3zutlQaacTmi5Ia\nZE5P\r\n=XXWN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDv22fuJJEe7gZ31LXmRPHr+QBp71lKITpFUtAQBvdZkgIgLx5+MwDvVrN9OQoikGcGALm8YDDFKwZyDtCzZ6ZD/Sc="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.196_1571001457013_0.7588535190181529"},"_hasShrinkwrap":false},"0.1.197":{"name":"@react-ssr/express","version":"0.1.197","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","delay":"^4.3.0","fs-extra":"^8.1.0","hasha":"^5.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/express":"^4.17.1","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"f896dcfcc7cb3607ba87b7ff41fa4aaed378ec42","_id":"@react-ssr/express@0.1.197","_nodeVersion":"12.11.1","_npmVersion":"lerna/3.17.0/node@v12.11.1+x64 (darwin)","dist":{"integrity":"sha512-4Lc+7qlglQWPFOW7LHR0Q4+w7jy49GrRtF1BiG5CUAMqxi0SFwokGoC78MlJz7atJqCXO638cYw8VCoWMAAMCQ==","shasum":"5d62d0e0739ca587f6db308311e0b11897317cff","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.197.tgz","fileCount":15,"unpackedSize":13278,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdo5UYCRA9TVsSAnZWagAAYXYQAIGyxv8oJmnForHhmrSA\nYYK0fV0YnZqS02xeyar0JASSYflsuQju0/OhNcE3LQ9NvuNeUVYWUTbKCy1f\nWliDJP//wekqmbQH6WXS8+B3nSGUjBMU13oRqzWtQmajxEDTGAWl9G8o69Le\n02lGVItHMmLHn9ms+GYUGHnRuMDBwiBh0mKYqWsDgQRoDbf8hnGv2Yj5d1Lw\n6TKF7H5i2j77K65ukzIfKdVpwT/dtC101AZKWoHQq/wZ723yEA+1kvd8WDiS\nUN0N73TEc3PkdFMjXpFHZzM57p4BmYmWyDj9gB+tfSuBMCZ31RnUO97Nidgv\nYghjDp2fpT6TMUBl7MShv2AAphVsUBr66V/kRLN0F35cQvRTnI5otTt8o399\ngn2yE/DbkFyG0Pzz2hXb9P7010fkM20ewvxw/YTNP61l+DsLp7GUQopudW0p\nIv5lsbEkbPXi2QklbYhd18Ll9duolwwk8dhRWE/5dUVNCvMO2AS+2NF4U99e\nkcJ3JegLjRYI8Gmhy4P45cSkY4dKeVpK8IkxGG0g9Tw8J3PFpVw4Kc+Gd1EN\nJz3WvcCEOg6p2MZ52FZf3UCXaU+VzE3yYcXLagfCrxg9wQ5JcSfbv2RaXh8y\n6S4wfGvAXM0qRtQio1QAY3qG/FpGgDZIrow1LcgO8jrc1iftExvP5Bs5WcTX\nAy2Q\r\n=f9t+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDTx19tXXidloHFqSLx/4U1yM4XyZzABhK41Z3F2e+zfAiA2EbIEHbAZU0JrZhjNQdYSBRsE2QKZ4629+D3TaknR4w=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.197_1571001624224_0.3290030715897496"},"_hasShrinkwrap":false},"0.1.198":{"name":"@react-ssr/express","version":"0.1.198","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","delay":"^4.3.0","fs-extra":"^8.1.0","hasha":"^5.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/express":"^4.17.1","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"ace86e67ee504dbad1fd9edecb24c2b1baac6b83","_id":"@react-ssr/express@0.1.198","_nodeVersion":"12.11.1","_npmVersion":"lerna/3.17.0/node@v12.11.1+x64 (darwin)","dist":{"integrity":"sha512-C0/RymnlL6ZePd1FKmDMLdBkkvAU0c3v6GmYLhRsplp/diUWjQFfj6DrBbTrgSunBDf+wfbFheGk5nx/NKoDxw==","shasum":"5b7666de86f7f175d945767ec7b8eb8fac2d3902","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.198.tgz","fileCount":15,"unpackedSize":13285,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdo5XYCRA9TVsSAnZWagAAuzoP/2cdD86GYY2+m0JWrj3j\nDx1dV4IgntwEO7qnU7SstpzzV27gl+HT247JbRA/x5nhv7GkkyxiV2Zfp2YI\nz2dddTmjVMkLgOZOxWlJMMNUWCsBwbJ75x/lUBMX4tUozk/lBMCYv/uvCsy9\nSfhZB3QKI4P9c+0ye934Y6d8yYlqIQCg8givN81RbZ/RggCbw2XB2preVOM9\nJC58iPFwOw3K7/52ud/EwFiRpotguKms5qO7k1gUGDrLpLygdeQXR9Z0HBZz\nx3wwle3KPKkBvYaBfBEQ5cths+kj9qz1kD/g9OlexfC04Z86QgX2bFuhFEgX\nj9Lgo6gcrpdr3tOfAiaZwIEnCACDiGvFqxTVYUCLfWVXqKq7ijoW2okyxGRG\ndJ1v2Se9TkXx5vuPJF1DLF/D9FWb/yirddrs6LE8jgu1+SZJpKKrQ3RCWQY0\n7So36RdDZi4uYRgBhPtY84F1xxRfJUxvW2W/OOinkS5jue8WjOncw1P5yd5o\ns0pvWV3fHdWAJEXkpbJuCzU9R4tpqUg07ldEQT9WcisuNO/8yA4zh8gWWIqH\nPksOB6MNXx5ESE2pkNerKbTBlnDVHd/9s8VFPD72MsBudTqcvxnFuEANYmNL\npalPEe1hesdjjWzZlp0RQlT0VYJ1kjDXfyoUkCLPUzK+9VfYd8aaE81mxqZr\njfAG\r\n=rn7s\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCVpHJr5b/sUBOcvoSXaxuj95Ow2yg8MYKsJ+bh15JuWQIgIAQJKnrM8J4pMTKGI/Jf+cn5DQbPE9a6/VRY9/DJ6iY="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.198_1571001815625_0.06493830453581695"},"_hasShrinkwrap":false},"0.1.199":{"name":"@react-ssr/express","version":"0.1.199","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","delay":"^4.3.0","fs-extra":"^8.1.0","hasha":"^5.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/express":"^4.17.1","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"afc2c2e29177feca41a127825a4415381fdd1fab","_id":"@react-ssr/express@0.1.199","_nodeVersion":"12.11.1","_npmVersion":"lerna/3.17.0/node@v12.11.1+x64 (darwin)","dist":{"integrity":"sha512-eYfZMPpTh2mOx4G2vEQ9YrSlGF+O9ZIZCTyKkZ6YSwIB3ZFzajaq0eOwpVzQ3r7OxCGdCTg0f7VQfC3sgacNKg==","shasum":"2c9e34490a53b4d52ac82def59b0db8d531ac837","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.199.tgz","fileCount":15,"unpackedSize":13281,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdo5emCRA9TVsSAnZWagAAZ7cP/An7H+YmWy/mcjjjXT0B\nA+OfhFbW2ltmTpB3rkRhkDSbD0sbUNgTB3YAH73uP0Pl3zfHEBQtDDF+qhL1\nVkkw/o3uxPz91oU03ThRRN9VzeYFDRpKowioW+HbbEnVliFP4BBlqraMiqaa\nh4gct2wmjD7BgUup94emq96Qn2L73lL+J9v1i7J1Zi3ZNiJ0ueY2TPAt0hDr\n89TplwvL0fZ2912WrKhgo//neHkBfobDSn6Z6ZwsaboXkSz28/axI5km11hP\n6bosnZcIdBDrI9JMg+v/ss4yI1bIcgLBwwFdMBanCxN5Tj6F4x1i985uVSwS\n0tWqtbiVUAwaIJpNgpn3YvG3VmkyVV3CvhreK++fDfVI0a96/hVG0QeMCmG3\n1T0A9nciaLEyNs7ZENZ0T85QDt7e8Nvjtn2zRD6EtbRQPccKQ9RNMbkMW1Qr\n7DsERlUZzIiGrDmtX+jOWA0fqPGMGxefwzQGoKZNHXJypQ/a0geWMvrN3BwW\nQr5v2Z/8uF/FIRiu7MeRXIGz8M+UsHAqu/cGnmHv23Pooh/OJdPmry5bHRPK\nLlxIIvpKIzlz6kl71T8KEctbfFmE2b+NLRumKDK+jivAWYJ9+MSsYAH77KoA\nrQNDxa5xjWp435Qqbo50EF+yJsq8h5eCywv14C+dVmrz+vNFsCkzoMJUn/Yy\n7l+E\r\n=h1oH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCkFg1cNGfSSKAw+qeEOuSZHoS5PMFwwy1OiILliDjluQIhANKdG34ZCsxsYZQJyWJvETSJs3N0RnPyTk6FPpTAjGg+"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.199_1571002278111_0.05110905393222476"},"_hasShrinkwrap":false},"0.1.200":{"name":"@react-ssr/express","version":"0.1.200","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","delay":"^4.3.0","fs-extra":"^8.1.0","hasha":"^5.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/express":"^4.17.1","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"dfa3947345ba66d675f72c10122805e80bed4659","_id":"@react-ssr/express@0.1.200","_nodeVersion":"12.11.1","_npmVersion":"lerna/3.17.0/node@v12.11.1+x64 (darwin)","dist":{"integrity":"sha512-LNwpatScPgOM6TwnRUi7EMEm1MPQbEGPAtHtjEOuvOCUlZl8EnBBOQa4vjqu5/0BJLDAqWi/R9gsRnEaaU7Kow==","shasum":"c3bc40d7c19279245e1f5c3f87558e40da322571","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.200.tgz","fileCount":15,"unpackedSize":13377,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdo5knCRA9TVsSAnZWagAAyYEP/RA0JJuj48HDjChWJEGd\ndeA+T+r2LtqtnvbPrznRZq7FmxIxGDj3MlT4DsHuU5GXQvLYvb9mJSKWevUy\nmd/9VdSxydfyKlQVkyA4v9VG7IgPIjRjWo7vRRaIHSLkDvmFhy62afJRJMvt\nDVL9+EgD4oKBs+16Uai9hui06iwiSa+HrqiDY4Fowng6kx+fDNvuEeVjlpE2\n5JrWa+IqkO37HCGAjW8L8fWTkeAx3MN1YwEFMKeq4f4pPqic0XRXkdQtL2mG\nZ6J/IipxK/dTvhX4XQqYCOI/NI83qYYFtpSWe/CbmDa7z5DCW+tFQMg3JmS2\nhw7mUqn1qLFBwiXX/dkzpF2tu1kKnpCYNuTDhXFpIrzu2rViuy/dg6Ydmf35\n/AWJ/WSnEIDpkJS0J3JHCxZ7PJaKpu3nxI6ClD4nT/lq/Y6sUBMAbGh6uoyo\nlkGuz/NTFYdCuSfgCwkq8RU8BGE041JatWlP2RJfSoclXCYOuyI0c/n/F5ap\nOPFpGfj421fTdIZ6OiAg+AeNnlOFk+ryf18mOP9NojibaRntxNaC7zXXN1K8\n07EpqXrnSgebJATe6EXfghX2VgwDRb7vMRKMCAtzYyuvYYEelo+EQSfn06Ny\nYq2JWqhU4R3uoGEnTrhkR2p+FXe410bHJTgj7ICKsPmlILZZSSs3sqSFTNZG\npLfK\r\n=gKqE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCWNLAIBMQybQRlH7SYu2gy0RFvvOhGSGbwkTb+IdK4KwIgYy7b9haHXVLKetIZ9az3LquzerD19qEkk1fH+ovfvyU="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.200_1571002662552_0.4964012773399946"},"_hasShrinkwrap":false},"0.1.201":{"name":"@react-ssr/express","version":"0.1.201","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","delay":"^4.3.0","fs-extra":"^8.1.0","hasha":"^5.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/express":"^4.17.1","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"4d0da7a8796264f0973e61cbcdf0aecd3cfa535f","_id":"@react-ssr/express@0.1.201","_nodeVersion":"12.11.1","_npmVersion":"lerna/3.17.0/node@v12.11.1+x64 (darwin)","dist":{"integrity":"sha512-4vzya1K6YG1WpK0K4T3iVAEwMDe2f6mZq8mmkv/iXTnlcpgzuiQNezaqEUQXanu3g2oxODHdWeNmZuegy40Jgg==","shasum":"11bac9fd1e3ae665819d2ba5ecc40fb36beb938e","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.201.tgz","fileCount":15,"unpackedSize":13316,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdo5noCRA9TVsSAnZWagAA53gP/jrhec+G0LvMNNHGAv3C\nFZJARCYhQFYeyN73FI1h5yrSQfw9AvshkeZCCbs3UJTRhsQYO47YgBVTZPCH\nkyA4wJLnsIsoKAGH1Tmah1SMpcQiVD5y+61KMReVoS95DIB2omnYhbPqhzYB\n+M84UvL35Uwzid4RgDiTfnN+PQIaHQLieCf/E5gF64iscN/8YZ5JuZAlgenT\nfRdeUQEbfPBFZ0eGWgS2Bg9HRB6S0/jxQSeYPjbzgsWBQZ1i3VV8u8G9OKgx\nWWN6bOelUalEYfGcPXGWNjAXhJBuRc0xa4ziHUR31WzJ8jXzMDPJXTaj1DPt\noS8z92+AW+A2uhyWHOt8jANu64oP5LVyr4rwyyWz2tfNgIi8fgK5h7E2O/5i\no2b8qkWiuCLqv2KTHcZV8sBhq92K4zIF2VcTPl+XMplDvHC/NE7T9q0seOYP\nQsiHP2syhFGday7+mUHUILx2lbATggmUanBAe3rilssbb4bhgY7BTPP8P5UD\nvObo81kw75ZGNoMwUKpKeqcMoC6wobb9cxnWSFfrUST5x/D+wNlPCFnXIh1S\nRffov7JokcC3rHc9myPoAvXBx2paYlO1UGXvr1qLmT7StoGCLrdraPcI0oEA\nuo0zn8KalpoSu05AXtDoQKPTrqYkZKQze+533VmwiWlQic1EqNmizdA0aIYj\noEUj\r\n=qZzU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCGYjCJp0Anno2EusAMvbkmr0DwqyPDNbS5T7utbvtruAIgME5IDIXMfqPB7Cl7JCX50aKigF2msxnZSxr834GqCuY="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.201_1571002856077_0.8031083694027337"},"_hasShrinkwrap":false},"0.1.202":{"name":"@react-ssr/express","version":"0.1.202","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf build && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","art-template":"^4.13.2","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chalk":"^2.4.2","delay":"^4.3.0","fs-extra":"^8.1.0","hasha":"^5.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/express":"^4.17.1","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"614da8f84839befd60ee2443e5f8589fed1f2345","_id":"@react-ssr/express@0.1.202","_nodeVersion":"12.11.1","_npmVersion":"lerna/3.17.0/node@v12.11.1+x64 (darwin)","dist":{"integrity":"sha512-WYYQQ5cFDCuWX/yjUNDAokPjMBJ8rasFQYX959tAdy+Ue4/KMav3D77F26qb17DgGCr1kxipqrFmwWBaqDzBmA==","shasum":"205985530ec7f586d26caca2297fe31bf38a2ce2","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.202.tgz","fileCount":15,"unpackedSize":13336,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdo54dCRA9TVsSAnZWagAAZGkP/1Wh6D9TeXMpuUqW8t78\n8d/FMt4MFqb1lk+vZVBIMTDma2uy5yAaV0Vuj6o6abU2EHI4aea/YJ3ih/Yd\nI0pX4xI61fcq226lHs55wJZzpQN9yzBoKSOgplTjz3N4S8EuWmXM9ONxt8Ew\nWn40xfmQhgfIChDL2dcNYw0unclujizj6/Ckblg3ZG+eUpKeEZFtEVuEZ1hX\nrWNy06CqQXLWBgtbAzQUUJH59v0+UsNA3IarZOsNeECqoMjvsk/mgjf2V3Du\nyJ2kIDjW2JCNSXoOSEScDHNOmgXg4p46u4bk9dVbYbdoHeJFpQFqsoSFLgU6\nJfXg4ubOqtRebBxsx94U3xufJE8foHpSTsxxsanBbHeBgkLS1CafoJQu+LoW\n1u98j9JIr9pljDBlBeuJVIxnsja/0qdT8WvD937+/nnyNQAW2YfSVglhq2j0\nK41WDFCE3YRZoS9Fp9rEdzYlvm211Q1lbY3kBJYtksJG9/La+tiMxjaqB9Ph\nK4ZcWAhlA/Ie1eKS9fIS6j4D4qKnhjMEXZnSxxY4Jy70CUV4oweg0D9KJ5sJ\n217CzTSfT8AKKSI9zIldIiC68qt7LGRxr5OtfnqIFlzrqRtiBvcsYx1iVq9m\nyygibol97/+zY/1ZwWupPE/fkIeXj0jOos4f3uXK9KCpuHDmj1dfzLK6puxQ\nstbQ\r\n=7DxG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDMsGdQCMz5K1u3wW8PGY9+FBdeWF65ZIEhIwFnGBNlEwIhAM9XfSzGqWk1nNcXORdoJXlYHPLirJCA3i4sBQDnrPMq"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.202_1571003932938_0.3360239254467656"},"_hasShrinkwrap":false},"0.1.203-alpha.0":{"name":"@react-ssr/express","version":"0.1.203-alpha.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf dist && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/express":"^4.17.1","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"73ff620b3e275af99c9f5603e04a0d547879799f","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate below files inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const user = { name: 'World' };\n  res.render('index', { user });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ user }) {\n  return `Hello ${user.name}!`;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  distDir: 'dist',\n  viewsDir: 'views',\n});\n```\n\n## TypeScript Support\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express from '@react-ssr/express';\nimport { Request, Response } from 'express';\n\nconst app = express();\n\napp.get('/', (_req: Request, res: Response) => {\n  const user = { name: 'World' };\n  res.render('index', { user });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  user: any;\n}\n\nexport default function Index({ user }: IndexProps) {\n  return `Hello ${user.name}!`;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.1.203-alpha.0","_nodeVersion":"12.11.1","_npmVersion":"lerna/3.17.0/node@v12.11.1+x64 (darwin)","dist":{"integrity":"sha512-l9ehMFdbjCq/DqpWTMP+m0vy/hYidbfbJpXIOQWwoRIBqL3Kf8xRzghpQntR6knVOTP/nHMU8RjUrcgomChrrQ==","shasum":"3263f23e71bd25c73323b6206239dbd54649898b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.203-alpha.0.tgz","fileCount":16,"unpackedSize":14323,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdo/vrCRA9TVsSAnZWagAA1b4P/05JPthJxP6bfclBtupQ\nrp1XD0GALqb6wqTFH6Wgy8Q31Sj0NTw41R0yGJNogFxXaMT1M8qOw5piGum4\nzTVhWxZuhHJ7KELDvWhc7QGVjqgCQQ15fAPrDKV2Jf+Ml6IO7rsY1fLM2Fsm\nh2MNIUl9OiNAuFgmwFdXRO5jq+lH2KORiycxcafFXzcIOyPDSWOXRbgD1RW6\nBCLo5L4G4WNqwwqLckXLdHVb17ARt/STFWxN7Jrg7Ezkmhys6Vh63oXpH2rc\na5SIWcXChjjFuMcZ34O/+Ru8clzbtUBaCYj2TF+ZLZSeX/ElLgb5N4MzBnPe\nWpzgnIrrZnUKcSN1CKn9GXRWhQZYEgUlvuwlo3dfMgAF9IaKNtbkS5J63vOw\nYxqHOzHIqkqyOcVz0P8YxlkUIMeFsyPJhVTA7+xnNCVoGkfwIajHJkf9B3EC\nJAzHT/eXlIeqFEzribHS88KO/quSho8cOCQO0G5JdmD4Drde21hRxBZwcp5z\nde6bk0nIa2snVxy22VzzVDMKxIr7p/IDkm75sA83j3ULREr/fDhAj7nqQMSC\nX66dGjYaRti6U8XaIYfp8flTQipupbQYSbkWW3513YJ/AIHGb+9bxtbhGzVA\nxtlXM2ALexEgYNw8em92lxuVfaLgxSjSmRWNQOspPljX5MUQRPXhzwnrOx+s\nHezS\r\n=S9Ef\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGHwc/cFlmM4Wx/gdouT8gORoeeVLIKogcOAa6yP+wxGAiEA4kG5gVmUhFu3eregTlubF2n2WzMkOV5DS5H/a9odJBc="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.203-alpha.0_1571027946664_0.7870355568692826"},"_hasShrinkwrap":false},"0.1.203-alpha.1":{"name":"@react-ssr/express","version":"0.1.203-alpha.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf dist && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/express":"^4.17.1","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"1f4ef1426bb23de60e5c9ab3a0f104ec2c5bfb82","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate below files inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const user = { name: 'World' };\n  res.render('index', { user });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ user }) {\n  return `Hello ${user.name}!`;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  distDir: 'dist',\n  viewsDir: 'views',\n});\n```\n\n## TypeScript Support\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express from '@react-ssr/express';\nimport { Request, Response } from 'express';\n\nconst app = express();\n\napp.get('/', (_req: Request, res: Response) => {\n  const user = { name: 'World' };\n  res.render('index', { user });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  user: any;\n}\n\nexport default function Index({ user }: IndexProps) {\n  return `Hello ${user.name}!`;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.1.203-alpha.1","_nodeVersion":"12.11.1","_npmVersion":"lerna/3.17.0/node@v12.11.1+x64 (darwin)","dist":{"integrity":"sha512-Dp4cSP2fLpPOpoDWWVucZ6aNOEJLeAipqzEWdmVnKdgSXGfWiMhJ22ak+vS4579L6+vaav/m75tNDg29Da8oXw==","shasum":"e29d1952fe3e9684a14a7079f2e5f160d372c32b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.203-alpha.1.tgz","fileCount":16,"unpackedSize":14198,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdo/4dCRA9TVsSAnZWagAAiGQP/A9Oaeye/cMfk5t4yRSf\nCS10RJOmTtcYs76E4+4ArN7hZ4G8uI8BlBoJePIQs5dt8upQ3KH/IiVU2JOB\nBTnYC4lecn9Zn60IuM4RqQSZEnlEsefFWvVsw4Hri1KUyCxMvGXku+d1nK9P\nm2YduoxLDSpKP+s4jouBMfK57JtZKrVsuWdLkW6yDPgfY16nDB4cta0Ow37A\nFqGusdBttLl1ZedwRmzZmEEjUFZsdvoroVU22TNxNBiy+TnO39UXOh9SbPs/\nCCd7qaJ+WX1s6X7wpVU+CCRJqvNe6gHwbeamMntFa1urnxl2SRK3OcF9QGrx\nus0a8rtrBmQuhpAnUFsoAgWIkOmfMEmD3fjWzeIkE1NcrK5DOVv+UYeb42CR\nLPBBZQhuhUn8r9qjM6+Y4Vzn7TQiZg3ax+aAmmlFRHFppJbcb/XkkEGJ3r68\ndFc6saCZh7gDgydMv+BW5FdFN0ZI23VQaSZLkhF9qaI8ttfC/Gfpd0E5yKDA\n+yUV8y7agaUkwS7kSDoXMkn4Fh8Ookg/rUT97X1c+gentW6RvagWjtPoMyk0\n3/84lauln4N4InS21LMssQlSs4ra8sQs1fR/AkRitJweE1qSN2DEyH0R/HEC\n7S6D+AoIMyr/dNel4W65rT/DeCRhYznLF4gyh1twDba+e9oSvTqL1kqj6gUf\nk3Qj\r\n=L6EM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEzyXendkOZxKH4UuFR2ID8fe9ayI931N5K78ZW1S1NrAiEAtYj63dNsIxk9K+5ffmFuAgXOZ0u9qzqY67xoIwSDaRI="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.203-alpha.1_1571028509229_0.19324991002279912"},"_hasShrinkwrap":false},"0.1.203-alpha.2":{"name":"@react-ssr/express","version":"0.1.203-alpha.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf dist && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/express":"^4.17.1","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"87a7cdfddeccb797398a4f466067a2d7f06ab395","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate below files inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const user = { name: 'World' };\n  res.render('index', { user });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ user }) {\n  return `Hello ${user.name}!`;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  distDir: 'dist',\n  viewsDir: 'views',\n});\n```\n\n## TypeScript Support\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express from '@react-ssr/express';\nimport { Request, Response } from 'express';\n\nconst app = express();\n\napp.get('/', (_req: Request, res: Response) => {\n  const user = { name: 'World' };\n  res.render('index', { user });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  user: any;\n}\n\nexport default function Index({ user }: IndexProps) {\n  return `Hello ${user.name}!`;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.1.203-alpha.2","_nodeVersion":"12.11.1","_npmVersion":"lerna/3.17.0/node@v12.11.1+x64 (darwin)","dist":{"integrity":"sha512-08qOwKc+WuUzrKPsNrF4LaSrs2ymw89vpenRvWvVjKA8Qw8LDyUBCyDqT7NocjeLWYC8y7uMtwCYWr/dQ2vz5A==","shasum":"4f0a194472b4e7d7c108b2c361cd007ad4afe6a5","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.203-alpha.2.tgz","fileCount":16,"unpackedSize":14196,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdo/++CRA9TVsSAnZWagAADDEQAIIwV6ndZKEFi4YpribJ\nX8onUQii9MzhYvlsm54OWxEdMa4GL82XVdzEvNmgOoUriOs5vifOdaxrrlLt\nvkoZssk71roST3+yA6FbkSO2gzbh+0fMQU3WjNCJFj1nrxtTHO97d0aVuNkD\nIhvmr2z5tYOgNTMAN0AERNGrgdTo69Lw5BWhP0zp9RJnv55g4J44mUs4bFE7\nzfjeNJ67jHXFWPtOoQs0hSeNUP7PiEqzqZWGoB/fsHWB2Fti/Rvy3wi2AG65\nDUQGx11x421RB4v8XvC1bew6CVkMWrQjAZsHj7hs9rmzXvXo7j58RLip7yh9\nABwuVIOz2lRwxp9ehKQsLUyRDrbT+w6Ew+7LEzBBKbrcxzVpyVUyDO+RL3Mk\nvgzMX3S9KQyTT9iOOjuIlwpSUCfRdNk710sHItpTBPXx73ZEaDbCnf8OzIFh\nmb89WPyW4OGaWaCNjQYkZ0LVTMZyj7RBwUS2ez69XEj7TLI3WJckegD5Ztw1\n2M7PkiPJ0YsAX9c1REil1WHLxF+gKXsl2fJyanf0UMUVo2QdDhxG9PU/IdsO\nQutMiRV0tBQcrzO3OqBqgYn1mD2X2Ll5WuZ9MME1CNgZ/zFArD68rIfSis1+\nTLIO0qQrCrAnozFW3VHty4p557sb/MRLB5Ttcg7PchHV4nPPNG8uCPbcW2f+\n9PXU\r\n=/F5w\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC8/uD9woqmV3IRaK+COzQRXgQ8EXQJcHReZjr8BLHXmQIgWxdGkN7yniC8ldgH/TkLonlTf5SNA63epKEqeb+MbfU="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.203-alpha.2_1571028925447_0.19193351937774716"},"_hasShrinkwrap":false},"0.1.203-alpha.3":{"name":"@react-ssr/express","version":"0.1.203-alpha.3","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf dist && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/express":"^4.17.1","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"3a46f9c8434af1227578e27ddb6fb05b56ec013b","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate below files inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const user = { name: 'World' };\n  res.render('index', { user });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ user }) {\n  return `Hello ${user.name}!`;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  distDir: 'dist',\n  viewsDir: 'views',\n});\n```\n\n## TypeScript Support\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express from '@react-ssr/express';\nimport { Request, Response } from 'express';\n\nconst app = express();\n\napp.get('/', (_req: Request, res: Response) => {\n  const user = { name: 'World' };\n  res.render('index', { user });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  user: any;\n}\n\nexport default function Index({ user }: IndexProps) {\n  return `Hello ${user.name}!`;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.1.203-alpha.3","_nodeVersion":"12.11.1","_npmVersion":"lerna/3.17.0/node@v12.11.1+x64 (darwin)","dist":{"integrity":"sha512-nwbDethW6JlRyo8h4BiyX0e+GKNQqiHxIgdJTD6CdXqJn3PYHoYqkWkItHEq7DDvkAN26jo7mW+eVZG3V+JoIQ==","shasum":"39ba5806bdcd66a148e050b1e548aed7de01d418","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.203-alpha.3.tgz","fileCount":16,"unpackedSize":14220,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpADNCRA9TVsSAnZWagAAwk8P/im2yID7GAAMxI6/zaHO\nDYCxCOB+jPIZ9Z4hYuik6n3GLMUTOpFqBI1IQctuvvkS486U5EbKN+dG7rNp\nusBkLyiMeBVLdNc/1/G+PDJM5W0ZjU37SUn1lWMtRAXNzYBhTdRxXSGqHbWO\nMqZvkcElm7Uowuiy7LhC5CEys9BY20+qohMJlVZn94WcjtGtNk5oGmN+vOg+\n09or6x6YeiGDHSOYyPEp/DNzrRaCwmtncn9za/DzmyGSyMdwgTLRV2CIrfpd\nRDOcOxI6QrKGoyWpWCXBka5IBW4ZU90fmaXAHVD8l2FoZGHSf0/wCM1S3DqD\n1bFDd4Lz4CAPosyo4eo7aqIuZfe8jL/56WBtKHx0lIRxklDUD2vyZ/bmo5pB\nY9X3YAY8t/RFbnuEbkNSE/G+cITIY+/HQNjjjoUALR0qbbTO1tdR2pPRN1XC\nv1uV8VGUOwmnc3T9ze8F+nvVOAk0BfsW1WBiLi3qC68r+B8g84Es0G0KPhqe\nwe6JyfDPDngD+GkytT0nGDfWv4HMgErS//Ktq/dzCYAT6jBl/FMPurdJygau\nNB3Qd3x7arC2EJyPIrSJ0H4Aaox2diRlh2lIJtjGZH2KGZK+zy7ah7m0vTSr\nlLaUHvePXSQ17N0j+TqdmdYvrZZTd5FHJ86m/kguGSVZ+KobgnoBeQaLM8dt\nitdC\r\n=uXZR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC7QUCwznCBC2KL+ORLg8NSXS7k0JdKgImjyjAYXdlZ0AiAN3y7HUnqZ9zet1moEyuG1E4NtPz/zf5PpHm+cY8LMlQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.203-alpha.3_1571029196773_0.8706278396209775"},"_hasShrinkwrap":false},"0.1.203-alpha.4":{"name":"@react-ssr/express","version":"0.1.203-alpha.4","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf dist && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/express":"^4.17.1","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"bf527d661e8219a1b9ea3fa4a57e7f8b8f857823","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate below files inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const user = { name: 'World' };\n  res.render('index', { user });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ user }) {\n  return `Hello ${user.name}!`;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  distDir: 'dist',\n  viewsDir: 'views',\n});\n```\n\n## TypeScript Support\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express from '@react-ssr/express';\nimport { Request, Response } from 'express';\n\nconst app = express();\n\napp.get('/', (_req: Request, res: Response) => {\n  const user = { name: 'World' };\n  res.render('index', { user });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  user: any;\n}\n\nexport default function Index({ user }: IndexProps) {\n  return `Hello ${user.name}!`;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.1.203-alpha.4","_nodeVersion":"12.11.1","_npmVersion":"lerna/3.17.0/node@v12.11.1+x64 (darwin)","dist":{"integrity":"sha512-hzJ/MJSotcZNb0VH7q5ZUCe8ZlHJjodymzfQ60upl8uayi1/ZW+CSdpPCgUfYMJOcNoHnpwvqPl66rhPig5h7Q==","shasum":"c2ca085e54763180dbdaaca54e82b70ab25b5b99","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.203-alpha.4.tgz","fileCount":16,"unpackedSize":14212,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpAIhCRA9TVsSAnZWagAAS7UP/0zh42CJCDNCNrD/GgFT\naOx6pMkVrVQhYqkzLff6Z2h2QJkNbTEyaxWal79BwhBofVsvcCXREXqgb8le\nY5l397DAUlKj4QbkWJ7zSl/qF6KowYmtqAkUkjWDnAb/VDHxOGG0183hIv+i\nnTshmbyOazT8TwCqcwBsXc+k6HmCanWt2EZhZxCeMN+/jJNVK7f+fkdN8clT\nNdC5wdShJ4eGrQ3NaZPYth+0sgSDPwb4cnzs6Eq2lQhAmvOJLEZxsYfgOx+g\nZpagrnxTaQnzMYazL73CoilLdqvAfG8YBHprauVQPuMJd0hvX0Dza3nix8u8\nCixxtQyJ6i+rErIxy6hn/Bv4CN3NW0ZuvbHyBpSesW7djSOXwRGlZ6FGlZ/v\nSnm4+vobsZetVWiqaJYc+TXNR6nkkba8bPba/LSszJwF/Ax1/oAWjHF4FBPv\nQsgK6h9/fg8qAoFbwHUXD019OUzZdASkPWuJRqpqd/se12n/T9dFUwPH7CSg\nmcbPxfuzB3PJ/EPyCk0g0rraWj5R888Cb4Q+BdnYm3QayxbWYD24Ddf8pQkL\ncuLHkHeBEEO70N8t0w1MccaehyWSyizeJA05TicI4HT9J0yrz+gI7kHErQhI\nKSse+atTPSF2Uhs6YCzGCtRVus6k7eX35FdWlQArIZnIpNHZjHy15mFWfYNL\nytLC\r\n=32YR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBFYjbZf2FGvxpVIwjciPMAZmPDYRM39NiS7DN+QApkFAiA+FCf38knNaC1d4/nZVMIbLEo8G2IObp8uLpJ9fw+oRQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.203-alpha.4_1571029537176_0.8977268570797226"},"_hasShrinkwrap":false},"0.1.203-alpha.5":{"name":"@react-ssr/express","version":"0.1.203-alpha.5","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf dist && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/express":"^4.17.1","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"65f7ed07d5a9ff8bd77f8a77bc1c4d610b24b956","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate below files inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const user = { name: 'World' };\n  res.render('index', { user });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ user }) {\n  return `Hello ${user.name}!`;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  distDir: 'dist',\n  viewsDir: 'views',\n});\n```\n\n## TypeScript Support\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express from '@react-ssr/express';\nimport { Request, Response } from 'express';\n\nconst app = express();\n\napp.get('/', (_req: Request, res: Response) => {\n  const user = { name: 'World' };\n  res.render('index', { user });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  user: any;\n}\n\nexport default function Index({ user }: IndexProps) {\n  return `Hello ${user.name}!`;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.1.203-alpha.5","_nodeVersion":"12.11.1","_npmVersion":"lerna/3.17.0/node@v12.11.1+x64 (darwin)","dist":{"integrity":"sha512-gQfmSCrEqKT5agz/D8CzKEWTKYmsuEPYSqMiWxG/xVnTPzFQWH/Qcn/tQG2nVfFJDsTNaXPQC8R74W2GXY4tYQ==","shasum":"b3205f789cdc03857a2ebb78f70b82721c2c8af0","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.203-alpha.5.tgz","fileCount":16,"unpackedSize":14410,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpARECRA9TVsSAnZWagAAtloP/iOJY5l2h0Y2gTpfpxHr\njidT2ynS3NupT5O7nwuRVbyfPeksOzd46bnFIl5jiSMW5/gJAL3UF5tCS+sM\n1tmjfJS1ifrgJfnH9aOj2CGbvibEkGQzrUiBeHQdZLVXMabA1QM1tr5EY3Jp\ncmX5YPi532q423ydELGVr8cgpwHPeNClm9V0QHzWF1H7iX08JJeDUCETF7Vf\nWmtFxxWzgZOoG9psrWFky6L4XRd3RH4pNEGEp8mrz//R19Wb6NmTgKsk4RwV\nVUm2f9AUClLncI7w6OQOpVNXD6p0AGBzy9a9T0P1WEhprCB0NYlk8E6DQTGj\n30bIV/+Q9MBknxFL41Xwtdbd2Yk/Ut1oJAFAcx++6LIf4OzAZXax4M5z4vm/\nnxgeeC1fGryPsQP3tEH2SGI3CV9E8BqpjONkDJL4nfH4AZPWFkIAgKx0bPA0\nX2wCmVTAn6FDStbOV+CNMsQDj38kNH0j+GKl3CYWOurtd+0txizF+QgwpJRb\n97YEvXjILMBAtuUP1O70AV0L400Yhf3nm6wKpPLEdW4er0n18ftUtfqiYSu7\n8Ds9c0TjYfMQqOMXrXoQZCitG7duqfyxVC9zVCkKoRl12bDylghKSRWQV9/A\ntGGulw/Mvl/cpckVb07r3skDws44hq+Y8O1cOYVd0aBWNFef1hE1PoSxA3P2\nIgHv\r\n=pzMC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBxHvsuvQ8JhMTQ+vWVskMKvtHxS5M7kW7juf430/MemAiEAnqddxfYoNGeTH10E42SMDIpi/1F60Y8y1bRfH0QgusE="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.203-alpha.5_1571030083632_0.4031233626619475"},"_hasShrinkwrap":false},"0.1.203-alpha.6":{"name":"@react-ssr/express","version":"0.1.203-alpha.6","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf dist && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/express":"^4.17.1","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"3634291de50475aaa395fee0d202d60636491248","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate below files inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const user = { name: 'World' };\n  res.render('index', { user });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ user }) {\n  return `Hello ${user.name}!`;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  distDir: 'dist',\n  viewsDir: 'views',\n});\n```\n\n## TypeScript Support\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express from '@react-ssr/express';\nimport { Request, Response } from 'express';\n\nconst app = express();\n\napp.get('/', (_req: Request, res: Response) => {\n  const user = { name: 'World' };\n  res.render('index', { user });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  user: any;\n}\n\nexport default function Index({ user }: IndexProps) {\n  return `Hello ${user.name}!`;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.1.203-alpha.6","_nodeVersion":"12.11.1","_npmVersion":"lerna/3.17.0/node@v12.11.1+x64 (darwin)","dist":{"integrity":"sha512-4xIpgGGsHAk2+lK69ZW6Tr77JMRog7fY+VXdSSyVjgrUdvDH1jezjVvdaDL/VlcJ8nNxlzkvbtOEUE0uUq+Uhw==","shasum":"640dbb3e189e235c78db2f09d3b3a931e3b8e116","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.203-alpha.6.tgz","fileCount":16,"unpackedSize":14409,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpAWkCRA9TVsSAnZWagAAPQ4P/RM1EN5mGfO3G5SuDaC4\n6kH0AXN4JvwFOMYP1IEyxWtcIXfJK4ZMaCZVdhAAX3ZRg82Q0SXxVwoKWwhY\nsnmiqdM9TZhlH9KHhi/fj8DjmDTRh0nFCfQKJD7WIHJg7nGWJiOachz2unmc\nnl43LxEbGBEhqWPd9GbKsI8qGBvk/yir2DEgbn+BHv5z+LS99p8ckKBGZUda\n1XuIpq2VbOyw210ZCt6BMbisKMPNMCdQyOf1K2QeiqruBbrR+nU/nr04EPSi\nxdQakTmBeep7vJDWNUTtNqw8EbucpB7ZyzKcMBMJ3YQWVPkIv81fAPKGXPZq\nVqqt42sSgch0S24rlTXM1Q9qfH4t+8fVX7qNQTULLM/I6t7IQmoYlqryEgEa\nyTeQgVy75mqX+8wOeyJLJaL/vgFrvdF5OqL41b59C8GN+aZFsn2xtiPmlSeA\n9H3gjBrhZlMI23KIIALcNL694bIhjAXR1CsG2CLXv53YlXbZ/VbJMYkUFMX7\nNkPp4GY2/dejcTOu2e+QX9mkDKOcGzcDbAqHlO/nhB9RML3vcZIjlDRu+Edr\ntr6RxqY1Hn9l8CvAgbspPHLwL4qjnSUFat7eB/FwIInEqRBVjcy+MI8JZe/J\naiY3Sc5MKYkKIndIkFn9+WwhBMJN0hT1MeCyuPpd6HlwwEj+7mZ3biQo1q+0\nJB1L\r\n=msqN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCYarJxNkKMI36zUrl2BNH27dIA8N5NPZWkrfCzYnymZAIgaFKwH5QOAPKYRY3i49jzIkmTc03Bg43WJS4RdXZphVY="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.203-alpha.6_1571030435366_0.7845015673539983"},"_hasShrinkwrap":false},"0.1.203-alpha.7":{"name":"@react-ssr/express","version":"0.1.203-alpha.7","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf dist && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/express":"^4.17.1","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"fc99e074cd82458217da25adb1cc22810e448ff3","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate below files inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const user = { name: 'World' };\n  res.render('index', { user });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ user }) {\n  return `Hello ${user.name}!`;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  distDir: 'dist',\n  viewsDir: 'views',\n});\n```\n\n## TypeScript Support\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express from '@react-ssr/express';\nimport { Request, Response } from 'express';\n\nconst app = express();\n\napp.get('/', (_req: Request, res: Response) => {\n  const user = { name: 'World' };\n  res.render('index', { user });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  user: any;\n}\n\nexport default function Index({ user }: IndexProps) {\n  return `Hello ${user.name}!`;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.1.203-alpha.7","_nodeVersion":"12.11.1","_npmVersion":"lerna/3.17.0/node@v12.11.1+x64 (darwin)","dist":{"integrity":"sha512-f5cY/v5X83qxu1GDGlkbdosHDKru8hIgcvEqRqTYmpj+BAt/u1sRrxxNSzMqusU/lpcJ9yYzWVSK59aV/a6NWQ==","shasum":"1cb483637ecaa5f4042b6d2d03987e8f915e05c9","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.203-alpha.7.tgz","fileCount":16,"unpackedSize":14248,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpAdJCRA9TVsSAnZWagAAbKkQAI5zxXldAMQfAs1qG3u+\nQGuce4BUlPJBb4m7IU2zhGT0/39q3DGlKRYA9kSMfiKXQtdh1EzGBSwDRPLp\nF/hGrH7G9CKvy/368SYiTpUOT2ezqtEpoFa335rAQDnvUfhc3IE/AiVdA0lv\nVKWtDDSGX0WUtWiSmqy8ethsrqRR1DCN140HV1rHuwB4cHFZcE0N5G1if/qP\nxIrWwAhCVzlVwe1+tedGvwk9XUolAAPKkr+OXAK4Ff5F3i0rE/0GDJ9tsOBF\ncJd8C0l9kl0OLK4nU+6ff01TlSHUxApXlV1UHYCg9Th5yB3r7Kyk3dEo2PqN\n+9alOQxP3poarIv+FYeu7qtDiNcx7qx+oSr9ouLjZjtSirO4Qc/GfzL0ZsyP\nJLsonzvEkZXw6/ww47ZvxEQp9WBFkW5WBTHVArdmXk4pl+GLFuehFhu3JhK3\nNovqLFY39RMzGC/Lo1q7ZJsAlrNtIAV4aNNYU38VN8HE+JyFkIzdxKIIgz7q\n5EFoT0oYI+WgYqm0LzxCL08yYkO/Tu6j6WXo/4n+cEmQLN7gh1lWQcljoE/B\nwgFQOkm5yp3IZwlCdu3j8sjKRFOwH8m3Hkc4MOZ61XbGixYDEp2r8tmNMjrq\nRMyFrWOofe8O3qKCN12oVYpxiom4bySEBqX5+U9dUOuhBrKVZYXV/fau5y45\nFxD+\r\n=rSE7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC3P5R1jT1DjVrpkmIXeymw7w2Gkc5GLsFGvGaIrR7raQIhAJvo1/zwFHUsqNnpnvZmQ9OOTa9bUWdhme6StMjvbf5o"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.203-alpha.7_1571030856460_0.5560654179874125"},"_hasShrinkwrap":false},"0.1.203-alpha.8":{"name":"@react-ssr/express","version":"0.1.203-alpha.8","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf dist && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/express":"^4.17.1","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"bc58d590d3b06580bb681cf77beb9fbc6a36d6f2","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate below files inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const user = { name: 'World' };\n  res.render('index', { user });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ user }) {\n  return `Hello ${user.name}!`;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  distDir: 'dist',\n  viewsDir: 'views',\n});\n```\n\n## TypeScript Support\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express from '@react-ssr/express';\nimport { Request, Response } from 'express';\n\nconst app = express();\n\napp.get('/', (_req: Request, res: Response) => {\n  const user = { name: 'World' };\n  res.render('index', { user });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  user: any;\n}\n\nexport default function Index({ user }: IndexProps) {\n  return `Hello ${user.name}!`;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.1.203-alpha.8","_nodeVersion":"12.11.1","_npmVersion":"lerna/3.17.0/node@v12.11.1+x64 (darwin)","dist":{"integrity":"sha512-TdbGcivwNjRXwBXfZ16hLuA0Tl/U4E+9Pcw3GgcdMGWbUkPcWUHL0DvEDaiMphNPs5j8TzrjCMnh6WGfqW6/iw==","shasum":"a46996251b73c5ece2ddbf0ebfa08abf1c761218","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.203-alpha.8.tgz","fileCount":16,"unpackedSize":14260,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpAiMCRA9TVsSAnZWagAATLMP/188RbPvLcrSPYNcjRqF\nTM2ZBIVfRHQh7YGjrWRQQg4DAbErg3kW/P0/s/RL/34act/mcMPoolF4aZQ8\nrRsWrT1p/9ibnLWx3AsLDfxmtdEh1+7A1aa4srAU3UJMwyWosRJIsSf3N9R2\niTb11CTvM+XdttNIFTNFfEQ2prJP21YQqGbKBt9YUGoGOPBWQn4OM2E/L6Yz\n2fJyLxz/z0rQ+e+HTUvyhKfmBQVDK9NTNkRGKaQRxFbB6VhYB62ewXKgmBZy\nlvFQ/nkn5V+0x5g2eCd6pvmzkbBhM9HdB5W6ayP0rhzyoi/AxRJ92IoB5+S+\nnJ1FIKNA3tOsEO82l34lT/41DDG007+tAHxi7ET4K2E2ki9qptIXZaIcbzaG\n29MOb8lsDBQSRcRUvcMT8bWJlOW1IOrz2vMiS4tEXMZb9sB+v66zWyl4V/m2\nBcDZ/XtuPM7Jkdmnoy+c5Apgl9LsNZTqELYjjuBVvY+vpmQQTqZRuh4/u7Wr\n5pp13RkGMWGbNQMTIGZBRRoBBqKBDXZNozMxnajOR5NG9G46IEREkv3ASTbh\nZbOFUTcbV7EWB2+IIM4DAO00ORpEBuHY48a8GrGO/B9VdM1blHdHA3v9MfWE\njHt/aTIc66VuGIYtvJRWjuN11pCLwxn1wlXlc8yPRvi81t9FGX6Nr9jj5ugu\nWYif\r\n=mZ9w\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDaRgvbIgNjkPP5w+/xzjlJNZuzGXmzug7Va0X5F21nsQIgVt5TaHomCU+PDsIXo0QlMdlv8dwI99Uti3zFD4uZ9j0="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.203-alpha.8_1571031178346_0.8059055526242038"},"_hasShrinkwrap":false},"0.1.203-alpha.9":{"name":"@react-ssr/express","version":"0.1.203-alpha.9","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf dist && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/express":"^4.17.1","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"527654bd579026e4f302183e2d31b562ea074fb0","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate below files inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const user = { name: 'World' };\n  res.render('index', { user });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ user }) {\n  return `Hello ${user.name}!`;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  distDir: 'dist',\n  viewsDir: 'views',\n});\n```\n\n## TypeScript Support\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express from '@react-ssr/express';\nimport { Request, Response } from 'express';\n\nconst app = express();\n\napp.get('/', (_req: Request, res: Response) => {\n  const user = { name: 'World' };\n  res.render('index', { user });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  user: any;\n}\n\nexport default function Index({ user }: IndexProps) {\n  return `Hello ${user.name}!`;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.1.203-alpha.9","_nodeVersion":"12.11.1","_npmVersion":"lerna/3.17.0/node@v12.11.1+x64 (darwin)","dist":{"integrity":"sha512-vSpjDFq8BTowWDSSGMkAMVuJsPlEceLhRZPcP9G4/fsVmhcXgDiv86f1plEn2BzFL32sVLHPT5jkEXtg1J3hng==","shasum":"f387244d8415c8b2c94ce3d0865090c8f58c4eb8","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.203-alpha.9.tgz","fileCount":16,"unpackedSize":14262,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpAl1CRA9TVsSAnZWagAA2AQQAJaetetxMkKAuJ0ySZQR\nfkKRcvr7SWOzNxJc76EHLFtIKMJzG58jPouc51s6PnMxWyOn6pIhlMco7YQi\nFscl5xhBDyQc77GyMKprAqArvwgNIlb/eonPcKyjwKpa7UTgTtosoDFCYzQo\nu3JjR12jpKMihaUM6b7af8d/f25vDe9/uf2i32O3yd0oVrWqXQpqokr+URdf\n/70nNoPJrHfCeKOC/zk4iqG1GvwvuLLgHxop94F9+EA9KvXlm3FbZFIr4b2c\nfDtu1IM046GWYERHoeZxTtSBPbgPN6dL+H9nof+dWSP05dI94Rh8Vug6Z5cL\nijwkfwkS8PspWRbjzzyiZIB4Hkh+BWmKT4uM8h9Txkw8ucjyYDxnpZOE/NWL\n25sBiIbXY4zA0o25L8QaSxualuowz27Ymr7QMTfna8QhM8mZIoq4lERTA4+h\nAv8RKd12dF+svChvdOxQdvuVjKbYHUp65MyX9ZRwoEkSdeZK9ztlZf6l9/Wj\nCZjjLJXLp045Ix4V3rtc96pXjMly8ZWixlc9fFlTwkizWiy7FK+IcfQT+P54\nCEbLXKZxokd+Qs+jjz54k4bKLm2kMhytOWG9ElZ76QP9+2kfaddfYIfPMqMh\n7htplpSULxe2TaWFSKQHv9V3tzQ3DZF/yfc1KqQ8v3eZOYr0H8Edy69VzByd\nrh5c\r\n=Vdjm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDjFC/InfgPXLMTJekIUOtftPHrcScdrIWz0kvGWAnw1QIgBZbBs/bfD2XLUsSKbMLW15r+f8ubbqvZnKw+mc8+GkM="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.203-alpha.9_1571031412412_0.7420591437583393"},"_hasShrinkwrap":false},"0.1.203-alpha.10":{"name":"@react-ssr/express","version":"0.1.203-alpha.10","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf dist && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/express":"^4.17.1","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"6af22aed3624c2048d8fa5b5ffdbeb695e0f8a57","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate below files inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const user = { name: 'World' };\n  res.render('index', { user });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ user }) {\n  return `Hello ${user.name}!`;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  distDir: 'dist',\n  viewsDir: 'views',\n});\n```\n\n## TypeScript Support\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express from '@react-ssr/express';\nimport { Request, Response } from 'express';\n\nconst app = express();\n\napp.get('/', (_req: Request, res: Response) => {\n  const user = { name: 'World' };\n  res.render('index', { user });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  user: any;\n}\n\nexport default function Index({ user }: IndexProps) {\n  return `Hello ${user.name}!`;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.1.203-alpha.10","_nodeVersion":"12.11.1","_npmVersion":"lerna/3.17.0/node@v12.11.1+x64 (darwin)","dist":{"integrity":"sha512-b7x0hgVGZ6Vq0i+JZXkuVarHnUzUZnwAnVxYli5mIDVVpgEEusjT6T3BgbFIPJMRf6GslDwdNB+HWX2R5sowkQ==","shasum":"cad7b0d6d5a81094448da29f84feb94f0910a26e","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.203-alpha.10.tgz","fileCount":16,"unpackedSize":14283,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpAtrCRA9TVsSAnZWagAAbu8P+QA4rY7x5FwjpKKa0Md2\n79T3sgOdDCF20+8ht7drt3RUU50izBcFq4sHDu/2S3zhih3UWFvxjZdt8s3C\nt5pa0VWAmQwIWxTbnoH7oxFOqhP8zle0ANvECEouzZtnshlzYESI/KzcXGSy\ndjIRa6ivCo7vIsCtECXWNKJtMYBaGdB+En2K3OU9p8kRUcxGqtLL5e254o1q\nxYh1UrDLSH1LFiMSQkYhVh+m6W8qqrJbEvjbOfnyr9332JReDGaU3RmU4TFX\nsJDSsB74ehDDeJ7/ozevgw7SH3Xg7srPLh+9Tb3AA+GUc6uSFEvl0AGgJyCp\np1CHk3H2F2/TIBeYMJ0M2zyMAUw2Guh8HMhJOUj2toVo+gtxWSIgZwifThkq\nO7Vcmv9eEUSLRvUAuj5gE+QRVU29jRlF/UjSn4mXjsx/Nhcp8QYXxcNOCKST\n21xk6IxZjmAnQx6inVAcTkJWQx09FHHqZqRAcRoUvlITqmvDqE41g56jtmhW\n3zUGYIrJgxIAwlK4+dpPHkiEpaANRrP3eRagkOIcqGxwze6ls+cvL8T6/AKj\njj2AgOjiYkSLUsyRuT9+xyxsShGuW4GrOEI0c+XPRrXD3wzTQGKAYozwk0+M\n42FqumeGn9zrGTjOOpHpah9clTxyv9dX3m4/Le2HVwZQ0XnZ8sDrDzDhlS40\ncVyu\r\n=BQCt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG/lOedffOdqOeECZi/BpFyCUIDRMRWSJPR27H1uFgAtAiAiK0yuoPxOS3FkuBjIpByh2zd6mLky11ixlSznfiOZhA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.203-alpha.10_1571031914546_0.6662731071852692"},"_hasShrinkwrap":false},"0.1.203-alpha.11":{"name":"@react-ssr/express","version":"0.1.203-alpha.11","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf dist && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/express":"^4.17.1","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"8b881f703d16f686ff431163531839f066e02203","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate below files inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const user = { name: 'World' };\n  res.render('index', { user });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ user }) {\n  return `Hello ${user.name}!`;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  distDir: 'dist',\n  viewsDir: 'views',\n});\n```\n\n## TypeScript Support\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express from '@react-ssr/express';\nimport { Request, Response } from 'express';\n\nconst app = express();\n\napp.get('/', (_req: Request, res: Response) => {\n  const user = { name: 'World' };\n  res.render('index', { user });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  user: any;\n}\n\nexport default function Index({ user }: IndexProps) {\n  return `Hello ${user.name}!`;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.1.203-alpha.11","_nodeVersion":"12.11.1","_npmVersion":"lerna/3.17.0/node@v12.11.1+x64 (darwin)","dist":{"integrity":"sha512-yUtD3EG9Ikd4miqx+ANC+wUHSzfGBmfNgDcreAXU0oRckhY4F2aPc4wHBCe/1bqyBe3gDaBAFLsE7ftuk4txiw==","shasum":"1937c094d1767667fa0bc4f2eb497da2634ad452","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.203-alpha.11.tgz","fileCount":16,"unpackedSize":14140,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpA2WCRA9TVsSAnZWagAAChoP/Rm6Zw8N5corcUiV2qM/\nReNqAiUdzK+nGOmkN6IFGJC1xDMN4BlUJNiu1mrCkfI7jfN2X+Nc1prp2LwP\nwqmzfpBsiJExRwHIerYrjVy6RKSdNgw2vQJwTmnzI3xhhByFzRAN4z+csxiM\nv/oLhGENmvIHXzNirhyFNC8YJINEBkWBtQV+faWqfQ1EZwNIf5CJzzPRoRm1\nNK4T3AeUKdBL0ycFrnDJG4vcsrnMkXtfgg3lCL2dNh+euWO/U999QOdjQgaN\nnKwyYjeU5zoAhJGmGfVwvQbQZXdXXVlTVBXtG3GSfgU9oAQ1X8KgSJSwDfOm\n2pY9RkYPSULj1x8tptkXkd9H+Bts6yq17lXyJgc3rwDUKEZ3COcAO/YGAc+S\nwbalZph1lrWyb11sSVB84Q1/hp9MM45Gna3jPBpAizKfsLO/F1kEkAsY0u7h\nDphu0MmMbAlJZRPcbTU9M30khX6zg7Y9nakPot1EqUs/KYy9Na11OPDJAbir\nLfThzDEtBD1Jq8aLoXkteSdYUw4MoQHK9gBxBzP0ltPWvl47txJsxJ78vxd/\ng/Jbo6WL5hktHo7sx0wcrlEzhrzWAi04AeiIniYB+WINPJo7HMn0BoYDW6jg\n+X/wFWKrWyyqn5w5/I2+6AubFKYf9AXpUIJKCEdhTzHy6aqEJSfd9Sn6FYTC\nUOP0\r\n=I9E1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCJo3whDB7pewtb/K1szJOrbaGX2IQCf4smMrJLnxNVMgIgLODPUzSeUoGXVgoYLQBttqaElI6ccB9JBQ9Mrb6w/4k="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.203-alpha.11_1571032469870_0.5827229895949042"},"_hasShrinkwrap":false},"0.1.203-alpha.12":{"name":"@react-ssr/express","version":"0.1.203-alpha.12","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf dist && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/express":"^4.17.1","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"55f562327addcbae8b0746bba662650c5a17c33a","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate below files inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const user = { name: 'World' };\n  res.render('index', { user });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ user }) {\n  return `Hello ${user.name}!`;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  distDir: 'dist',\n  viewsDir: 'views',\n});\n```\n\n## TypeScript Support\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express from '@react-ssr/express';\nimport { Request, Response } from 'express';\n\nconst app = express();\n\napp.get('/', (_req: Request, res: Response) => {\n  const user = { name: 'World' };\n  res.render('index', { user });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  user: any;\n}\n\nexport default function Index({ user }: IndexProps) {\n  return `Hello ${user.name}!`;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.1.203-alpha.12","_nodeVersion":"12.11.1","_npmVersion":"lerna/3.17.0/node@v12.11.1+x64 (darwin)","dist":{"integrity":"sha512-iNumEqlmwiFz/fLasgd6TWbgWNVj0ocO5uKwwtc23yKs1Pbzz8YeD5NU2s/lqH97YqS3j7iTjBLb01yJ/xr4EQ==","shasum":"5a683a7b77cc1925851543ee8cc965c8f52e6961","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.203-alpha.12.tgz","fileCount":16,"unpackedSize":14158,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpA7JCRA9TVsSAnZWagAAoNEQAKTZQuO0uU9vNaQalL+2\n+uB3dPobDEUCsKePsw1n/h6V0kGoiVGOLV07nia6EBvNDjv6w5IebaxBXoUN\nnXwUHLOr1S8E0JFhynYSTXcGcpJegaoYEwJXSYWe6eo3oNKmnLSjKTKjezfw\ncXP8kg/tPwkFu8+ErcXoWUkVYwRqT+WLEMphYA2oEGUsbmX1ouDc9CC81jQj\nHtu731/j9Z2iQ/2Y2JLE2dRAbNp0/z2njNnJIsM7fVwRX6TSLoQPXlXMob75\ndCLubGf2B33wWm78CBXLFt6gnqWbUvKpfhy98WWTN2h3WRTXfxnlOdDjRQ1H\npKXL4+gjU6eD+jSwcWlDa6U98z7HECIgEPjsj45m5ia5/++RVRHYedt/9jLx\n2V/iGR34PnSDYbbVlKSZw8HEc+iO9VykM0HhFoWuMN4Qpn+f9tTkUQjQsowo\nihtImDNeIddqjU983BIjg2RpwXZBwCU6uCTmQAnsMaQcdabyhaAHxXn8yea+\n23iR0Kwyp2xfDcIspW2SBTJC3u1toXYLArX6KQXh5I3obWFK9BuZchOU0GQS\nIumaGGp32chj55PMGYRrVL8V7S+/0/9Siw8ci0vueV32xc7JOMTPvCyrRM5W\nOzxVwHbADMYcyp4hzlpAQ7t01Cabur8xoyP2+8ylRJgu6bH98CWZp2yeWglz\nuMuZ\r\n=Q1Sp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBnPXXTy+kvKIFfsJmAcmAax5tHu1/5vR01owUuf9RQ2AiEAgkCHWL6icUrPFl34K+iDSuNxwq5vwBbrxL5iQJQqNHk="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.203-alpha.12_1571032776547_0.21947603960755657"},"_hasShrinkwrap":false},"0.1.203-alpha.13":{"name":"@react-ssr/express","version":"0.1.203-alpha.13","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf dist && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/express":"^4.17.1","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"e16c185805d3279a766295e76b31c57a555c1a32","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate below files inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const user = { name: 'World' };\n  res.render('index', { user });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ user }) {\n  return `Hello ${user.name}!`;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  distDir: 'dist',\n  viewsDir: 'views',\n});\n```\n\n## TypeScript Support\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express from '@react-ssr/express';\nimport { Request, Response } from 'express';\n\nconst app = express();\n\napp.get('/', (_req: Request, res: Response) => {\n  const user = { name: 'World' };\n  res.render('index', { user });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  user: any;\n}\n\nexport default function Index({ user }: IndexProps) {\n  return `Hello ${user.name}!`;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.1.203-alpha.13","_nodeVersion":"12.11.1","_npmVersion":"lerna/3.17.0/node@v12.11.1+x64 (darwin)","dist":{"integrity":"sha512-nfUnCLUF9fUQNVBsrl+PWLeTvjgSEYGxhHsIiWUgqpCr4g3PyBFxFnZT+HgIfc+lt1UKwfZFjcm7aAIVXyjScw==","shasum":"4cf852d658b20a983153359f15a4b11b4560594a","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.203-alpha.13.tgz","fileCount":16,"unpackedSize":14175,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpA9rCRA9TVsSAnZWagAAMu0P/iHFyzXergrkU6GYVyNl\nJ9s/k12XBsvJnCg5UKAIgTfI3UtbDI3O6MOU/f/R8jwf+n9LuR/JtMELf+P8\nocmNYZXFeFrbiDYEZJcLA4HK7vOtla+l5+W89d25mqdOUh4fpnxPVWnRLR5z\nsTS+N0xk3Eu4msk5kQBmh5AenLBytBzNm2RqouWePPeNj2nM3Y/Tx8OjcUw5\n+XA2Ba7PJC+F6cY7Dxr/DwyM1OQ1ndEXmL4D2w8fzURAkrPe6y6U58jQI5Ig\ni3Hd09rYCD3qbR1yLudrUfO5/AtWgDrQ9EgTRsOBG5oqbPM3gV2ejhli6992\npLNwmGZak9ELurnoDKazyspfFyDGKk4hPskSGq8tOSrWVLo/lKqaTewX3vp3\nXrsgFE+/aKBK9TgzXyk8XXyZzttUnQFw71T84LL6vn8sAJ+zGjyYkd4lR0Pr\nx8M9VHuNDcP5vH5Gy86X/RfzJVBj8CuIjLlwJtH7/+ze23pp72LBt/B11uGE\nY35flJetUrTlLIkv3q72Fr5t3wmWIX5ATmhtLOvsv+BMiupjTg5SGbHeY2Wh\nk/urvlBQIgQB0FMvf4gZZ1VZ0YMBX4mYWh2lQkrY8jkm/NUB+Ak/0XRpU2cr\nt5gqK08gk8qTNSpkEgLT1X1QtNy7ii0ODTTb2GvtJ+R1wqW8oehIx28Fo5bu\nAnkn\r\n=odYD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCRMn2e3ZIHGTrCayvldUl/2zGI0wi6flSgwCtQY8o3iwIgQk8AJ0Xqp7DKFLHMdzmpYT3k9f6ui4UW3CJ9QugJ9+k="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.203-alpha.13_1571032939279_0.6875841569376431"},"_hasShrinkwrap":false},"0.1.203-alpha.14":{"name":"@react-ssr/express","version":"0.1.203-alpha.14","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf dist && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/express":"^4.17.1","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.0","express":"^4.17.1","npm-run-all":"^4.1.5","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"express":"^4","react":"^16","react-dom":"^16"},"gitHead":"15770a068128c456c7d151e03ab5d3da1df36556","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate below files inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const user = { name: 'World' };\n  res.render('index', { user });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ user }) {\n  return `Hello ${user.name}!`;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  distDir: 'dist',\n  viewsDir: 'views',\n});\n```\n\n## TypeScript Support\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express from '@react-ssr/express';\nimport { Request, Response } from 'express';\n\nconst app = express();\n\napp.get('/', (_req: Request, res: Response) => {\n  const user = { name: 'World' };\n  res.render('index', { user });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  user: any;\n}\n\nexport default function Index({ user }: IndexProps) {\n  return `Hello ${user.name}!`;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.1.203-alpha.14","_nodeVersion":"12.11.1","_npmVersion":"lerna/3.17.0/node@v12.11.1+x64 (darwin)","dist":{"integrity":"sha512-zL7lZ6SSXqTWuJxckMn3J+SzTpjwM82ew3sf4o41+6cR9FeEhRXxQAGlkj8wWjRmsH888oxdN6QIaEBCXveBDQ==","shasum":"b01eb6a3d093b2ac869b26cbf899466e2c32dea7","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.1.203-alpha.14.tgz","fileCount":16,"unpackedSize":14171,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpBCjCRA9TVsSAnZWagAALOgP/RIaghEByatzZEtO7Ke4\nDGGkMPM/uU931KMaIdjw4l/rfD32B6+atSAuFt0SOXWxbcO30MOgrZWoJblD\nFmargEoy5Y1NmOUPb9JPeQ5oxNSWdgRKIEOCO238JzPSYuFpP6RDK88WBoLd\nHB/PqLm9FNwOly3Kz8IFxxgiMzAXLSqADLYbVDdGBy9SuFJAx+DdIDmUpxHO\nVk4xexb1pcNNGH3yBoE26jzRscOcMUN98z4enGUc1pUIqN1Aj4g4JkJ/G3wJ\nudNTQUlrG5Y6rH0xcbTzchQfy38NhQMc1zNGnRtiigH1DEfPMr/mLFF7N4Qx\nHZZMCPqaQ43w5PM/eOK7GtW/nFTVLuD7JQvBQkokj2xCi3iZz2lIOlhv/dUs\n0ominUR4SN7yYjoipsLsJRLUfcLFYghbcG4PkdN4Z97aIlL1WXlx9toG0Nqp\nGbrwb13Yi2nVCZ5bA7e1dMMNZGPTxySvB0lUpfuGJKp+bcNB3hIelNXMSxWk\naN7mTachePm+lDpB26W5kRKeWHYRBGY0344MNAfc8EUtrISLAQuFZcm+fsvp\n4tt+SaLHfMx6PI65MJPmb/wzwXQIMxsOZuDtTaIML9vVqhEx9OpI4SNMlQhd\ngck7YTEKhV4ijk77npDty8vDNouWwxGTKyCr84Z3tR6+PGzzVkghOQm6FqNz\nXBI3\r\n=FkLl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDqU0CWIGeIVvrjA71eQUQmZ6tsQ2II+DLtgATwt7xpNAiEAn03jky9iR5P9h8+fF77Xb7CrQL/LVFe7j9raBQ8WY7Y="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.1.203-alpha.14_1571033250705_0.4772697414107474"},"_hasShrinkwrap":false},"0.2.0":{"name":"@react-ssr/express","version":"0.2.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf dist && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","express":"^4.17.1","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/express":"^4.17.1","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.0","npm-run-all":"^4.1.5","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"db0bdf9c7b736058d54f151137cd6a74885aeceb","_id":"@react-ssr/express@0.2.0","_nodeVersion":"12.11.1","_npmVersion":"lerna/3.17.0/node@v12.11.1+x64 (darwin)","dist":{"integrity":"sha512-pzcmjx9o43eKRSbn74pbAjDnezr4lJCS78j8jAmi/JBbJxeK3Gphby6EKeUuYybfL1dloSwTjSd5MPh7KV/KmA==","shasum":"d47be1b7481dfbb5cc110784ddd7248eebc1f297","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.0.tgz","fileCount":16,"unpackedSize":14123,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpBMSCRA9TVsSAnZWagAAHcYP/3w4nOxG1gjHlrCcyfIk\nDnjBshvUwlqQdaGlFjEE9hkPBf7Z6Y/r7l/A1s52nYDJ1AsR2EdFOVolxjaw\neQm/qsAhypQ+Q3satsB+b9++8OuDXOszmKpqHTI2f8kPNVIGpDyakQOJswUN\nnhpMqYSjlrIu29o2vSLw5bFsIBua9tuiGkvAUpnWbIunSa8c6FNy103aJ2X4\nfuTUkEyL2nvyDH6vNwmV9IBhrp5aUGeWJizkd4x6Lmoq1ewcMA/zefimx2RI\nIKC4MhNBjjrwiQ4dGiThFKx+M8TiEGfNV7QAkHbbiRo1kC4TleMf8jMAXRe7\nRtTYQnVgFtRy33aEbQZpB/15+XP2aLQ7yJxZbo1+9GVJK7bN0UHVGb1cIR8Z\nt8Jz3+A4nOYKl2k94s4RCmzju7uKuM5xL1g/U21o+rsYnc0j13FjZjqw54Eb\nLN7TMjhNT+mPK79y59V15jo35w4chaaQf8CRYAoUpbnHJXNS9wGV0Y+brl8U\n6EDWC7+LM6JEDYokuoeY0awNj1ArpF8UAPs7VGcpiGZRMoY8ZREguprteFvN\nQMoJ7bo7puSZXWCeFZm25hyYSLW3pbpoxTv5LhJl7pgEeIwYrjIOlQEGDC9D\nmj6sh6kkJXm9b6h4T+xNNo9M6uGgeQrvnpag9t/cdh9eTmUqaWwB8l6yO3XS\nAH0o\r\n=OLWf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGQ66u9MTs2SRbGkhcp/ncrk5UcdXCDTuLmikLviccMLAiEAsOoVGmnCxbBL7hpjL/JQpNO/wBw5UvKuTVGWSBj/Z9M="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.0_1571033874036_0.9705112953425707"},"_hasShrinkwrap":false},"0.2.1":{"name":"@react-ssr/express","version":"0.2.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf dist && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","express":"^4.17.1","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/express":"^4.17.1","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.0","npm-run-all":"^4.1.5","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"d77397de5a9079209efcc1b7262ff49d07666ca9","_id":"@react-ssr/express@0.2.1","_nodeVersion":"12.11.1","_npmVersion":"lerna/3.17.0/node@v12.11.1+x64 (darwin)","dist":{"integrity":"sha512-NUZFcqkchDCZOaC/MBLEeaOm6xJ+M7cGpUdZhbbbiRJ3ipwTIN8UqWxpnTXk2cEvy7HiF73dMIXOjbXEljdNjg==","shasum":"2552dc3ab5e4a6b18d0fe5e602cf0bfedb1d1936","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.1.tgz","fileCount":16,"unpackedSize":14140,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpBWnCRA9TVsSAnZWagAAS5oP/2EzOCSZWIP8mydS2uV8\nL2jK9/qup5vrecUfHqaPhD5vKHUCOA/mz2dmlXF4zf1DSzic2j2GBiaQpQB8\nK9A9Rrxb6jzqMdk06sUeXauqdxuL3nMYl2MF83R1V2d/nvnUMGF8/C3XeErW\nP23WexKRGsYGa4Ygfo7gYWANUiobX8VYgWnDNLDkmLzStxEQvY/HxARiJ1Qa\nDMiA9gYTPJ2BY0vy7GjwUgHFHWZlQ4T7MIa0Bcq0g0lpK32nzJi2OMVZloOy\nOeSwhpEaXoPljvBS+b+ZaoqfN0NLcto892Gp551xcAhami+frJICxQ1dR28z\nDL6xtdCVfxh8ksK9J26hS5+CYR3t0gd6hmgfus9oRqTOtpHHsm/3lVk3bsS9\n5VGq9Dd4K1SsdR70wTp1uULytFb1Omnj5sayI+JMDh/9TjQHobu38OddMVIl\n8EPxy/yg9kMPdSdj/yL54ziMwB4r/YiTBLwFteVC6tJRiIstrXLCgdvlxYUn\nhQWeGzNdzJYQ6fOymiV53OhxsldL+jrlkiI4o8XExkCltggBvEk43RMIAkvQ\nVjJumqn+7SDMyrjknBpVhAfMFXBl6C2EY6DpG8NsJuVV2Q57ebIPRvhCBEIu\nC7c2YhjhrrqdDLR4NTEJDLtudsnmPyeUh+YbVlHbd+OSWxDzUVnCIWw8iONy\noXdg\r\n=OAIF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCqRGBCitshKTwOnHxJAW43PV1FWhOO6XcyLiPfUweRnQIgCLIexf96vsS3fAPpgiiAbqpviYFM/GwuzkTwkJBFwGA="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.1_1571034534716_0.03886735277552611"},"_hasShrinkwrap":false},"0.2.2-alpha.2":{"name":"@react-ssr/express","version":"0.2.2-alpha.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf dist && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","express":"^4.17.1","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/express":"^4.17.1","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","npm-run-all":"^4.1.5","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"c82a3ecefc19f6371ddcc35b21baf0153870e6b9","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express from '@react-ssr/express';\nimport {\n  Request,\n  Response,\n} from 'express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.2-alpha.2","_nodeVersion":"12.11.1","_npmVersion":"lerna/3.17.0/node@v12.11.1+x64 (darwin)","dist":{"integrity":"sha512-XKmGg0i436dhPHNeZc88CjwwsTAKmtolSYst1e4ul2konMAN1PdWJD4dmRQXIgMq+Ay7fJTD4FhOr7gYL+a4bg==","shasum":"733554d4856175daa4e2b15a4da0b9929b904fa6","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.2-alpha.2.tgz","fileCount":16,"unpackedSize":14306,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpC2ZCRA9TVsSAnZWagAAaHYP/A4SH1uT6QJtripRqulR\nl/aLzudbbaV8G0Fk5rDolvGS4W6iVjm6OETiZqBJcu7rJwZnac7T8yBQOqcw\nRSw76grXKGTCVbS6s7Jt+jOYw2CynZGoAc+EilPM0J39qiFPzi9nb8LqnQOs\n2MU7BJZZj/+24Vzy4LmfdfAlmuUEGen7ZHFELsjVioTiuo8EH/cLQa1VGgKD\n5y0opGcB1CJjHusRF+t6gGLsCRZPJihru2t6elE31yZJFbR/ngzTXmI8KT5W\nop4/kx+oA6ZyVbtS653EYqZiHN3E7BGwesSSzUKYT1E4+AaMKqU8PzSYim5G\nzIojg8eyaD5YFWM4CYpCgy+HHsfpP1ZIMFR0fsDN4ReQU/YXW+B/EZSO0pil\nu+TzvotzMaaYftOkHLfS+bKg/zhHA0dqolldjXlNDfm1D01Aq8ImK1cLku+9\niHaTq1eZz04q88fvmBR1NDt5IpsgYGYClovYa8uOCJp2nXiPoaV8af64TwJ6\nter7ViQyNb5voiP2BGpF2vqRZpAR3djPIfvia4E0LLqmpxvqlKiTO5v59IV4\njUQJXTB385nJPmwpIeAmnCt3tKSwctghHyIHEfSdHiPHVLSN3DyB2LKqiP7i\nPKXevOz93KBf2Uw9W0JrSrmWdaSyPxAnghyn/Q0L7QPvtLFwsUHbZaiKOuns\n5JYf\r\n=I3g0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCTINP5I6p4Nmbv6PpaFN7FZ+JwVlBR5PnWKEjbT58syQIgGGaH4nooZcMCojffo0J2D51wdtaqcC0OLXIbrKCZVb0="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.2-alpha.2_1571040664734_0.6163373057840829"},"_hasShrinkwrap":false},"0.2.2-alpha.3":{"name":"@react-ssr/express","version":"0.2.2-alpha.3","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"dist/index.js","scripts":{"build":"rimraf dist && run-p build:src build:types","build:src":"rollup -c","build:types":"tsc --emitDeclarationOnly --outDir dist","build:release":"cross-env NODE_ENV=production npm run build","prepublishOnly":"npm run build:release"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","express":"^4.17.1","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","npm-run-all":"^4.1.5","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"29e67e36937d62308819eb4bb4265cf878b25e47","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express from '@react-ssr/express';\nimport {\n  Request,\n  Response,\n} from 'express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.2-alpha.3","_nodeVersion":"12.11.1","_npmVersion":"lerna/3.17.0/node@v12.11.1+x64 (darwin)","dist":{"integrity":"sha512-wa5UHY1N4tXlaWcPY5vyGADXu4HA7VgYmIsgDynpRxPrtPlhkP7iNFlIiUPqwnMoNIMqdKO/ZzIho5bPCYNkbw==","shasum":"a9ceac9771c79b755c66539499e6430475e6c135","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.2-alpha.3.tgz","fileCount":16,"unpackedSize":14306,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpC7RCRA9TVsSAnZWagAAETcP/jHJxEWj01lISRZddU9b\nwNo9lh8Y1z2H4OLUFiV5hlZyo+XVBk/cGMBbRzMn7/QuTEDQXTbZcHnOwNoA\nbp4Mm2t11jS2BwLPMNhx07TKubLsyc+IyWwT0xLI/JpmuURpeZQt1itP5RxF\nxQ1WT30Nrujxw8mRRzn+OyqLYhE3zgbM7tkm5Hmxtk0NuGAXNFO+lBeFPuV6\n1qOE7qnXggr1aFDdZG7kvsJ4w6w2roiuQh4s8UVN52Ni9Mz5C+IRzXxBEMn2\nbMVQNF6AbtGo517GScu7anKX+OLXvGULpr9MeIe0ufTAH34bpAoVchpfuu9K\nn8Qd3jGivHh99byOiytJ45/soMqWAT0GuerqGqgcoZrtItvbMzQQgSwGh12d\n3r9MlYiDMmaneY/pD6e7FgnFBhEeMXr/bkzpAOiec3ZxTPsHA7nlPhppxbmc\nZ7Ar4WFNp7CsoacCWDZ1NcZj7oe+BuUJNqyeBu7103dRu62anqYD7vAy3Hyt\nEvjluO0zZ8kS2kLpFcVTZIqWtaCy0MahPICWbBZ9UHL92CT+fdip8B1ghQNq\n4OZe+4m7yh9Tjr20ybJWyEh03gu3pwcVaO1r6WeuqnXdIMyc6fZI0gGVURbp\nRu57IJl/zIEDlTpd29TpbSwtXsBvz1/+G7xwVwNyVq0Fskb6ybaggpXRpHed\nJWtP\r\n=iOoG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEzP/90o/ZB2B2dHQjs+Wx4M5OnTbtxy5OfYQYGbAXjAAiEAwowWArGGx1C1e+G/deES0e08csU3W/aLFVpPwdNdyhE="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.2-alpha.3_1571040977153_0.3965410178670943"},"_hasShrinkwrap":false},"0.2.2-alpha.4":{"name":"@react-ssr/express","version":"0.2.2-alpha.4","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","express":"^4.17.1","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"573019035410e3bbb304301074b5babf3fe9dab0","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express from '@react-ssr/express';\nimport {\n  Request,\n  Response,\n} from 'express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.2-alpha.4","_nodeVersion":"12.11.1","_npmVersion":"lerna/3.17.0/node@v12.11.1+x64 (darwin)","dist":{"integrity":"sha512-ZeCEAkJe/j5VlByIuNlhGe9T32HcOmdyZn7+zryezfNVLlOJW60mA1fqaqCkneJrXcGcMjonp4chTkwgyu/G8g==","shasum":"b5c18e566e2cee58cf638b85c4cc71c0bff35ee2","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.2-alpha.4.tgz","fileCount":8,"unpackedSize":8965,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpDpXCRA9TVsSAnZWagAA9RMP/2NgTAws12ANHh/XC1TJ\ngUKKNu6GrsuHlVDfUx5HkUgfk9FzceRmYTbAVlSZvaDz5Ds7NgYjJMQEjoVR\njgZh41EBDpQrwCPvcbucLqxMMkACPAvMAdvWz2RZUQhS18/Uv652Lm0chHqI\n3RXfinrhT80k11HBNPZ9UaA1NAU22tFL+fRoLy/StImrTRpk9WqoGEqWaR9o\nfih93vT4kmI+w2MVyyQoS97KCW8eKdK0wd8xw443Pud24Q613sNrqKaSnoYC\nBylQdMf2/47jcoj6lsFtJoyqkWtc2tQPKohzcL9p3skvpeTnQXwl4vJ3IleD\nzQDon35CfOhlVqptNr3Ta19+DM9nyr0NbDL4dNBSmTjog4RuD9yPosyL3XdT\n89qFhrC5SrAvFQsIiDvzMtp98HuM3BjLOBr2NtkylS8EBK0ZmAfyFxVTkY0M\nDz4qED6NgAmL2V0VX/95b4l40btKIcM9c+sNyry7YGUpCvN+hVoFcTaVsOtb\niyGixr7wN7rbNQi5dvfKFZZrZ5GWsYGBkRGASY+2sjusIsaZUA4fbvc/E+HA\n7WwuBI0ICCJfmaxf9IOzJZMh63zLP0XqRla4yeVA9DCtxlRwswGumFYqsjsq\nYjK7tWFRr46shNkBzYLWwtIUBcHFHkVpbZiq7VxMG7TuwuFs/uuAw6fiNrvu\nS16/\r\n=AbnL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDvrUH3XphA3i5VsHP7zLfczuHEZiS2IPDCA/bTMFejygIgEZEhRFLXf/+u8Zl1GQJVpqArbwA5RgTH0v7Q0pMO+hI="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.2-alpha.4_1571043927180_0.9287964700759455"},"_hasShrinkwrap":false},"0.2.2-alpha.5":{"name":"@react-ssr/express","version":"0.2.2-alpha.5","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","express":"^4.17.1","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"d6e10cb68dd06e1b58727b4a3b92f90024bf78b4","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express from '@react-ssr/express';\nimport {\n  Request,\n  Response,\n} from 'express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.2-alpha.5","_nodeVersion":"12.11.1","_npmVersion":"lerna/3.17.0/node@v12.11.1+x64 (darwin)","dist":{"integrity":"sha512-qqzVNL/CqdOGNhkCOK81tOTcLkRg+ZVxTUw5IZWQHlwn1AZudMT9vn1+dVljPxmNr5mFRQFxMLKXLnJRbrIv6Q==","shasum":"5f8f8a2444177f13d32a80314c185319d73d5ac0","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.2-alpha.5.tgz","fileCount":8,"unpackedSize":8966,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpDq8CRA9TVsSAnZWagAAQMwQAJPvDSOJPBtA0mPt/u77\n4yAbQF0UJPw12X7CJCTfHjRZK2wz91OjhD2c6rtvfaiCRvZQJVWpkcx7yIxP\nfayyp2NzrCPQ4AIroHoDsKNAFXJjYZb0MzxSP1R3XqfHJEIJ2ky4pU+AjtOR\n1PYIYlVH6WxWU7XRamSr1Om+16pCy4SQnas4wQVn+rHSZn0p4o5CapeAReez\nJS88khEB0ZtsWivx/b6IGhts2VDhPMMdxBRVFZszIkHJ/Oh29DfzjfMau4N8\nR4pzWc2NQ597lNl11m7adsqehkSXeDr7YCBew9JUke04yIdKSUiy4JCRO7Z+\nxlfCwOnvyCHG8t0NLFakH7bChHp4noabBpFuBroivQfskLekMuWdQjsDJIdc\nMAWBZWGE4gH9YY0GzVg0QdGiRW1OHmbMAF85IS1fV9l5i2GHuroVFooHsKj9\nUVdvJaO+yhFqBAya+ezd02RDOCJZQgqDyG0mjHypF39C88DkFU81RfMe9opx\nN4mnF/bloWG2+EyZnpTThyfVT465d0S4cSqZppBfvOiWG268TJPYKixRWq0p\nsPEuOWUYSQ2bMm8HFRvC/Teowh6a9RvQDzTqvdLzNKfKHfE76ZBzSbsuKIME\nSGEiA84Khupx8FXEQoLAglElsd6KyVDgtTq1qe4j3hDlzYAxeXbR7ZWQbA3C\nP6lr\r\n=EWVE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCZ8uato/9GN8tpk8PvxuIPy8byqqdy9S0aRzJjJ4In/QIgIeVmMSkKOgR4QEnDJoSkoatOcoqcKAiq6mef4Xts4NY="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.2-alpha.5_1571044028026_0.14853330912393492"},"_hasShrinkwrap":false},"0.2.2-alpha.6":{"name":"@react-ssr/express","version":"0.2.2-alpha.6","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","express":"^4.17.1","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"e968a5e70518916a0fa5b498ab6253ed1a4e7c32","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express from '@react-ssr/express';\nimport {\n  Request,\n  Response,\n} from 'express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.2-alpha.6","_nodeVersion":"12.11.1","_npmVersion":"lerna/3.17.0/node@v12.11.1+x64 (darwin)","dist":{"integrity":"sha512-ZoDBwPHt2bBmUbSjbbrx7BlP0oBummyOQIQCze0QOeB1l8xhWQYwAqzi50RT9ZAowNm4LuIrJvr1xRP8lpwXFA==","shasum":"b9f141f9307f5c6e3a1cbd916369e5e0466f0599","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.2-alpha.6.tgz","fileCount":9,"unpackedSize":14451,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpDsxCRA9TVsSAnZWagAASRUP/icPQsBLwVsaN90x6/wG\n9ZpUSnje0odseB0QFiEbY+UgGipkwTqQrNeZKRxHNalnNuBKN/G0eCYGPP/Q\nnDY+Lgmn1ay927bcVeLr0bdUyim083UiKOZQ3MnRZKKFjE/A6I2R+hbEnsz4\nDJpmDO9X8vmTi85gW48PTaIm71rtufjLaSuRqJE2zel0uEtUbfeXLJ8Ry25I\nv1UGxKnZme/2WjLCWGVkPE5MuxUXsfrcaMs8uyFeVmnMzgnX9OaQ5CM7861E\nIAUtvFqCq6OIMhtci3MAYVcCyDharS70wSlfSpss2EHQA5ryfUx6HYZwSdij\nKwCTurZjaex5RUqY+LHBIVspubDupYCXvhQhmerwxtg9DBTwYLqoSHcqWJAi\nKFPCMb3l2THExzoOAqQQXXq/H1+UBIR9+RjtKg439qc8jOlOIE8W927cc/Xl\nQMQ7KccRhvTCaV3WQB9neCrrCFT5od1s90ozej0RkX97T5+uin/GDJG5BKMG\nao7ZHs9+0cZSrsclxQbqSttyisPEOkY0BPKqLSsLLgXcPVjAnCpWXvs+Wm1u\nN1alhmT1UAiHzWtZfErhbVNp8TI9dRakMlIamnuPCDkYQTOVX5CuuYcuw47r\nTxiUKu+wYIsRm1o+Z1YPxZo1xcuHG4k8cgqC2tjcghLZtnMPoTeha0OgRyGf\nCD0S\r\n=y6W7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAh4AT1NY0RV0GppEmpzET2DGe6kuuUzX2lVVWhsW0jpAiEAwjPgmhdIzCOxgn67hIhJJSNrHES0Puqg+iCBMlnuq7Y="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.2-alpha.6_1571044144641_0.1068620291345066"},"_hasShrinkwrap":false},"0.2.2-alpha.7":{"name":"@react-ssr/express","version":"0.2.2-alpha.7","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","express":"^4.17.1","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"0124a1239742b3dd7da901be3d2402ee347626a4","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express from '@react-ssr/express';\nimport {\n  Request,\n  Response,\n} from 'express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.2-alpha.7","_nodeVersion":"12.11.1","_npmVersion":"lerna/3.17.0/node@v12.11.1+x64 (darwin)","dist":{"integrity":"sha512-LbXRNfFJTrJn9HqgIwBvl8eEEgGQuDbj0m0TdcV7vRvSbLCHmo9nBorlHK0PmhLYbZz/Q+WZwfcb4aEiV0K0Bw==","shasum":"ee1570f38217e306db858570d030b21b0f8d2a68","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.2-alpha.7.tgz","fileCount":9,"unpackedSize":14453,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpDvcCRA9TVsSAnZWagAAL7cP/iKH26vumHpTjai1USVR\n4ADuF0A+d8CBKy7na6z6RotqFS248QTXskznnsJ2fn83JjIbg1fsklTJH2ed\ngHSvwr/LHuFxyOK9fvUyOcns0RyaGT6C+iJ+6x8yiYFm0UrSQClGot9MuDTh\no/5asaDcbIIjop24yvIzxK9qcbRjkzLmJzKigyVOh1NcWCthYAy3od3mHisq\nd/GyMAtauJmRuoist+SJEO7ktIwii2u4fF8Fu/tOmif7ybSrhQbVR7oVHlqX\nsT5cScChO7OD34QIq0h6ZZJVfnOJ6kPcyYkDQy6c/ti04zmYt/baEI6Xbfzt\nPRrtIqmG3swRMCiHwfzY0zv4C0Y2TQPAyDCSgRbHScHMlvKVZL2ZIVX9eBLk\n/AxnyiVonG7Wibvzc8F29Z8J8j9HA+Vfn0D7XBb+R7L5jQO0jW6f3/b+HK5d\n3AHBpu3/C26hFuQNuGWSoDkk4b180CuTyvadLGm80kaSajc5B37UfKuGSkH0\n6E0wesvwgnu4shfIIMIiodp00pOHzij24M61bEAsIHjMv21GhoQusx30iZ1D\nTo1mehVn8Ox4d57IZl8zj12z4yr6Z7HHpQ2VBpisjXPcPRg5ji2cm3ShtZ+w\nlgjhgKF3xFK7dX+JLsYTEtTVC3INrKiggofzfHxvnBOpoAI74KLD7NbF9oAW\nelao\r\n=7mDE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDt1HO8ptE2/uL/No7640c/+lwM/jrJ1eTejyYk9/n3KQIhAO7DsGsOTLCwqpg1pMAViqzy73uHeTvbVV/eW9vHZZY6"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.2-alpha.7_1571044315887_0.6774953738396974"},"_hasShrinkwrap":false},"0.2.2":{"name":"@react-ssr/express","version":"0.2.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","express":"^4.17.1","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"916d9cd5e84c85e2ff6b3582baeb6a669189c1e0","_id":"@react-ssr/express@0.2.2","_nodeVersion":"12.11.1","_npmVersion":"lerna/3.17.0/node@v12.11.1+x64 (darwin)","dist":{"integrity":"sha512-TpQGH4Nxgtgrh5z1rY/aNn9xnu6NJosx61XFVA2Kj9QQtes/ZAuOdCNFhhECPbVNdh540fTEoXZPgEb/T37R9w==","shasum":"f924e0a573a83452fc2bcb2993fc09b0420d2186","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.2.tgz","fileCount":9,"unpackedSize":14410,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpDz7CRA9TVsSAnZWagAAGkYP/j3cLc5qUhqDZVnflen2\nJ41BxZJWalA4TqcKmAeQ7wXDXrtoA6H0h34Sn+jPH1chFmwSMqDxcAODOmgN\nn7Zx6flPaB81K6V1fep8JNVHwqpN2yT6v9nuW12h0CfL5ZmoypJfocHwW4kb\n6DGF00f1pIh8XZl4qZEy2TvDFGt7yMlZly1MuaBn4jFhPb+2CwSSN+7IVKiW\nGfQAzDbfLUAiNPaXCV41JWvFYf+kPJ8o3lqZpVOfcZIr4mmVHVkVDMxY4XD9\nK2xTEZ3fhC8zfTl5KJ4x/cyTUbZZvxg8DRGAJUaCw7uBJK+jBeIyc3BHJrNo\nWTmMbptc2xkud8ImWVy+FFFfWbpnHs2+XwJh0S43ZJoLrYaLZzMJCJ2QVzl4\nktfKWXF52IvrSW27R4qdaYWQDFQ25Q2LQcsuBZIHe+eLLoAZh9ku6CmmU19Z\n5q3Jj9J0BHZYlwjPaLI5E2jewKGRh9Yq/OahEeFCSefC9yI+PLinPOoAXqvv\na8l+3ULMAAp0ZytQpxlV8hB2+b+EBgLNNzAFEgZT1Xa0tv+dxOnJ2xMd/Mdp\n6yhw1r2BSJRLLXqQThl0T+g+1oVOPfF2cXyx3a1MQHQ7tX9DaHiiPi29cEyx\noFkdeimilFbkFhUYGkPsSWEQiZucIZ6vzi303GVkVeUMZgC0bj9af4PHVnHH\nt9oh\r\n=ZOwr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDNKDAgF1r0h7bf5uODXgOaVDp+7K1ZOtyyuhHQgqhzoAIgPSkVkqFSSlJwCoDZn0brosAsxOg8XqW0uR/j22AJTqA="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.2_1571044603055_0.7589679072803583"},"_hasShrinkwrap":false},"0.2.3":{"name":"@react-ssr/express","version":"0.2.3","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","express":"^4.17.1","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"19b8629a30db5723db9bb54bb1012d387bc10fe4","_id":"@react-ssr/express@0.2.3","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-mleGIcBR2cx38bo1a58GZmFYC7QGUvbXvUbe7jgfa0lQhExGOjWiVWRAetGglAq+mMmbgyS3H1UsKCtJyR3x2g==","shasum":"ede8dd6a7df61abd9c5a1f9224a48908e90316f6","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.3.tgz","fileCount":9,"unpackedSize":14482,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpEYkCRA9TVsSAnZWagAASkwP/RDqqPBmuXiYGhQ9Xivr\ngehHXao3apxAR1VtzMCxtN+Z5d2YpStfSRxzxLFXTuZY8Sqezpu5p+hAWmk2\nUmAJRAz1PZd3opT/mqob1L1/cImQl+tiPbPHx0uUCF1SFWJD2+YPfhaY8oS+\nLW/6y+NXeg7t92Un8n1Ib43Vg6KTT5bIlA9vATi8T1L22aTdLVrnVuHC+pHG\nAmOPdeUc9UaOK/lf0eEaoOUeu1kHOiUG7nya554j62q8sx6actLG6KvqsLmW\nM0ale/Y3oTKBYEXmGecwSEf+uXUNQfJ5KkTVnBHY+25s6XQFBtdjHRhTTV2a\ny9pNHPa/1Zajj3e4VOS28GJu7Zjt9gkSIJrgdURKVNyWlhLC72StGkMahP/U\n1j+Y+EMMJeW2F6BRseit1X7XX/8WGiuN+LlOeX7yYWVEmPJp+5/73SlsJtLt\nXP7eCT+lRu2lJm2KDfdF5CvsaMbHmsP91yeaw4KCEn/Lik5/fq0LuX9PMV7/\nc1SFwQCiUKFcnVvM0Zg9PXRhxBcB1BuNJW7cMro3zve02AHzhKeZ1tIJdIru\nWbMFapnx0yp8fG/EMGbzuOEuNdJpkKGaxFTYwnr7aJlSVTAAUDkpyseaN/0D\noh8ZDIeL2U7j+azjx3Dtcxu9CXrlZU7ui4HMyZs0UgURxDSTwnQ+EABptEil\ntEe7\r\n=3E7m\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCKh+Zs189Gp4n159uN3YOPb7W4QRqcnCBuv8AN1vFMQgIgVeAbcwzfmHrgizQPfseG9tg0wBKuIIyHvk7TGxc4GxQ="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.3_1571046948251_0.9635720528391476"},"_hasShrinkwrap":false},"0.2.4":{"name":"@react-ssr/express","version":"0.2.4","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","express":"^4.17.1","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"b1f566fa2db7b3430a3f1e2c84c9ed449fc5ef18","_id":"@react-ssr/express@0.2.4","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-kv4nFLeWNSiB3sO2QuRZ8Xzakljq7cuRJYKcRtTswJsaOTteZp8agFV59qCO42iGciQsk9Gp0zZIdvhdYHSLYg==","shasum":"809db672a3981474b24c52f0f105272654ab2f0f","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.4.tgz","fileCount":9,"unpackedSize":14494,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpEdDCRA9TVsSAnZWagAAchYQAKTN1aNWMNdx6TcXhvLi\necSLuRkw7TVP5D2m2c1+fMoW+vNbGyCJS3t/29lyDhHolOlMaLKdtQeXfAm3\nZ9SLfzCwKMBA+O7ESPzq6Vp39VUDjH3NmxkJmL1aGjzQAJmmI/UbWFwVd0Vz\nEjcZinybGygB6VI9w3o8I6exTBQPjFDkN/bMYxiHTJNsmJ4l3HIysrVbdrHP\nYpYK5JjX5G1OP67GMw46OUFZ8ZfY18zbY4q5C32YtDPMCF7zRCTK+syD7ts4\nWp4DtcrA0J54hPUKr2B2kLZXr+TadL52HRwHrhA73b9olhjk6HA0amQFJIyg\n6AHWqrGOCk3JnWHNbsYanh3Iob2anLOTZ5AZkR+F1H48RsqZmZ2dlFxFB6hQ\nr+e5/NfHXrxjSnLoqgzvpT6bdla57EevKBgT5ejIOu+m+Dk4qNOjKx9qdevO\nVgl+EFl3DmJJgODo8yG2+AIXIfKfQf9qYDQrHl58vJ9DiZXFl5T0LxOrkOA5\npDBEAnDRC3kQvHo1FKYLM7e8JVL8wpMwqzdn9f19poZIPGxzsefJAdnMfjDN\nZy7gdp0n76kc1kv2gYgFmw68K+R8O//rWPl6NHezAnaov7maWx7d8XLp4VPV\n7KgQp53RBF44c0m2HvMyYxfJKIrLk6GsN01GroA04d+4UlhY90/oqdmCplcC\nti3b\r\n=kub2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA0rTXi6jtWpy8qWPshn4xWp5fewUMvbkGKfPiU2F8HsAiEAsQ/YfRgXHnNrvRO29nQEV6uV/cHcm0V8GT2MC6axmUo="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.4_1571047235010_0.5003340972449417"},"_hasShrinkwrap":false},"0.2.5-alpha.0":{"name":"@react-ssr/express","version":"0.2.5-alpha.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","express":"^4.17.1","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"90f958feb3ac16cf010f54dac71ac9f5b92c4317","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.5-alpha.0","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-hwVBLxfhWqukDPjBC3xyZCAR8qsfXLRDMh/RD9/iCjC/nY1ExV8DOshp9t2tMUiTv/kCoKcXrk1BBdq/1423jA==","shasum":"39cbe8741ae1425fb90a18351bac7648e887b2ba","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.5-alpha.0.tgz","fileCount":8,"unpackedSize":13819,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpF9lCRA9TVsSAnZWagAAGX8P/3e6FSW/CHlCP7zKzQwt\nk32StgPwIGgQ42agjmpdHUac8OKHdDQX3TIcW3zTs/Svtmp3vN1Fw7IqTDU+\n244LUsIDLUI0UeuDLxEAhBhDeb/CELeKndsfkibvICI0fWxUoCKbkHUZQVoT\nXmPp1ZJR5huuyKF8tFA+rXlfyVZ+tBkXI+Y6ssOzZpvblIte6c5wOhXhJvgk\n6+lVUQUkq0/G4CwHxfVgge8iy/7hZl89l6q9PMY/ZNd16Lkff0s8p2AUZlFw\n72t8JPp5IVH9vVI5tAmvVuTW1adui4Qhb4hpMYAsasLZc3Wt6wK3RWPwRs8Q\nHiy4iLcWT5kD53kgvi791BoZuuJj9Rx+EpHtq6KdFv5LJqh3UaDsxCUZqbUV\nsgfllECtocyhsfUr2p3UbIH0RNNv+5Xthu4ws0hpwcsoMspBuNN25ZwemB06\nIlFoaCHd17vNk/rQA9DaaU1qYz7/rFymXrOz4ekti1t+YVsTP/MLMiF5hKmM\nbxJfRSpFmIzDnwSsqj7qsCaSBSQszQ2182bb4rKzotJId+EZT+u8XzamPIVL\nbfaMJMbSRWEMOBIX/+8k9p5pZ30PBjIkvExqp5KtHuxC5FeWC7vI7E9ZM+46\nS4CSujTDJpcJ0y/FY6KADfGRy0EjF+NS1YdDYKllNCVgwgr50gE/8pidupzK\no6ub\r\n=wWEL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIETqOasgtOcWYwLfOn49ozSPLAbaUNW/WVGko+FCs7nEAiA5F1lG2qbRf8E/yUYwROPdN2tHRKN0Onkcv8qOQIaa4A=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.5-alpha.0_1571053412884_0.3356367306654746"},"_hasShrinkwrap":false},"0.2.5-alpha.2":{"name":"@react-ssr/express","version":"0.2.5-alpha.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","express":"^4.17.1","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"64cb050ead3dcfa79743dcf1e457c82e481f418e","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.5-alpha.2","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-cvxZMqbvveCJPRv/iTVXXx+9B43s+EXvVh8yNbZnOzsL1GpsRQbvUGPM1XPAuY4xMso0cSk66RD3EK3iiN1eHw==","shasum":"f1b371ffc478346af2fe2b8fa0d7adbfec4f21c2","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.5-alpha.2.tgz","fileCount":9,"unpackedSize":14514,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpGB9CRA9TVsSAnZWagAAp2MP/Atbxvb9d8rnYbjEvG07\njD8mzfOpDqwgq8aMyekGzjNtMsf357fsLqqpPj1k4+hrlQRbwi4g0hESgBO7\nkUFIb9yINi/bVA/U9V6bCvIdifQZEX6xQgt1JLobZEIVVJVVa38iPlociT9w\n+ZmWg0UJrhIjt3RFzFWHfLH8wPotCAZ0SXxipNfVZ0oPmBdhJclIuB5k/SMs\n9251k35vb0e/lMEl7UvkplhDEFkjvQVeUhOp1AxoYfvNZ5CWdymegfeo2O3Y\n6rEu/Cu2fHFQUQv0BCfWw13kS6KJvlfbPxQ9mHEwSMsvrU7vvTH1JpD1fwst\npe9r9in9cuEUnDnHzviN81h0NGPbgxcKMW7LCNiMmeHIHkHWkyz8HM9lMC7L\nh3hxFIH0bVyDEgllcWuZa5bA/52fuQ7BlEPkZkmOApmIuoHYe2uUYThwQGUU\nFyvLXDzetIKPnoe86qlo11XhEMdbDp0XA9GJvz8W+rDQspl7javDvLhkwv8C\nyaPMlLnMwzMt5AWEo1oRIwCYbGXIYNFp90YW0RyYPuGLIwUSuNKrekcGEt4J\nu2c7SswLCgm+6EupAipQqSUSIOCoyVGAHdcKN7UbVMOPIZpR6GGKgtPxN3Yf\nxXUaIoMjd48jShnlAkTN71jr6c5CQO3ZQBNzWX4FFX+nuU9v8HWqRT3l2jZu\nNQHY\r\n=6FPP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCKVkMzuy2ciN+Um/CfUSgiGVCK0/zfnHu00vGg//QZwwIgQmXFoLLf0MfYAy6g5RhN02Q+LFFwHmTYS1xS9lTl7nU="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.5-alpha.2_1571053693145_0.7152012394767315"},"_hasShrinkwrap":false},"0.2.5-alpha.4":{"name":"@react-ssr/express","version":"0.2.5-alpha.4","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","express":"^4.17.1","fs-extra":"^8.1.0","hasha":"^5.1.0","is-object":"^1.0.1","json-url":"^2.4.2","unionfs":"^4.2.0","webpack":"^4.41.1","webpack-dev-middleware":"^3.7.2","webpack-hot-middleware":"^2.25.0"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"17a9eeacf8082309c8bb81acd9eedc538bb658e3","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.5-alpha.4","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Zozqcfsu1+9KRs7Q/cFlciNFBe3vrjV9WsQhNdX9phimaecfWkwqFnBIK9Kn2uibF+HgtSclMvI9HpC5Ub+rCw==","shasum":"b690e325b983eb48b62fd0bf497f30c66421aaf9","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.5-alpha.4.tgz","fileCount":9,"unpackedSize":15447,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpHPJCRA9TVsSAnZWagAA7kcP/j/l1CjpGU/f+1r14iJp\nTjFRmblrPts5JJsLnjSbgo3idSV8pZwmEQTL71NMFFzKV09CnOFI56zhvqSj\nhNLrFPwyeFGM8Cairc1QaIky447olFus/cCj0qRC9GeEEXF0ZIsMqLRxHIB+\nGAig/pXhXWA8WClP+D6XEckG+kegwmtBD/8ADpgxfumH5xd1QFlVj+FUQCWx\nKiv+olrBdm+0/Uxe3O+zMrtNINLibanwThH795PKsxWbjIjDBpTBbtUSvTOx\nm1iLnAJqYjDJtJjo8e+6tPOCW1jU3QbIQHPHAGx4ikouX4lO0x2bRfAmnlw/\noDlIG14iwIQvE7TRvRqHyZSsRznoKPAFBHlJRazeCezIBXmvHHYauPVgHjR6\n4H05iFfEv2vtqXhJj7djuF3FslkfNx2on0GTQaPAU6sLVDX8Sf34VzCv2lR/\nkcP065IRHKngk9MbuXSkT5dj9eQQP4kl8Uj5H6fJHQoMlQcxRZF+h979zhqL\nC8nmYhAp57iFREXg9UjcD9gEqhcTmM9jucvn54x/t92+op5MwwSqqzY2jrET\ngo17xWasdU6Y1jSTCccYNciLrwviRrp5wzmQp5k0OX4picPHbVAV01tDAdxI\n1myC1b4kdWw0S7e0cu6CzVetEa6TUymMcAIpmhA2SQ6YnUlzcTlgnv9znV7S\nMGok\r\n=K+P6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGd6tRzX+zbnRcMAKRvunvW4p4+NrK/RxamQ1WM1xOG2AiEAgcAJQi6ewGzfY3WNT9xYdMPqOdWJbj6sjWjUglQ0uO8="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.5-alpha.4_1571058633286_0.6819486149056102"},"_hasShrinkwrap":false},"0.2.5-alpha.5":{"name":"@react-ssr/express","version":"0.2.5-alpha.5","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","express":"^4.17.1","fs-extra":"^8.1.0","hasha":"^5.1.0","is-object":"^1.0.1","json-url":"^2.4.2","unionfs":"^4.2.0","webpack":"^4.41.1","webpack-dev-middleware":"^3.7.2","webpack-hot-middleware":"^2.25.0"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"a4f11db62f9d1b1672e67030a45da4dbd8cbeb7a","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.5-alpha.5","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-rhLRMpLkjkKv20XSGf4tKLC6MEvh4y9C9ARp976aVJFxhIHek9cHAcAXjvox/PIOAUQzTJef+xATX2r1jYLWQA==","shasum":"74ea89eb529e09c676dd98131fd06b0882e54bcf","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.5-alpha.5.tgz","fileCount":9,"unpackedSize":15457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpHTGCRA9TVsSAnZWagAA9g0P/0ZuyfcJnyM4fxSnDq9C\nybhVJPI5D/k7L0qFRxpLuoCe1uj6lVnEEzae0tEedePdYRXGSirEkmv3+Bx6\n649hhRShnd4zc6DS077M/+pilafAdA+KSJPgOQUxvIL3TiCNcQpR6g6UAVWa\n+lFUBgVUYRY/jLARxIgY/IHkCuwJDBAQpMOSfvYrFQsYdNtsp18cFU+kxbHj\nmGeDzNK15iWSGolmgK+4ILjDnPKCiBNo+k05yNdtAtnWAEJvN9eAySjoWTyy\n4JqGa+162WUKBMstreWhcj1piECBJ8D9NZR9/GDnG/ftbOVYEFu66F0OhPnn\n2gRjIerQ1Mfg0ff9qO+YpeNgvWX1H82enH4N8jAzLkh6reOORjfRufKgUnJg\nYTgOI62vy03Uue9vZ9oT4V1lhwppbA4HiTiggVACNAEQWpU9X3igjpZ4Zlb2\nDL6GjYYXMRmoRvf87GKGxniv7j+UNJXwv/YzGHZaH06yxjTvY+m4+XQ2xSrh\nmyDD7EdR02S9rtRzlG6N4w0oZpNjvbAkPMILfTKehNLkfGxdLoGWW1u9TcF8\nhG/Abo5JEiLb7c3w3KuZbCRtlyHGKJLgoJyKW/5hPYaQgR77n/SXcFb4r13O\nGcmYQwOAiEby58dizxVhWcOSxr7YPBuMg4S98EUFZseYKGCAkVIh5IXFqMTC\nSEVA\r\n=fuWe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCsbEMoKz4VWmmNUjzjOy+Jb/DY7u1B26vP2ZfdaKx7zQIgLCfLExX+FvE/MxRFahf9TIZLwizCcZNyw7iKLvS1pVU="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.5-alpha.5_1571058885708_0.9239668294659191"},"_hasShrinkwrap":false},"0.2.5-alpha.6":{"name":"@react-ssr/express","version":"0.2.5-alpha.6","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","express":"^4.17.1","fs-extra":"^8.1.0","hasha":"^5.1.0","is-object":"^1.0.1","json-url":"^2.4.2","unionfs":"^4.2.0","webpack":"^4.41.1","webpack-dev-middleware":"^3.7.2","webpack-hot-middleware":"^2.25.0"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"bacf1b6d52d817a5610038f78866e2b8a4a55aa4","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.5-alpha.6","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-0mLlcx6EGRRsJu47OKwK7ikZ4RbEMhkHORn0XCXAfF9WQc01Xlfx5tII5oMajh2PH5IULxu7tN+WpEh7rnPRww==","shasum":"b51414fcf56daf6c3bb19f3b3734cbb8a8020818","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.5-alpha.6.tgz","fileCount":9,"unpackedSize":15594,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpHiYCRA9TVsSAnZWagAARV8P/0rFegx5lQNPtT3sWNxj\nsABCL9d2OE85hsdxTMqo64k9NMnFFvkeVNhuet8ivLvx2H1CUG/2I6xrIO68\nNTXGYrBMVFXNeU/gsJe7IP+FZFwqPbv/b2eq2DT2meOwCc0/xu0lO9NI/Gnl\n1YhR3H5kD6qUPZQ1akBN++JU1CIynKdIRU/pqaGFzgdtj58yTIRp9UdVFloA\nSiwkCwc2OKhHvGfYe7cH+DuAM7ZeBCn/oBPMkJR7mLKZ5TC5/IRJd1+Z5clK\nK+WwqPlvT1/TvEuquVgkB6dbA5gVqN9Bu1Zrq9RlZh0dhsHmCIlrhPxvOKSZ\ndRPmiK2saFlyaHmVOl2xZcp/qax3snJHlsZXi+ol0UQbQnaLM2dTl8unClwJ\nR9cRtvwWk+Nsix7FkHEkvdLK96GPhrQWEkTE38jX0tfQhD5ecJrBsXoipdge\nf9nCTbUPxfKsCpk8V6Hw8k2523A/yV+jqbg2ItosUSoAu4M5hG+xHxfs6MpC\ngGAoDLYYwZQ24afgP0dcBEshJ7FfLjMFWG+/FzdXLelFlevgN1lZDYFjaCh3\ntfXXwS+aL4I4Ncc3tfO0zopmYozXFIl7tS7ST6uMFv5AgG4T6QVZtNsHKwnL\nB/y9/O3wCvWw+IcG3ax48EBLFL1fthVECikoSLAoNVIer2K5OGu0GiiePOI2\nMfAe\r\n=IDMT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIENVzLjoEu3YeqDUT/5cUWQP4pca1Cx/xPa3tNee0MggAiEA5PqfBIVSJjTRLaUgKe6GaAUWeDUJfSduf814B+tl7Lk="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.5-alpha.6_1571059864095_0.66433019748609"},"_hasShrinkwrap":false},"0.2.5-alpha.7":{"name":"@react-ssr/express","version":"0.2.5-alpha.7","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","express":"^4.17.1","fs-extra":"^8.1.0","hasha":"^5.1.0","is-object":"^1.0.1","json-url":"^2.4.2","unionfs":"^4.2.0","webpack":"^4.41.1","webpack-dev-middleware":"^3.7.2","webpack-hot-middleware":"^2.25.0"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"b32228365793e2435f495a0344ea218fe0363787","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.5-alpha.7","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-xr/NefvWzSZvc5wXXheOCVNbe8oKJIgj/n67xGqkQ1lWtRH2t8m7jXeFWy5BdGlkXfLKhOBiq7YYuzUkG6L60w==","shasum":"1f62aea651140a5e469bae2f12d10cb8ab2620dc","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.5-alpha.7.tgz","fileCount":9,"unpackedSize":15640,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpHp0CRA9TVsSAnZWagAALR4P/2+3Zmf4rVnPqM4PccOc\nOJGXBmjKkby/GlFs8hR4mXCzCCvEGTWlltLBb0YjGwacNdaD7LpSQtHi2sMk\n6hZmp//xwW9aKdmEAyEk9Kzh68zsEQADnNADwSFwqTakdcEbOsX0g3ht83Gn\n3BP58ojRJ/5DmLFb6ZsPFAscUXWx8lxtDqJ63nU1t2ovNnga649RjFr3ioMI\n7Hjg0o2XqYa4K4ZrIViyb5jnkWcV47FZfmtEevqddJ/ud2Japr4eukdlceFR\nRzl/wt29M9PCXAl3nxOubs8ViBmJ4e6m1BDC2g8BNhBRKaLikspd1MxQgzdU\nNoo9uunjEiFEpDi1aBiRXtq79IFJ/Jk0vQ23EH5+FOvrK7Hn2d7PNGIZhk7s\n/IGxCJ2QFDOxJOKuurp1aci3+ugBZw0mYSqmKYzZW22PxrxGfRO/BdknrcKm\nkoHA+tYE/B8WXCRNXiemMM+R5dIXGGbJkRdhJIAGfh5jKzHT+Vf5aAMEMSLA\nLVmR0NCQ9WN+LfNFrzVeBoqueYlvotLbndNH66nUbOuAzZkAHvMU+s75VyEf\n79NoxJWMbyuJV4WSLpQnWxwp4g/Q+uvHEP7csSQUazPXnCJjLlBy+UeeF7B6\nGKFb5hxwnzpTU4Vrh8fkO0/3qNlyho/Dnwk/W40YbD+/O03TbiP4bRqd+/9j\nZsoP\r\n=8gtH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIChBWoQYUGVw/aWazLaU9pGdhTiQHpW/cTzWZTKDQzDpAiEA4e0sHV3Mh2GyfICqY7dzbYo3yb/I7+bwes37G8kGSss="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.5-alpha.7_1571060339670_0.08431358322137017"},"_hasShrinkwrap":false},"0.2.5-alpha.8":{"name":"@react-ssr/express","version":"0.2.5-alpha.8","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","express":"^4.17.1","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","unionfs":"^4.2.0","webpack":"^4.41.1","webpack-dev-middleware":"^3.7.2","webpack-hot-middleware":"^2.25.0"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"ca2a06de0e18f932523d189cb4d0eea3b1019260","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.5-alpha.8","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-l/6Qs4oYgZs85MrH/ci0Ditpco/KyXhryuVojWyf2UfAmXinElLHlTJ1BpCcYivY5MtSFqNuSa8j18W/hgFWRw==","shasum":"e226da5bdc357f2990433e63250e3749d6bb09a4","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.5-alpha.8.tgz","fileCount":9,"unpackedSize":15733,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpH/xCRA9TVsSAnZWagAABMAP/2+EZqc+jz0JixI94EoC\nTRVvU93TU878am3eOg99t3p7SEsSw6z61BM0OXpzchSgffZDIN8R/8Dg0Q9b\nuZQZljcRhKA80lpNSMd1msYjUoE5jFInsz8mrPFHo5jLmPi/q4lyXWymNeHo\nJ94xNloLv/z1P2R4CmNd1kBISv3YiMUIseFU4vFz6LlNwHvjBeHCzxBfi9f3\nGdmilgUC3WwWYZ4Td24VYSNeJ/0XCb8mpTIS1090h629bJXkk6aFBEHMGz8d\nfoMAb99TlbjSILNv3sr2bYg6tRFlnELItxzgsutdtRly92whVYbD4CmNm7tf\nFrLxhe9bMABR4/+L6iYIWaMfj6DuF5C4LImzlyJYwI7kamjAuY3OWjguEVwY\nlMJ59k6/XMMG+TqC+KJZo0xLQD4NHllbcPOou6iRnPrQ6cZK+SDABkpXdcnt\nEvVPyN7lEeJuIeLUfgUDKXzwIA6jHHhTJRvXDHeHIKCFSK8fOZnaD6w05Vt7\n4tvmq7Jpj3ofJbuEYoOY5AJqFzetztPW3HGU3TraV5z0kwp0ZSINXM9SXmoM\nn7Zs4U9wJsasHIIKLQ1CIdZqh2wR6PApjArGvPDjuLj7yERlKe/pUibPgcPu\nyRmyuBHD+p9Gu9gEvZ/QMgK/YAZzJq9XxplDRFlJyWRKoltOnBASPCoHBW6K\nh4iv\r\n=Mlxx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDOeVdSTOTvD1UaHcLAmQiN1ftNYSxYxcNVsTQJVzXmyAIgeoufk0zWSEU5N3+ADrhdfZVs3KAsa7RhrOOg+8p24Rk="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.5-alpha.8_1571061744548_0.13358027694692964"},"_hasShrinkwrap":false},"0.2.5-alpha.9":{"name":"@react-ssr/express","version":"0.2.5-alpha.9","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","express":"^4.17.1","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","unionfs":"^4.2.0","webpack":"^4.41.1","webpack-dev-middleware":"^3.7.2","webpack-hot-middleware":"^2.25.0"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"bc11babf30e191be0886fcfb750561723c5681ac","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.5-alpha.9","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-IDqoeeHnrYA8PMydLSf3dejMQJ+PpuK8ofm2RA354EX1XYS8L5n0VMP8OtCsgcqDs0H8MA0m3/MEjVnCkt8TpQ==","shasum":"9928d64fe30524958fdcb1b9aab4736ee3586653","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.5-alpha.9.tgz","fileCount":9,"unpackedSize":15736,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpIHiCRA9TVsSAnZWagAARcQP/0QXpV4VKlmPPrOPweEb\naYrw8vSwJz2bkuAW+NwbwY134AqmSTYMP+J6xs5hBcMV3jk6XhGoZuFdzPlS\n47H2nX/KyeRZO5osjygPk2wbrfbCNG6zAhQDNnzPEoEz6wTwKTy7ZGN73UXP\nKgao0oxzm3Ws/l8W1B8kLD9obwKT1IGZ9KWn5UEIUPXkDjCsEHGIKpeJ55xs\nxxXByAesVPQ+Y4CXu+0eqLI8rGYpIrs0H+3YE//N5R1ykqGT9DfjN6zYK6NC\nAketZPfgX7QkZc6wJ+agoCmykMTlp4tsX8z0BWyftKvKUi720rIOo5VZCO2C\nNRM0tHzehqDtyBeONgJIHNqb+YqA/1yZSRXqTG4z3syA+QWxqG7U9V7CGiUa\nydhLgI73RcNjKOUcE9xOx1o5+NOILT9TKeUyhc8k6PJcIwEMX3PF9QXWDXtE\nBHMNU6mlvfNSossLnL5OOsFZAxvG16o/ScDmKz1y5+KF/D2qluuQXQ+ISPry\n7ZGivTioaNlxxpbbtE8MxL93D9G4/mbpr68kIKBJkW1HKoHp9Td+lbjC5h7w\nHWhN1g0hVuKIZRjfoDXpVMDwovQZ4yQ6JKMK0E+84eVZYUqLawhLhxwPxYhN\nJ3+ZJp2rlydb2y+vHUX3jr4hhHkVYv4jVmwIQq/nJwkWPMEIJ6NJuFllgBqt\ncikR\r\n=JHNd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDTTNum+KsR+0zRZmfOa7X96zGvkivBISFF8XsOLAkEfQIgNCSF+/osG34wc7pEL35P/6TryB3CyYtL+JtX5Y+1IP4="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.5-alpha.9_1571062242223_0.21730903037444427"},"_hasShrinkwrap":false},"0.2.5-alpha.11":{"name":"@react-ssr/express","version":"0.2.5-alpha.11","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","express":"^4.17.1","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","unionfs":"^4.2.0","webpack":"^4.41.1","webpack-dev-middleware":"^3.7.2","webpack-hot-middleware":"^2.25.0"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"d86d8930529e54a62059c466179c89d80c621146","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.5-alpha.11","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-8L1RaXtYGRbCIoynK4zEHHV7XSA0vSmT3/gXC9ZH7jVimj0DnGTKeHqf0lQTmCXAG4RuTIz9MeOQd8Gst8QJNw==","shasum":"8c532a0def49069c6ae8c6d8c74c2a03787b386c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.5-alpha.11.tgz","fileCount":9,"unpackedSize":15676,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpIMhCRA9TVsSAnZWagAAb1sP/iaoH0RDsSAS6cBwbK2a\nMPHPYwFVZx6Zznfy02xQGGrj2p057olFCbmU+nXrUj/QvKm+IwOTBvWC9ao6\nVekhef4fZ/t0F3ghAGxQTNBx0eDNog8I7yDLgt8uGcps95FkjQYRSyBeOoSv\nw4Rmb3fOvIIeiacoKebT4kE0kXSXpd7kVMVw8VNTWYrRoty0mds3YvXcrOCr\n57DxdRfeupAsDjVcAg3uAIMY9fEkTMBFR7cN5t5q1wefqz4KangFojlz6b25\n6tVoS7lg4WF5i/UdDdSGBm+cbsNqdjWyeYJZ4u+/TrfuCtFJCdGT2JDb3lt2\nVoGLC4p5Tdz+qEjKwNjGoLegF2+/SdfwtL6MMzI+f19MuuTCoc3wRK3ghu+N\nHK6KqHIT7iTNYguOHPvTW56/PeDczhg9ZGk/dirZzJAvKpoM1V6dtKVOCAic\nLtq9jm5fAW2inqFWBoAuUe8WOhdwAFZXdfXwAlAOi/spwNeXaDY4m1wDURAX\nY24KoAj08krGjBhziSgFzi1uCHBVSY7GxPZzYl6znCtXVsPXsCqdIFheKQ4G\nDFghFD5jH9Z20mgart8Fz0QEwSdW91qaiBeav+K2dpXZ6mnRrJ/38Nc/XD/G\nZm7wRUH3wNzK9iyAqTehEe0oMiY2WOml9VoK5vSLSBLXHs8ldBeqVifd1RHn\nkVr5\r\n=IWsU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDwfuOHn/p4zuwGETUFn/PGOf1MjNVUv7Zkyu2F4tgHMAIgHVvUNAIpu7rDCWELmFpv+5AcxDAyQUgUK0OapisT74o="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.5-alpha.11_1571062560810_0.40924086985181174"},"_hasShrinkwrap":false},"0.2.5-alpha.12":{"name":"@react-ssr/express","version":"0.2.5-alpha.12","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@hot-loader/react-dom":"^16.10.2","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","express":"^4.17.1","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","react-hot-loader":"^4.12.15","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"0c66d07350d79948728fb1fb3dc391a53dfecb30","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.5-alpha.12","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-37F1zGcK59DBRyaFNU5Vpw2O1ndRnhRF/zyKefyCA5xASQcNfbeCbgGuwzCC9JMz8ZA8XSZz21ylOM0OBnVWMw==","shasum":"4bc12cb1ba5faef66d905947b2dc2eb4d7c3ee2d","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.5-alpha.12.tgz","fileCount":9,"unpackedSize":15533,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpIxXCRA9TVsSAnZWagAAgGAP/34w8ELIJnoHt3XfZHc8\nwmdJDtm18Upk3G2TtZ48Dg+EmWxERk8rqqyE70vlMV4mWeiJBvep3KNzzhUG\nHSMv6a08NpXbwwiLDdoC/onhgQL13qkBGKxd/iBQBAQOHiVtRGfdE4dYldOL\nLRC7Df/swsfKogcSodB44Jky/ieLsgegm++nhTY+jlWl/fvnvg0t8vINAT04\n/fxobFPOHK8ICo3YX50MYYKq2TVfrOkCa63Hz8vMxUnmOuAUGl8Z1av0AXsB\nZ9AxdNwweh4PYxjJBYNEoETZysCS9sjgY+RZn+SzAu9NFcrVwKw69yKCffNv\niHQrRC5oeJ72z2GBgm/f8/tl9wdWOOI3Mc/g9zdz+6a2LwNlKSIoQJ9BHise\nMRIzGx+uCEKbcoin/pBthLP4t1uw3gLH7SVWyIXPv8ReBBrylBSHiKTuIoxs\nujkLlcOwoGyC1g9o23cinl/atZ3Kcu+fHVngmPDGfjjzMqa7FHsdaS4T3M2X\nfKKywNhmm6wRalL0geG7wLQv2U7JWZF8s9DtMlQFVE0FfgSevzoWS/j/NW+5\n/fMb3Lm8KO5SX8Mv4hahUFLyPYBV9xy3jLglzgbOcLZ2MPN8X3EkQfPkUqEH\n+AnEogWaBfcLqZrTnW6Q00BJ/2J111njTv63vRuzzzjWCGwUgXrlL1CxzZDm\nHFct\r\n=QDzU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCZkXBsxW98BdrtOXdZqJmwjgvR0Z+H5QmJCZDl7QNu8AIhALWBm6PGlYLjWy2BqDJQ+xOsc7DqI+JsJBPEWsPtOL1D"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.5-alpha.12_1571064918615_0.7960618069803451"},"_hasShrinkwrap":false},"0.2.5-alpha.13":{"name":"@react-ssr/express","version":"0.2.5-alpha.13","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@hot-loader/react-dom":"^16.10.2","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","express":"^4.17.1","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","react-hot-loader":"^4.12.15","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"56351f0c1047f483db599cc9d708e3cf3e33c8b7","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.5-alpha.13","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-xFGXQGCR2EHhRUtgFnmg4l9FZVgjwQXFR3mdJ7EZ3FgREWK4pYKGOsoBu0QXoHxXUg6HNSTxddnKa4JYyfLo7w==","shasum":"bfa986c4eae771fd921c7ccd0a87125d769ec2d6","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.5-alpha.13.tgz","fileCount":9,"unpackedSize":15547,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpI1ICRA9TVsSAnZWagAAzcYP/i9R/mucNySSVy6xVTdD\nkVpo8v27719daN2VS2zH3q8Wecl0WlLN4cm7PcMQiV1i6OHeBfoSwr5ZiQIx\nZ9x0IPDnTE+nAQxb2jWeXTNgsL0r+u/Xx3m6o8/CA5QbxUMDrKfBsCbcmfJI\nhFj4p3BvFQ8hB3BRtYvIPj1b9hj/2s33LsxcHFpFIAFVqj6XGJvlZk7mvsvZ\nl/q4jrjCQiZw1CCqIiXG8JrUWjkUOyb3CIeU7zFvkU30iQWFWtb86T2xQ1GA\n1Up4o+6TXSX3X59yIRtEiYIyBOmvtLNDDG2Y8pMboRnnFLVeT0mr6X30bniv\n+5IxDup9UQvQKDeV/qqqRjiQMVLKnzal9p1MNlpW2L9ISbmhz1sMlDH/qnkR\nu8ExcOYjIf64JECFdGqqbap2zYT1VJHEIAWBGYU5nbVrxPa1nlYnA9uvusPy\nrXWIBgHJ2xFtT8JfD+2vqHVOj5aQuKK9TEmJ157I2lFJfa7DAdYKcgEjqKK8\njP9Y75uEFsWir+lmCpE+d+ZH4yY5/TKcLWsIzEpEbUUTJ0IUWwFDqPEoYy7D\nJxtSSUgfYzHeQOtSVZSMhcSmaVQXarNhrWt4939SDfJli6P27fuqJbtqEhJ8\nJNLalNvf3NB0A3Nf2jK6JYY9Dm0fgtC0vwi+HoNiM/oFtG+n7t52FhXPpgys\ncHnM\r\n=aPV0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC5ftMuVqGYn9P3RVUQbxxT3mLbXpSLWM//1XGW+fAm0QIhAO5vl6q67zHXMCM1j1XGkYymDXP6mPnpGSKKS5EruIz6"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.5-alpha.13_1571065160401_0.9451383798840232"},"_hasShrinkwrap":false},"0.2.5-alpha.15":{"name":"@react-ssr/express","version":"0.2.5-alpha.15","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@hot-loader/react-dom":"^16.10.2","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","express":"^4.17.1","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","react-hot-loader":"^4.12.15","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"04f569cf3019f4d2f9156d9af43a594ddb9ff986","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.5-alpha.15","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-49KJf/p1YYEmPQSfdupbXR9FnXLK6nATRtk32DuTnxTb1pkDOUpdhom7+/XqQOENbMKGMoiQiig8L40JQt6mzA==","shasum":"62dbc8ab0ea0c8af760948e12bf4c280522b5520","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.5-alpha.15.tgz","fileCount":9,"unpackedSize":15933,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpJCuCRA9TVsSAnZWagAA6PgP/ji7ZeHCYekShqMKFruM\nSghegzaImDIwjkBj1VVUwcMRF8WQrVMDrrfgGihzX4PO3rXhe5syXM1u81YX\nVIz+ON/VPK7+aHM88KTWY0EZgdZTMTRZkhZItqKAyW5NjoXTegY1GV5C+dDs\nqAlLsUSFHADxhvgh6zo7UwYLz90Iqa2IJoaa+CBtb0gF+Lfp6Tb+ROp/0r/k\nb0q8dD70/l9sn/T3egbgnTHjo9Oh16+4vQw7K0HSLoE+IEtatkc2x8XJ1nf7\noQ4HnrkxBxyEobJZDpY2T8FqztGjAif2yTzFXoaSbIDIBXcfSSEj05tnjgCx\nvlBHdClcz7djwLcsF4EJt71gywNIWCSBB8gawv8/Z+EyZp8VK+qUTobnOgws\nt6vPYv6pUxdEksswdJzTNZv8+jCwoBh13KY47VK80KOoqPfcJ7Kc4MpHjOJj\nsa+vsWaxFHsHcuU3CnS4ZoMEeeBmgeOcGaRzj6R7lIt0RRqaWkJHpBNIpY8q\nq2+HepnPCqER7EpAk8qBTRaUPudbnOQrDmQOt9AzbkgBARoB2e+ilc08i2Z/\nuYu1Zk2u3Tx1gHS/iMkX8UcsbNacwfUddureQ344WwtlV1tVcH5YrC3egrdQ\nP6NEtsx/Bdu3sZfe2gA2DNPgVSumF6W/bqHY7tzbMS/TtFnXb6LxfZvV3uNP\nhXI4\r\n=UJQB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD38+H/qF7D+IlUMaGhDCFJEtPEnJ6/1XqwTX2//sZa9wIhAJpUSej4Mja69kQVbG1xXVBBk/ijBG5ubb8q2EMSe5zG"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.5-alpha.15_1571066029757_0.35993908477360925"},"_hasShrinkwrap":false},"0.2.5-alpha.16":{"name":"@react-ssr/express","version":"0.2.5-alpha.16","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@hot-loader/react-dom":"^16.10.2","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","express":"^4.17.1","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","react-hot-loader":"^4.12.15","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"4581f89ece98ac31eab4eaabc8fa959a400a01bd","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.5-alpha.16","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-DDk6o4cOTlivSCF4d2mzVac9BkjXFfiC6tXk7J3mFgsdzCkoclFHteK47esevNmmPrfIsdbN1X9rVmnZGcGGBw==","shasum":"1b4077bbc4d10081cb71debaa42f937c9f745793","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.5-alpha.16.tgz","fileCount":9,"unpackedSize":16216,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpJIcCRA9TVsSAnZWagAA4LgP/2xJ2hvj9qRtxmNeqpon\n/GPwXCY8RaSuKtSWK/xaoXrrjugouFR4sSCyJYMgzqEhZx5FeJvKOztH2b6j\nZdNL6LzkQV3YfGv7gnFCri9GQfM1WDI5q3nlR/xWsNw8Yc0ho1ni8hcVZaM2\nSXoJWA+TXwpXCWSBojmSaM0rzyuzCeiJVJjhQj2/J27qzXuir6/bjkOkYvbq\nqigJb0/c8kd1lSD099gqRAihfEIYdW2scQVT1m5xpbj0eZYQnZ+m436vwnSi\nzM2CqeMqWBSbZ0RZS7lCKKZKg1dVqXYdpwcaW99CBEpVDvI5dIMpYGH5qOkx\nn5EvWU6XUmsN/YM10lb+eaJvHQP5on6uQoV+R6dsdt8mlIVALHlu4oe+M9jR\nzm1rysfeZ55on5sjZyY7fzj/sEmxAstLVe1pDeEQKd8+o0e3LeAhCHg+/yaY\npF89xKeZi8DQcK7aIbu/oYlfW5IQpJNTft6xFRtW4YVCkrYL7Gl6BdLJnne+\nWxnyCFOFRdHhmOOgPD+cnG2fUuHZWQt1wes+wSABXM+O7rTyRm6LcjTu9Ei3\n09Yyb6bn99rxLdvkvWm8cFvIHFYuQLdmzeD1a5H6Q74s34svVcasG0Jt610o\nEsLSG6f5m6O4Sejyud5iTLHbJP3XJVH/auQhLkdt1gejanRSZ0VqwtWo7ryn\necnx\r\n=1p4j\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICxL/pQBBOKHkfUwhPSfkZEyPOZjysDebcI442rc7pqUAiBVo+XXb57o3RtcHd9rJYLqK/7vaOPsLzVzROSHjzZ/zQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.5-alpha.16_1571066395875_0.10910528013502097"},"_hasShrinkwrap":false},"0.2.5-alpha.17":{"name":"@react-ssr/express","version":"0.2.5-alpha.17","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@hot-loader/react-dom":"^16.10.2","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","express":"^4.17.1","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","react-hot-loader":"^4.12.15","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"bc8772abe6c5eb12294602020d6c02754e708796","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.5-alpha.17","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-oCg0BQCH55M+y0FWhYe/PxjYLHbHg8hr4Odz6ymErxRCMkBkMmsoqu/x7BqS7tgwrJW/uEneK864Al0t2b8c8A==","shasum":"0bf65d025504c5f3d7e9fb54e6be04f4195ce0ec","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.5-alpha.17.tgz","fileCount":9,"unpackedSize":16208,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpJQnCRA9TVsSAnZWagAAU4oP/0pioYuSzHjepgP+qkNp\nqDVIKdGWTispZDSXDOgw0vc1vBiKsmR0bQ+R1WOt5sfeSsvoISPCna0EYOHy\npPJ5J0WaCyiP9jGC+QCZbdy78CtX4+0O0C2vhrQHH0sDnU7Zopd1nmMD4/06\n3NwFsVPGPeCB5ZMWnRD3qGSd3yvD2CO5FVwCA2a7B2xR3KGFsVxE4fmGzwoE\nH3dhzyA1rhkS4MHMbUrWtl6Dd4UQaQ4hsuJzkZG7PCgUxNT1nazXdTTJeZBN\neyoVK3HO37Bx/OhcoOt3PXmzLfSAPkRPfaNrShGWS1Hkm3DOTjuq1ffIyEjx\nCLX/Sf9wl7gTpNY+qjYCVYqWDQF+5JBvnYIA9hAEaDPCWTe3XuV6PXQ174YO\n+fpZPRKJGct/KJrnVU3XJOi8Vv5geioFHAMt6EkVcQ8q9nsg7kcFFIOZPLOs\nJomybhoEz+xmTS1Q3VCdaQCPQ73OX5BFupfY8ITIQ10cvceopvI2dZoObU8Q\nvgq15Asq0ZGThamDNRag+W6Pzzs1iELNJXhrr+/gtD6rrHHrJO8mD1JMzywc\nqvxktx8kOzX14vc/YzMnJmZMOYUjwANZu+64whlwDgSB7M0HQCeZ712gQo5q\ne2GmHbjfoR1jBqu9SYxEqGbRf7Nlk2L2xGSZlre6rBl2xHy7Bhto+Myfc/Xb\n6AAk\r\n=bdEa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHrsfVdo58tOmwaf6u6iUx1lpq6A5IP7IG4HXKOe+QEyAiBGutSapgiNhJisqk2VIcBhjAI9SjY3Hdhk0vfa/XoFvg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.5-alpha.17_1571066918954_0.5346810616821931"},"_hasShrinkwrap":false},"0.2.5-alpha.18":{"name":"@react-ssr/express","version":"0.2.5-alpha.18","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@hot-loader/react-dom":"^16.10.2","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","express":"^4.17.1","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","react-hot-loader":"^4.12.15","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"4c052de87831dbd38fb24639b302193a8187c947","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.5-alpha.18","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-QeIlI4mrsEgHs7SB0bKVhQt87VAvGak1NBpnu8TDSlGe/H4Wl27TJkgyZ5tmibOpWNQu7MxSDWB/LCTkNpwUQQ==","shasum":"de979c9e1a4fb2d241f8e8bc5a8854e9a3262b1f","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.5-alpha.18.tgz","fileCount":9,"unpackedSize":16238,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpJXsCRA9TVsSAnZWagAA9dQQAJDg4RBn+vWC9p+/DE8H\nv7M66HjLWOFf/c6IbUHRJouH0QdxJ4gCt0xhTPxAF+7D+USm04sRRCPr2Gvn\nxcA2Lp6UkPxoGFbicEdsWOE1kLjbG0uIL6WzpyrjK7x7EDNOeoje6xiVYxMU\nM7A51PEb3r1MSfjZ61L7fphWjlB22/sw8TIPjsNGtqSYetaQc2/Y2Dav64XY\nM0c20QLIt29AwLqxKdWe9turlOx4xj00U1ZmOKRnVDR4JglQIqWjZBEeahSs\n9y8H5RusNchy+HVUTDhrqEh9yd46X0M4O4CCxcIYnbKZnLP2tvg1k9XJ7f5y\n1IZXoWCFurJfSN3TM3WLpIkMPTm/fOyALb7Qb/sYLEC5fWoPPiYFW/QIYiie\nsjXq9Zy4vH8MO81XAdAEHGDNq+/JmzoSmXM84s1bYhhpBD3XZx/0wtcIEuvU\n7pLvM762awEKD4FcKcRd3cO0rzrF7oQZqdq2KeK5wstBAY/xNCpS3wNbY5Yy\ni6Lv9g75JN5jNstcoXdr5IfFTSVYY+irwWlOG8EI7QvLjsNvsI81H/u4UBac\nLOm8QJ6TBYtwh5+KbzvY1DYrlXuLsdHR0/LfDDv56O5KLYwxJaxfpdrLXPuK\nPD4YP1plF5AmR/gxzqNMXUbK89EGIJyWnMKLfOGfiOiHm0ncRqR3spRXmo9K\nsR9M\r\n=vK4x\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDaA0tPQs5Nxx44Q8t2Y3GtqEzP057S1g/gjLDXfuteDAiAfwWJ3sVPJaq1jIDjDb4FdLEEurFxDJvPeqUO3OONkDg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.5-alpha.18_1571067371959_0.009803341378404218"},"_hasShrinkwrap":false},"0.2.5-alpha.19":{"name":"@react-ssr/express","version":"0.2.5-alpha.19","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@hot-loader/react-dom":"^16.10.2","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","express":"^4.17.1","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","react-hot-loader":"^4.12.15","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"4d2dd9314ef14e13eb08e79b23200076cb95f8f5","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.5-alpha.19","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-ueNYrjE7grGwvfSunVkVxflgMid4Jquo+l11qNbulMgL1ZopSDpqUB5UrHu1KN6uyaDvYRpKqgixrcvEgGkKiQ==","shasum":"a95d0319047f7a742ac271f8c835e24396584677","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.5-alpha.19.tgz","fileCount":9,"unpackedSize":16455,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpJdoCRA9TVsSAnZWagAA0ygP/2KJ4xAggUIY7/lxgexP\nQ1Jc/YWmYtxEgYcbKI/eHYl1l/fMiM4xuWxfhBYaBLGD1u17iZnMWZjjvMd7\nlYsvlRj6LqqcKkdaN9oP07zgtEbPJ9Wnq5bnh4lcCO8CVu++ojf13twRYWrt\nrVfjGTh8va5RzJb+BF723+tzakjuatcyzbllTLBeis1awaMTgI/akdrkjwJY\nC0hne0rXDHuw8mxwCdfxvYh725KfHcCzz51H6IiJntDF9XdjStvTQiZe/9oT\nV4KrJP3DjyQnIkvdHIbULl9EA2OBrPPZOLg2IDQTzYF+APhYf8iPgFj456dc\nqTjNzHzs0we2LaSu0GzuyTUkpi2GMUickEkqTrDqa5m85aWOhj1G1GV9v/bI\nbLJoe9Gc/jHmMQu9vcJkhtDQLDW3B2tdESU83TFQ8yVxi4yjjmfmwNji9ovP\n0/83T/1bQZFqsLkG7rXAOJpdf7UU1PZrhB2isORSxJl3bdbV7jXJdAzFEs3N\nY7IwD/ldGy7hlqGJhzUZzlTBqTGoHGGcESWwUMvY/xQ1p6ogV7Gs6wcvHi71\nWI7DZpkwEzJD4OhgyFEhOdN9MnRDnWRsnNUtWuT/7B4ZBoz5gLN83encuKws\nTkLAIRF/eSEtA2tE0MXlnRBi60+TzYGnJzc25eZyhtUCwGs/7D2kVifmIFQd\nU0Ed\r\n=k0Ei\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC9krwlDSwpM1Qgt8yzCLQGsMoU7fTKbUd4nJBHBBW0UgIhAK0Rd6FZmcB0K6sVj3Lrf+7S83SjxI19QhpBcB/jdVdT"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.5-alpha.19_1571067751446_0.47111830949062283"},"_hasShrinkwrap":false},"0.2.5-alpha.20":{"name":"@react-ssr/express","version":"0.2.5-alpha.20","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","express":"^4.17.1","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"6377095154a5dd3d5d722ab035776172166a691f","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.5-alpha.20","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-D44s8/y/Xhc0N+3IurqxTqGSqnP0NZjP7HZ60ZobZbKJVeYP/upnSbP7lJf/pt+5KnwbKaC315IT6CQ2xBq/5g==","shasum":"8c9997c7f61831048b7043773e65db2e7cd77b28","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.5-alpha.20.tgz","fileCount":9,"unpackedSize":15782,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpJkGCRA9TVsSAnZWagAAhooP/RwtSpqUQ6gNUSipikM0\nNBYeh82UWF1Y6gZI1f8Z2oJrTehIZU7Rf3m2l2TB1HNAHTe3Llx9qaq26+UB\nmps8lgXJn3HPudQzNfd5SA+7ujU6xCq9b408qldp3aIANCvrM98b4hN0z7F4\nkdYv8MuXt5hlwaTAKehBxqQMuWWPiOA42rhzufkjgvQgRIfN2coII7Cl0NAK\nPHaF/tOD6ufJHo1RU3Br/TOLK+Cc42XOfqhBn/o0lR1ub2kPj0OXtta/vN++\n7fjRZ6ks7U8XfUbLqkNDU6K66M2Ob9u8Vg0B8cIq1G8i/1NjsYZRKXs8L8HM\nc5DP3EfO+N+7l0HkAPm6DpxKiklHU6oyClowqIHfZGasr1VLV5fPwpP0syqc\nFGexp/97Ry0yPFPDkFY6eRa+ntS555sfnfvD+lmCJStOTuQ/WdbYFIJ2CjTx\n4qjwxoWnAgqPeVDYrqao8YqYgN8hpD2mULMGUs1pfz7cV/49qU0sB7nXKXYY\n3h9jwq1Jq2ycDlQrqYByng5E2x5KzHGYkkyGx2Tvu8C56VS3KOYVUKIYb+c0\nmN0Ia3G/GzxaI5gUiarXbvHHQTxsqB5h/KdStFWdPuKuzJeqgHrKU2x2ohV1\nNWP40cmwRAw3Zt9HS4JHnUXJ+ff6jU0Zf/zhwC8sJkVOKOrGodMkFQxBQ2/m\nigIy\r\n=cKQt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA0flTjj6viioEhg7fj6v+6cQOYra1Z9A9/JCsL+w1SVAiEA4h8LrOQbgZSigSGCTtSl43K/wSjIhknP4lAFUdB4Vy8="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.5-alpha.20_1571068165665_0.4667551874335565"},"_hasShrinkwrap":false},"0.2.5-alpha.21":{"name":"@react-ssr/express","version":"0.2.5-alpha.21","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","express":"^4.17.1","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"75535a4d5028618e356e17db5f6fa4e30acbb648","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.5-alpha.21","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-NsJnhRhV8sDl6PYEGpAnuBbDbw4DlHu2M0bOMGp0RxFRkH/TNpskRgZStg/eoCfw95Gl+8OVBP2XxMvqVUGq3g==","shasum":"cd3db2449663f7e43414726d3bdcd81a13c1708d","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.5-alpha.21.tgz","fileCount":9,"unpackedSize":15794,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpJu1CRA9TVsSAnZWagAAvxoP/1WHthX1Q7FiSH9DmnU2\nNpe6R+oufOJeY6guQ5n/lfM1nmBnFv+NQESYuemE8Wxe5i7O9sE9JSSGPQFW\nJG16A4kNbIvREY29AInXOSpXyvwoF4j1fH+UAQ/EKVEX4mwO9AjiQnANThLv\nl47Kmi7iE6ADRCauKexOwsno00yt/7IPTwB+xvEjjbbXADw3TTo1mF+Hq2bN\nwmIEXQDuR/meeDoJO5rvFfRSBLFhmkDU33iT5++Oh+Js6RasOVvXiB/XjMrE\n7f69MjzUoISf1gGZmqCd4sWQN2QstjIgQY/qRx9+VH8MBwcZFnvOd0F000BQ\n3TgY6Gxub7s6+oNaY+ITcDm8EdGMW9M+qVRpkSwBypPcf+An7sZqLunIqely\nsaTULpiG9A+8LiBYHPWWbBlFGjEBiEmlsHhuwL2Clj3318tauF9W2MBgZk9v\nxwEhIdL8UiRnoHOkUGtcSQIx0DcttvTQEIwxVR/+f+hQjAYOWo8FBdHUHYae\nL5Lauin1Q3hSoQWTKBHTSyq47ObQfQ4/90rUCavfgiCJvAd5i03a306AIZac\nrvbBwp9ILd1zbwEZV7Yx5vGAuAvG8HlRJO9MDzP59Uc+FGAHCurIXnKLkPDx\n09hit6UbaDkht9+f2WpSJn8gwZv2bQsf2Egmrn8PZe4evORYp79hnOvBdMeS\n79AI\r\n=RGiQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGWWOtNrU9rkRLtp3jVA5o5QXWblKYU5qvHitQDwCH5VAiEApUTz2pYoqahi+SoM6Tk7326gA0F3ZZRW7qVxZEZq6KI="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.5-alpha.21_1571068852509_0.6544240750066757"},"_hasShrinkwrap":false},"0.2.5-alpha.22":{"name":"@react-ssr/express","version":"0.2.5-alpha.22","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","express":"^4.17.1","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"1672aaddd98701e8f9741fbf61f274b422b61f8a","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.5-alpha.22","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-7DAsj4y6+euTiZAAB4bMKMA6M9tWl9XvY2YDl5wjxstp44nhMM+GtFH8fYUOHyzXOirQbSNyNP5Vr5TRdFVUFA==","shasum":"672a83c1cbfc7cf78b57cf7f9fddb33211bc6901","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.5-alpha.22.tgz","fileCount":9,"unpackedSize":15802,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpJ0NCRA9TVsSAnZWagAArVYP/0ndF8ZMPkI3fjBa+6fh\nZuNBvGtyAh6k94BUUgXXt5korNtrXdsSgWejsgY/L1cO2F68wvbS+JgPkOo1\nIwvy3g+do/0eR9Ix58yE50OIrocH98OpMYN30NDJMPMaF1UbOWUHPTkwOJDl\noxMKdKPwZLubK9T0dQA+A9Gjm9L0eJfFKLXF6pq+5+YgrILj+YYHN+Wu+RJW\nOl8azTJXviO88VtlXDiey6UNTrIUzF85FfkjcIcKQMb69HzrVinh/2Fya4KR\nvdx6bnKBpPKA/xjYC/k8R6xt+Gci5736SSduYZuZ3rSL2YPRtJuhvHyzBLGJ\nz5l8DjUsJzk5Q5GS0s0CAWPeqdOIXOdBpUIZKp4BRZM30r5ehi0SRalYuFcB\nghbgdbDHPxAyQfWo84WKfEYoGBTga642fw+2uZ5o+attNtFAGZ20PdazxiFr\nQGln1lGQzwS1QL8CxiLD1hG1JBSS7Dk18sY+6LmzJ5s3KlatiAohLXgsmjOU\nV2xW8ogSRhcibJVaxV6XqA2zXQMJVARuGNOG1e8pS68jaf7i8XRxL3xmeFUr\neVlGlBHSu11h5Moe3zYfzrD/WsvlSsQpxOMcZZumeZJQJvx3xzuHpFefdIk3\nCRetmavtu7lgVnIChmFPkM5MDXd1AJdz8EGhNjW3ry5vUtYnkoZh7kuH47Zx\nRTXc\r\n=sOA/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDUQcJv9o2jj1wg/ixEMQmqGc6F1b8HbHN05XOi8ttuAwIgewXWT+3jpglB5seAllcJLTnQ8yQLRlw6KKeBhbDSyYg="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.5-alpha.22_1571069197160_0.9221143312900262"},"_hasShrinkwrap":false},"0.2.5-alpha.23":{"name":"@react-ssr/express","version":"0.2.5-alpha.23","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","express":"^4.17.1","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"e0899545958176400a09851c9604a9b16f3701e8","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.5-alpha.23","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-j4OQiX+njYHM12hEPu3CQPl05P+IE+71AuQqU/giHEwGjOBK2MYNbohK0RPZIUl9mJAoujxwgqm9eKcTiPZhzg==","shasum":"c5c13bfb1df8f28ef7fe244e7a608dcaeaf187a6","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.5-alpha.23.tgz","fileCount":9,"unpackedSize":16621,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpONPCRA9TVsSAnZWagAAG8cQAJXSzisitgj56uziEP9i\nVdTbx1eevw8eCyTIjDEZSOI9lV1IJgGOZlTHNTu4pKB6uoSPl4eKSrT7mUcg\n6E1TdB8WT/QBKXOBKrZdc560U3Y4sTCtgo5wAGraOT+TnZjM3aE43T5S8ofQ\n3eV+YOLGzsNk+S2dHdWuwXnwRkg2FBN7kmyEM62lKXWIUdXBIkoGjnDqHQzW\nR9S4q+jGppiKpxiyYSzPMGyGEZKvURmao+ieio2r+6gd72utoe1lUC4H77qh\njeJJi5cxn+qcT/FwuyPLEkZc7eJEjd5zCzXi5/zVEItUxUUGu/0negc9IDX3\nXIC1k6Mrrx2ZoDB9ZNk9finle03yqsEXKXB7DmrUUGBh6/ntmouoY5IPp81N\nClNQ30Ix206kIVWzDh9y8DBmiajaNIdU42IojIcCia2i5yTt3PpbeLRvhSOK\nWtBT3PyizApAVip+g+A35NOH4SekuFmw+jpQozcgSu6/OGVIkZYsbG9vXgGy\nrI/78RSw3zF1b4/VW5fJDO+FxXqpVyEASZuannjmnDCCyn32JN+qT1SBJm/e\nVjcbZqbKLvLQDFouWtpMSH0Sf5AQxMj7Ns67nXl/QpEodTtrcyLRsZNhWPrY\ngUBC8zFosVl26NVgyp9K2u/AsZf3nhcjcsp0ZTxqRI38iGhfgqWv5S7qWZDI\n184E\r\n=12Bs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEjty+KqnGDjLlmtPotRMTIpksF5ZbKJoUtCFlOgKBsnAiBf0tj9CpR9sdeDCPjNeudLyWqqvAgk7A1zU0sZZD09/A=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.5-alpha.23_1571087182956_0.21358254100111718"},"_hasShrinkwrap":false},"0.2.5-alpha.24":{"name":"@react-ssr/express","version":"0.2.5-alpha.24","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","express":"^4.17.1","fkill":"^6.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"1206d1a5d20f57cc9dc8f1f2ba8c56d45eff83e3","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.5-alpha.24","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-hhMc09I4flP3x+AsOCXi7u0rkHYodvZiqBcV6S62TmXn1rrvHoK0SiEoZHVpBfiMucpngKYjeBWLMfj+Mkj3TA==","shasum":"e115d09c73f1e2700abf70c55b9962679db116e2","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.5-alpha.24.tgz","fileCount":9,"unpackedSize":16690,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpOXsCRA9TVsSAnZWagAAtZkP/in6Euo28VNIHk2LNOYP\n4MYaDU6M10dnCmBqrqRUroTMPlyPbrCAohV6DVzBYLv08WWwQFRtznp0sKuP\n0pnnfK30daZeZdv2x54B9irIx0VNK8V4oM49rMYKbhifzq9BGhzr8N7/enHD\n+ts5VRHyUQyNWuSprG0MVoP7/k4j9tPxYIvzQ0nYY9E37zKJ3u3xKOJ3kjtl\nnNlimPAmuleEaHuLGdByc3M95BCeEHxT+H7oU+Af+QAoD3dAyVEapBkD+TS7\n12NbjmiOtsWIG279Djye89noEJMPJ+8T+zPOcpF65FwNoLhb9eTZFp3G0UKs\nxjjIwpcIN9cwndXhHSpiIF/8lDhIJ043TkzPHgqJEkaHq7FYqR9c9WgDTxCM\n+CnFlRlHLU44xKsjMxBG9jsPuL6OyOFpraRaB+GgJWX/4p1Rz+mCVX3G+q9x\nEraY3LUWKpGC3t3SSCYnLjteBPAfgx/mrs3YR+2/JxnjT63m2u1DtpzmXc2r\nBAHwh8MF0/lvHzbz8V8GADo6hALVSXVJVfOCDkCT2MncBT9i+e+jpRhlISrq\ngmLJar10d0SunmHWjfNTt0X6uXohcCfw8boS0ZteDVsi4LHgMDL44bkItCgL\n+RXFKtChuJoRcGFNfUp9zB326YuQiq3SF1Z8FMtDpXlYaROwQ9919tDqhmFi\n9n1V\r\n=Nmsq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID2XhJqn7nnafvwu5gfjYWev2hVRBEkqy8RY2ejBMlXmAiEAszdrF8G0KEhpOKXT8GIKrSj8qhnyzgFrHch5efeOGPk="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.5-alpha.24_1571087851412_0.6549240464390924"},"_hasShrinkwrap":false},"0.2.5-alpha.25":{"name":"@react-ssr/express","version":"0.2.5-alpha.25","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","express":"^4.17.1","fkill":"^6.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"eef78981726fbef0f93dd546258d0580e041eb95","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.5-alpha.25","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-HEbYGiV35FVg6KRGERuoJeto7Ybpr0461bJSJnJfJMhOVr/jQI8N22Qn5uVEG/qGT7AO+romWW0FvRL9AdgcZQ==","shasum":"294d99640ab67871d09d8e781af18bcd4869b6a9","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.5-alpha.25.tgz","fileCount":9,"unpackedSize":16679,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpOc8CRA9TVsSAnZWagAAa/kP/icuf7cWlg1aKJETwHk6\nSZrioLkOlS1xxqIvki0iju2FvZM4CH4qkWICtFPZs+NkK6+b6FiDIlVYShrC\nZBiEDhtcVM/gxrSYo/RGcyT/j+uwjh0p1czLCdvxa5aPJCy6hLEeptqpf4dk\nPv1cHHlKgf8S9emfhssG44zVSQtlfItfHnWgagdW67OEactQO+Xi3RiDnxK9\nwoLS6N7r2GokPQpeZXTHvOMsl6uQQkIKSZh9j8sW5fmEH9s15+o8JRKH1Put\nGF7uVmZEk+ug2FTTsYp5sYWJ8wzng39wu1jUkRI1whuOc5DlBDITCJkd00hT\nJPwJFgD5kI6kZkfbiocPfqyUiVrGBRRxz5IF2uTFUChXUzno2t7UwIk5k3rj\nyzteZt9uSNw4Vrc3ZuGQT+V6lw55PJPkyNA83cgGaqNtslu8rv2CoPYSY6Lw\n1dENz723ZEFy4NYZkLf+W5e1opvD7JJU253jIrknPHT3fBFsPVf+u25mchEX\nFgykWX5EGv+0C7XDXeaAxzatqdhS7leyeIWLFStT2gCVLhHpif07FjvKt+B6\ni7LX+FydBLvjlrnQKmYPZXZy8jFLZ3EDZgSM5NjzIXRjyHSWfmzkS8rW2SMo\npbLkPOVxwKWlI65RLdk9W3c4/QjgEupc5xqlO5kSOAeN2KTxarBdd4rxV5iT\nN4j3\r\n=Kl/C\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDfegrqCGS8FI3QL9OGSjbNL32c/Yn/9p/KI6PahJWHIgIhAOxudcUtOp3BscLHZpZrVHMQcFoP05xwm/QRX+SAUm3g"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.5-alpha.25_1571088188236_0.2324239143307727"},"_hasShrinkwrap":false},"0.2.5-alpha.26":{"name":"@react-ssr/express","version":"0.2.5-alpha.26","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","express":"^4.17.1","fkill":"^6.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"76ba553411e73b06ac099c87459dce6f70ef6745","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.5-alpha.26","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-4zJw74BGfmUp4nKb5neM3DKYLXkW7IYOnzNtufYOLJ0KTPo1NkzAKrEQNOILGXBBHmKprhWEo5Cm4FX68LmY4Q==","shasum":"8921e98fc0b233bcb0ff4a8506ed849177c5b40b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.5-alpha.26.tgz","fileCount":9,"unpackedSize":16591,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpOu9CRA9TVsSAnZWagAAD2kQAIuj4oLyzsZqdLvPhk43\nik4PxRJNzAmoO+r1kZMMZWmh/kyAX75PCetOWPn5wBp0GCOnnefMH28qO8kC\nK2mm0iU4AsQc6hrISYg+ESsdz7JVfmHwjyUKD/kAhXILE+GqUP1pKLcf+57e\nQePg35iYDYaOTFU32vbRS+0Wpqpx2tmU/Rs+vlVpqgSY8cS7qY62jwZfN7Ob\nvZWToFUQ9j3IPY/v01AFxCxLGDd+HLz0vXy7QbzxMXXOO3cJi/+XaE0WYG+I\nRmTmCDIzdHurXKYj4kXAJkzWxZbB+2/IjbAcb/zNf/98sT5QtjpwYnWKeueL\nuHww3x5Cb6dBboAkoee5LSRqWBCA4K4EosCbgBXI6vKmuOPYDuTCCuELJ85V\nlpAdmHbTya2itsrmRwlyLwFyRUlMzee1Q8ABtZtzwTixgImD27sjZIBVBheO\n0Lyo0w/EjJT3AmWzkO4uw5TsyKmSrLInFYTqmOGdAxpAkOsCRFdS5i3LjejV\nP+S2ADh82DCRTjEHa50fy2QhTqOKkDBmx01vEkp2ik48/tzdn8Gcph6/32Si\ndtahCMGriUkQ+7APuItSFR+xSMkq1inn5KQmwQlF+GqVkaPgANtJEI/1l4yO\nuiZuCmIegE8iak+CiqZtioWr9/dqXSX+1cjPwD3A8ewEv+T1xpJUuqC9k7vf\nnkGt\r\n=P/7K\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA3pVy8mZjvCUY1AqKIppd1fscLZPEe7hrWuJzdmMXbbAiEAqNahAjxxMqCelN9IcBC6tobbLHaiJO9g3lhg6CCo8/Y="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.5-alpha.26_1571089340529_0.9008678592811679"},"_hasShrinkwrap":false},"0.2.5-alpha.27":{"name":"@react-ssr/express","version":"0.2.5-alpha.27","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","express":"^4.17.1","fkill":"^6.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"7d01536561ff84c8fa7bdc5ab114e26a53933b4d","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.5-alpha.27","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-VVcc+WGNnpfp4i+H4B6sh+/SsT8Q5I4NypJjy3xjWC4VBwNMW/KVC/x8np4ZSkpM8eorB09sT+JNFkyLWCE5BQ==","shasum":"d13a4b41e912c77c8fcfb05e40fc95a7ca9e11e5","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.5-alpha.27.tgz","fileCount":9,"unpackedSize":16596,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpOyRCRA9TVsSAnZWagAAHJUP/RUD8pJ6bgU4fVSD+Jix\nrXDq8jN8Q2QABqQF4lV5U+Zo9T6aC+3w3DjFIQmZgcq3jQMGnOxlQuu/HQl+\nPWzV3uWaBTHkDTOpjGVyU6k3lwzfAP6U1LxAgAN5qvNMcAoNWkfLMTSycgju\nGJWfoEeiQLJuT0wPezYkqXedBBOtyNYwUVZ/Dqw5li9cuUrNywfpUkxtjCZz\nXaJyh0HeEzYYZCl6lvJkMbWCjVEZKjQ+WDzsUdnQwRRTlWyNmiRHc5hEbmD7\n/qFIQsgcVn2se25kRWs5vZFGAU4/NDuf7QroDKwPvKI1VA59IFtW+7IH7gGR\nkiRkwqDmJnfeQZGuvK+KoxhJnpxn9J6mDwL15J8lx5GLgZ9+nCkJtTry9SC6\ndkIKSZr0mxDasZ9hul0OtcqkIK86Y6pJkRyPLXDBOQzWe0+Ol0Ul8bofpJyT\nLY9gd+Pod6g0JpzvwclOG7FKIz4nRl7k4M5U2TrAiOTnWI5wbZfZ8MH3IB5x\ndenLwj0V/4xxmd6Hzl8SkuHQ5UjMjtxGA+lx8FXrGWVAayUmb8bfrAZerq4o\nUUqfw8VmBzOeSm7KjHDtUVb2EbQJzw/s3vkJ1fAFmECGEQzRGYfxljhL7BHT\nnWctQIY7bjUI7unRwbcGBjc2ynmk7CHZYlzU704XQ0AOaqFgOztArDqJYY7O\nU+ur\r\n=OVVb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHF9Dpdcyvl7Toz5Aw5Rc7N40bgqSHwKb+JDY0z/4Xz1AiA0nV03lqDJg3Xs+EIWnZAPjTGhdc3Zlbj1/JE4HmNiaQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.5-alpha.27_1571089552758_0.06022381141864841"},"_hasShrinkwrap":false},"0.2.5-alpha.28":{"name":"@react-ssr/express","version":"0.2.5-alpha.28","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill":"^6.2.0","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"a38c2186d175481176fe425c36f5795c9aad45c9","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.5-alpha.28","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-zDP3o2PVE3wNIARORlMNpkEfe8xNpQiWsPj8YkqD88NmRNeKmLTpWdCTrC7PEOrDB+jpz+Z4st/hbOVOejuRMg==","shasum":"80b26e2f90940b019011a91a0478400c3ca68c89","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.5-alpha.28.tgz","fileCount":9,"unpackedSize":16770,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpO5ZCRA9TVsSAnZWagAAu4EQAIPRUu0CoN6FD5RNzeT+\nrqIzGCpPiLEa0OytG3m9qdb9mYALcHlCREev7IkHPOuLY7tkwd5L9XY7YPfD\nmcNtTT46sd1PVFDhqmQsKp5kEqqRchipie8grBik6dVaK+rzhZ7loWC0ReLU\nqVz+mmBZiCV4kaf9qF6K3k6QRGK2oouaW6zGKqdWgMOwzHeMNInmOtO2ufjQ\nj+tF5bjoZ5oxX9GunzbqNmoOi+oI794M8tpsui+wcxWIrEGqzIxGkVmiuLC0\nO27omChRzURu4j8sHpMGfQdeziAKdlxy0S+O112cSzvs3ftdTMhcQSbN7W5D\ne9KGUWmzETo3SpVRZS6b/zOaMlniLcpSQWXWRHojfP+T7OhSCxgrL/e6n9t/\nccCwio24VvvDjXFFYqVkrTzjlfn3ICXDQZEsRspO0FsV5LIGoIcN1puaIP+M\n1+aYO7Uo4evZ17nrlKPyKSw0MzQEy3+vPcxzc7G/DyCGpDAoM3HZVQpOet73\nvDA+u9FcSV1QN8GTAsbvMPPa4gpTNuEPJmI28EEMI31odcTqTEAEkrEzR/Ut\njT9yLEOLQ3R6wUMVRleI8yoWT82UTbMh/SYhRucPJRgMB7BseLk4empYSWYE\nk0Olxw9yhLR0HheQ/1WfrNEgTfnWNRz4anQS7ieCHteFC8VjJQfAGE9MCB4b\n9rJ6\r\n=FQWA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDs3fWZoVRG/NZNBbXmHuzMRrjfIn9dihYJ5Ji93TaHmQIga0ceLiLtNPv3oDQfLV2al9LV/n6/fONJ1j15ZWi/+mo="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.5-alpha.28_1571090008994_0.3887512066037304"},"_hasShrinkwrap":false},"0.2.5-alpha.29":{"name":"@react-ssr/express","version":"0.2.5-alpha.29","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill":"^6.2.0","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"b5cd6ca789c30fbcc11ad2716f4a4d98902f8aa0","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.5-alpha.29","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-NU5Ku0BbJxMfVnkIftIOYhzKKG2W0rcPZGyogUhrK0YlM9w6AFLfaP6hxTypJ8ZLt4XvKy064rhFt+BrpZykgA==","shasum":"ddacbb5180e449852bd24617591722c3cb0726f3","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.5-alpha.29.tgz","fileCount":9,"unpackedSize":16608,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpO/dCRA9TVsSAnZWagAANfwP/jfybEEudxPQlpNDWT7c\nfXkzYPWfF/1YB65YBEUkIqMoJTh7lyfwio0VWVNcxI5KWCLhoQLVtYbsAM0q\nWFxukaVQBi7QZAK6Umaop/jejVCBNZ5wny/e8g9dB8NASR48lbxlZdESscQ7\n3T8uwJBZt3WvrPSxJ9yC4TCwBMsaVTJBM6uVLrN3F5lRpgEF0T6UYWuf/saK\np19F98DMTSsLTiXwdT3Yus0xtRvt1i5Mv6H/yHyy9f0nWMuuXMMrsYF0waYQ\nZsGBALwZdvBdMSyu4IsOP71HCj2mr84aH4Tg7o2gJvaPuBcWOnr8uXQ00GbF\nyEsYpKHsdOfD+Pn2D3qpfgRtuff8v8hNXFX1w1AnzNhs0eLHQZ/N66fwnQcJ\njFWi9YHA4TBG0NRThtf1Tgwfv9d516OXLNwcw5pqCp8WWJRmdTXgekv/Gf+m\nJcR3O1/yUa/Ww36zffNOKVg/7tUvh3rbiyNIh/eRAkDF6E4DTElrN3DanEqg\nC3Fkvw787OTWg1+CYrWM/RrMDgiPwgU0TuTVtY5YbPMqPY3eP/TJXGIdl5AB\nentBLYHkSd1XCHgAsd8K6450jujoquy+T8SsTaWqpJ0Lth6+sMGr6Oq0WiQV\nHcyFtsi9iihakw9r/8pxF5eGL3KpQeG3UDuZLw4sndxNURHfdYkT7HBUfx4k\nNCJk\r\n=WzH4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICXlMeQY4OTz4dDlupGBfQpn2x6Ib4ICGSN3SXuvbPDtAiAoxp0rBEvwIGruZl4fh01fMEvwnYDIPTk09D+y7deCgQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.5-alpha.29_1571090396663_0.7707635347061328"},"_hasShrinkwrap":false},"0.2.5-alpha.30":{"name":"@react-ssr/express","version":"0.2.5-alpha.30","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill":"^6.2.0","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"29d41670cdae2370d0d6da3af3b84be3f9038c5a","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.5-alpha.30","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-raiiaP/9pBpXl1OoDcKJvynOxQbLH27PmVvwiuj8J29xTq7nEuZqNgshnf2FiBGgIgOsiCDR35F4vGj1oOi+qg==","shasum":"90bdb364484b9907218d9752ad3b22d517b2cf77","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.5-alpha.30.tgz","fileCount":9,"unpackedSize":16662,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpPJECRA9TVsSAnZWagAA/KcP/ijEVD2j8OkXes1rKoG7\nOybNlXrw6XyRvbSJGw4OluTi6kcTXKhcZzyLw9/MkQjw1b94VHoqva+0r4Qd\nsBqI9U+E/iL4W3U9HxCH9wyORzqIWXi+s9HtK2tZEfv2KPHHy0pVE3l9uJ5P\nEOc81SZ+3EmWcFI5l7Sb7wFe/PX+FaYQ7T7UtvCjGsLN6WtvUNsCIPXtRL8y\n1odQw6SL8wx1Pb1xCfAqhJMOMpjW5RoFl8MDuVTPc22PqwBj4XYoB8d9DLxg\nzaKBXXni8E82CkbwQXEWH9+EmXBKzBlhZHbMIaIBJLAMh1jI/+sTzvhXK1Nd\nREhrRWoxc/6ULCdqgYal2TiDmAB1JaEAJFsYZ5Kz5HntOcV6IsYTvVjrOmIs\ndETtq2w+Y8m1BRXiddWZh7SfFHffMU9A4xYoTKbjZYvLMmpGc+WhDCmhAa4F\nL28RdPrkZjLQOz86WZ39+iSiWsxcy0cX0MEOtpKYNnHsaEGY3pyV8KsiSgl1\n5xAOPSzUaWeXgvHBlgidJLETlqN6i+66vR++yks7VfS8qRfp/qsW6/MBfUma\nnNk9lJ9xVTsN+Isw/wytfN+C1QmCxELLJH0V+cnOLiUyBDGi6FiU79rVAbo+\nLeftGiSsO0kobdzq4t3Mz5IMaAp3zB/e6j5UcUB/KAJjUkqUuSCgNbWeH1w7\nQGPW\r\n=IMnq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBkFvO8/if+6pRNe4uQYnv2mz+DZz9jblFCxl9hfuPniAiEA5harZCO3YgBAImzZv3n4Uowo8g1BYW0tewlCTv4/p4I="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.5-alpha.30_1571091012117_0.1950878941489329"},"_hasShrinkwrap":false},"0.2.5-alpha.31":{"name":"@react-ssr/express","version":"0.2.5-alpha.31","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill":"^6.2.0","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"0cab017d73e80e3d0137fb073ee4c81ce15b128e","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.5-alpha.31","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-sJzShVHqMDLsZWyKM+5rYtsjIOXO1n9oX74dO+bBNqBfUPs2SHhTDv+G0jFWS8ReuM740csrE/Qt3o+lAx/RNg==","shasum":"602c72fe48e623f6fb35eadf0e8ed4b5093f7d3e","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.5-alpha.31.tgz","fileCount":9,"unpackedSize":16690,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpPL+CRA9TVsSAnZWagAAek8P/3UWBk0silV0UxxKQrFr\n8bk9/H3Ohl/sAwxK8idSB6qM4uNKg+nGllbgci+NDk0NGKTYWAGwCcSI+Rf3\nDVuWdGMDAmIUjapYjrPEjCwj0DFiX+dz1LCi9PE/s+oU73dqbCDrA5/aq2EG\n7O+0e64jVDlt1rSiKX6F4RwwMUdGyEJ4QidDVayZvB0qBXQdu4EplhCry9e3\n6LrKiulpgS6gmrIxWvXI/YPTkPiCT129DGJldEkw2zTLF2QTkeE/Ef2kDROb\nLhW6xiTE0d2vW6EMduVA8gPTIuD9+Yvpop7jRaE/p0GHahInLrswAJAwwXh5\n6NLi03TN6B5eCF0sb6MaTGTNQdRzmb01YNkCYkIIFYZOfPUNmgsM1+PfqZKt\nkHwC5I911oXolUdiS/3xT06gJcnm7wvDIVT1FHX+5+W8gxaoyFTo/OoqIryn\nMp4eJpgTIZVvtZfgsy4QHiK/8CqPJnIqPiDRSF/18V3FdYMBMVGl0jeTw3DR\nCqNkmfqK1B4fNTj+T0asrQCwyBZBubFXwvxdTPMs5IDQk3xsO160DSsgeAF8\n4Ovf3jCP70ED8Ule2jpj9ZgyXJarHgyc9fzOw/o27E8SylR3rsnt5x0u/h2+\n5u+hLDMatA4J44+ctS/dWWlXfH0chBhGOfznY/GbfHjaeNDi9eFLnxhRIbSb\nwPpI\r\n=FX5m\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCT27fLZMSRpRodeddUWKLcnRds89FfMxNC9+Z9RZj4EQIgOQDMVWzHXq1u1xF18wBFFbko+8RRUZCHTq+Dx6kVHfw="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.5-alpha.31_1571091197760_0.017556951833185952"},"_hasShrinkwrap":false},"0.2.5-alpha.32":{"name":"@react-ssr/express","version":"0.2.5-alpha.32","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill":"^6.2.0","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"75a2b3aa50f2aa564f245cd43546833b03e8a015","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.5-alpha.32","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-1yqaAef1mj+KNI40F7jXT0wyIKHrETWms0oXWIjyxmmQw4LfoxqQ+a2UtQ5qjnvJayzLvSJBmrk5gheSdYIIjg==","shasum":"791fa7b1178a9d54e8eb599feba79e93bc670966","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.5-alpha.32.tgz","fileCount":9,"unpackedSize":16703,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpPNvCRA9TVsSAnZWagAA+esP+gKmCtEtN35DdgKcyu21\nekEZSV/5ESQ7q9x7aWy4xSBR+ajLM3iwwgi3AePKPK2OPxHKrEYL/iQ6wrmv\nf9LGJaGlNUA+Xbjpl7xkX4uhPZ7ytspG8TJfVkt5sMNK+NxrhymU5wLv0ood\nxLpkiymfY28jNDYYHDsJRZ+rLsc7KotI1Xi2Vbp4tYiQ8o2EdR+AcRodWc/s\nByT9JQ/COiGiE6aB60aS1amRlQ3RekIw7IHE49R+A8sViVbrOrNwpTUTado2\nXxIfpHszh0rONNycTKL1AXyl7vq5/tMwTUP9BQOg5xSsx/jJ28VOx44/mBmL\nd+ET5vEdk2o/ZR0/95qBBjyJ0CSlek4FoJwdot6fFJXsRxQFbLKXmvCker7v\nc1EvqonZ6YL1KcVDwGouYmLGMucJ6L0gltKqnjWvzhOwxNoZZhawj7Gbc5Cr\nB259FIDyv7V1RUzMQ+ElW17dTIF54zQZYluzMnY/M+Lr6TV3VPPvjLeBR+tS\n1FKkXrFJ57EEWHsdUb18MYvUYsC4QuNK1/doWHZdCdlwK0IwCnrqsBAy2xHG\nHHL6EifR2JFbmLfErb/INza0x8IXNi6ykcytUlAC4BdxC3mHkiaS7rZFjIUW\n/NqH1bo6LjO6xe70Jl7irwi5n91E9LkTl3NaSAHTTleauhKi89k2r4be7dtt\nJHpr\r\n=jiCo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDLbszGOReDSmZ4PBqgLbQkWPCaZEKNC35pa4vHtruhhwIgBcMypYKheklS4WaKXJeCBdJ/AAcLbmzoN7iFJF8AoJk="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.5-alpha.32_1571091310874_0.18048371543024544"},"_hasShrinkwrap":false},"0.2.5-alpha.33":{"name":"@react-ssr/express","version":"0.2.5-alpha.33","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill":"^6.2.0","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"4ec27ad3d4dface67cc7217d0675aaec3e182d4a","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.5-alpha.33","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-2vWdc4GtgjAt8xj+nCHSWKTqRJiOjHrlJYFhTlhX5CatPdTZoz0SJyQVSyYgOvDTMQI+iOlS7f9MINnnamNxJw==","shasum":"a48086222a9c52863bad11147531ff0ccc655259","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.5-alpha.33.tgz","fileCount":9,"unpackedSize":16754,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpPV6CRA9TVsSAnZWagAABDMP/15pnQjoEe/VEnHTy9OO\nVR8ezGdyd1xLPKG83DEwEvX/lmH8sTAVRuJYDK5U4YrIayb0549AxqKtGUHf\nakZuwbyvJChZbeUUuA76gzrj+RmqIXtd47ys1N23NPC9zl7vKcVEY+T/CC5G\nvKEIeF0iz19vJlDMBzUpNt0DwwIFePcMRv/qIUPjxZcyFISlzJfNLTfYhqO8\nuHOudHP1QUqsAim0tbpIyOPgUJeWy1mth40rDXGzD041TferAUVW++b4AKGW\nT3u1lwCxOjTSf/KQk1N3nbLTmnqrKRxOmpbs305peFCZdOkQOcao3X3+7iVp\n1evOAcZMgWXGQDf6EhEwybEvt5dSZMSh6y1RijhLdJSSgUW0LlNuf1qkX+Vn\nqCYIcuw0gP1z0A/AOA1ZckOtLlGUegT9eAfuRZ7fpeAFEZ212nFdhwfVs1YT\nez9bh1uYYLHrmWk0S5dMMd7rnPut7lddVIgvwk4U4gKsG0FUVGTvihjcHuP5\nD3nis3UPC8iSuldXAU4U4TllUiQQD7B2hfdS/0esiVD+XVA6m1OqbEEQCmWZ\nS+KxUixqYBMYfcaaeqSH3xziE63EZK8KXqxcYFfQHLN/AzfHB/4FsutlQojo\nUxdlB2hFYH6LAcWoD1UPNy1d7FFsk+ENvwjvUtcWU4ENZ3OoCskd+knU8GaR\nc/06\r\n=ahbJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC9f51LpaAUjOo0qA+OLSotIctN5q1tamfK/64/MnN1/AIgDCk3MYsK0r/Tu92dovTtTU58a/9TSGiyzotoO+2so4E="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.5-alpha.33_1571091833687_0.16570236157125962"},"_hasShrinkwrap":false},"0.2.5-alpha.34":{"name":"@react-ssr/express","version":"0.2.5-alpha.34","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill":"^6.2.0","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"1e733f8bf058717eba62f6e370b2b6408052312d","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.5-alpha.34","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-InyE9zkZcrngrdgtg+eRbxGvvea4bTRg+0FYwg4tNJfHuMitgcCrZmAT7g7uSFDFVYZ66UFhtT3KuAGSWjkdBw==","shasum":"8d651fbe0b0317e4ddde153459feb5d7d6971ee1","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.5-alpha.34.tgz","fileCount":9,"unpackedSize":16632,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpPY2CRA9TVsSAnZWagAAUksP/j6NwH78kyIMQxnmCGPb\nj9hu7yCtS5XbYXl5T7ZhKhvPl0WL5d5Xbv6zBeAvE6NacYzT24aGh5gcKvr9\nB7dqTWTaopoogxzpJsHGdgzeK3aWHlBXwQ9GCx8hh368mLRLZqpOwcKUYb4s\ngeDr3HHZ5d59+CZUI+ZuYDzu7o5gB5MJxkMdiNLbqs132k3GdSR/5tMhGBSy\n4limQ3bKfPIi9jbWlF4sgXGR/CaPKqk+fQKcTh1P+srq6kj2FsQi1a5eBZ0k\nD3az6ETcM4kPlqaQOlLnTeEttiQEbztabPrbtrypxItO3tCLa/TXzuei5LL5\ngspsSOimqMftBZoIbKVa8eYiSYYE3iHLjWuYAAdr6Bc7fOh99MSQ9lgBBcZh\now9ob6B5afqfv8QTnyR/855ZR2KVNqKiJQzNyidBTwZBrW2b2W/+1zh5Dc7O\nOUmsdbk+W9S4nWjmN9YPtj8w/kieh0MqjgosFjsDuOW32Ru1C5qgGsfT185a\n+5twyIV0GzwmU8KJmvDZoTzI4MDt98vMxqdpG0TzfQZFt3HP143vp/ec+FOi\nTlYrYr3de3orarkBjJW1RHvy/3zcEUMB90pygJMTsij4tH1J8WZ+RqlnlHMw\n2hnpzd9It5HdnoE/M/os55CJJycV3bNMBIYWynD1FaEiEhwpGoSX3Wa3Y2r0\nuk1x\r\n=UI0V\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDxZm7NqEUqwq1VhOmqlYK0AmzdpW+0pQ8rbJgXSyrDiAiAXC4DWFqvTgUjsfaxY5kXb9hHKt9BVtPPWqPn71T82zw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.5-alpha.34_1571092022367_0.8362385872403253"},"_hasShrinkwrap":false},"0.2.5-alpha.36":{"name":"@react-ssr/express","version":"0.2.5-alpha.36","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill":"^6.2.0","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"d582dda9d2f797d6670eb53f3ca943e746b17882","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.5-alpha.36","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-1dJliJ/c3GadyC0oEeUiI7T1dYAzzwpxmvoluOUmnATsrgifPF3vdnNfp2heY57emLiexDn6ik4gMnE3PpCH1Q==","shasum":"5ff2c7d05855cc0f174e6232de4bb51cd11a8abe","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.5-alpha.36.tgz","fileCount":9,"unpackedSize":16609,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpPgXCRA9TVsSAnZWagAAEZQP/3nliuIOZtmz+Y/hTMY3\n/Udt+1jmAVVVXw4K6B+8k4mAk9Y3MNfXTtVEi9ujncKlfA6MbB7qpVHa6/aV\nFVXKlRsZl4xzWQ3r2rxxfi6paEu5w6IKthnFvjaI1+k5xYYrzKpd8WOSo6wt\nt4iaSPNNu1dyhr7LifLF0fcKGvt4eXZJQAiiyFJr871OM6goz9o+577iNMVX\n2+pXoeIHwvAo0kk+1X2HxhnnX0g9+ws411SDlhSbe0tLaRDrDb72nsh8+xMX\nlSNqznBDxal4RD/9wsUVkA3VHblNa+i0gdB2ygzmCi+T6/cwcXpgpiLvZlyD\nQdvfn4mvyOeL3lG20Cl7Lk3XKyW0nKk1OeIeYfcv5tl/SBq2HATBjM/SOGmu\nkqcg9IYY5/ouNLnH3dSK1unpi0//+cRzykg2u9KPUGRW+zRyFV1tojruO3L/\nGMOcCR+XguDi+eZbNF5kJiYRTbCUkvU46dbFozDTpvHPbWiEuSh4MPjQVk06\n79p3pjbDdWEcdW5+paB1YcLoGPfys9hTVaEk1zTFNo0cTqKvpilwoFZ1SdA7\nmFQAPN19kF0W2zvkTez+XCs7JLjvzyaimbO5Cn9ogmMimPGXnTCCJGb0G0wj\nOtdccLPdn0YbXNcLB007sDHBf6i14dcGRLCP8i3mU8g4Pl7P4H+skkRdBx2Z\nSswQ\r\n=QUSn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAZxCMXzLMtGN2iFlccIXNeErmWGTH+oTHzAUkTm1yYKAiEAzqhYmuW9RpsNMHkcHwYbkQBLH6K5vAc6f5a48ej44ak="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.5-alpha.36_1571092502810_0.524341672124363"},"_hasShrinkwrap":false},"0.2.5-alpha.37":{"name":"@react-ssr/express","version":"0.2.5-alpha.37","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill":"^6.2.0","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"ad12276d42a7fe68bed67bdb2a1c1cea5153c96f","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.5-alpha.37","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-O3bebXhtba+Hpq+DfYxvQDKnniYKhcDDDgFPQAba/S4joq732+SluStuzw3EQ3b04Yb4oC200kElOZAUQJ8ZHA==","shasum":"1f8fc26d425814618655b9720609bb95cf1ceb36","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.5-alpha.37.tgz","fileCount":9,"unpackedSize":16593,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpPjSCRA9TVsSAnZWagAAhPQP/1nXq/3Ttr5HvZrEe7F4\nz9yN3C67gtaX07jFYmAkYTu10ta8Y5JxVfO5e5/ySpp434LpT9sGayUwmqto\n92cZkVDyE8NgUGamQNWB8rD3d+89QhgaKwZ6teS2+0VDfcXSh27iwcJBdx/U\n4QsBXqqLC0jV/mhF+jJougjBIHsdjNPnqeSXTt/06BqgYEawR8M5KR5jJMV1\nxatiYFuiGyFDbsSrGQINn8sCjXtOwdCDe18md6S9jTfgKwKKYWXP0c/A/h32\nODpZ8P4PFik/cub8COQ2bXLDq+YQQ0gX87SUAleaKjKna1ULjcwy0Pe09OUO\nF2eU3U6hda6otb0r2J63jlZLMs9AeOta6zBl3JBwJKFxzR19QtWNaOZeY4Mi\nPHGx7LHjluQ4pA6hD8WhM0+Y+S6TruDwmPENjlWMTxzd6CT536dPZb+gl7qt\nL/a94E9OSEpxOHApROZAFaVNdrFa4xsm9c9gycc9BDmTZwVQI8KiXvYUcRPI\ns2tSfRbPE5janrJnSSLz8ShHgRi2/cy+Z5u/5aCJfZyHXjARBBrcTknrAMZ5\nveMXAiHZ7B362HhCZhyl37C/4VHs7CRzBAS9mUoSOAg3uHjmJVnsJCSygq8g\n4QMSfR/Dde5NR0xQrv20hO7BFz0CgDJbsQdTa2J35qjIJ1NdWBkhEHA44PeE\nhDO9\r\n=Q2qY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBej1DE3ZKbRkweqfbXzCOQtE70kkC1c2oPgM4F9qsYfAiAbbEHLaEA/vJyUExkiJapIWdq+vDv6OgyMAQEu2+uL0Q=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.5-alpha.37_1571092690278_0.17738153162206305"},"_hasShrinkwrap":false},"0.2.5-alpha.38":{"name":"@react-ssr/express","version":"0.2.5-alpha.38","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill":"^6.2.0","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"2f809f0754d86579817ea33544227da409bfb265","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.5-alpha.38","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-snP62BgGJTKHTHLAn/THCfAzPLIgvx8JxEFDNB2lPsy/zxI8UsRDkfpLfbXgSuJXM7zNeHrcihoYd4R8M/iLDQ==","shasum":"04f0ac46c0fee2ccb25d412cf8d334f38f34714d","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.5-alpha.38.tgz","fileCount":9,"unpackedSize":16602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpPmbCRA9TVsSAnZWagAARXoQAJca7Il0k3qHf/3JIQ2U\nkvO6cXYgZS/ybJXlSwykrFlYC50iBz2ADcn9eIZS0tXFoJ6quooEsqVrzWA3\nNXER5/UxSPAlXcqKp5P7T53tjp543IQrH4bHMoOde9bJZfri9Jt7D4LNRQx1\nvg519DKgPliXiUFQH8yhFeZZfJvCjYEpiwJ99VpywJ8deQgl4kgyX9QOAtst\n5eH81J+iFR/FIW0HZhUAFI3r7vzABFDViSnew0WYHevm1KK1uryDOTQOTkTK\nAFUUppbdUAntVvwJEov+fblY8BH3m9ZsFZJ2RgsLKXuFbqNvFZPDQNwXSE7l\n50JkeTs9AimfDyxfQYIklj2jA6seIdbLBaGnv8eJ2OD2WJ+3cwsCfcltE1Wg\nwmp7ba9tyDI8swlm61bwjlbe2k8ZJfImRKwPtDKXWeBB4R3Kxt8SOJZ0xu3u\nItf2sfmWkowdeEodZUM3Bbc87/2axAm8yWOfEs+uKtas31TkDg1sPysyQFIG\nwpaQos75uEEH4ogUrA48e0jB4xmsEjayfiprcSxPAr/f1hB60mye4/XHXeK1\nCyDLn96/cjrOc+PxOwMJ4qn1IMz05Du8jGTQEkT3TqLhWxyoKr5zoYrI1fFJ\nGSLmpe2jibKVcCIwxBn5J7zRfLnzpxVPOvfKETQb/CXgbVActFCt6vq2JtvB\nRIIO\r\n=yOX2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDHUflkAQi0wtlz5t5i+76ApYgNcyf4hC2a9A43nhQBCwIgOQXxl+7UfTvZxpmi/4SMh8GXPiiIvRJF4XdQZkcLhhI="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.5-alpha.38_1571092891002_0.3180742035303823"},"_hasShrinkwrap":false},"0.2.5-alpha.39":{"name":"@react-ssr/express","version":"0.2.5-alpha.39","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill":"^6.2.0","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"a13a0d45e1f98f049bcec25a761393a6d5280470","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.5-alpha.39","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-QfvgniiJsjiV4ihtdobm7Iz5ufHk9ax+0rp4VLcal7FIHM50UbPLtx5zGywQYkT3+mCI+Bqu8DuCxsGIPLkS9A==","shasum":"1c5ea81735130532346a2f8af3a6eb7bd714a048","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.5-alpha.39.tgz","fileCount":9,"unpackedSize":16756,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpPuRCRA9TVsSAnZWagAAVUgP/3h1DWLtr3B+pltv1bMr\nnwTfgSN0hLM+yG2DeLWSpyVE//dpAtwDuRo6SkdQBgxlUVKSig23Jyy/vHZK\nclX7DisPTyvv/XNF1zO8/QuBLV7W9m4KDJFaS8gwJQ5Q+sh8YYjhJsa+F3bg\nAXFVLHtFgl/55aCuzcR6Tt+dKCLa8RnZV3tMOrEtY7m2k2R9+pLzZhkvbMcj\neDf8uWMeA9EjznwlrdJpNODC9KWzuf3scT0jWg5rT9o9XdLE616SCEGWhJmr\ntkJ1A1pV8k4Lk6M9c6Puj9ju6oRGBCRoS2rvhKey9SsMzqvrlvWtP5oEAqaw\nZUZPrErTPZiXIssfGmN1IdqWGYwu2Qvfh6NUoC1Gar0MFEsegThag6TcH6DR\ntp80gsZ7vuJUVZsg4I+GKqj7F4OPH8ZYtYrBU/iIJvqud8ViUu5qyJ2llq/k\nyoGeVuD1wPEdGLwA22hP3eueXXX+rTT2DiK3FaOLBWa2Dl5bdxQmOgXdTqkd\nLfq7dhROlFuzEmaBVXsMyQ0aZvbRKSy6/cnWkjRitwe/bWJBI0OcGvGuE2JT\nEw09pW3U1M6XbTpyj0TwGLZtX2w1qxMiywOFhIDKggvxESXxhblouRnlpVXu\n3ZfvQZ7b0Pf/bZ+74oiMIoDrGQ56/+LBsu1cr/lS2/PLjWAL2u/hHfu7qDsw\nu8vM\r\n=CKXP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEkNAQeUf2Sc8HvHFYDnDhStNiioqtLkkwEGXtTPCrLMAiEAsx8Lv3akWCrUnzvDbCFUghvdI3HNF7S2l8iw8S/nT8Q="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.5-alpha.39_1571093392938_0.06533535497070875"},"_hasShrinkwrap":false},"0.2.5-alpha.40":{"name":"@react-ssr/express","version":"0.2.5-alpha.40","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill":"^6.2.0","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"59f9ca5ac487293e41ce6fbc02d0dfa56b755538","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.5-alpha.40","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-UtVPbP9WGEbwIxNM1eHCrCaVX8OHXY3zwvDTsXtMQ1U0TFevYC0v+NhFTRXYaVYTBaQl97VLHrrGjUymKSypvw==","shasum":"d73874df29082997949d6da7fa5f74030fa796ba","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.5-alpha.40.tgz","fileCount":9,"unpackedSize":16918,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpPyMCRA9TVsSAnZWagAApDwQAJboec7DZBGVz62r/sLJ\nw50GyBdrrOvbKULo65G+MQtow60FUffwPdN4xiRDqcA8eZNtLdyULE69Quko\nNBRFKPxVfa5CnmbSSSAMRYDmJc9IG10Y8/W5jflIt7hUdggvErXTPmC1qO7W\n8jOIvGMGYa4d3DJ3oHAKsh4vrlX+ckW/7mxKBmVJ5zr+igCe7S4Q/qtn8nz7\ndDcnR34qTit8u3D1sdT14oRt6Dezodbi8TQg8+VrpzI8VN5N3QSz52YfL9gj\npSn6v1Kwr8X7uKYtqk4aSxJTWQQoYo+yJ6GArZcG/X+gPxl5FBKKAKMb09PC\nPc8rQxUXJwnLbBSIHB9oG354kJeZnSqVApcQYJANuSJh5Vxnj9VSOmXPy8q4\nzCyQJ5EzN49AhVPAMDucMFhFW+7RiE9WMtpkEkwtZk2vGub2FoqmAGLriYaA\nexihy1JrA3DRncIVM0rgjn4fVAGeUJb82F501us9E4wlFf9uGhCfSxQFr/zQ\nRMzWSiRNpMoLafnjY3LObCzfV9GSBWH6u2vTLGjAncI0qDRhI+cnJ/zM4mDf\nbLXxiZ2cVafs+f9PudJSj02oi/+EKCh+PRTbt+VG+9fkyBXmzd7Xx0xbzcbE\nnbxz0T+Ku+Aed/fFFQRKCqlvAUutHsi00+DCwIryRzyNgUrHUZwf+e6FtYWZ\nzL9K\r\n=8pJu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCkfg6OfcreVNX5Hx1ZkyCtf62AOjz/HXjFXChBjHQD8AIgM+KK1Xr/lVjIapYkJejashhHX+7wjA5O1y2cUbm93H4="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.5-alpha.40_1571093643232_0.14442670541090585"},"_hasShrinkwrap":false},"0.2.5-alpha.41":{"name":"@react-ssr/express","version":"0.2.5-alpha.41","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill":"^6.2.0","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"d15ace676f545cd6fbc5def223ce73d9e07b3938","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.5-alpha.41","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-OlGmdb2R/f9WXL/Hh1i0A4YtkmQ1bY9tCvtisr8aojJYe90i1FXBGvkdGSYIMVUgc4IhlvC413YhVlVB9kWXPg==","shasum":"fb5baa08fd96096302b66ae798d246a1d2617a2e","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.5-alpha.41.tgz","fileCount":9,"unpackedSize":17038,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpP2ICRA9TVsSAnZWagAAp0YP+wR7q9jo7c/BXa06Hz5g\nTlMFH2RQ4yVZQnwzdQ6C48WONixJcGrprN9gz+wipmemL+NlKw4yztVHJUFO\nWaKdBZ/BQeaR9NTijfyZ6xOZxv1Fd7a/2+aExxX3pjK7m2Ymm7dnmugPyw7G\nuyLsv/4PhiIzJXmWT5x6nqinx24DhA8yS+PeOppstYfwI8nENP8FVpWMm+MK\nB75LoWOG3zF24z4bTNgGUOUNl/pPvEokVhb+yf23z+Z37KYr7GPfeqGB8p3Y\n0Bs6J4UQ1xkkoTNExn75DJ/IM3IV6Yd82xh5Fli3rAqom1iha+uAzSEH5QUG\nSUG+3gBtIeEXM+Gcmiczt7Bu6At/zCuGIaFy7bqkziIilWU16msyLCp3n3ro\ntHFfQ4cg5bOoJ2ZDpB1dmaG/yCVeLESLbzCnbFO5HiwrEzuH5CihueoHrceH\n8nsm3i4FO2M84TQqxzkQgZnRWA/RRoQXU7JTJpqEZCYZOagtGa4RfmQhYslA\n/FoFgCqfmtM4y9Hj5lWhf0Wzg7uT41aUiKdxmGZhjRGad5yPiZYl/7TE9fXR\nbjsClqzbOa83nSXTVqgeiZkri0EjzmMWMtdbFnh3nL66NoUq4DwpSrGp+O9D\nI6+dNHzhpa1YnWPkxKLmFlpN6IlG1OySNwlhQ5wzyNi9B+WtvNhL7GgMuBaJ\naEOH\r\n=OxKk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDLg/yOJuNC8NdE+krpijuBxtXSBqdJhpWhMXlZKUfghQIgTzlJOG+9dV5bvtPMIi1zYNjy65N2SftZE4v1+Ms64ek="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.5-alpha.41_1571093895658_0.4247810430947876"},"_hasShrinkwrap":false},"0.2.5-alpha.42":{"name":"@react-ssr/express","version":"0.2.5-alpha.42","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill":"^6.2.0","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"ec1c3a7ad3b138a6f0ed3b10f3819f93fbfc5add","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.5-alpha.42","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-2uhtKgeHGRiOp6AsX3l7PB6iZBJgmTZcwfg2r8OPucoMJoxXYCcTFc/Bbqvv7pJZs97QRnxz51q3eSwyUos+YA==","shasum":"8a7b2ef882fb75f56bce6e7ab132f43a5c99af43","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.5-alpha.42.tgz","fileCount":9,"unpackedSize":16618,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpP71CRA9TVsSAnZWagAAeUUP/jz9ParWIXlM4qHKXXC0\nNgende7wapZIFVytYfRzC5vtRxapjsdCzCc3sqdVbAp/NOkkEG1z5Fpu+u4n\nqJnQ7S3tprq/LlkU030jcH1g6uQsRPYXZmgp/cuNhyocgE9b3N88f1p/GebB\ntLwwkWPO4dkPW/QgWxKKm8YnvVoaYPcCMWYd3/MczZiRCWIPQseIgySBJLIb\n8FuYLVYvHMgNS6VZ6UQkSQxkD0fh+6ulT/q2AfDN8+JGi57WHyXazLNrLdeF\nqWDLmH97RI0v4tVbMMKp1eTW9h6Zf0tZoWVc/a5KkjviWD66itPy5WLsFhZ4\nYxYVtJ86RAUwu3lwfc/3oKpnuhvVn/qjF41vMhRJyCehjGvSmFVDsUDUA4uR\nDisMjuZK/7wuv/dzKVhePda+H1e9nrQiScBPX/PfQtbpUGiUk9YLU41TmH26\nwlmzLMJZPFGB22KKejshTY63Emy4RTNO2qNsX9ms52dL/nJN3C/hWJ4vbGHl\nDFovF2f2IEraF+0u2wTCMlpp4FYIlgW119g55bj26UQ8X+FeTL2T9rAYfOEg\nryrM23uGmuj5vv6AO5rgs8YNUXMwBOyhdNvQJgik3Cq124Jn+YNAe+EhzWZI\ne76YMfZ6gxu74OQJW9SwWJVfpI4X33fdC+lBD3uUsw0wRx++1b1osDaYI3/B\nh6hA\r\n=THkn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDibf+YFYOiDIRjn7RT21BgNd+p3PwL6T6JRgpU1+KwqAiEA+GfZ808PySsmv7VfdcQ+wU9LgFRR/xecFVcdWTChe7s="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.5-alpha.42_1571094261261_0.730095260233246"},"_hasShrinkwrap":false},"0.2.5-alpha.44":{"name":"@react-ssr/express","version":"0.2.5-alpha.44","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill":"^6.2.0","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"116711dcb0eb0b2670e843f4d93eda5e02e107cb","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.5-alpha.44","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-+f3wy7YymPxzLbwjwcs+yvLYO0mB1uA9uP35aKf4AiO8iwN/aEKzW+q6Jw+IzfjM/HcuDyvCE3BYasVNE/Uo6Q==","shasum":"ea9117c52c91467854889478024f0fdedf39d802","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.5-alpha.44.tgz","fileCount":9,"unpackedSize":16618,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpP+gCRA9TVsSAnZWagAAiPIP+gNYUyFoOaHxIXuzAjG9\nOsT5KAdYPoIdwTrZlLRtDzXd/VzW/v1aUrhO5yVN45A7sqZyQ4FM1fSvjHCv\n3r/Cai8qURNY0+n7Y3JPIlrYwqQwrK3cLZDXwNKldkFtN3F8+22fLoMwlHMf\nkiCWaIzHtlKj6nKlizxNFsrbPYVhyNIo1x/qIoYLQs3u1R3Wcc/vLFQVScMh\nt/swtSkaji5G0BSXblUWPrYjScSJxv/rMzyhqmpuiu12Xeovr/LvSPV3xMCq\nIX9naPLXzykS1boVbZPV38EC8dQN1hKdY2gud0fS3QkjRZd19yJJciaeloZi\nVc1uh86oibJFCQqPwP2B7wqv2FZ8q4StzzyJyLjh1TW4sxMdheF+Op2kDXSg\notSdDMZvYPufH2z0o+NHgBcIHfyDCrvG/caUzmGWEzM5W0tFrs3q15J8MIty\n5IbSWVbaBI8HDkMj1bpJGT1FxlQ6vHZfsAVcaMT2NDlpZa05/lWPu8bYxw9X\nLmTuVcZ1bjwxG2XiUotWVuU0IVxOQ9yYvqZt97jasnRgiJj3s7HkdAGvt3mG\nZqnkQirxJNuW+VUSr95/xJfVmfJRjkbcAkHBtSfTgFJCFINScidLUbfi3NqU\n+lc8nXlZkaMsxQ95dcjceQB3l5+3zjWqp0J5PkmQFA9GXtFQ1qXEz9oYbAIr\nkT8B\r\n=6x0g\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAqRdo/Gki0yCNri+M3rqOwHde1svF4EuMHJ66nNFh6AAiANWjCfVrFGQ8Se0yu9fqKbzIlbgekA+f709y2OLXQVAg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.5-alpha.44_1571094431746_0.49845122614417203"},"_hasShrinkwrap":false},"0.2.5":{"name":"@react-ssr/express","version":"0.2.5","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill":"^6.2.0","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"91b2700932a968e932a1c780ef497443340ebc85","_id":"@react-ssr/express@0.2.5","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-UckujqSEo955nfkAxAcFo0w8UH2Yr7VEGn8+JYP5GA3k9N3WeBwWCX2m3Ry6XJMVF8FVKRDlHIF6y+7p6RIAQg==","shasum":"8bce577a08512e29426aa0eeb77e000b3bc5d3e3","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.5.tgz","fileCount":9,"unpackedSize":16601,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpQAdCRA9TVsSAnZWagAAAAcP/A3iGJS2xl1ngOLTxMuz\nFdDGa62FmHqrwHiBy0P4lEZI2JisGqxqKtwNn+zxJ9bfGyppfK4LsjC61VL3\nyDwF4ej565ILnLviabmJgv45mWMJoL01Hl5kgleSz7p51+LvHd+FTqIOgeK9\ndSvOpMXeIKa+HaPtHR3OXpyiy6j100KvbgHOTJTxcUQr+X8O02AtH4qy13bY\nz6pDrNu0pmJiy9cQvVGsv6YY77rd6rpb5aAWO+c8egb/uTN8qRpmOs7yPALi\nYjJd4edWiYRq9uxCmPxdmJ3ehmyY4W3mPULPhb4Ru5E0QdNpbrdwLo4zmNHh\nKabcfGeeeIqXtxy8xjLH8E030pK7cWFbyMMhGGFeFOzkAKTOHd9BhWftv6BR\nMVwghQkDHLsVPpwsFuQ5t3VyGzmh5Ul4mMAtQDzeY4VUplA+v+cl9JhFJcVf\nl3/4cjfJzyGm+3xx015M+qcXfQmpfYsF8EmxEqUzgxOoit7uihSmCf5ngOn9\nswxMp2Xi9342k317bhXBlKkkM+r/s+vJZoNQmyp+CmJoBVdgBmqSXo1Frtia\n17XBgaxbMv9Rjl8ZLB/aOI66CKYD6/Z/7Ue9oa9pkLkZcLfrTxXXwmCEjyxF\nlC3Mks86QawxnXTMinSfHDNsC00Yh5ojLt79CLCNDakvYkngMLZrDoqkBCT1\ns4BT\r\n=oe1u\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEU7RvQToN3k2vaeciBEVLjQ5rjGfARbuG//XWlYXiqwAiBfFltRJD2p+8RRL5uCz71A6hxyi3MIPCytfrxTn3KARg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.5_1571094557217_0.5786063455392003"},"_hasShrinkwrap":false},"0.2.6-alpha.2":{"name":"@react-ssr/express","version":"0.2.6-alpha.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"e84ae01b1607e6e7d80f56484bacc601cba4fdff","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.6-alpha.2","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-fwCXJ2M5rGklRS/Evk0IXLYBadcyaTNvZokfIDQPFmsns6/TFYNm+VyJzz4Beoum1I/ibn+BRNHJq18BkFwQBA==","shasum":"4acc0430417c393ea8e87025a6bf4e60e777e5d5","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.6-alpha.2.tgz","fileCount":9,"unpackedSize":16536,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpQFPCRA9TVsSAnZWagAAHXwP/js2Txp/4LXA/Ku+a0mW\n5grCw/7IkbNvpv2jxgar8aE/AzgzBDgAnFi1PechkDE68mbXf3YaQK+Magt2\nPerzqMrCynaU2Ued0T+NEL5/R20Tpbp3u541RMJQUjAK7ZBHsj4/7HOVpROo\nTaJ4o/XKqc23rBRI9wdHHh0csbeFqGGbxqW7L756jk8f3ACkBF3cEHmFrcek\nE0tyzGcglPgnk7nFu95vD7KWd8GObt6GJv6vEUIr8fyqgnJzm8yiACVUO1A2\npBv44LkKzwPgenu+UQJy8QZlfmHdiA08nlY6BA8IZyJMt+T359ruCGG2QuvU\nu3gNFIOWo5/8JB+VIpWHtDZbmNrqP7WJaoAuwFxnQ7Tjbm6k9NVVtxzmNP73\nWhwOpe3VF44wjQoEif16TIgaj2MbPLQE2+QJKZshkyX52dWLhR0QAAJ4P/ON\nc93/o2ZjCAyOpL7unj5n2a6Yz3i02BHVDAhGdLMcyZ73CJ7DhcstJz75GxKY\nT3TPO4dStMLeTNZ8kEfkOi8/F2yJh4KbcYraRu4fCz4XOqnDva7KkuvFfWZu\n2x/n3bqa8GofGUZA8IToyACX9HnhTAvXNF5ce+RAfo3MDBim89qz4sqeYXpJ\nNz0KkeuIb57aZwCgleOi2e+COKl2LaR3lFQWxyXJqoCPBWpaqGZ8AIMwiDFk\nhThk\r\n=NXQX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICaY0H9rLqqdqY5A29i75sCYZxj2xferPZhO1ZkGCjT5AiEA7zRvpIQ64zla2WUV8UQOh0YEkG6LRn+D8zXpfabGyGM="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.6-alpha.2_1571094862645_0.6906450757080465"},"_hasShrinkwrap":false},"0.2.6":{"name":"@react-ssr/express","version":"0.2.6","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"6125f2d29ecba545576e0c59fe4fdf24137e6d57","_id":"@react-ssr/express@0.2.6","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Ff6k9clfaEbDs5g+dpQzJG7RnHQwVNXNA5HrZZZX7dzL1NwVuATCxuVsEX0E9C4SLFTuwcc8lGjFpyJN4RLrfQ==","shasum":"91bad7af895736b40bbdef85a2bd9e580d80485a","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.6.tgz","fileCount":9,"unpackedSize":16520,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpQIgCRA9TVsSAnZWagAA9XgQAKJT4lz/m1U4Uvxou2G5\nZYbX7UmjE8hQANKJ0kVF8X6PkFtTGNptsnL5eNBjJywrltsDBjpsQKQOo5Fp\n2ZewYs0DO18EFxQhxT52sbCpZdIgmto2g9PvG10t/NkY0sZ2uuhXccp5sKoy\nxvXac66Tzjk2k7BXZPTHedGbeDDHUN6SNx/PJkFqnyyLEsQGfLq6wT+0wSGW\ndr8guQjAnctSD1lUqRzr7MKOVEMjFZCJshpB4kER0I9nt6aR6OAcQv825dy+\nXZb2uVJxa6DXp1GHfZMF9f+g41qcyZd1786oea2YtNvyWNSecIzyMPdS2kSb\nRfWpZu0eOXsT9HudPwKZ1eki0hvJvU+fMr1c7Jp3Zz0S6y87/Xw6cK0Gsnwp\nEv4G7tHZHWhY4/Pwh1twO4Rm2CEdgwBDdBBBL8Tp6KaggL8oP6k6MyRULepc\nTL+dXmQYN96kZkUPceuU0cXTw2rVIn6FtEXrNt/mjL3DD1j7kM6Xc0YL/SWU\ndpVYkjlFQS+MtZqUpBeDk9lIGee8+4S+GpBjgSYeC5iBsiY/v/34tpzVKoBG\n6wslHjuFEq9cYItRHhUj3B5fsC1o60AFqi4V+uQGP/5pIix7+LGiucpBtP9y\nSyYcYm1fhIUTrlYdcNGngeFV8QqpHXJL9x8dlGNt7Q7/W2v1EkOuVxk825oH\nhumg\r\n=O6dw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICWb3+I5dTky06PyvCGAOH7YGeabPdC8r6hYbIxM4IP+AiEAmJcZ81/5CXKZUlfaCyMX1i3wGpVhY/WSGdroPiNHucU="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.6_1571095072002_0.40378511870819667"},"_hasShrinkwrap":false},"0.2.7-alpha.0":{"name":"@react-ssr/express","version":"0.2.7-alpha.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1","webpack-hot-middleware":"^2.25.0"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"0a355d16ffb572a3cfa62c838c0323bd8afc64ff","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.7-alpha.0","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Qm25nEzOWad5uQsqVFw2YBIjgyXXd/EniXa2aebgfTkjoO4dFQqfwTTV7RUlk/7EupJdpI+9k+gygFshX4FbqQ==","shasum":"d133721d3b53c8be60ffdd202e8a1368135b8700","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.7-alpha.0.tgz","fileCount":9,"unpackedSize":16606,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpQhUCRA9TVsSAnZWagAAp9sP/jlZnpKFSk1IT63tEzPF\n7E2qtNpMDo367SZoSISG9hVwoGKzM1fgIhl/yJNZJn52wnAyDyMIcAL5+9VX\nHh4BA4VpNGOMS5198njFB+FJ/gJE0kjJBX2kRcTb3Vy8qIRPD951bElWYC6B\nqFzLnZrnR4aSe5YLIE9OgsGIeRfSIAEjRcULhS9H0M62UcKCCLLTR1nYvFKI\nfLqMCcj3dfy7ijN0cBFqY3BiQJ4/e9CCkk339Jyh0DS6dkLC59y4oHgHyn5K\nJWHj8z2HcN9ZNt3byBl6vJ5k/3NSib7itXO4FR/0g/2eq2eqzRmB5nmaUa1b\n71tgtnVTCFfznnfLkiQCWWBzPSQQu1lNtiDvU/ry7UL+eGRZTP1GBxTYpdLk\nYjfQKWeikCmW43Z49jSdFpVKEO9p/BervrGWY+Xhg5MnVI2ELTEilhVlsp/X\nqROD6ohK9MhaZIDCQiVUrToJBuSoVpofrZ4e4WjcZd/HLB3CMks+hpbWNmh7\nQHiOeoQpaUZbcBRgPCdbcZg+FMwj2CM+nlprEsebuR7e1lzx0foFi1ohS3Wu\nvbuRQ7irCApU5wGJt/fWs4YAbD09QESGGlasbt6CKCdkDyjYlMyKgvdEXOzH\nghVKlPhfXRrHuRfvOfWgWYIYvtSZs5B0ZFPQYo+R1N2Z/RAy8W6TtuwiKn0E\nCrar\r\n=EO2+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAtrsszUrqfVvaejhJHu/uydc2whVeQUNZhzppJ7634eAiEAoIlycBfu3KO8Km1RQfrirzeDkdG2JYoZ+7fHC+N5d8U="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.7-alpha.0_1571096659726_0.2579673783279486"},"_hasShrinkwrap":false},"0.2.7-alpha.2":{"name":"@react-ssr/express","version":"0.2.7-alpha.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1","webpack-hot-middleware":"^2.25.0"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"e72bbc26f68eda6e977f0bdba0c558046ae6577e","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.7-alpha.2","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-iGhnSNJmr3OdD/SqY7t8x0O39KdxoT9w5LkVaY0vdO6kF2All4GW739j90KuvyC7+2LzR2+q1krzSd4lROLHGg==","shasum":"c1678a36eb6ee32dc44a0bc890492387d670c07a","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.7-alpha.2.tgz","fileCount":9,"unpackedSize":16362,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpQyUCRA9TVsSAnZWagAAd5kP/jgWYwsDHb5EFY/YLKbL\nf6JruhTg43uWSYGx2pXkhlSzbPWMawNsAiPJUsJ+7xGjkFwSR9y7SN5QWZ7K\n6Y1sec9N3tG0Phlss4kGSk3tbqOso8jnqKVPsRHs4TLgpPXPz/D7CpdrZ7gk\nZJEj6IaU1X0iJ75USQSx0UbD+WLb3LeR+BVv2EGgSm/hAwoMDg9d6nI4a9IC\nRUvqNAukSO0/LHdNwnKF88VRs1zZ1wBys9eYsd9v4Gp5e/QQZIIWXq31R7vK\nDbMNgbZoFMHtBURuGN78+2cn2x8m+TDOC+8i6ZIdNeNX/PNLDj+ZbTyed6Of\nHrbENpFQ+AdZpid4eC5NySqsTHbkGyHppNUFpSAw3Nn+iY7kabzBQXLsrgeF\nNBjlbwKOOZ6aM1j4o1J/zDNovw41g3sRLeMReqe8VywWu4DA3I0gAhiB7M7b\nUipxfqZNWV8XQ0JjbVqCttfLE/cMXoTl4ggmRtnSaYE4eHDpG2FZlS6YVQyB\nKE9zlYAL+BA07Zx+yYim5jZaoUk/sHa7ZOdJYfR/LkEE7rBJrBNLTLw53AJY\nOYQk3i1vuSPf2BgSqTzBqzPjEeikOttnzh6hB/dRo8ZnWOlFa/3bpdZhxYKX\nfrTgzv6/r9O41xs6skNGPdbPxMfM8Mw7h0ig2rAwk6nQAAuP4/6OrfE78kE4\n8/bm\r\n=0Iko\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDOi1Vb34xqUN/GcZG1O4D4By1wvbFj7KqslhqtrMgbFQIgaf/eB/eHTcSZMKNeP0MJx339E5F23bNCwG3e68lTScg="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.7-alpha.2_1571097747846_0.7702587205213953"},"_hasShrinkwrap":false},"0.2.7-alpha.3":{"name":"@react-ssr/express","version":"0.2.7-alpha.3","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1","webpack-hot-middleware":"^2.25.0"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"d25aaee5f8d407e99b88d5237c3bde7f15824bc2","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.7-alpha.3","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-JuYz6QVVFiRn43ztImcNZwQtfyHGPR5MLfPyOc3D/jufpyZt89qQ8DJVzWfCqnIgRq8Ozt1SMMqLHfAahcukOQ==","shasum":"a5c5d6ecbf1854f76f5505aaae7d9479addd115b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.7-alpha.3.tgz","fileCount":9,"unpackedSize":16663,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpQ3FCRA9TVsSAnZWagAALBkP/RYV8RwkFOLCA5Ki5l1Y\nG9s62CoIWlJcl+vtzaRlbQpDSBXj6RmC5OwOHI7Nx8S8+SLPDex8U7HIhE+K\ni7LJE/h70L0WtSH5xpjc3gKInVjDLR8VM7lLM8hrhGp3zrPajR3KBcreMINI\n7silg0tfRZDDFol06ue5x8gNQqq88HAtsBmYmo3f+C7Afy/xAhodIPBL0WJ4\noVd5A7hKK2YQJ+uLDLyPW9CVDSS6K3ff8es/fQzaf2m1pLhHOiBPZwdWGRI3\nmUoZ1ZiTAN/aIU0Rb7wKJ+LrQSqTvC7ZfufWAkY5ZVYf/lMAs/xNcnbG7PcF\ncy4hcP1w48aBPKEfi0wa73dApV/noBMTo7NEGKqvMfbOf6+EREBWgzfy2H+/\nIG9BZ/caswWwlyEDpY0fm9yok4sOghI6HA7hHqB+nQE5nRyoRyopSPSBcd01\n9xfoGuWuYyc91Df5yoY3yix7NlgoyXMfY3oParXtPjcY49YhEDVX6uXAXypd\nK9j9RfTny+2m3BEM/VEMXyDvyXHFz6an/fM7RJx2MdK8c0WAk5qg1+fc1Khf\nvumW1E4wmUUjcls6I2uLJuw7Eb8iHihQxzH/J+GWrApoLvpx6kuSpHZBOmEy\n40/umJmt6oYPUnxSyxQHfC88cNzkMM5CQGJA1CX7zeBuqZ1SV9nUknrs0via\nPCFE\r\n=bo2J\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCSQFkAkgBEN8ew1IYyuzLvT6eXlSUrh4NfIa0elUoWrQIhAMpXIzZmLcwMa1YV65YD+105ihe6KmNoxKaDDwnKFNVO"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.7-alpha.3_1571098052996_0.6322519048756474"},"_hasShrinkwrap":false},"0.2.7-alpha.4":{"name":"@react-ssr/express","version":"0.2.7-alpha.4","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1","webpack-hot-middleware":"^2.25.0"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"ff09378774dbc24ee1a179eb56ba24d3fbc1f6c8","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.7-alpha.4","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-ZRDe1HhLaG3bur5gMCPyHeJOFMmucudIH1wPDZbcSwhaQTOlAHO/bJZFwIrZDeV7MkEppgUzjvJBwIjZvgoLVA==","shasum":"602ed304a4045d889bc79413aee4b4a08a2437d6","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.7-alpha.4.tgz","fileCount":9,"unpackedSize":16675,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpQ5SCRA9TVsSAnZWagAACLYP/j0GZ4oOOqJhhvQw+psK\nzQA5asKxiYBkXL7k+ZX0IUhXzc3O7w1mwEe3HZ3riK4nt2aaJEwGHw/lEMX0\nvT90RUxTNoxWO/iLPIYYd6qG9YMxllo9/JVcnk8lSflWlNVmXnqvGYBT8Eug\nOoNscvRObDf8DP5AvGEeMQ+jvcRNpVsZuYnxXgmYJtJRofuY5yqx8cHWG8jB\nmX8Bpt0cwz05/yhbH8tQjwX9F6gLjM9eFiHAiVSzNgJVjyZVp61PcSfOX2bp\nm5AnRCCBJ7WTgrfFhHf9WJfvU/jwzrS7RUz9raM5ASnFB8MIEiygRbbSBgCW\nSfSpxh6Dss7KqbClTZkiYnkUJf97QqpA19PbAZ3yzhKOFbgEeragGwz/rrGm\nDf/ZA8UoYccphMSG0ZB3jqVptSbv05Gk03Eh7I3s5PIiTGYqmQZxqB/4nN5D\nDoPI0+tn93R1IRq3TDa8ewtFAyKqpZ/J5T+rLHf0qMAqjQ+r7WZhBMHHuy8F\nVlkIga/pxeky6U7OLXUGr/N26Pe3D2VLq+4iKV3EjtnLqnkZhTjOpLZqPhn/\n2jeuvbkVcUyeJYq43qUixLPZs5d9yT1MGrofG0eVyjycB0MiNfedgl0lBBv4\nCWw/OdX4OaxMEx6vv38lgpP7kag9tfpyymwV+q61u2G4WZAuHgzDQ5gcqVzR\n2KjQ\r\n=GQUR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDab8b7f+3d79vSABSxi9m6/F+/DIzF7W4Grzc8Q55kdAiEAmFRoztze3JpCb3fjrX0wA5+QMQcvKLtS7z9+VL6Clls="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.7-alpha.4_1571098194241_0.1427801514724305"},"_hasShrinkwrap":false},"0.2.7-alpha.6":{"name":"@react-ssr/express","version":"0.2.7-alpha.6","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1","webpack-hot-middleware":"^2.25.0","write-file-webpack-plugin":"^4.5.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"f9909124244d743b147777b287678d80f7550533","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.7-alpha.6","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-bW2C0E4BU504LnwEIkMucDtKcKj+r3lLa+5mdXqTDvHhW9MKa3B0ZIKw3TQlK9USSpH4uzTXz835XYPEnkx6iA==","shasum":"e07014b505689368ac44afe721cef11ec5a78c96","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.7-alpha.6.tgz","fileCount":9,"unpackedSize":16759,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpRCBCRA9TVsSAnZWagAAsCkP/0gmiBMkn3szlyhWZtX8\nOOE3hOuNZvN5ErhMiZFh5GqF6UeIjMfpGtU/hqU7icobua+s0imEHXeAc8OP\ndGXa3tKSnm4tRov+5pboyqVae9IDux3Bqyo0Qm7c0GszP7pzs1hQ8YN+dGom\nqcyxZNU+mTkdHCZNlIWurWUdZ/LuTSaA+/ebxUkXyQMXD5evrLy2R0ztpRvl\nxiu86ZBeOO9O3i7mKhrYyJfVCvX2BWXJ0rp/jIlcdssWX+nlqd/3BULCsUNk\nG+I5oaL3m7l18Sy6k/lJzUpAEQ1+BaIWrny/5NxvY6MT1ugbEjVb6Rk0RvHh\nDxK3U52NLelRMZdgWNVXPFPiXGgoyPaBeXsdpOyU0acfO6ShL0GXboao/Cbg\nm1/Incs8AnissfP6W+tvqb6czO+81YRO9E5QeeEPL25sb+9dx//LhnKzIPzo\ntXXf/M4aWkiyvbQMUdVtER0nS+JqOb9y97qJAePCFkfiKiEe7Jc80oJj2jdx\nMlDM+keVK7OzFWQqVOh0rfQe8gqdcrL5pAKHa7qUyTyy3TOabz+fyZqy6NMf\nEH+Xs2f4cuOszUbL7s35c2uP/MNqWr0Mu29iD534W7EJl4vw74id8ZejzQ+V\nEXdapX/OkusTNOF3tElp8mgdGGYwrsJLNgMP+JpTGpYq5pvVwv+l/jgtHY0y\njoSL\r\n=6QYz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAZwea6UhUjytBJ/k/gZP2JwrnY4g9vG2qZIWi7ul4rXAiB7dsQ/bsGOfuOZW1N381wVtJr7xV8OuiYr48S7fsLl4g=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.7-alpha.6_1571098753304_0.12078269299423505"},"_hasShrinkwrap":false},"0.2.7-alpha.7":{"name":"@react-ssr/express","version":"0.2.7-alpha.7","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1","webpack-hot-middleware":"^2.25.0","write-file-webpack-plugin":"^4.5.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"a4f07219f17fb775618a2a15308b3a8c65b6f014","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.7-alpha.7","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-e6TAZYljfyTCzf5/HXSLRyxNTVbUE4j1qtwoNb/KedAsBSrm3xcIOF7vW1nBN8glPNWWK5+Lp1HS7dhqEmeFVQ==","shasum":"a09604a26414c6751accfc94d6a57bcd0d8da756","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.7-alpha.7.tgz","fileCount":9,"unpackedSize":16805,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpREbCRA9TVsSAnZWagAATd0P/Rcnq2PBkbT4/K8ILhLC\n0whTFlXAxV2mj+GDVw67wQmQbd1n9Qcv9km56eUK8h4iRio/FKtCrWDeo1Ef\nv+s3ZQC/8Vrt6UJf+fNBvGMYC1MtkFoB+tmzKjy9Lrn4OdbiIY3KA1jyV9L9\n3qjn30P6CefTbq6PFCOnAdB49Ts2q7b47Ik70GQyMQHSNr+8NxP+R+Hz+3OE\nXAeNF6gvIrobL7cWNG0tJcypd2F/KrX7juU3syN4KZZZKAxVVOzHzxqf2xrQ\nwTG5NjRGfToUxxGt13eeNm0AmCvHUFbCsIzFl2U8rUahyVsMFVV/JSba+lrY\ncKGWcloa8+hWeEIE8LVOEJFmTA374pX7R1O6BQZFvUnI7mmr8WMabAJWrRka\nvbIY14UCPuvt+y8zrcWShXDF3zymeFUvAV06jYMtiNlkmYJuR5SUDdVrwT5Q\nr6Fy+20vutP1x0Xy8bbdd5c0YuIclOlQQEjhbHUC+pSHKRuUgYM6yB/M/mAB\n8E6oYK/6rPjaMAzdcWCIAE0fUFYRHvlBFq15izaw7pDgzebN4e/jtWgObg7z\n/s5rKs06k+abnSGKPkPCtdgHtKNXyve51duV9CnqYjp4TXySZCL96atWcdbA\noOP72h/SeDWX1Z7bqKIZWVdz66jYJFxo4kP62hp4QSSMVp+IVr0W2tl3PxpF\nXEhY\r\n=UsjR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDQs6cNzzS0CEv5JhKJThCkhknyp547m+zAvHTeQgW44AIhAIouTe38j56o8MsvsMtuh9k68nYRMJtlB6WzapLACooY"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.7-alpha.7_1571098907025_0.6024014070000314"},"_hasShrinkwrap":false},"0.2.7-alpha.8":{"name":"@react-ssr/express","version":"0.2.7-alpha.8","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1","webpack-hot-middleware":"^2.25.0","write-file-webpack-plugin":"^4.5.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"2e298e7e2b89622899bd8d9790d142917854349e","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.7-alpha.8","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-WsIvlvsLP1JVpZk9umkNyUcp/X2GfIzyM/cWmY47F3kPo4pvCAyPwhec4YC+yQ9YRvpBWy4Aobz0lk8Sa0Eblg==","shasum":"b394843677686f825a3bf73202a8f23776095803","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.7-alpha.8.tgz","fileCount":9,"unpackedSize":16994,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpRIiCRA9TVsSAnZWagAAnu8QAIgm/YdgVUWc0iX4AVjV\nrucW01P6bPTjuU7Sc1KkRKuUKmq5NkwEJb2cnXk4k2oInTdhjMldLFfw+0Ir\naUOE8r9uqQoAAu7v6sUysaSognsXlmihnIj4HRgi4W8+0sf8J5OPgNFlLksF\npO8ePSd+sTLxhW5mLDN8HGBvVQe+Ii6srpWahXDx17qhU6jXIHMW+AteZ/qx\nanMkl9YVAI66eQNght9cbyny9lKnvYy8SFMEZpQMF3UTc0mqxTH8T7yNtK6U\nDQIva+if2abWAkVVDjmzgxYlkM0zRGBxOMSsfJbkZoQMEQ+8rL5nzr+xowvH\nkSjgkfvLdIl9p+ooB4POrnGk69vUGzPQI6kWwqffCmKPVewVaAqJjxedYO00\nsmbfF5x0olq9l9kFhsIhAW3yXAZsU273bAkkXy/mEOqNnjqj+Vv62hWGG88H\nnx4Kp9t43bn6NoNbVaCEGHSrV2gDhJUgZGPtycf07FMhicqAcV4fVVGyk3j9\ng0t2r8zXgwUXO7af1O+d4rqcfCmr/ApnvO27khQgNR4XuvFiY77Km7sV4N9u\ndC1Rso7n8YI38XV8l+gn/sw28PXnwXCMxue5mq4cUoi3nJaGVO5PR4Chr6rf\nQLoieJdRDAlRHWM5SBnzhXCVFdPEG0FDg3I6xVlPFpnlD7OCZ7tj7yPG6dn9\nxMhf\r\n=755J\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD+8JR8TZP2wPAhi68QHU7Xyb0MFYJNIzY0VqwLYUE4PAIhAJkHI0LP+qXfNbKN1InA+Nt3wLmOT6eizuoPtPguCGrq"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.7-alpha.8_1571099169460_0.1407470735903078"},"_hasShrinkwrap":false},"0.2.7-alpha.9":{"name":"@react-ssr/express","version":"0.2.7-alpha.9","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1","webpack-hot-middleware":"^2.25.0","write-file-webpack-plugin":"^4.5.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"9ba054d66da0d2efc9786efbb4cdfab09fb28a66","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.7-alpha.9","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-sE9VQIN+4rQTd2NDvlI1CjYW58EB+O3Xf3bqJ/zvydNN4ShrzAepgAVDxDtGX3ExL+zDezRVHUnRm/SKgPUr3Q==","shasum":"40b71188a411883eccae5f1c8c4ecf675bb62248","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.7-alpha.9.tgz","fileCount":9,"unpackedSize":17006,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpRNzCRA9TVsSAnZWagAA8SkP/imN3JCFyRmUqnr/OqUw\nmGAeVICmXKGeiUssQBfLd1LQ6omaYzQtMmh4DIXOkPHPETBGk4CSZD+XoqRX\n7e7xxWIb1jTaIp5K3dy1wrrppoJS1ZzceBbFyG33nmw/do6Gx1ahITE3Gu3y\nwTBXt3ns9EGNusVHiIwMrAYKhGpJFKSrZmMB8672Qzu9zOvbh/94oMv7A2Ms\n60KcSrPmwDTaFWY1ZdNIV+cfE3pVsrS8Gm6ZABnKpiDaI/Rr39eS9+VIMHl1\ndJJHot4pv0c8Ol3gDI4/usDGwlkm/x0DAxvRsuDEqrSaUMLzAnvi/S+35HD8\n5IHgyYDFIye9sxF2SsbwBNcToPLOgVvsmcr+ojeaDUj2kRTcvEAtAt3t3pAX\nJvtSEpGP2ZVP4ribEwVPJkjWWGH/WYDhX/yVvEZKVIRmmp2s6A77ihQLyieI\nl7H0a3CVT1QUcj7ap8HQvjIK2Yj9kwhXqjsO/KisWasMUUvAguJxNpcF49ub\nueZRFT6ZKZGFP6mF47hzyQsGC1LEYEMyMiSavVSCQWQHBZQVU7v9rJTM9AwS\n9nu2xW8VhI3RH1OFpNnZZB5yzp+khKFz22azIfXiL9EYA3qXXCNlR7hJpGTd\nxOaM9TEXkbNoHNqksJSZXRt2U6FwKNPIe1TlJeHqA3jGX1XHOlgzSHuIekqz\nxMh8\r\n=3i5a\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF3pz0ta8Nmz0Gu7vZDB9DmCm3IzUk1qD4qylx6/tjCyAiEAvo4tHEEtPeVruM5QuQfuLV2iWUkACPK25fNJy8UYz5g="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.7-alpha.9_1571099506575_0.023710515296895718"},"_hasShrinkwrap":false},"0.2.7-alpha.10":{"name":"@react-ssr/express","version":"0.2.7-alpha.10","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1","webpack-hot-middleware":"^2.25.0","write-file-webpack-plugin":"^4.5.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"c40e4762957d2b326090d119dab7b33f06891bbf","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.7-alpha.10","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-JTeTQ3XFlerU7UHJArBc7Z35V41ewFB2rXID3iJGEmr7sDfqCzFlMvG/xA9B39PyOCAgcYyOy1KgszWVuPgVJQ==","shasum":"2b0f4ab5c544d0f132916c8835ce1d8b50264cc4","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.7-alpha.10.tgz","fileCount":9,"unpackedSize":16853,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpRSPCRA9TVsSAnZWagAAZswP+wUEkOGAfWzCTcvkHUkR\nojFduVepZMrnUJ0ImSCd/ZUiOBc8/BfctRW1NaVW1vsGu6DY/vc87x1rH27d\nER2pHtD7tCLguLZcDPBUleV3wex7/DWAHlh2vN9Wm+udTdYQycXeYGov4ZT8\nvINvngWab37z/wWSK2Wty2vR1jNHfUleKzVcDVwc7PPFBbmQIItMe0qMWqbm\nD/oWq03G0AFB7kYC/ng2RiognAGNkB2CORrqCsPaY+9XCpCh3xdQjps2OY/x\nME0evn9WAuqnBIWTUQOoIy3uPgDeA/xWDU7s2YeJv14Wwu0GKFeqS/+qxobF\nZ79kTmVHjXCvpg6f7GpPNQWB1dlNFWKk/j8D/i8cckRm77cgWOiqgoOiC4Ny\n4+kKx114e/AlHUbcSXnMQIIOUmeEO7Jkxbxv4UdE0nkwB3lxB0Opip0e231/\nQnQnaC5jmI+GYZ1urE8zkOg1bBgoJYgqUsvA03bB/LIiPFNNJ8hWUDMuVltu\nfrGLEUkecCqiEONFYbkujF5a1DM1G3fKeM66BzEYNVtpJ9BvXUQtN6W+rYxk\nFD2O0o38E3HhGjeQDTigBTNn0ntcxTcwcNU/cR75e5EHaE/zohzQhF8xVN4E\n767KzYSK9O+81EeZxxO912BHof6mu4naRDsm7a5OxzVr3wD6q+LAZK/aQV4x\nuHPM\r\n=thu/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFlVTylmBeDJdsXbMu0dmFFOn9e4N7DiMVuYpRVr8gqIAiAyn+KpeeczvJEdMXlypC00QXwnoWfu/2CftD/RcH4QjQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.7-alpha.10_1571099791157_0.6823801553591173"},"_hasShrinkwrap":false},"0.2.7-alpha.11":{"name":"@react-ssr/express","version":"0.2.7-alpha.11","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1","webpack-hot-middleware":"^2.25.0","write-file-webpack-plugin":"^4.5.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"8ec8af5912717746301b3297afe64d179b760ae8","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.7-alpha.11","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-soJiDrx9lPzfrADe0laj2C+QQfAgPJhaI4KaozOe2qijFlXmOFAOiAab+wbSguu74tNdbfJU3kjdF3DxciY9Cg==","shasum":"8303ebc5c0f6de710b8cc817e0abd31ca43a3663","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.7-alpha.11.tgz","fileCount":9,"unpackedSize":16797,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpRUNCRA9TVsSAnZWagAAahgQAIZ7lC41/TdTV7Kof11V\nHG8/Nvb6OtslScoF+LVsGe/lgwg5qC4CIR9josjx1IF0tb+ZSnLm7h0yXC47\nSNx61lkJNFkYbryMlUugtnI3gTiHcTCBPiqBS7z3KP16iyXa1eQex71s1nLc\nxbj/TCp13kXqfQ4nSHF3JcOIQ6FioC/GetKYret0djPLUPiniQaZ4oNTmmyS\nWeWgG62mmDw1baSxHv1swYlDAqvwB1VrXf3x+tXgI4xB/JeURrnRv7XRxYdt\nFNTVnPYt+GUq3P2QmkCwaREEkoECTrEJ6TDFEfzhBKUA092bFxisjOJ/rdH4\n9OolrVUvEBurF8mdiXoZ3IJMNniPjgJegUky0OlPZGGtdEclNEXspq/wBtdS\nc+BEVjbY5ZTweOwzqzXyE0IFGJimhQX5yKj0t23JLIYZX0srUnAJ+sgRYs9f\nNyiNPUXGUcfzX0xQczU1Qe60wxNfsSa8bIG37xCBbBknhOIaFlNhQK7fS14N\nNhstkbq5n9NXi2P2VXYJo0H/RkYo9gXC9s3q1Tc4XHIwxeujP3EkMPOUVQVC\nTf/xqQmzZmRBwwLRwPxoMULm8cIiCb/mPubIpLlqyhv/noNPtXr5iOcXzftd\neYfVouoK/66jZrd3vNV0DzUeqV3km51WtE3aX8G56OUCJdmbwd6YmOYWw9R7\n6Jy+\r\n=kiUd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC2kRziOaUSqO8ImOizzK3aGqq6tLckSRWplrEuXyRGuwIhAMp0f0YhF8pmyzUYgzt/RuK64Kffuolor3yAogQlgrZf"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.7-alpha.11_1571099916714_0.987931587924777"},"_hasShrinkwrap":false},"0.2.7-alpha.12":{"name":"@react-ssr/express","version":"0.2.7-alpha.12","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1","webpack-hot-middleware":"^2.25.0","write-file-webpack-plugin":"^4.5.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"ace336e32063e6a545ede2607831dfe1dfa75e79","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.7-alpha.12","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-LY8IoxCAfmTdiC37Ij1Rse4Ehj/kUaw+d7cmM6JZdBRzWcA5W/y0EOdftu+a2eMOzUd//j5bFZ9fWU4evSu+Rg==","shasum":"bc6abdb5384a186d600dd48e5b64fe8a184b3bbb","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.7-alpha.12.tgz","fileCount":9,"unpackedSize":16541,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpRXzCRA9TVsSAnZWagAAsrYQAJbBfGImH/E6G6iBodUo\nh7nwybKCrz7Z3zL6dQY+jH+qYNHLiv2VI4UFpVmXw0eeAdm4rQMTGRE/dc3i\n4QaFqS5CJGNmZf4ZMgYtByJqrffFA80DOWJX1voL2jwb5tggtGFpaedbExgV\n88SKV7x4JokpNivyzsr5KCF6aZXJ1wnBwh66dhVpfdSSuhnenaaJeLVWx85X\n6K8WX5TtK5SrtqKA7suZwI6n3NeRKV81fZ3i1nJsIVko5oAEHsJSpm2jE2p7\noffLfp6+KmSTowFvUqaV6JDwTDJRz649ftmW19xhKgBbirx0xHjZ75ec98ZY\nCwIO3Z1V58DNWvMdIsEQyNSXwCBmRagA2RkEhe+ha2M1XCxMCEL75ZMNkqA+\nUUSsjnGywtsXQUm2+503DRsBc/Phrzrm6vGccdEaSrFIT5CvSYF9XJKPGqLl\nEdFmmvmWsajdVA7k+o9EuRYne80GFoe2veJnZaWJSdE8fzk4rCVwTD+GBBRG\nxtl8/4ilQZMOK3NISIrr6R3WtNnHb2mrpXZp/004YVc9kv+W1oyowUfJocrx\nm4xWb3bMThUmeB2+hS7pS14TN6gDiYf6ncY3icFhVpwyIXHJlc3ZIaPhcV/7\n08K6zMOe0s2Pu+gcGDPAZR8cYSTMU/rLAT5/i2rEv8sZkW0RVNz9OLDY3HVr\nmKmX\r\n=Tv4w\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHIoRj9Xluy8QGqUffiwEv/fFhRKiLqfF5zMktuzTQH4AiBaeO1qnczxZ7Rx3Nkm32/RjYhxYkcHy9VbGV4EE0mGGg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.7-alpha.12_1571100146668_0.24099537978175345"},"_hasShrinkwrap":false},"0.2.7-alpha.13":{"name":"@react-ssr/express","version":"0.2.7-alpha.13","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1","webpack-hot-middleware":"^2.25.0","write-file-webpack-plugin":"^4.5.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"50543369545aa015892f1a85fef4c49ea1b031df","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.7-alpha.13","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-d5eHuSq1gcM3vzalWYv2Jq3kPaP9cAgUeuWkPEaDqTFDr9UW5MqepyehXkfpMmjiaL35T6ip1bP1XcaTCSV3SA==","shasum":"2e84dc94d8764982382b55a3d1217b86c406acea","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.7-alpha.13.tgz","fileCount":9,"unpackedSize":16823,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpRfzCRA9TVsSAnZWagAAuh0P/0x7a4CqE6gun4Of1PcE\nffLwGvEbLv3AvGPSEpIgnV16XzhI8ThALptgZPgv0TGZVsNc/KASE/cXrW4q\nTBUZbN6eiAD+Y56mPc1FAsydAGzuB6tXoGYJrmbi00M/1O3yFW2PF5LPucsm\nAf1Pv4OGFyJQOQhkli5GkSUJ7apZmIkfPffBA1rb6DoJxYt1UL0PttgOXROf\nTqsxpb+cRu04xVlJzDpdfsph6c913uVwxp+OUHEa4FsA90UfJ4QuxGi5wLoQ\nxpA3qsCoYIoAoRu9gugkgHCprQ8ARU/YKz4OpDRuvCdfEDoNJyzPeYJbrEbd\n6BynnK1AvnNt7Z900iu2a+w+nRWIV77/KimnnT6vrRM/VPcYn+yvsJDZzcpB\nYCHdl77auqsfkBHAM7aH+eWb0IOzBIQnIA08sBlOL/wi0WG0mE1FSgbWoCVL\n5zYnC0djbSZWZDkaBYYV4xBHu6ygJQEbHqzkc258jPiprymU2s8LrcGB6xmJ\nDMxCmEyLKvFIo1aaup42f8lzoSAsjwJxcr/j3LcRmPnHa4LXLsAqjo5SschM\nmsWEppgxp17BycD0ixlQN0fEieyk9xoyeZxV5F0ouuK+JfeGPI6bTc/guzbj\n5tjHrL0QmAZRTAO1RjVxTV4YFBozHSqr1olkcWg2o7Ij17M3HoPvZZBx/3Sy\nAx5B\r\n=y2hD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCfH1cgde8gODo92/5xGMuuXm/nde45WYgLzF7l+yfNnwIhAICXBfyndArwV3FbdWPT7z9u8MQskrrmP6kU/MG1u2/V"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.7-alpha.13_1571100658883_0.08176302918499356"},"_hasShrinkwrap":false},"0.2.7-alpha.14":{"name":"@react-ssr/express","version":"0.2.7-alpha.14","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1","webpack-hot-middleware":"^2.25.0","write-file-webpack-plugin":"^4.5.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"56bce6071c0b6af85e2cc9cd174e2e159ca90648","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.7-alpha.14","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-mvrodXVgl/6E1GmG1PGATUN/69tzWICHcoMnbs4VMk8vIit1bF+rfK77jEHm57TYjuALjlKVEyiOW/Fu7rLKhQ==","shasum":"88605e530ee4c9b929dfb57d0a055b7e29e13471","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.7-alpha.14.tgz","fileCount":9,"unpackedSize":16892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpRlMCRA9TVsSAnZWagAA7FcP/1Yv5+DrHXLytRynDvj2\nCvDTe+lx1Y/Ikpm5EUMXhZXROY1hLToQMxN7K2Nko2g09TZzEpxHa2E6rhuI\n/0girAWVfbDmJja/PQXfWcFqV/KmNyrEbwgQypoFLKUdOcHThnfWI6CsxMpA\n0exnXweLWl0OGaBoI7MRdrsDsUSu77OeM527evQC4FwoOz2RIc1qteytJc/7\n3nowiDaxdaqCxO+CYPAuoE2UnFLwd4Wp6HUgAXUqa+gre8M2e2pjSVzCmYhC\nFUsCjWQaw99LovGLt6cqJ2qIdH+GD6+PbCIDuua/uGzP/7tfrW0bRWKl4hkD\n4r6kcgz9UgwpfKsgQAvxSUAZaX8FH1y4FpMG9IV201fL9IobknCotPQMGVXC\n/fu6Edd5khIz5zTozD1K851YOo02nstgyJhpXJ5GLdTYAankNF+MzcFyyey+\nioiegvNY5rp6UUh16Scq5cAkrb7lmBc6ZZaWV6oBtOJv5tSHMEds5GQnpCgC\nMlI5Zz88aml4XzgPNeCV1hh1CSnsC5XG+VxManTDkMDmbt8pX1fPjipbz/0S\nSdC4Uno74EHx8HHta7XTKLbBfs8fNSj2nj7uNvBED2j2Bo1/aBmcMiIG1tin\nyq4hx+uLV1qq1mANsNz95h0R9BRAJJsO5uv0u+ZaAEWpMCn5+34y5gftn5se\nqZCN\r\n=mfvV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCKU5Es4uPKi4ioFOLJDR9PXX8qZAPF/D0Io2FehRhHBQIhAMGquSHLhRgMdduJew5O4KhbIphJwX4mlz2aNSmS34eW"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.7-alpha.14_1571101003289_0.6140518861572406"},"_hasShrinkwrap":false},"0.2.7-alpha.15":{"name":"@react-ssr/express","version":"0.2.7-alpha.15","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1","webpack-hot-middleware":"^2.25.0","write-file-webpack-plugin":"^4.5.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"6e42ea08de9fd5a7e710245331cbfb85499219ed","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.7-alpha.15","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-PthTWVqgV4dtHM7yJfY59tuD8lmWQXMvNxRuxvGW9mdknYFu8Bd8IDpmsPD6mtt/fAK9wh7o5hcxmeI1GsVUHw==","shasum":"a2d806ab3bd03527719359549765a1dc4fbcbd17","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.7-alpha.15.tgz","fileCount":9,"unpackedSize":16903,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpRqFCRA9TVsSAnZWagAAm9IP/j95kedQubTClEB0dACo\nc5WoNfGDqBQds9pdcRuhnrHQidt3EqV5yWDrSehQLU5MYivfSordOFOahy7z\n5XMVF8zAA1Qc4wZ3V1IpIwU3igK8lNR5zDsVmiX7qzZ7RvBi/YVGwbzPRLns\nIHmTSV8SOc5JnUsJLfcbiQWmRE3WDIsFFBuWbxOCeeSfxCsoUwGghmcUEQkv\n7scl+PRj714EcwYUtqqoYkZU81qSOyg3eEM33rUDiaem5hFyr2oaaQXsbi9D\nSkh8z/7qaokxX7PM5PUzOYrPljPYr1i5ay+iJaMRJl/zxU0DmdiHUw7/JDZX\nYEk6JSwD0YtwM7stVv0QXnbPbATQxRUw6iExhX4FRz+B5Di1BmU/8YmblE6Q\nzGoOU1dxUBnDqJMdd3JsLpJBAenEmLK6ALNIRWm/tu51H8p6CCgckEeM2+ES\nFTDZgBMDV/0n6BFSFslZ72ret75J9LdteNzim8kZPoTKyBNNvxs0zPC/Fw7U\nb27KoI71laFZ6jl/qNEuHucgJTLwF7mlfWldugxthCK0ppgtmSo+yCjYAJ2X\n3WbkP92mSz/RXVG2Yy1I/+FPI1iP3vtDKLwx9ceZSd0Xj9rgAGqZPEFZyUKy\n1AMWcD1HHiTbxr7jxGp0B6jt4/Y+E8aLnzR4wRpjPKOgBmX7oOF8tX8y/wvy\na3lC\r\n=WBo0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGowJ5/e8ODNXTkA5I8V+FV0GN5+C1xp83nSH1Et1VM2AiEAx+yc1lPOQsqykU+edaNhheqkX8jnHKU7ATN/De7wPyI="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.7-alpha.15_1571101316076_0.23774109641614993"},"_hasShrinkwrap":false},"0.2.7-alpha.16":{"name":"@react-ssr/express","version":"0.2.7-alpha.16","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1","webpack-hot-middleware":"^2.25.0","write-file-webpack-plugin":"^4.5.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"24dc4005811be8e068982a0ab62bb849d7510f13","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.7-alpha.16","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-bX5lLoCXsrXsQPi0t71goznxSIWXDOyXP+gHSrfm/083uCIpEPrsKMkVDskAxqjhVYjWTKeBqrcNekNtBFhJbA==","shasum":"53852ddfbf99f223604b77cb90f0256e1f4017ff","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.7-alpha.16.tgz","fileCount":9,"unpackedSize":16904,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpRsaCRA9TVsSAnZWagAAQNIP/11OQK4GwmBO0DzLX7xA\n/mm69aVwRbR/Hc2ukBSMQQISJq/L6eKp69dCttXhk0doeLCogWhQG04MuI/v\ncv+aOG+HEct4EyPoDMvElUFJTmokmamGmITNPY3+wtwCj3Cnm4Tinp5u2dcz\nEIdnyo05GtLchncTiAZf1LAV6MYg1P3V6599y0cypjPn21SgOH+48hcwft3t\n54UtRIy3mnxMnRARkcUGxgQBd1P/wVaumCkh4mGoZAr6Y0zoqODTFqHraI4J\nh/4Hz0nGcu/qCthcIyr81eNpVpaO+u6Z+7XYtEGr4dZzEoLwtiFXWPDzbWtV\nI4vdo+DteVOlT92uNvZIdGlWBivx/73rVGe8q7tfoSn9Jb/cenTZ9qIXr+me\nyzGSNhJYktFbVOWczcHBrw8X0eczVdO+KOzlrIjpYUbuoui0PX8S0CNB6f0D\nKV8d7jh4J5gr+A7ZRnnIXMN1IGc+/WbJtI1wtv5DDwJOF9qdVfut9Y0WEmTM\nEP311+7l4SZOvaTs7i4D8XgWC58XH44KUy5tM7qVhgKTavLmyXFUCjbRCiNZ\nOcI1J42ftW+v/33h4LmiQQf4cED5F7oTHhVSn4Y+syHB0NeRbPbVxmt1Mr3w\nx0lJdVUCrS/cLKRY1tmN9eVi3/vfehvXQQsf23E/66Cpxgtzz2MYawVd/Eat\nBST4\r\n=LmtO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCwbEvmRz2KoF+rySJ8CfWUbZ5Aa2vxv6IjcJu+c+kBtgIgFrN7fUKI3gCJIm2qPPfcoUYRSLce1zgHmXCyPWYJL74="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.7-alpha.16_1571101465747_0.25886217513554466"},"_hasShrinkwrap":false},"0.2.7-alpha.17":{"name":"@react-ssr/express","version":"0.2.7-alpha.17","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1","webpack-hot-middleware":"^2.25.0","write-file-webpack-plugin":"^4.5.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"d39d2c471b786bb3ff03afb11e0c2f9d53140600","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.7-alpha.17","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-BTVsziRjOszsZhCAP5MxgEJPxcqhut6hlJzfP/l869Qa6mvzd/QlKh07USGQ/vya4bRoCsEzwe3iRwtnn3vJsw==","shasum":"48f67773fee80ea33c88abf1d5ec8e4919913f82","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.7-alpha.17.tgz","fileCount":9,"unpackedSize":16861,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpRxcCRA9TVsSAnZWagAApPgP/0ZsvWWVfQXYJrue5Am9\n/0gb7U/viMBnlvWBGGN/jzznsIu5qx0jgHdTSFyJBBYpOdbxHLRuLHZxRr1/\nkxDeLls3YmHA5W6D5fOul7dk2xPS/lzfT91g4Y9S0rgmceqXqidjm1Ro1hTF\n8yEfqKOXOcS5+OSJc0tCag+6IQmYF5gl+ehAy7DbUf1q+4wAKLcYhQchm88L\nP9VYAGtQbf6rK+WlSG2bCHRp0Tug3Fb/vDgBhvv356kERxzdplJ17W2GIVrh\nYTBNGaT1bCJ/nR7nUnqzaZUbhDWqnm+tpytxAgkY3uVw0ZeHrp37B0DV5deX\n1Q3vOyG6zmqJdWaYGQclDykY3Wue6w66U+kYUNvlao5HyiqZC0flL0SED/ka\nRFJvinPCdHTesuRXfGNVr445mCuvTIzlO2rpEKgg+MlUWbapXKFiCyZ/uTC5\nWB240Hqanod/ViFLCKemet3nwkynnU02wFkyn94zmS6moqOovYlGsZCLlr1L\nHxuOio3S4BjetAm2VveehinVJY6jJdm9TvJahXgxzuhqV2k2s+VsRS0QRdsq\nIyeXJ3DXzLELWY12qhY8QGxYrOXvYIfAHXcAbIUBh9pWW7WGWTWDINtPlfEE\nv/Ew4ng+M3c57GlwxbaZdMWQjNXj5P95h/bjvPfYpb9Y3bCHQ3Kf6S2WCGZd\nTv/G\r\n=+sLK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDd4yuwdMbZIV0BVZMMk8NDtG9tO8v+plA74paQsV4LmgIhAJ6HxmSou9nGEGa2Q2ClGDHZt22N/ppxUP4Q/64Dv+KP"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.7-alpha.17_1571101787578_0.7489530139622849"},"_hasShrinkwrap":false},"0.2.7-alpha.18":{"name":"@react-ssr/express","version":"0.2.7-alpha.18","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1","webpack-hot-middleware":"^2.25.0","write-file-webpack-plugin":"^4.5.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"6fc0d575ded8451812b2cfa05ea4f79a796dbc58","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.7-alpha.18","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-tN1lvhzfCwrwXFK5En+YMEi5T/bAJlhs3c9yHZ8seJhnOAY2g1lYlkOWOVhDxhU36QX2Ten3JBVf/+5S8t0GhQ==","shasum":"2a6490d954331db7cb8a922ec4969ba286b1b483","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.7-alpha.18.tgz","fileCount":9,"unpackedSize":16902,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpRzvCRA9TVsSAnZWagAA7NgQAIfSmjoZI5Z7svEBCk1y\nZqvEqjowCJmpjV9rpV6pjmaqjEMC6tg5UvlsyUNuG8cRLYMhjHlyXgVru2XZ\nURLW8kWCABFWj9xKfDQqLdw5kIiixlWULAYi15Xa2wBEbqkSVKHvetjeOJXM\n0g4JzkS1nqbUfKygRKr9MoEp3j7n6JMLLavEz3rnd+6x2xLLK4XRUrTmNcsf\nYPlHx89e7B/rD9+ZgjjldSpaqExyU36KoGxRVNhiI/f+S3ojbXrlKH08g/Hr\nZizbXL0SPwZsfkbFjl0vqO8MmUVtwpEsuCyld+suv9Jg2E1OkxgMehd7l35x\ngpXaLWwXE0HADvWEqVfPUiz77HXFz/L4w4SEESSINpGFh6Hm3JEUdhjTEame\nlIbPBoXq9bB3vWh5qqRFQ1mNPn9mK31ktxLaUkjYyqTXg8M4koH7tMxNgT8w\ndkhFv8rmOi/ggU+wlkZsoo91O1AZ5XqkR+o1gjIDBXWlPOWsfx916aMGmzJq\n8A5cXarjdw5Ezf7DtW1uo33V8GZkXRmYL4iYkhjWlJgP4GFqTvO0uZH6o1tf\n9PkbhX8msClTFvLBZ34QTMHd7G+aDxh2CCVSI9AwYqZyFOuuhAKX8pUIyrf7\nN9M/PD1m3+viDB2e6GSMvJz3uz2W+n7nVpuyv8QS6QjHBB0l23+2L+yVVewO\nKKBx\r\n=FSh/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFMpd3IDW+KCrMi9xwUIotOaQIfLGSb3AodIlDApo5nQAiEAop1Xv69F38On747mMV4LwMvkbapdDgBVGnACzSZu1Zw="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.7-alpha.18_1571101934961_0.9609367963271935"},"_hasShrinkwrap":false},"0.2.7-alpha.19":{"name":"@react-ssr/express","version":"0.2.7-alpha.19","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1","webpack-dev-middleware":"^3.7.2","webpack-hot-middleware":"^2.25.0","write-file-webpack-plugin":"^4.5.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"764883b6d124be75be45148afa896e72f938c7b9","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.7-alpha.19","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-w141mhmS2k9745tUibZUvxZtEfZkjqy4NFyLHu4x0VZTqN8hn3mL26Sv6Gs2S95RLmnyfXeTBa7wDEHNMXZCdA==","shasum":"35f0c8a6177c7d64bb1cb191bef6dad26be12568","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.7-alpha.19.tgz","fileCount":9,"unpackedSize":16966,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpR6QCRA9TVsSAnZWagAA/ZgQAJRKQquSGbAO7jfJsAVg\nhjy9g0IRX4k9OjGjMeV3d/VSe27UDX/h5TVharB0HfyIQrviygCtL3gYEkTm\nBuco+Kk+Tyj++dfZBojS3rq0RF9YjCDGbKCXjyh09ChxCNkfYnu9Idqp3fZr\n2Mb7ZUz2ljDxV4CbRy5rVpWXMcB+oC8OGvyTdH1n7E73UURM65Kf2anZXiVb\nSj4ABX37AfNmJL+obq6M/N5vxG/Ui/d3eK9s2aF9aUwDThxDT+CBk5BzDGUO\nAsWUf3ahE0OcYkkl3ez0J1hGHbwu49nrO6hDxx1XBUVm1n/tqQhSoST7SA0H\nGhCjgI0BhjNgG6XA6jTqz+JIWf8teJfmqS2xQk13LVG1jKsp+4IqaxG0V9C/\n7oxgBowGMTZuk1iqBPHdlP1IS2QnKLnfguG5sPJtlJ8vGQJsWcv5TrJUMH9d\nORce50pcW+c2/v+CnLRVfc9425i9y7CjjnGq1KddAUq/WKAB7TzNoDs6ROVt\ngLvX6dLw7mgLEmrCVexFTHgYMEj7nu2xL3f+cj/V9SXMSVoBHbUKXs9Wb2Ha\nmt9wtsFWBTXLBlt3v4Lozkdy/MZE2Td9rBCRwG3kCZqvRMJw9WgS52CSQkIe\nIGfUlqjFZIZchQScITl0AWJdlGvSo/1JePqfV9Tag1yMY3tHl56Czt6MxlEY\nBb1N\r\n=NzDM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCj6t9CP9SVCadCJIP9fSmyNLeGyKNHoidBJSXjtH0RTgIgLGRMjf+dtZCFSDTH61E0zeQEGBlKMV1Mmo6kg9hhdRA="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.7-alpha.19_1571102351511_0.022465069345989575"},"_hasShrinkwrap":false},"0.2.7-alpha.20":{"name":"@react-ssr/express","version":"0.2.7-alpha.20","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1","webpack-dev-middleware":"^3.7.2","webpack-hot-middleware":"^2.25.0","write-file-webpack-plugin":"^4.5.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"4d0d3b7836d356531774519a0c1cc0a9d37a1dde","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.7-alpha.20","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-5P+r9ehZskDyphqKkAvInNSCZDL+85Uy66wGtGqCTpxlFbF8mK7XGYXO0tpe0JNIg5X4gOt4kAf3LXjtm+hF0g==","shasum":"99fea2aa504816c23342255ce63316b51dd3fa4c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.7-alpha.20.tgz","fileCount":9,"unpackedSize":17043,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpSGrCRA9TVsSAnZWagAAHiQP/1vlr6N624i7cyQ7BDfp\nr7BUk24Fi0WfnasecEDEqcQmDTbqkfpWS+FDWpiWCqTEO2cT7mO0kNf5jOW7\nkkLUdgHR+2VD5NZTOhIR3iCMjmYcSN552O505rJL8yA3Rn36T2FWNikQzLzx\n0X2DCYAPolgXenY9qyjakjDZ0Onnyd0O5CNI8KBXT7ckSYf6mHv2EKYfgQ+z\n5rt3mdHmxKhfivbJYhK6qmjoDKBdmLhfgaQlbWrCm3dgeX8wzn1tiAgQ8pvB\nA/sP6yTblepv1fZMm4X1zDHhcs4ujE2+stOBsH2bkaSu37OZP3FpwGlEMxb8\nAuebTieu6QLO4SAGOH02wKFWMUxSh78xEJ2amATJaNwEcRoWUxUCCYQyh/h7\nvE+6wraJKbAybQh0JQtZHM9zh0w7MuykA7GAwpKOE7Pbz6j20wCDVLxW2qN2\n8n1zAR3DF1UPZop0AiSupPikTfCJLH5kR0Hp8JdqtvXNtu7pstXoXKaSpKPM\nGJwaXq9wFXyzzdshnmbPpTZAKY/tsWyQbLy1kHQe2tj06IdZ1doZtPpphhRp\nO4K1DgG7DXd9/CN198eL6DY8yKPAMMRCK26X9OkePjwrg3kjXC849765DWil\nX9oYoVqzukB6+afK16G9mGdJQTDTZzlZ4XbAx/Y8QXTCUjqx7oHe1eiDo/YN\nYJw8\r\n=fxCO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCsS17zQHvCotWgbPwSZ1OReiBN++eSmqT+O8GVeAaaAgIhAM1ffi85gLQ4qaHnG5ZDd4fjg/PRnzQdRGgy5qP8nmmk"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.7-alpha.20_1571103146607_0.7773147945302148"},"_hasShrinkwrap":false},"0.2.7-alpha.21":{"name":"@react-ssr/express","version":"0.2.7-alpha.21","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1","webpack-dev-middleware":"^3.7.2","webpack-hot-middleware":"^2.25.0","write-file-webpack-plugin":"^4.5.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"9f704ca99f44ea993e52d40dbdf0c60e8357f52a","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.7-alpha.21","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-4sl99oLoIrGTCI4CKHPGO9mvF3lKpfkMj3Np9+6M2PWkI/yeE/yQAsv/8poBD2yBnKGb9O4AUP3TRKn/cz1aHA==","shasum":"c36d087053bb0e4dbbaebde3d2d261351ab1361a","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.7-alpha.21.tgz","fileCount":9,"unpackedSize":16797,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpSUrCRA9TVsSAnZWagAANfUQAIcxXbsBF7uge34CwoZX\nvm+hdZWrYlwrtY2FaaWZs7mN1yU3ieuERmncBsz8mz7hOAVT2M4jAw3nt6yK\nrj1Ud8D+xEJym/N61FuD4xkUxpJlsfvmwlwUjbV+POSm6kji+045cxg3nOQH\n5igp0Xf5YwjRXr7UIwB1EnkoS+BWU3FCsGDXm7AoLDPiRfu/PScn2d/3qAAB\n0bmcSLmiKfAPGb9ooyCgLQKBSVqk21mKqNA/KtvqfiWwtzac3tCZ9jy1vDkF\n/DimEsXADMrpRtJPA0b1Tfd1DER7FEppJvTRgIDOrS9zibT6bZx0pXBy/FOd\nvDvANNuhNzD4GAkAB+WsIfvbdOvR59ZYWD7bM63LOL6QHCGgHg0pF4x0BNUY\nmVULW03EHaBIaak636Jfw+8VbfsxzjhdeSodCdCXxyGEmh3BibaRY4vAVu/h\npa0u9f49cRK2LNUM+5D8EGU76t+LN3W9/dHP1XNQ9WxatMzrSyn2d+nRBjtH\nrlBlkcxguEKBWWvCLutXTtOwCa0IFOEnpaJSKJvbczLwri/hcZ3Hyk8bOvag\nZ9jX4NkCjIQ6j+/WXWgAHMtFUPTvIf3ZkKu4ovNFhgjCSUoAO4YHhSnOEWUc\nnnj4upMPjeq3kFi61PvCPsARrrkvVeQWJpQeqIx59f7U+pzdZf6G/2PVRmme\nTqVJ\r\n=HZ/6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD1DfEQGGrHK6hd2QY/dvkBTxYHReUyHfpiYHXwepvhtwIhAKjZds+qZ+xy1iNAoB/fV69cItlkYkNOmMuYOTq+wD6I"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.7-alpha.21_1571104042965_0.8418629928416563"},"_hasShrinkwrap":false},"0.2.7-alpha.22":{"name":"@react-ssr/express","version":"0.2.7-alpha.22","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1","webpack-dev-middleware":"^3.7.2","webpack-hot-middleware":"^2.25.0","write-file-webpack-plugin":"^4.5.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"7ced43a77c4067828056649ceb85bcb398153764","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.7-alpha.22","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-yOaCYqNEIjWIFhDwsFg/ybBcRuaI6/Io34GOHyRVhQfpqSsOg6ZLZmbRNR85d/H1Xb/QCaoHU2Lrdi8wkwNWdw==","shasum":"64ac804cc80c3535db89de966b701c1048796dd7","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.7-alpha.22.tgz","fileCount":9,"unpackedSize":16865,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpSahCRA9TVsSAnZWagAA48AP/3EaaJ+vSylSvvqDaO77\nt41kc/ojTmCPMtQBlCfJPBXP7HPiQ4ta6ucXR1f8hdeaxUUIZDsY/pGz4WMZ\nZW+2egzqEYSibCEDqQc74JOtHvoKd3HlZFr8BYFflH9h1MdUScb1qpidVByQ\nxvzOLd0KON9egmmx7Oh7dVhGaDUwF9i2IJSIpKn40vyatRfwiHr1zPpziam6\nIjbl70Lff9+x/RURzVZ+L6sLq3AdIROGXoQhQkqnCKKph4RAHq+YNZ7E52LU\nqllUiJ/78u2H2lMV3AacPSPr41vLk41E/VXylt5v6jWI8mlOGYSSHBOxJKZz\nNhPWj4M2CYzgXJlgfYPYv+aoubmjEwILmK4X3r3V+3V0b5FP+MOK1aP/W0I6\n5zjEZVF9/jsLjjsNyLcHvUQFgBgcdzwbPFtbz+fABhm5jxjREFmhGNTuatU9\nFdin0s4juukxURyEYybtDSi4kUIQDMdF8owpZhX3qhrtI2L9TyF8V9KuD6t5\nTkJoKwFwccCn/N7PmqCnICGQ508PLWbQ+vFrXhsOLsy0sr+QBCAI0erWAb2/\n8d0/2yeKlQLAS9e78Hy/opQdNCSwzbMhlSbQrLZ2disBXlrYIezULKG2pIyS\nkIocGyYw2zBsRXP+jr7PpFNWpevGlF97PewHyYZhGUJNrvJ7c1WS9MGWdN6Z\n8UOr\r\n=TbO9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD5mRniG2wS9wUamHFn1tLTpjrffQ/KCH/WzIatn1V7NAIhALKFDN6Rq40dic9P1SqLg6iTqf0/8VTUOxPNchiDMpqK"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.7-alpha.22_1571104416934_0.9418498581232826"},"_hasShrinkwrap":false},"0.2.7-alpha.23":{"name":"@react-ssr/express","version":"0.2.7-alpha.23","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1","webpack-dev-middleware":"^3.7.2","webpack-hot-middleware":"^2.25.0","write-file-webpack-plugin":"^4.5.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"cd136ce4766e1d372fcc97fa5304a35e4ed29dad","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.7-alpha.23","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-k87xWYIR/8oqpkFkjBUFtIKK/R+kKOrutF/SW05pP4K9++mGoLb78dBx7R6OnjdE28jPFlSbB5IO4t86YhPNTg==","shasum":"af4eba3d113b49e4a622572fc07c3f8e400adf82","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.7-alpha.23.tgz","fileCount":9,"unpackedSize":16880,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpShFCRA9TVsSAnZWagAAtR4P/AlrHb589Lfmuw6oXBo7\nPBfjhL5hxsHfaSPOkEpnGyGPtEMwHN0toZiXJibzf8yLUWUUvGTI7sTDzHM3\nAR7qq2ZRLzC2bGspKvbaECOWXiDTFxrQAEEymCKwHY+JhCdNelLInZtlC99s\nBotO3rAnLSjWOyWjwF4W6p2Fq6QcIX7yDrtjkC07BcIwDKc6esj59ZPg2zBk\nfX79rLNWBHu/LDzTYnTEb5bGkb9sPbW6XfGk8RHu9yxVGAZwVIB9OVrGUSri\nKqCPnx2rfHwo/2yEU6Qun5sbzAjkw5MegLeBtOYXPXho9i9gh6Ro19bo0WJb\nurB9NdLT6MItyTpWMjtDETVpVfXyVi+XxQYDJRn3DSEIaTz13FDyzCzOYcdo\npSgWcneGI8q1L0fslCm4bMC8zuYhUTVS3KgeD8Wr41Kf/9FhCetInTBgyKBk\nSlI2BJ55suyq+uCLjOeOhvPjO2adBWYWpGjWSwsLebwMgjO1ICEZz0amYYbE\nkBjk/CdofJgnAGks/4aWUbYLsE9KvffhEctgiUBmS0k6hyc+NM82+cIY0i0b\nqv0iyk8CH5QOe0ZUWH8hVfFptiKZV+mMLal2qE49M+HrZQd6kvp9AgeV43pS\n+lfogtwIJtmc1fFQ5EohRJDip7aYdMER4V0l6pMpk5nY/5HJxQOu0z0dpgUH\nil7U\r\n=bynJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDQqBiWz9kimcWVfWC4+FU6s5yF+4QHEh6YMQcSzWrjVAIhAMgZcxKIFeayvOjYq04n+1zmjg+ZwqQG+1+xORuu0a57"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.7-alpha.23_1571104836986_0.9466870254675515"},"_hasShrinkwrap":false},"0.2.7-alpha.24":{"name":"@react-ssr/express","version":"0.2.7-alpha.24","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1","webpack-dev-middleware":"^3.7.2","webpack-hot-middleware":"^2.25.0","write-file-webpack-plugin":"^4.5.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"375a47d3d9918978b86f67f17ba96e862a65bab4","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.7-alpha.24","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-EtX7HZZ7h/knaSaekbTXerTH9InyWE/vk0xeJNXd6cfFKULxK6E6NHGw4RqJvOrNWYA8slSbXVUFZNJxQS0SJA==","shasum":"4e993380a58e4c6988b7c8b0f76b0a7b7da7c945","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.7-alpha.24.tgz","fileCount":9,"unpackedSize":17013,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpSpFCRA9TVsSAnZWagAA4jsP/iHPsvcZqMExRab9IThY\nvRGM00hjydF+/6eTYL9e8xZM1Vub5AvE1zoi+GDcuQU4fE7Grf0XE2av0slM\nXb0GKcZnKGf42JFs1OkhRuUrWyl1GPRWHLwUK6ySVXLii8KuwHome4XoItCy\nQvRzegbDRYjwu6M8AJjCHR+Vj+fq5ugu1+F7Qbbae6u/4uesrSPtPfEvAe/o\nsFYKDdeX8zSICajfEYaGvwC9XqrGForyomnRgolPt5mkKNOUT5nT7pUPjXEc\nm9z96QnNAGsrVnYYKvg4VGcKoJi7vLFYGj6HMEz+v9cL3E/ximgZaymdXSEO\nILYHzJFMJ0HwrigFDAA0qeCxtqfEU5hcqdSXTqfvarhgpw31AAhmN8XVY6DJ\nKEk0CYOYMq/gSzJrinbXB6CpdyBq2ZhCrZYOiQuxPZQv6I46RNSEOFdjtfdK\nwQuwv3mY2/V04+s8MJTM5WIBgmXalWq3gvDIG7K/MwOQDCuNU1WxTeRBbYxg\nXU55b8Ibk63mp+IZGlzQMegbqDy735N+KJdamb/kA9UR/bB39+Ze2jrDqF9E\nrcR69RGvThs74KdEDnh8rBDsnrG1rgSpF+3QEC7T6+545wDfnwXu4m47JaFP\nju7NNC84MrnV3fCsUMFIh+o23T4l+2/Rr7sKvXs2ZNh3zLHWv0fwj+eL3AJl\n1tjb\r\n=JXzQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCTtPvUgoXHPs0JkHLoT6M9hBQ36Wv+nXQ9mPejY1VdiAIhAICzLiD1XfZ2hnNJd7imuIiPB5L7Tb13//YqAxXly46q"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.7-alpha.24_1571105348897_0.8959944890409919"},"_hasShrinkwrap":false},"0.2.7-alpha.25":{"name":"@react-ssr/express","version":"0.2.7-alpha.25","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1","webpack-dev-middleware":"^3.7.2","webpack-hot-middleware":"^2.25.0","write-file-webpack-plugin":"^4.5.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"458f18664d7e30c08a0c530d78367682bebea160","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.7-alpha.25","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-6pnbWKhzLe4xkN5+Y0gDHBLLbsSkxLs1UrKVSgIT3I21xIQbhj7RNNbpCskgQevcD8QcrP8iK/vhW0BXNCVpqQ==","shasum":"3f7ba8b123d4320cae3c5942d029db0cc647aa8d","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.7-alpha.25.tgz","fileCount":9,"unpackedSize":17082,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpSvPCRA9TVsSAnZWagAA/twP/1QZQMOeaytsWnwgqzAb\nAfC0ajh4fCwnhRP9co+wSeksuxOCt10GMT8YaKRbuWws1GqRt3sWLIg13uz+\nYe5FE+GUGWaH7sOCErYcwKlfjsnafx1ql/Z90DRVPrI3NsO2iiMpQpQjojc2\nYKkAeOwKUEvem0tgx4/+CP0HRaMPPng6SPj3/a53piS11ghs3aj1CHC/h2m9\nwesbxIo/IDMr3zPqzemBcBBokF/Lj3Bry3DA0ZjTXom8cRfod2OdeQXPbV35\nRufh4P/ZutEVveNjD5jVsy7UJiE6ZNzA9EiCr009SkzJwbP14MrVk5ld6YCQ\n8lfRhKwjVar4GSoY7qDg155fw8BD7c5P5xg6agiKQqdvotV8MhKcNk9QK8sT\ntf6rA3FAZVtuEwPGkx6a0Yr6DkaZqFN3Lym/u4KP+zd6V6kc0htMza+fsbYO\ncOb1TrBwxQz8p4xex5L9ik+NEkkdx7oTe2o4HBM6hw5LlL5ZYzKvGBBh7k6h\nmuy9mjdC5jC5DX8b6XYlUaRXABSNVeWk2gbtstOQsZavHKKhxu7w3X/ht+b6\nU+t3l0p2uWk1aSQvrNOgm+EYvh9PwZnobdJLzKwpw93WgX97Nd7/uFpUnW0D\nbN55QJQVEMXQMStaOtg1+GoZmwEO3Aho4EspSsgVJQVBbkvcqsM6eJzxI8Nb\nlrI5\r\n=hKuH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC+OqSwKGCQ9XiN4aHLcnyjzGumYSwB7xGBBtCZBdzzjgIhALzDijNrteXsWcB7ZkHTcYWQCzZPnHaqWgqo+2J5pCcr"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.7-alpha.25_1571105742350_0.49308861882927957"},"_hasShrinkwrap":false},"0.2.7-alpha.26":{"name":"@react-ssr/express","version":"0.2.7-alpha.26","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1","webpack-dev-middleware":"^3.7.2","webpack-hot-middleware":"^2.25.0","write-file-webpack-plugin":"^4.5.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"469b3c57c88cd0590261df14b34e1346a2a9c207","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.7-alpha.26","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-qlzCTLLauzz/I/CxpwGKNOSNhddvjqwopkMIdJJb4KCBHvuOWiBMDuRtIF6/fKK2SrZcIs3ur7taCJnHjMCpOQ==","shasum":"cd49e53cd47a2ba1e4e5d7be87365599e0a82bc8","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.7-alpha.26.tgz","fileCount":9,"unpackedSize":17122,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpS1LCRA9TVsSAnZWagAAJ+YP/RTuQcgmTUcuM9HkONON\nVuVQJHP0Jnoae4Lk/0OwLOWiBEoM4+Tg4oEJotFVyM9TE5uLbt/LXOTaLlTh\nNqd5GLbh7nmu+qxOCFW/7zNk1qL/nL00MxEzO38zreMyb1yA/mXVt/dnJkns\nkBeY3dlJJ30WXUjCVO/zzQXpd7fIB5zaIAoOdBpbGE2TL7afTJtspUNUbgQ9\nzp3VwqKix7hDz4u5inPBi2vvLQRlr4wTF76eqpH6pxJyh4wrcIdD96xDcS/5\nfGPlnQvJ5ZXm7JdVo8xN5PSm8R9mskG5Z7yfsN4a/e2K1y4AvOV7YcYWdapY\nbn+AzcyelPLC6wPgcxfrali9K8u85uH3XMEBHQq3VMl18hcD8bDsEY2MJROB\nJEgG4Y2sAslkrnXxH94pfkXdIbDKH1GdtEQd6X5MbxXjFStF2anaD5J53vAF\nZU+LvC1Rq3wOWmF0bcsAHkNedub/l4dUsvPooW6rh8YAFl+sUZGEjxmwNF4e\nr5R9MMctGu+RGA/cNzsE5vQbNRYTb+JJS44/6axdCpAiK/5WZta17sH322d0\nqBokcjL4B26P4DXnd3W3lPWUrHGt/hQKDnCGIGdFTy7p7h6BqE7g2bOJc2nm\nYtD0L6o4JTyXCo3VJc6QuBcvohbjhhl251TTJZyIRtkS2p4uDv5x21YHdDV7\n1Npf\r\n=4frf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEdWZZ70ZfADKgjKOk3WWtl2XKDZtrYnLYmhuZkcv6LYAiEAhqh4PrGdklLeHCfWs7Ee+SIMTbDuzp8GUBV/E5nJILk="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.7-alpha.26_1571106122745_0.26264135760338103"},"_hasShrinkwrap":false},"0.2.7-alpha.27":{"name":"@react-ssr/express","version":"0.2.7-alpha.27","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1","webpack-dev-middleware":"^3.7.2","webpack-hot-middleware":"^2.25.0","write-file-webpack-plugin":"^4.5.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"e83f3c08acc2b275b02c575ad6733fed6abb890f","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.7-alpha.27","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-NF1tk+Qso4L4txpWx3nRzNH2LBi0M23DlsnijoEwfjNsoYJ6AQotI0RDlu5k5aZP/w6gqaImWhXbl4GR0Oi7cQ==","shasum":"1fb5f0da37e065d1b310eee0df1a2464e27e772e","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.7-alpha.27.tgz","fileCount":9,"unpackedSize":17129,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpS5KCRA9TVsSAnZWagAAlbEP+wSn5QJbCkq69VD2AJWl\nY1mPvoKyCo+wCTXBNtyqxNfDq1HunkI9KdqKAoNQgM2Uizu65rh6IXFh46MO\n23kkMdL1crY86Nv/GrAa3+cgcvCM43C6fmR7cWF6gn9X1K2KkSk2980jG4Fc\nrBqNcFgIWfmgxZ10lHDcPIBwu1oq6DPX/85Z2fKnYYt8u1whgtOymNcV7uYU\n7/USYu6PDofuoVCGjtQYsEpvRJjAVV+ylfoXzgMyK+B3izpRHdpEMYar+888\nDCHdARbMyuU1Lb7Zxz75welKakhaulc/ywEFstJWaCaH/dJ5aJPNnVGr15EJ\nD9jvXxZNgeDHxPTtDuFy2HfgAquoRmZEyLNgwVkZpbcljx355ExIDCbZhtUY\nUFszKRQrCU8lfsDl7yAVP6IgJ8Ka4ipliOSOtEVh/LCgqfiLlS7l5ZSELPR1\neilsVTJPxf67r1ZQCxltVFI/kvJ7mZyoOB/a2nT9RoRol56n9ymmfcXzmpj+\n/p7ECzOWGGuss4fJN5biugwDzhXX/1uKjwa/jlk8KS1DkcsUbaZguCJRVsrj\n54EG5rE1ODJnzYM7ZeB1dPp6kEauTtn9jq/sOFT4k5L8/Ygv55lmtLFSGKSl\nmOFxV5yjDIDkmxicrdjmgAyKjT1D+BpKY8Qv/34kbliOyRC6aI5TEaokUWlN\nUn2p\r\n=9zyY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC14ClFHVMiYPCCUA8F6AcuL9swhZucgDX9872KARyZdAIgDNW1QbhEmq0BWlyP6US45f/h0n4Ad8nrd+gZI122AbE="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.7-alpha.27_1571106377452_0.1043994611544059"},"_hasShrinkwrap":false},"0.2.7-alpha.29":{"name":"@react-ssr/express","version":"0.2.7-alpha.29","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1","webpack-dev-middleware":"^3.7.2","webpack-hot-middleware":"^2.25.0","write-file-webpack-plugin":"^4.5.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"4bf9f14885d38eb6c95844b283dcca5318a66218","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.7-alpha.29","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-nBE3GZ0C2zMZkejctwp5tJtEe9uHFuuoBjE1eSFRmrg+lbdAp8pvP/GMjSvCOBL6jb+zeX0gO5t/YoPUl2FQow==","shasum":"280ab58ebc520eeaa5410221932f8a010ed44345","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.7-alpha.29.tgz","fileCount":9,"unpackedSize":17324,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpTEKCRA9TVsSAnZWagAAKMEP/28gaNSq8jtWvVZgB4Vf\nTgnEWmpT7ShClO7jYKbwS50waRj/fB7Snr3KJkelbcqBQJ7WCnGBIxbDmN7m\nmt9+LpWnWa6Fl3akiaWFttk5Ihi6w+sL61uKUFGTebC3BgE80w8sUwSq7OR0\nBId4kMePdKBBBJAbhDZ8DFER5EVxanabX5Vb8jVqu78TbBM+3HJ9TFu2T9kw\nkpqURNorKNG+vnVFyQ9sgRRm3tk8XxFsUkvXlwPclXzJxH0kfMJihEJrge5S\nMkiFRuLn476PKkKDhVqEPZvbQLpoXWnKXenHy2+KE2HUhb7os4OjJux24/cz\nx1xfxMm5RHiTgf16NJmVob0hNQtHcqRSR6cBjGmUS7LK3k6A/FFsNJ5x093A\n5O4/TXt09BSLjQLuFYmgVJH0u/zrLMHpwYBhbRLAurtI9VzLUZWF925DiN23\n2FcwZhJSzODJYmZNYNhktkOmbu2ub3vKZFrxkoOhAPQBvuWVLvso73HYIO9a\nee7rC/Vt1Dt92lpk5H9A44o40wr8Ugv8ryqqd5v+r6+JXYEgPYQuZRLUudcm\nyyP9vZCMCeyAJzMUjMKjkBh/1xcEp2BJEVACoohk5x9Na+C89Fz/LYMa9ntD\n5wyhd3iynUW1kezV1SQyDsW5/HKjPdJ7K3Vw+QjjUv/ANV5I0uKfmKly7yqy\nMIY6\r\n=C40h\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCLNaaStyG76Fg7NDRSV4XSO2p5Xd7n8V7LN7zUy6UYwAIgf1CSt7HJA8nsgIrzzSNzuiO1BRwEuSPdvIe5XHhv0Cs="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.7-alpha.29_1571107081615_0.3462100434065545"},"_hasShrinkwrap":false},"0.2.7-alpha.31":{"name":"@react-ssr/express","version":"0.2.7-alpha.31","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1","webpack-dev-middleware":"^3.7.2","webpack-hot-middleware":"^2.25.0","write-file-webpack-plugin":"^4.5.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"e766e9515efba5b066176da7d941da4fa0bc7044","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.7-alpha.31","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-/WG26LxWCSTAogfnzyGqNQReeUepxB2EMJzd6fNoDgTIAw3qJxNRvVUd3mZEo7tGs6WCIXCrYmqFCNrUOkQYgQ==","shasum":"215af813e2194afd67ecd718ef64accd3ac54a7a","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.7-alpha.31.tgz","fileCount":9,"unpackedSize":17306,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpTHPCRA9TVsSAnZWagAAwgkP/0CBB+VWMgB9WPemFnZS\n1NYJ6GF4w974YvYFwo4apJDdomyKO6qFaX+w2hl93wft2HOfmqbMhRZdc2MK\nWDDOMFtDbVj7fmv2P6Fy+wQGt9Vl62F6JtwckV8V78Gg+bifevHSE7eO6cFg\nuS71vyCDh7NRfp+I8BcUxrkP/Iq3gNscThnmrmm7N5X6Rj72dnKQskPm5BTO\nKz6HYGVd+qYNWNbs56DpOOp036OFXS67EmXrlkYW6mb6G3aq4g6R7HDjVjEW\nZykZvnrKw46kzAagAcN13Wa8Ueyto8OkUYn3x+hdvIUCcmDQVwa5qJKrZ/T/\nD6DwGJ75neXlXxSj6BYSXz+Ds0596PWMn3Cpi2crbcPtd0eUZx6/juqSQfzR\nnni57U9UXCIDv9WzenYnHSuVPxVrrnlc+pVMjBMiNFokPzoJDSVmZwPzkEp2\nnOFmmsonyv3HMIJur7a+b2dqlPvad3om16mm482qzkwe5sTpEzT9Tx2JER3K\nBu8F1uK5ateFWF2Qc54xe0Su0/g5iKQzRrbgGVkT3EGXFABydLS67KaulT/Z\nKtN6ODIOJzvbCJnMWoR1FzoDxpek2+Rr4Q4ErmbBh5aizJxg0St+LVZFikvM\nrMVG8N5VbTT7gz6b5O/Gmkvg2gWpXHl6NW0A6QNEb3aSuEXSJXK5pDlZXnNb\nw4oj\r\n=gfC0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDjGbT0xoXFF8LP7J3mis7KndiE6yDcxTslIqsH+gzstAIgUY0NdUIM7hq7s7R/cwfl7rXngJzjuwMu32wSHsBdq+s="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.7-alpha.31_1571107279253_0.8501208385409857"},"_hasShrinkwrap":false},"0.2.7-alpha.32":{"name":"@react-ssr/express","version":"0.2.7-alpha.32","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1","webpack-dev-middleware":"^3.7.2","webpack-hot-middleware":"^2.25.0","write-file-webpack-plugin":"^4.5.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"f7dd0b21c894e28964822ae1bc12743a0bd62414","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.7-alpha.32","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-8426Ts18dIIPa+Rzbi8wv9YUL+3aUktuKoEANaFLj+HPgJqVN5ALREGCGpKC8IEBY0zpamCzzc0g3JVpMTgtfA==","shasum":"ff3bcc3134e2ad1596ad88de0195cc8813dc998f","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.7-alpha.32.tgz","fileCount":9,"unpackedSize":17313,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpTM1CRA9TVsSAnZWagAAFXAP/034eYCZ0N50DWyouxAP\n9FC5Kz8eZmiFA4sDpLHnDLeSUsryKidB4M2nQvQqpMsVTZmt+6qXAZNb3M6C\nbjV6T46rpA06b29N83EN0AOEphmMfKi0KFY2d3hhsE0hTbw0W73etPwZGJC5\nfFeAEkH1tm7IH7MtOZTOi2hiEPmjBPBClWP68xT+bVoplMgtlNJX/CY48KQX\nUKc3efBJl73KNTIEk4r7ZL00tl9HSkXSrFD3+4eaCdOX/rQRvHU9Oi0JP3jr\nYJgSlAxRvQUVUxg3Oa1zUu+SZA1519zeqUgtcs2qDkL9Vp1mF1fcXlGgNFM+\nrIEo59nNx25RVXSaVlrA0u+7yHocJFdj4j/KqxSk4uWy9V1GJkJeEXx6YQaV\naD8ao7M/9JbV+LK+XlqK0J82dMgcAN8orruKhn2DRK2pH3jpfdwcxPOV19Tx\nXPrnL5tpWs4P2yONm4+yQ38Dm1OFxmaxqjtQ55xqEUwBnl8v2OAL/Xm01wLi\nBbVAYMc7TyuXYsiQrH0+JKPpMtLjNB0rggC0RYJ/q1p35nzyMcdRlxnrgF1F\nsAX3tKsEno/OxT6WjYJahT52SvPeoPDasmZkzLAqBjzqe5uVgOh0zl1pqNdU\numxiDluhbxiBk1AMsplXcNWwUS3hlOARFQfLv5yHQ2bvwzrILYXDladWQogF\nArHM\r\n=O1g+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCApQvykzeGPnX6fYhusPxrs8XsHcKphikKaG/xYPvUJwIhAInmWiUHtPmc8cHptCJSRZBGMNJfTbvlWJ5m8xPJDwUh"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.7-alpha.32_1571107637333_0.8590813567002267"},"_hasShrinkwrap":false},"0.2.7-alpha.33":{"name":"@react-ssr/express","version":"0.2.7-alpha.33","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1","webpack-dev-middleware":"^3.7.2","webpack-hot-middleware":"^2.25.0"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"cb84fce3f26212a4fa2f98997547c3736c59f0a0","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.7-alpha.33","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-LuBNjsjuvNoY+VopP3+ipK9hhN4VK8hdXAuBSUBJYfx/Z+6kxKhfZFrmvJJOjJrhGjYb5HwW8JZMIKBieUGF4Q==","shasum":"468daa2f94a451e679025bc4d839f396a4b50d48","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.7-alpha.33.tgz","fileCount":9,"unpackedSize":16867,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpTgsCRA9TVsSAnZWagAA54cP/jqvKgm8/LbAYXjK2VDw\n7aN/mnbvfgvY3L8CbVvkgFJ/HdH9XGzJlz+D8bwndcLBzSE7M+7ej/ljgohG\nR0JsiwA9Agph1HHmG88kZOPByikUzBt5ARd5LakiWQc7q1rfmouCtTVjb1aE\nK0x1pq2QgSOuwrtLh/f7TxPmp30m41qEz7NejY4VGp4oJItFPJMEhm48SRl8\n8RUsobEHIAtcGQ7yGciw1zkyWPhuu03bqRAlE1V6vbLkSIryQ1NcBFSfaCE/\nOAUjfuzBzF/WfAPs5BLq35qiRgie8LdYwJMeHHQzAhp8Sg+HrcoQwAiMKwn0\nJY3qTzhuMJsS7ypZ0irRjXfKmQEijtg5VsGdANOdGQ4gnzemcy7QAqOFFYot\nW7EIFel19WLPzbSPpbDWxjan8Lu4kc9UJ7RZEqhcBetHLlnJUV8ElPp5DwTy\n0YaCDWfRmQXqOVcsl7iUZB4PRqwuCzjJUyDy/MxQUHjl2OkrXLP1tkL7M7Jp\nMv0IuBQSVQz1g+07P+b4QiVrjJrhD6pJV8RyuNetcO/6FC4T7wvg8jooOAAt\n/S0tYAt3BoVJ1cnOEXmxdpbi1X9qn9mZ7tfaVxueQPROR1Y7F5YFpgOx/5Of\neP0aGpSi3eLua5/dSmI7V84RW89Pr1o003nhFe7n9LpPq0DI8S8Vl3bgNikb\nGTID\r\n=NJwF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB/0wSvDhWELNf1ogDtoXUsnFQaFgSTjpeWD5icsAcg1AiBiMwCML58moJEWeAPIVLMe0xVsLiVjT5ifPJC+5WKObw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.7-alpha.33_1571108907884_0.2720677089630148"},"_hasShrinkwrap":false},"0.2.7-alpha.34":{"name":"@react-ssr/express","version":"0.2.7-alpha.34","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1","webpack-dev-middleware":"^3.7.2","webpack-hot-middleware":"^2.25.0"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"ac34537d6eddc2e70c0b12beea2920677172cec1","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.7-alpha.34","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Wd7MH3EZhu1P/MK3jKbToq9NvtOCuRVyWogsIkfom+CqAkBg0iPnt5Vtps5ph37ruaiDasjTi5q6IfArwlBljA==","shasum":"699e0f22035e8bdf154a07bf63cbe89356d11746","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.7-alpha.34.tgz","fileCount":9,"unpackedSize":17045,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpTlJCRA9TVsSAnZWagAAyqQP/i9chiSGMBppvy8LqaSy\nDEOYCbiOtilxVjcVAOTHuBvkOSOwpLwW24qFyhTP5ClfsfIL7KsDzcwccN5C\nSmN6vBKRk7xbS/OPQz3wFfv22E9CgWJYHqMn6kNUrNhbwRltCp6ayXOpKpPz\ns8hIYDFJsBnoH2Nx0juyZ+nXP74MRXDPipE93Sd7LhjVJH1ZVyNH1XzpS25P\nMzCTVAe3/Xr4EHiPVsvLT55URveVBUrBiNvML57/oIUuGCsQ6hwW23Tx6tIJ\n5tdXaI9WfaXlnR8BppYwBqNwrkMkNdzxIROn30lq0VyNhU9QH6Yc0b8iP8so\n1loCBJ9UdfBEBt7+1okyRgfZESAxhBVlCS4L8JqTRDLUcjSe9rmLe1Tp91Q/\nwYz7wguTkJlDvFGYsDIJ8F9h8yanXljQQqYnlhvT3LspDDwdl0+YlSCIpGGh\nNwOM3/LfV1zA/zLZ1wYeN51p4hsSde2QjvNPSIuloLzFGWXz3LCFFnlKXtQN\n0sqXINEvZKGhOQKoIt2iWj3YFkCqY1lDY7jKpCnt7W6D54hLW0pvffKtmozD\nwCclj15pINiAszEigXd89GAaFIKTZz7cV94LlXM3YKHBLAZYSqHwcGgP+new\nAoRJzwLIu55m6hRh6Huwu62UsgVcHmSl/x3TDQqLQOYlrZBdgObUZA1l1URN\nH9OL\r\n=Y7Le\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDVeSv3lIK3MamReUxhXsTIn3IW5YSPEgkheqaCBTd4XAiEAnrdZgL5CGtVsf+LcwJwmr5Gqp7z2U/73dJ7Z4wt7OS0="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.7-alpha.34_1571109192993_0.813452072413233"},"_hasShrinkwrap":false},"0.2.7-alpha.35":{"name":"@react-ssr/express","version":"0.2.7-alpha.35","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1","webpack-dev-middleware":"^3.7.2","webpack-hot-middleware":"^2.25.0"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"47e75890a2f9edab0807d26c18df570027d8fe8f","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.7-alpha.35","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-7qF7MXfWhoOdb3Dd2ZeRU5T0nsPUZLHEMORuJdse6SPqgmnRtKLxxfsYnRxLBIjI5M7OZDI0OIVWC4HtK++iSg==","shasum":"d85feede9cfd23117bb2b42d9e4018a0187f0d5a","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.7-alpha.35.tgz","fileCount":9,"unpackedSize":17225,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpToJCRA9TVsSAnZWagAA5IgP/ic1UvX+Cx70Hq83NE18\nDm5sAqydiYY5JwOtqpy+X2A6tlKejjFNAo+9ytrgT3aV58RlFtu7MlSpPE+3\nuX4XB1bJGjZtcyEBRDEDw8kPgdGTmMHtpdlQ+2Wgang1PcpxtoG/80QVkxRr\nHQayU5ZJouR1nMH8H9M+h6wVMgupmlbvAi+iZ8x5XfThF2j5s+gokCSuFBFS\nybZ6592s+5HFUPvE9rPOB/oEyBsSPqPb9gtM84WH7kDOLDe6u0fe+h7NHk+C\nhM4IzdOTuoPOIT+HglTDCHpbyKzNRI4+yjDVJbtpI5kpCYwwqEHDXwnIayP0\n+iYs9JZulsO8SsoYig8+cChOhtDEBgTwZK5pwgJDlNpHGpa8J9V4xTNkCfUm\nkUHaAixotb+V2dgRp3XxR7Qd8PWJH+4MhVijAdwVKdOEKq5EVuif6z5fiBpD\n38UHHd7S0r93lIdkEWc227y6IQouXrACLAxL86yv66u9vRD7sNRc/An+lWLN\nwA/T52kcCbatDqAIPAbdATqmV7WmjvgRcXg5OeXvMmY2s5JHt3xaDudIsg6A\nMwBlYIVKNa4g/uOiGuX4n3yJ0dKZ9soCD6qhbEsK8t9RoPBbymDuLP0bWT+E\nZH0A3FUsNyzcoishlsnMi0ySDFg/I25kH3RDWcC48uw/QY+ulvoPuQ+Z2HL2\nOq41\r\n=K7DX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCIvZKG5F8fWWM1RKh43xFvpT5v51dnmuQwHJhN2bdp/wIhAP3FG7ZQ5I+ylFJZ95nk4h2bhojsoSx44+PPHVeqW4qc"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.7-alpha.35_1571109384401_0.6195956484609921"},"_hasShrinkwrap":false},"0.2.7-alpha.36":{"name":"@react-ssr/express","version":"0.2.7-alpha.36","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1","webpack-dev-middleware":"^3.7.2","webpack-hot-middleware":"^2.25.0"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"bfca718768dca78cfce8459b6b040dfaf4f6bb07","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.7-alpha.36","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Rus1LdhwP6YnX02l0A5N5u6EzuBf3agDQlpaz1kxP8nG+ByovzjBkbmpAD1xqWZCbha5oJtWJCp29VWhvtQHCw==","shasum":"3bbcc6b1b9df43b59e36cb7cb0aab55678452d89","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.7-alpha.36.tgz","fileCount":9,"unpackedSize":17172,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpTrZCRA9TVsSAnZWagAAtAkP+wXzM6WVaE0zlDH5lEaw\npRqT2JYnXz26Jh30YfYwqVPnmr9OwQMpwD6b8Mrb5+pxIuAMznGNrks8k1/W\nGNw8Gp3WIJUiBgA3dKZ+dcPXowtntDtO6PdIdsnq1s6yVwY8QkApt9svlcS0\nla9H7DnIg1HT87Yvr1P3HkO2P5GUnxYRgiCDCZhiCyGlbBLQxICazjq4wUkh\nqIW49gU22e3egaTpHLJFDy5YCuUnjO1aS3dxs79QptGLCSdkLs0KywkSUvVY\neEYCajp45Ke55JkXJa4CA0Sn3GPWD1LfIb78vfv+KpQqXt8MddnTF7I79ydx\nfllW03/807mac6NXNkWPSDsN99bddpIIoT14v+oiXOWvTPdsx8vuvkUMlqR0\naMI+uv2GI5uwafr6Oc4RcJwIGGS858SdULApQq4oUIFQnx2FJXIYLCeBQTIw\nWEOuAGQCiYGVjeE5ddSfD/+f+VVleO3d9/KCJn0tE9lUYWC9BB41V2Tqa/Wk\nO6rOocRABEiwI7Qq7mb/LocKaK5caKZ78QA3V0Aa0JKrdgjeRpD/eejbPn+9\nmmPC7m+4NvZ0ztunnLV5O+36WMP5gDbbUKUwyhrh6CByCyjmrVPJJalV1JhC\nVhqqR6JM8NM0Ag7d2Z3zalFzvwAOUwuhqspnRPCYn/sRqZsEVHksZaXbsVS7\nJujc\r\n=BPbb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDgiRyvlOgVVcrWQzUXLSEEj8BEaT/jvDwi1LaJ72Q/GgIhAL8O30hkYs/kGpmjp6SwcOtA7FPcEKGgWHF3VgO5kiy3"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.7-alpha.36_1571109592990_0.5104383054742887"},"_hasShrinkwrap":false},"0.2.7-alpha.37":{"name":"@react-ssr/express","version":"0.2.7-alpha.37","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1","webpack-dev-middleware":"^3.7.2","webpack-hot-middleware":"^2.25.0"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"fe6c05d485210cd34ff280da4972fcf3adbb3a76","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.7-alpha.37","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-jhC/NJAG9M20HaXWTg9qzHBS4Igjejlci+PVU0Ewh8H4vMcmrQ+CpDauOGFf8VHPU+tuThuD8afzaSjTYAJyPw==","shasum":"b1a069a040a1e08324d02ec30a07228bf52a0b44","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.7-alpha.37.tgz","fileCount":9,"unpackedSize":17198,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpTu7CRA9TVsSAnZWagAAUT4P+wbNAh4noUt8VOtbv1YG\nDefW2PKDeHv2tIlBhUbeh6JUjeXvo50YlGVu4XgXyOFM9wUlmZiHjTnYc4Ya\nolCUy7t+IpjvRwC341a5bPCnZLvPyI4PyBLMIHhhrY5WTQ5fuyYhgPe9snHc\nL6lILwTDzFVwv5xCq+N60zugsCTchOyvlFB1nfyKLDnQ2p2HcOjXizZuwi9C\nzo/midBfXcMAoC1BbndbZ4Mc30GV8TZK2bOTk+/h8VPAebcLcAUdjQdppuFe\nlxbEZ6/FuKWQ0By+wc9szf5sgKo1NRMoIqzowy2R4gZ9lS/zP2qRh144uiDL\nrWr+RqB0nZWUXWV4RFFO0a43pWwoppXV+gQb9ApwPs6I1yQb7uxYXQqJsauA\nO1Nq8PYR6bblXd4oqaWGPv8T+sdxg+Ri9wwMukZSAmqa6pxAmEJwC76GS7H/\nMbYcwI6HYd5QdejcPcK+5YJuRegfpPJhn/WYAG0fGKYgh4w4cOUMVOVytdet\nTu1J418s+NSYz3STjgkzLfOWyasqCMjzHixtmw3dLbbhACYUcgCoWQOx16ed\nMiMf6o6qK+RSW1gOFF6pavE9Ne/Lzth0xlsVLlVnETJ6LpwCB8DvdpfEWava\n7XhmRQOLlP5pNzSOqdvNBDN4Hw9QfligCbJZkpeId2OGhG55PbvAU9T6zQe+\naADN\r\n=Sq9+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD3jDTHyC5woFHZa5aprpdQxPazHuQw/ukhwzhXcCb9UgIhAJ2xs/oPV1taYz++pJZmLYKbF05Qv85jX20rDEZOuIZ5"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.7-alpha.37_1571109818529_0.33995499094347004"},"_hasShrinkwrap":false},"0.2.7-alpha.38":{"name":"@react-ssr/express","version":"0.2.7-alpha.38","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1","webpack-dev-middleware":"^3.7.2","webpack-hot-middleware":"^2.25.0"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"e52e167e55da5c2c2fb45179ac969109a50b04c5","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.7-alpha.38","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-sAqZNfwoGbsVht8AvUH71rpBRZjj6kYGfmNPRt+nkQncXqEcA6ACcYF4lwbdtxXzTPS7kwiIvVfATU+Y4Ao59Q==","shasum":"bcfaec0b7322f312a1ebe3533189caf5dbe66ea8","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.7-alpha.38.tgz","fileCount":9,"unpackedSize":17173,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpT05CRA9TVsSAnZWagAA3TkP/0dAh2lnQJncER4sPEGQ\nz8ztdVPVRzav1Qyw9afdcHaTatNss6b7P+1c1OzWi8Cp/gyjOiss3Tzmo9XQ\nt/UpGpynXvMo3Qmn70p7htjgGiK6uUZ0soZyzKFdq10I7Mcwg62zea6OJ/J6\nKZxpL+F5OTm9wn8HGm6DsUpHNuxYtiNC6JcRV3J4SUyYAQ0sikYmXq0zKDMN\nIq95EjGNLOTcu234HSUkru4ADUoHP6RSJoHpygzhOZOAw6CsmvcTqof11fUE\nGWNqyEevTdH07OETdZyACcqe3A/955MMo7onOoRBuPN+lwRXq+DovG2V2Vay\nUlEj4RZdHsPdDQ8nAEHnzbihc4w7sVY6c1wnE8YHr8EFOT5YWHhAN3CgqdJT\nXlWLZcabmaZGCk6mAuWdJ3hbtoyaKywfvtrcXafIpTGhrdiqojUhf2oAPpxL\nWDj4ihRczvOWB46K1DdMq1o5Vof7bIHhcuTVmFJ4UXzk87Otm7hQKhcSJDyD\nSB7D5j18umVtI8ntVine4InKWEhKCWQHUku6aBb9EwooTY90Xhj0Xz78i2hR\n4ahYBR5Rn8HtIgWOSk6nwa73sDaodh6XVbyWE/taNqcuxgwY0D7bmVw2Qc3A\nm5kdbgKRZ+Y/PeZv7i6FnTh+NGxFl3lSwe4B1gDfbHzTYeivwXE6U0mVSwac\nUpTd\r\n=xdMN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG7ktXVegTZEVCm7H5rVd4aaFx67mREBVefS11mOQAa6AiEAtW+w8nFDKv97B8jzGYxD/7xVyWhNfLWhmleCWxL++OA="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.7-alpha.38_1571110200923_0.85436158815628"},"_hasShrinkwrap":false},"0.2.7-alpha.39":{"name":"@react-ssr/express","version":"0.2.7-alpha.39","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1","webpack-dev-middleware":"^3.7.2","webpack-hot-middleware":"^2.25.0"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"c222f22f09fc4e16cea69b6c8d732332d1bb1f21","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.7-alpha.39","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-3v/QXgXWpBxLHgn0V0wu1UEajB/xXBm5Zld5SFhmUnLA8hA5kKtqE93Tmd50ME3CL3ZfMeG4mbxNVPvNPZK1NA==","shasum":"b48ea36fde60cb1db89d734066d013c62ab275b7","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.7-alpha.39.tgz","fileCount":9,"unpackedSize":17197,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpT4pCRA9TVsSAnZWagAAwuQP/0sm87UIeZD+M6MFFUXk\n1ohuiQhSb6Uvaup8X2TfDMUqTRii2DOTDMhG6U+08u0lSA8V3aI1Ff/dAD2Q\n6eTIGk67Ar0PNye+duSTBPFPlhQQCFBu/WZDwrPVw6xptC2JRgMvIdD/ZzUK\n0fhQm9VDF0d3cdt51tT/Hjxqf//kx+q33LibpePfJzV9rDIUrvO5fCzprlpq\nrlhibB37lYUO/2yKwBmWIZrcPwnvKEeRgNGgsPhsUEp2iXNx7LPZErW19lwW\nKL3ygt6UZMCSUFmiNTDiZg3FU9Il6PI7ya8MqsJHS3sOFfyLakTuR9JxQoRk\naBtielU99MO2liELje0QrbroIRH9rh4AHM9SfY47T3NzOe9fzOX0cxEhTP1f\nJchTnq4yqZhLS53+rUB+dwsM1PiZH69UgJVva/bySTvCzGP+t1HdJ3D+z9Gh\n31GIib48+a+gdJSiywcRtw4ehmqG2Nzv5ZZzL5LKiAaMBkWDffEpdbRoRW7F\nHgAHp1AiouJw59vKpbiJCTlFJtMqaFOxDqSfJ5ORoaovZiGMJJtbIDyNzJ14\n7NcN2kXjmeWvAFUWSUHzuXvn3rfS6hxJkQidik72tmSsOs0RUGsYY8EkSqkB\nXF2gYmeKKBr3d6b+dQqyL3Wc/1xpDGUeuFay8+cawvUBKS1/aHxn8MzY+NCS\nSAfH\r\n=ldZB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE5BTst+MHbshnNf959wH/UT0OQYkVYGfXfm0t6tMx5vAiAELjc7LKO4wgolPUgLWCRkVOJAcrjAnNqfCDEnx8cweA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.7-alpha.39_1571110440955_0.690138164280441"},"_hasShrinkwrap":false},"0.2.7-alpha.40":{"name":"@react-ssr/express","version":"0.2.7-alpha.40","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1","webpack-dev-middleware":"^3.7.2","webpack-hot-middleware":"^2.25.0"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"8ca6760a12503aba6a3466414c83d1cee81f81b4","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.7-alpha.40","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-RpSnadpNnypz9DAANjhRBUX9tfMdn5wIH8pn/ZSJcAiPGKZJsru4CdpY7AK2xx2ofTan5B3AQO06xyBz9PBD2Q==","shasum":"b9098ebfa17b0dcc93c8627fb45b08d23bc74ab3","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.7-alpha.40.tgz","fileCount":9,"unpackedSize":17243,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpUMyCRA9TVsSAnZWagAA7usP/irf1x8qhX1PSxKjVMOP\nqJvKFff7YV3jmbrX1RVUqfOwlPen88Eflyan2SzQL5ECNmXu/1Teyd7nQtgd\nGFrbHRaXcWH1vZf3YX7bFxNTlDj5d3nz916w6ixtbVxScYdqpDW85FXb+w+7\nHtt1kynpZSQk4Hf2z99OP4ThLd73+dKVQLGIDNrdhK2mkAUjCgEpxta30Asu\nv33yKfRGrnos7bYy1LXz0dgnC8EZl/A5tlPNXhsuQ/mFWH2yumZWuEPq6qbh\nA2/GkLimH84NV/M6unbazoJAawoCWKTR6VEr+H2oWIsm60FyVoXxp2ZlPz5K\nn50jx5/8OOZSbZsMKBWcw4LqmqjnW+hJfKu1XQH/t8kt2gOGDmVzMxABOc9e\n7/+u1s2NDjMatw7o8rUOWyAImhSNPfMKcp/U6eTV48GrbqZZSIm4JE0HGTDn\nOaQzD3705rW3K/S2ZyseGxochi5geDxatCGuVkkduZG5VwkD83kVnVwcRX9c\nTLZvDjvn+x9uINEzhzrw7CEkVu3hXv+vXSUkx4R0X4c7pvOE8uoNiaKs8SZz\n49NivkBmd6UFe1EDkCrOzLOyzWRASh2tgD+S9WQ+G6YJlYnmDuMNVfpyq9M2\nGhTXulsHV5gpY20QaT0WqhlaVsjpqYgUeLPK2QOfaJqjsDpWIoYCzVXDbFBq\nG6lN\r\n=z/7/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDW1iiwVe9/VbITAS/WPNyUVGO/C6B6gtR+TRPrz4cXeQIhAN/X+S6i/jlmx96bhayjueUkOrOU1E9W5Q67KerPQZVe"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.7-alpha.40_1571111730056_0.8996680257369751"},"_hasShrinkwrap":false},"0.2.7-alpha.41":{"name":"@react-ssr/express","version":"0.2.7-alpha.41","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1","webpack-dev-middleware":"^3.7.2","webpack-hot-middleware":"^2.25.0"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"7db4766e36545cd80876a8ab9732b7a91ea8f834","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.7-alpha.41","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-m2wY5XmBc7wVOiTfI57yveE0Ez5kMVrqxZkgMswl87TDaFbBdRIzK7KUVUHi9G8pPzW0k4PaWRPq9n78FA73eg==","shasum":"248ce55e0f610b1eb7eac39eb91758a41221e8de","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.7-alpha.41.tgz","fileCount":9,"unpackedSize":17514,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpUUkCRA9TVsSAnZWagAAcygQAJPgGhxHRI9o96LddNN8\nzCMaNg50lZg1s8FnVTxxGKTR/rmlpHvBoOTGOgrKbkQvU7wRccHjq/GJgLfY\ni59IsyR+f2HrESxYqgGgHb3ENmOS1mLWEvsXmBfXc8AcdQWMzu5Kpd8TxkdH\nGxrqLXfnCGIHJudIsfcQ/HfWLtyvIXTUhHzvDS1eE8dctmPEa3maGaq6oQtf\nSSxO+GwJ424vtvq+iMeaSSkCk8gAvDj37XumSzDm3DkHU81OBDKF6LsEcZjG\nff03YP4TMFMAMBsMIfTVWOSqSumi7vL1jqU1RAmJTOK/ds9JPnB2mD6XrO8e\nNH7Zh5lbA3835JrncWiRYH3d9C/yk7U+NNxyjPKH8pMFBq/hWcIbAEWI7+I1\nBpNvxJZQ3CxEmzuB7xzL9hxNb3dJVg0CMOR5qDTXkVXRBX4m+5qqpfxASzSy\n3HnKIeznV9gOMtAjxu/cJyLHe4fXqbTm+jdLkSvIb1UqaBwZ+EX5JpVIFFVh\nKaDJifCJAVgYSGUqkR3ZDsxRe4S8nghoPw+YmGCXfbVPfSAHcY1PdgJCOAGQ\n2rLrFs3ApZB+unbUwlP3nHRhfcnBSW9JMqzk7bAtSGMfge/HHIHbZfoDMeSy\nX79xDq0oEf7icWTjTRLW184OaDD6YrcFk8zqDYuWqo6CX/11B95sjx7nTp9F\namsn\r\n=Km/X\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC/awMeveCtRhM1lUsqMGVB34OP9wOtWg2CJGsNH1kCPwIhAJ1qljbEDVDNSHimFMOg1ooJjkQpvPcUvX3wW9bpc6OR"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.7-alpha.41_1571112228153_0.6297178744542047"},"_hasShrinkwrap":false},"0.2.7-alpha.42":{"name":"@react-ssr/express","version":"0.2.7-alpha.42","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"b2b505b60ef5594f97e46bc876f5541a88477ab9","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.7-alpha.42","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-EF63GES5eHtRQd2ETmYjKcBTX7ixwZjIfFVUL0cr6LZIxs+VMmh8U4/aAdEomNYbUSWKJboUjcIZrhvS8nd9bQ==","shasum":"04a30c8b243c280e1b654b4003cb37a652efd17f","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.7-alpha.42.tgz","fileCount":9,"unpackedSize":17360,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpUY/CRA9TVsSAnZWagAAL4UP/2HuTUTTYJ4jFcE3dMSA\n9NX7ssGdsCBjxlg5e1Oe/f/wTWnvTQxT0RyRfB6Sp2v2gUgkbuJ1x2MN/n30\nWNyP+NQPm2imk/1hGpkKDSigNR1UL6eVAMVCYEctp+UXZ6IKuEpVGv9t/kw6\nhI429gVF/7/gcBStsk/IcZJVIKz69iDrHCKz8Si+J7q3qFNBWPnyC04tNq1w\n1OY9fMQ5oQKL4zOEZvjA7dybDJcpyW2nEOeqFy7X9U4a2MHYFRCk8MDyjTkZ\nQRE9KhGcGx6H6uPf8ZExKV6ZKFfxv14feWQPA6cS85Ojmo8Tn37TKqbSMWMy\nSpWyOfPq8ASFe/urSrjZ12G11uJBXrtmcbQCWh6RRDflSaxIky+0dXWGgoSI\nYlsTCShQl59YBRUpvZfni9B9pKKDGY0fxPZNaurECwYG5sGXHRDNhMyYt0Z8\nAK+hI9wBK5UQClhPEnEQlSxTpaLEjHAnKQA8B+o3Z9XmheGl86Kth/hyygQh\n8AAoPz+OGblqQI7kc36R8gJW4j9yGgoTmXiBssgAeoYoeSNdAX7t0lrrqMO0\n3UN81pvo11yVarYtr0KPIYea0h8OdTDrUJbEVpDrqN/aHY4th5WUGi7m4a/H\nmbVCuaMuT0IiljgkkbGKpoMS1SDy5F6jtfjcP7dlqJ/XO8NQxc+Itlq8Zjk0\nuGKS\r\n=0Q0O\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDWJF/ZcrX5BZ6ftK6TFqeUYjE/3owyfemChlORVSAcewIgK35V75hMoaKmmENM4FeOpB3SRh7skJdwH93qb6MRXyQ="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.7-alpha.42_1571112510689_0.7707728305453931"},"_hasShrinkwrap":false},"0.2.7-alpha.43":{"name":"@react-ssr/express","version":"0.2.7-alpha.43","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"e654672ab10f81435d24786448cd073c18c5b8ea","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.7-alpha.43","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Z3koHmT7pny7M1KOqMIjhrE0ZuGrp0+lgvlcN6njNskVH3C0UMgnZZekpxdQmn1z1dpcBZv+w2RU6xdlunQV+w==","shasum":"effb7c19e64d474e0a21c0721b269b071718c2a6","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.7-alpha.43.tgz","fileCount":9,"unpackedSize":17346,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpUcICRA9TVsSAnZWagAA3b0P/0t2zEXMgl/8sz0IpCb3\nb35YZb7S7XcKNHU1wXeRxgLvZ8kSrWd1+k3pHrQLzclWF3Iy3edY+v1pHOeX\njsR1Ry1MLn6QJLesGLO3zXVUUWkM1+QacoZ0GjnPsU0K+bZgSpsJh0GphC0W\nQMDlnFEhN+wZZFdiIMB3TaoVldw/FTerLspSubS0DRb8+vOECJa29eTIYBBI\nK75AS9DqeaTPPwAEgwX7QcTXifCM+zSDI0OsAVQtavY9PQNmh87VLEc82RAy\n/JiCxpwwGIKGBrp4QgBfnxK0ruKiPcmErFiZSkGxzg3aR58CL9BgPQXO4PdV\nSZ5ODQRQLV6KB+FExRnRIsEHz9awA4J8GIhGAnLUKtJw6kkPEbTptUfHwwLt\nMzPy0rfeC83FU/yQ6GjwOt9HFkyNK3zdEXeiKMngMhVnwUO6ssS49jsA8rtB\nw2ZjUjwd+Kd/By7gXJ3NhvlkiMfxaHxmhxv4yXxsUCF75tE/EwGTVSglln8J\nbRkwkD6zLNs529pDTeVIKzF13037pckfv79J36L0Yfgee42Fo60MZnnWQMDA\nunwytgLfHdPTWA0aNvf5b+WKGfdY6Uuz7hHIMSrdGqgWOgaZKVZ3QZS2LMYK\nPo9QQSeUKJe1kmUU3OTIXJjK42OVdWNrcXVbXmTcr4cx4pQFqSRk77+UlFUw\n2Mvn\r\n=Nc23\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFm9TWh59Tj4RkuUmils5V9coiVq0jXGGy4taMvqNUySAiEAhAAhhiaEy2oBBg862yUIt8NV5SIWuLwuZOTrvYf88Yk="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.7-alpha.43_1571112711470_0.7931066666346622"},"_hasShrinkwrap":false},"0.2.7-alpha.44":{"name":"@react-ssr/express","version":"0.2.7-alpha.44","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"28d3070d9974e6ec4ef17e8cd42c6dce866ad5ce","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.7-alpha.44","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-4x4MSDjt2ROe46PsDCg9BCEOR+5TiRzlkph1j3FllDglmYzOMppa+v9Uxy/xsZUn+KX5nB2S7DpimQmtTkxWow==","shasum":"aac2e4163021c37c49c3086d0effbb96c17eea12","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.7-alpha.44.tgz","fileCount":9,"unpackedSize":17321,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpUfDCRA9TVsSAnZWagAAia0QAIiuVxin2m6v001UBchw\nIYrfOvkl2qD2phA+BjOZ8INqxuBJv62HaonetTOdnjQuQfq5uS+BSuG1vcZb\nlhiRf6Yg0tpFswkLYwXUWxFdHRDRbTZkkt0hBTipNvTw6ifIZ1MTUW1MNjeW\nVnDC2IphzAF1eUEHTJrefWy8LyKtj590j3cItSNb6NXoOSzv8GgDzAoZnUGv\nbuSEBB1+8/z0gaabV/VQ9WFUWmkzrvDGMhJLNtv0fVd+sqotVT30ecPUCk9c\nxbJlKuhmMiowsxNYih5bFvqxAPPh5g8ZHjM7vdGLIgSnr7Tjj7aOnbajjc7V\nPOruRU+XDikX8lVflyCyirU2smB6njn2mtddiP+e8ps2TmNvT8778xqFzxot\nZhnSbUh6ZyJKYA+11WUcOSqt2Ydn2rypJnoQpRh0pPzMSN2w3AzJgvIF0g/A\ndItxxUuZJNhXVVok0raGr9PhQfShQuCVCi2OqTjG9x3zPRjuoUvzavPNyXFx\nIt3WV+f7edj9nOu0xsc9vzoF7loMZNU85d22Nf0Niee5wGYep8pSKG+oTNPG\nkTk/GYNUTxKFFC3sFZi1K2/s6dzMNCCeejKu2LVebARf1Sj+Z+WuxNLLorBm\nmDCnALOzxjCnt36o02RWqNh3cgVwsCUd7iENfPHDJUnHwsV8dntTje9L+piO\nnUE7\r\n=9vnh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICOLeZKmOdTj1X3dqh/3cb86OGe+/tsaa0D75URT/x5ZAiEAkzuDLx5m8NsLPrLeMh7ovbMLV6lfcrLUsOS+fQVNXag="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.7-alpha.44_1571112898810_0.24985303144847992"},"_hasShrinkwrap":false},"0.2.7-alpha.45":{"name":"@react-ssr/express","version":"0.2.7-alpha.45","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"36f74d59506e40860204fa54aa9c59d28ad9b248","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.7-alpha.45","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-0mJeabWEh6PD1CBs72XyHeRyFoRp3s8UuJIn4oI3VPOYQyevxd3GUnglniWzOW2mRSed3ebqGTSIghuUML9ggw==","shasum":"431ff6ef264569b0a0505c2b88f263b23b5ed37f","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.7-alpha.45.tgz","fileCount":9,"unpackedSize":17341,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpUj9CRA9TVsSAnZWagAAH9MP/jp/IzrX+0AcyTW5bkcQ\n+BQJVBprgXjSBN/dhrtYI17xPY9wM2hm/qOaDqvrjM6spWdobgqNg67/rIuM\nhWFCW/NC9FoolyXO2byv/c7lncmoAsXTxN4SjJVZOCtPKAKAyLpWtjmINx0k\nUp7s2hJhjITwoI9PCC5fSIwOjzcMjKmHCK4u90Td+t66HAOTiOR/CCT9Njms\nOlct+yjJjjJYmrOZwHn1RqPIdoIync7j3qgnyAUBmMA+YmPRdArPBTT381++\nbL/mN5BNpHX6ie7+A9wvmEXWv2GAqyzTvKVKinrOzIMiBI8cNyT+Y0Rgp7br\njogr3vyHG79S8QIF1tY7a+pVt1VqIQl/PHdPWpOOEtSkKYbXRPnTZzRtoo4J\nj5AeVkWsCZGuqD5/h058BWTC9k0JFGEg72DgglXlwN4mCK7gZtRfVNch2RFn\nExN9hJUmH0Ifchyk1PkzIpCnVR8WIVdmxI2nMA+LCjMR+LAN4MwgzdvHQ7eQ\n8Aq7NsVteBcb9VTVIDqNsuWgkjfuSWT2P+ZmMIpNCbs+8W3d7gjFiHTCfsL6\n/QHQ24qGJarwADEtOPKBdzBz6h97+f1+Kf9Nz+zCAE4mXXkpAy/BiS3nMB1V\ndyCwAqwnPAmeuldtDPvIbWQsBlvlR/OUEVU1J4m/irWemnJkdrCOWbN2Np/n\nnK4K\r\n=L1dN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG5pWMPB6LxOOYhdL+NY4ApNl8zlQ9s/cUCA9Ah7cb9lAiEAnITwaL/v9HaY4Ga8BYtSWkwSS0WNqqjzcLmf1yxsITo="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.7-alpha.45_1571113213196_0.9630952814990248"},"_hasShrinkwrap":false},"0.2.7-alpha.46":{"name":"@react-ssr/express","version":"0.2.7-alpha.46","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"2bec08fc8ba2ba3f07fe4f6622fe913a6192362d","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.7-alpha.46","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-xnyhWqES5Vwd6vAQZp7mc42m5v6bKbsv+0D2nIjR7Id9OLKkI/aM+b3cKRaF7ITO6krw3WRl3I+cS4m1UtBxuQ==","shasum":"236f1ec2ec0c4e71819dcad5f023363f0f5c4e7a","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.7-alpha.46.tgz","fileCount":9,"unpackedSize":17345,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpUmpCRA9TVsSAnZWagAAGKkQAJBLgYpz/HRrjUsyHF2L\netZgLk48A9Fw4Lu2pP83XW+V38HlPp29TQUtvawD4J8Ki8namKcy/lVrU7ow\nK9s4FdkmLzpmtmzw2kL0wBby8D7GpDu2nL0Rmc7Eu+3Fl7R6SIB0YvpCuJHp\nLsUnxRpiQsCVNdBFOKcFx7i9TkR3BHLVTY0dzaO0Z9G3AnpNw2Z1olY0FTE+\nOBw+M8EAibf4JyjHd9HAMpoA06QooEk52jF7LhGQRivAL+0M+CD0EPCCU+Mw\nOZyMpE+pW1xb80jCQwK+BodoAO0AM9ocSys0LpLcB9eTAlM4KiMGynKom8Ey\nYxYek6aFVcRpdQoceUmrcjyXJVMfxOFs/fdNeDtR77NtiYjeqLdEP5j4B++Z\n5o70ugqLc8ltJuaXRF3rZzN2TY1rfP51gDoEvwFogWxObXX06dQs1qBBwG9y\n4dT6NcmxQjEuPm4fiuGPq74Pbdf7Fzp/tFkacpx85RR9vOPBzcY2hgzbyiti\n/GPfwZE5oVFIrEw30RiT4H+K7Kl7AfGdt4iv7etGscOSp4u2s3oLZrHZTLqY\nAWhOOvvZSrI+/Lb4HIuI0AW1U3nVzKkDvJD2+JuOXAsvXaf7Qg4yOP4uMKDp\nMxXowQEcpOUHBO7dEQnLFEA1rexe//TM0gHHm2uCj2/8Kq+HXmMpXIxEVTKr\nUVaW\r\n=ITwr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFoIzgdbg4CNlbdoUrWfjusHquf/ItmsZ/hqqueK4jglAiAeiQ88PF5X8tzqi938F5GNn7Hy7ntx4CogwUZnPFesjg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.7-alpha.46_1571113384684_0.4825967902523547"},"_hasShrinkwrap":false},"0.2.7-alpha.48":{"name":"@react-ssr/express","version":"0.2.7-alpha.48","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"ffc5c697da1ee5d4b9babf736aae276f5d1f0ec6","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.7-alpha.48","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-/eiGXnTjCKNCCRpNgqO4T5RDYYFULIlCjHAFQ4PbHFtSB2ZzGpqMO4Cuei+nivW+el0Tdh7H1gES8bE5WTZi4Q==","shasum":"ea940335835e0f8e2491ab74a152c7ce3ed549d9","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.7-alpha.48.tgz","fileCount":9,"unpackedSize":17352,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpUugCRA9TVsSAnZWagAAHKsQAINkcEMg7pw075HB+CYV\nWc1Ku936zdd5ZrGmo7OVuYJoUxniiQzJiJEQ1O4CCmg4EyVIMrXGUHGvpVe7\nZhqsKkeLcjDOR2XCU1KnNv+KdoUirhn5RtUrgDi3gq66ejOiWhgImtJq2AdT\nDR194Gi/MC1LrcJtoMwqljGOdToGg1OI/iYsiLeb3XX8nZEMztfEi71HnCOC\nhiiXB3DqXDYLYV1KJ9ihVBIx4v1ggQ+XusojuUbQD5O39BfzvK9p2jw6yvKm\n2+0KrE7MnFWH6YTcFX7Vdb83NbTe9rH5CMNRZzOzTB1QgHr7r+/Hq0JPNlMJ\nhONXlHji9ljJSXFC6iBXGhEKm7olN4DODPPWGOcNSorHl2JKyk/d1smlvLwi\nxRGbAdv/E4v6C9GAHlFRytQs2RdhMpNpVNrx78dH7fEloPT3/U5xYtfWPgut\nVHf27vvlL3qjfOzudN5FnQw6zbeAIlGCHPrGO5TUocEtP7K44sLYY5bZsJ3W\nsJVZ/qXLaTE55ELEHVIzQrz0ID+CwBd3GCPj5shvS8Qmq0Kk0M/GWrlEeIHY\nGVrfgAFyj7XdMreBw9nppu/v/UHjUNe0ckI9Duk1MTbbztGVrs1VvMvM9wid\nJK1r6+9AAmIY1+Wdjqwf8N4t2bg4yesiOSXGwMkhYkqyzkfjUPYdLS/DLlrr\nXBkK\r\n=95bt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDGsAiDCOx5RCkdEXDMqY9MjJ4r6ZEpffdzdNJJ3V0Q2gIhANPq4T4ad1VZotYhoigr8vjESILUY/gIXyQuBd2LyeHe"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.7-alpha.48_1571113887378_0.9243840276238493"},"_hasShrinkwrap":false},"0.2.7-alpha.50":{"name":"@react-ssr/express","version":"0.2.7-alpha.50","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"594ead57180948f3a4972ed86b2662cbd62098ff","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.7-alpha.50","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-U6cqpxxOqeQitul/zvrnrcky2HN0of0QeP1hMVvX33sbDyi+ITjXaPYi5kJ4jMHIHqbI1JliUfNtgFjsvaaU9w==","shasum":"a88ca30b9bc02fae2ac8a272804ecdef3f68d59a","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.7-alpha.50.tgz","fileCount":9,"unpackedSize":17373,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpUykCRA9TVsSAnZWagAA57EQAItp/P7Kbcur2CoTOEMR\nS+SlvHgQhSqBrAyhPAfQEhbBpG9RFdVox/vEUVxmqzfw+soq7yHL+DNmui/i\n2rjuOV0gTBlPzO3D+8/WTVNrecnFSTsZBomg86on0OgIhSivTIAVnOaGvMyC\nz6ABaciR8B6a47k582/nEV67GTHMejhgIlAwdEBPgYAZlT4z6GceKUHpYyDC\nYFfh4ur71ZyeXjOnTUto5VukVXPiAWJg1ezWvo/TuI6CvpWrVgBrfcl0JHnW\nryZGvsASrCXKBAYPrteGnfHMdgsq5jvXlv9I1jaUfFAczLKKqn/H8QGT70ut\nvHxWwL3bkKXlAdKQJIk0dghJvIw9RfizH9tqM93jMJwCe57XKBCcJxtztDAz\nqVfbnzRM90PvhR2A0FGsGR8cAKyCioNd5hU9j6BC6anSFrRsIfKacVq/5ryf\nlXe4FqTxyk+r6qjn8v4NizWoXNctnhXSmkyvoQDe2rqC9NaRj8RmkJ77sAq1\n7srlPv8b9OzKaL9hvgVtmMg3FhdMAAyKRmkkuoXo8t7Iv/qPvFzljbEhNA2A\njqSQbY7from4rm7AoVe2mNdEzaMB+9zRoojScd5S0cv+jOh1qoVa6m+7R9nw\ntYXvqQ+oHqyEFtUdcndLalB3k9c2VK03iu16OKSUI3sEQASnIHscEz2O2CYP\nYMl7\r\n=wj3d\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICnPv5w8hUXlI+nA0MzaPGe6dwR79WzAFV4Ldd7Yr65zAiAwVSAP14xgWxG8GCXYcHEQMdy1x1lXna+w5NbDX5I2fA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.7-alpha.50_1571114148216_0.1974435664408407"},"_hasShrinkwrap":false},"0.2.7-alpha.51":{"name":"@react-ssr/express","version":"0.2.7-alpha.51","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"2da5d0ec827e4b5e2a0e9a7b21fbbcef68832d16","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.7-alpha.51","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-wFd+WGsE9+TZRtH4C7/p45tQrZqz20N9RJP9RMHZZ5Jc1mnNAF0pxLmsPmTprkrALoNl8EydwQ+J3IXGIGj2GQ==","shasum":"c09d1a66f1d911908a99fc9a4a5f112183b450aa","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.7-alpha.51.tgz","fileCount":9,"unpackedSize":17373,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpU5HCRA9TVsSAnZWagAAh8QP/0dUlAtNgkIAW/TQaFu/\nFKSZiO6fDOzv6MlG+X/02HmidP78ACQ1G1gKpQVNfn9+sl8ahH//741NNwZr\nV2AK1u7eXkW0qs5d8Jb8xop4GcvyjaVuyUZ8TjSSs+89DZjE5J4e9bjY+ClM\nH1NE/kOKiZdmfZjvE0G5zF6laW9/LpZuYVeD8wyQzeUeZdN0fejRY5B8zm/s\niU4bG5rz31c6t9D8ImLpW4vnf6wZeaWSKwszRMTqRo30FsCoGX3z27oFDTVy\nTOvbC8MVxfW5DrKSDZczgurTHeM8GAhGT2bzEF6C27O4zpizKv0mk6R0zN9C\n09o9WLPBhFo7JjtZmG+3lKctex8hXgsUaEeDSIUqERtIyuNrsaHImPgW6iGY\n1TmE7ctPZcDSlVG0XVa6BzQGmhbzCCViDqbqW0aBCiEktK+8IldidoEluTsm\njhEnXsb/TAy2MglrXj67mKb9yIFaWPIar8avpVPV+YQvimbzQ01inyKfGWaa\nFnUwQLypAS3OR1zoaMzcSJbJ3UgOxxGQrumZCrkW87YRpY+yGWv7Dz/iDnxR\neQznkt+nKB+vmTuATmEraqqQvAOTs1Y1+f6fRCKNaeByXk+ucFY/sZLoWpDf\nBmJB3rkZlRKpEIOwoir5bFCyR8GVMrumeuxEEslQcucmTLR6SJ1PZBczuBsU\nfboE\r\n=0s6F\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCNmg8pLfDKah8cjOsbF+7PBSoUbJgAuLuSBzeotiSSYgIgJV9H7Ic+ySUnvdG/Jz6PHBWpKI9rLd/vux/GPH7AJR0="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.7-alpha.51_1571114566685_0.0923332140010682"},"_hasShrinkwrap":false},"0.2.7-alpha.52":{"name":"@react-ssr/express","version":"0.2.7-alpha.52","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"8b79fed36603f7323c7b5fc2e99108c23323b937","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.7-alpha.52","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-gT8VXnGAqRM8OqN6Tj1+nAmaXPkkD8F01TPU4K5IGR8RCaaVSLxuxUvurBbRV5Eurt1cqjooSM3rnKwmGpLuWQ==","shasum":"f1aacc6fea72601f11e3e22ca8a589d91e5cfc75","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.7-alpha.52.tgz","fileCount":9,"unpackedSize":17373,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpU7XCRA9TVsSAnZWagAAqckP/2YaxeTpzoxkvglNLpL5\n3me5R88jNoF/oM/Fqmmh6JXGMFmXIbP4dVr/14W60OPNmzZi25iiaZEEcpgB\n0WCPMrcR+QUtoijHDBRLxTnb8ODuy6Iv6JcQ0GBCEDO7jWsc1o4k5U1PzxFg\nF51+nbBCdW0jqazUMYM7rT1X7UswRiIz+VVZ4hcMnP4qQ7n6IvQ/sShOevEc\nH2KXCPxaE/OOhSW8U5KPqPVdtDxvvB+i1CQIJGp5MCFkwZIwgrCKi/eLyS7o\nFIRB3CxcxyDC25uJtVgTxLqsnuN79RrX8O78P8xluNHebjgqGRGRK4fJ9p5i\narSekRCDHmxGIQe6AbL7y1wzNXxLxF/ulacNj86rcSw3iKwJErNXk+JpP6V1\n+f7A7Terxa+JaXM77/cNgLGrvQ0clBzHd1//4wCyAT+8vCWQvxXNZRDv4yUc\nePtwDgcj5ro5DaC7shyKYzzRxu2atjp9nUHr2bX00gZWfIahynuW3BrNOT5G\nThrbwaoHBZqnisAQgkET3pFTeGvPdLHIUKdMaS175sP9Hk8fH+i36uZPjsd/\nenMoRVLDBDtLlhTuRp9xiF+ROOzNStIM7YPiMg3RZH9gAmE442sPdjkXN+ev\noohHFTvYdXw/oBvJy0ewdqPKj3AV20lPQ8eNUZ82+Z1rQZW/oSIdmzHrD34V\nMAnV\r\n=hnIt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHuqNXi75cxnbGHUTAiMbYKcKX+nPrRR7njB9wk9PGXhAiEA6iLKoY5LDDncDcECiaYYRswqxrsYsPsh3WtxDs5anb4="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.7-alpha.52_1571114710446_0.9266336997384346"},"_hasShrinkwrap":false},"0.2.7-alpha.53":{"name":"@react-ssr/express","version":"0.2.7-alpha.53","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"50f79618826530bedc2b6c32080b03e18fc38dad","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.7-alpha.53","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-TXhviUpCszbKWJQGzAzHwEsOYI5UQ+sRA2jNp9G1E9AKgb5He7dkQK0vVasv/3OlgrBZyZzIksVRO4IBuCG2TQ==","shasum":"954bf61eb175c7ddbd225252edfc2913b16be0e1","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.7-alpha.53.tgz","fileCount":9,"unpackedSize":17373,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpU9rCRA9TVsSAnZWagAAZmsP/3XpqZ5TnYOKyopeOyom\nviZ6lClb3xjKVuoJC0j0h6TszHrq0DXFpqibJsCM1dCGt+lSlwA6b90N/Wbt\ngOQf1P0VUHmKNkzhjxo1FlUqFk0EDOoEsM4j6Tb9XrnYiXea4iMRLqjDajC1\n9MNOpdB6nf5pf0gz+0a/6yEU43KAZP6cUIVZ245EjNThnvwdZdbcl+aWZsk6\nx0xaAKG5QmAqU1EHzvDT1DC3xfIKkVnQqywIQO+1ueq4S8kFGKl/vpfOJIkw\nKrhpXc4LTA8CUp2iVO5cZlHwrmjr8w+r10PFyJrIRQAgpdDZLRLudGoZm27Z\nwOMFSGYZ6LwYm6sx+KrnS3lbBL7nyJ3RAMZ4mpTvKCKg7hgLBkbmbd+bVJmt\nZUo5caACges+5wDI/8uoMvEGC7JbEktHAA+IJkRmKN2MVZE3xEvOVLLP25vA\nWlgh3ne4WmWGsTcVUjwG6qvvlXbmw5PC+v93owYb+ntj2I53XVpDkKbCHVHt\nyMQBwrn2x5CSEe6AYy5MgTvpbb5RLmqnEZ6HzsXBwVcht8dimiN/or1V8e5B\nBnPOdrDJQvo/WQI6zifT5dpa1d81FojUV9GqXR5OS5Ix+IRQeFbJY1X9etfE\nTSddPH3TAcBoPLLmavq6Iqzg/fICM0t0KzkpVDUXH4SzlFEk0p0ePBUrasNi\nF/qY\r\n=T5CW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDvcAqNi9A69GIpd+WcocBkPjRt8SSKKw8iP2e7uAwm2gIgLLbCk/LLCSW15jsgL5R+HmMkJzrJ4+HbbBZe3OJVVxE="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.7-alpha.53_1571114858534_0.4650688093996249"},"_hasShrinkwrap":false},"0.2.7-alpha.54":{"name":"@react-ssr/express","version":"0.2.7-alpha.54","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"f0d6eca698585e0932161f4f79b36a96ccc4eede","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.7-alpha.54","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-pxautepaAw8NYybKv1lhk1mQccfKmsLJu2DXq8JW0vjHcvucn+GRPEz9ISRRe+WG8dhp2hNF6w0+hyESVxKGqg==","shasum":"0864ac1f986533de81ba9025a04c539c1ccb3c1d","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.7-alpha.54.tgz","fileCount":9,"unpackedSize":17368,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpVBnCRA9TVsSAnZWagAAdJkP/2IG3S1R0qUHuGgkpZU7\nt+qMYgtcs+lKdCS6C9Xlj/n8V3DSqA7dPaFtPKro1WuiDalqrEF+lBCL23Xj\nJeps5mf5d4oc0qB6kJbTDBnhqxEDtTR4UGPDFiXHRp6MDk5s1jd1rNj1iQVG\nbwJLLCwhGh9fp8ZblRC+oi/H82C3wza6aAM5ZF+UG20NxjMiXcexjqDQ1iOA\nFrfQZrq43NIfhCd5j1o9nWosLsWHpnpn5H1cj3ZWEUOoKozh8SoSBTKR7KKw\nIEuhK7frxHQNUQddGpMYpGDTOT6EdiKr53HRfghCksYOLWV2sZJXUipQEqsn\nGYNfRXvkDWH4PXk+5XxWzkfWNvxiTOjyQ4TJBPehQH9lrqkjUKHZ7ZhUj0bQ\nP04v3isiZW6jpGVY8IzOndvkw5mosdoQPe5vFfBWpgOG51WB5eHizF+lqnaY\nC/TLk//bxc1MgW1bgNHjET85HlIrsGFIVlwCyJAqRkIeKONC8KfO7FdYzMWZ\nJ5fUjts7goGXUMEtAwOCIIUubZoEV2UJLXfA4tyhaQTX1Ew/nfo8grg27DtF\nsJb+scjtEvlEI4lNzRmeSPLvuZz5qSaPvCZ5wxbUDHvKVuE2zgmuekNeD2/W\nSFgTjt9D7RN2elAGSh06WEWQca2wwfpR14OGs/mQNq6jidNRa8nW/hGgRNoe\n4nLQ\r\n=1ajk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCpuPsF3Dciya8O5Zrso4Ymj8m79GBWvY9KLpcsMgecBgIgG0Hg/ZSLZPIfrEfVwpf6ERfEtFiZqe4Hfa4j/e/T0t0="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.7-alpha.54_1571115111053_0.45636251920919"},"_hasShrinkwrap":false},"0.2.7-alpha.55":{"name":"@react-ssr/express","version":"0.2.7-alpha.55","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"6a84ef36cbb850b3d31bbfcf2faf9f05a3be22c8","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.7-alpha.55","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-f/bxsc91hOwnltWj2IixOW8RgoZ5a3kuijAhe8G8YCSA1YGdGsmQKtmA0fgH0oAQnuO3NQEUK/BWrXo3cxibQg==","shasum":"ce559924b97069b850ab6864c925ba27a46090f6","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.7-alpha.55.tgz","fileCount":9,"unpackedSize":17369,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpVD9CRA9TVsSAnZWagAA1NwP/15Jr42m9EvCSYCr7nRo\ngTed1cRraUPbkn0MDINLZbCMETwanGdBWuxojt/M+ScavvFa+rI9+6kyg1kH\nfRoJscNQC5KG8YhDZYD4DrrTpBycwncdWHCu7oGNHaC9EoG2DwW4HNuWU+KW\nK+d7Z0BIn8W9QCyYAqTFyAoJwXeogQ2kVvBsPLEUBQ2bdUz8ycSLrDqbLzDv\nsGNqe5b8eh1FPwA/AxSFuMBHNOKVyTjjQJVYX7edvo0KoXA586RTajzbreKf\nZKTDXBkSCATHcKk3++IXS3nH9NXXW0s64ZC1vqw1DU2RDhrS3IWhi5Pw95Oj\nMCzTFiyUvXrBrOaP5a0C8m15CJPyEpQ98W4VTGv7vOcKUlJGKJXYXGiW5IvL\n6RsVbMorcp2akPTX4T2ygVXNiZAd7e4hV6ckXNzEwkKie3N6aRRybSV99y/h\nyC+Iu9rqxEG7BCboONvvojRHhW1tlMWei26bseVjPeaEGyq2vD/E/CRrZ3a5\nNTkka3CyNcLalDk9STzOBzsEVPL+OvGT/HF1G55L1EHPD6EsDwYI6b++RbS6\njJOEGsSLkMRMZJP06FY+BcouWwU/hdPKJ/KuEya3vm92Tz1qKsGVHz1esMYx\nV1+e5+dgyK/Z+JUZX3EYOp2CiSK1oQlOIibGfjhIJ+NcR2tPxLlstYj4XGS4\nVMRn\r\n=pFDA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC34bTBjGd2dya2+m3Q2ZXFrtmsm+yVjz13fRKBrpmSPAIgbohCuBv2GAIv5Z6yflwm8f5oYGsfe4rxUY2uohLiR4M="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.7-alpha.55_1571115261213_0.20279371474809582"},"_hasShrinkwrap":false},"0.2.7-alpha.58":{"name":"@react-ssr/express","version":"0.2.7-alpha.58","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"833d9860b1c0801fb4ca4f02b3d314c4d82d8281","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.7-alpha.58","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-CxIIXuEjJ91Ly9h64TThcbMoLTyJoyTiNy8dtzZtds2K/x1wG8BppMVtkGfSEHH5WqVncDMZN2G4wLNrSsFA2Q==","shasum":"bc4bc4b3ec7768a7c01895f50bb651d290ef23a8","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.7-alpha.58.tgz","fileCount":9,"unpackedSize":17345,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpVLqCRA9TVsSAnZWagAApUMP/iAKWuDaxzGSRDknqPDC\nozNT+pZCXSDK0Sc1yB9C0XgcF+mIfz8KR1uAotShgzikGb7GTQB108CSxHR5\nPFTjIDWwao7pb6Yuh3uQYxTERpNgZiN9sM3Yz6Debh+yHE1m1bGCclxd7P3u\nhvUa2yFC8obFGfClpujg9x5Z5KLFkUDhXk6D5Sxr95OxNEUjp1fimcffU9mM\nFK0KyIWan78X882+LJiKEcH7dETKDjWhOJXaq/06ClnLZP1SvzsMA1AZalzO\nXNoXXV5boiWZSZchUJ7afZmXzRbmZn+78cuFv7nlqWLa1uGUw+KIXXUrtXqV\nyn2tI2GZXudqUiJ+HIvINYu5AxQiZoZCOlAA+GycDHv004ggS1GlbMQdp0Cb\nalgRwarh51MielebDaRUV10pjbmQpk0RHwtxBFl6iAXe3n6THf5FG3g58OF4\nTclPPJCqo3x+kJhmWE0CnnBjTY0SPet/8Kc+ejMMfX6thtigMdRgzSxEER0y\nyGq1Bk/FGFYOwbTjgpM28ts1p8VHppDMkVczZox5rdgDYdMBTFDU5YTc7DMt\nRhbBHHxH2Ng1hkx4+9uNYPgVbpE+jt6SqyBB01yFYzjH/IM0xM19e4+GXJMu\nhIGLD2Ja+KaIO81WcfulMn9Xs82Y/il7LBqmIFJ+VzBKMxp3haLk3FicH6hW\nsLpx\r\n=eiXZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDQ7sQW10AVZel/3/lC7Wd+TXuaQRLoD4p/7EU6AXfzJAIhAPA1rp3yvniN34z/avNICm0TGkmB6inyJRFsiplIuBHF"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.7-alpha.58_1571115754078_0.5176375913005027"},"_hasShrinkwrap":false},"0.2.7-alpha.60":{"name":"@react-ssr/express","version":"0.2.7-alpha.60","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"5ab99fb007deab8745d35e996645234b22986ed7","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.2.7-alpha.60","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-y6laMQ3OlTY+TVYkUs8hiSkW/lDcCdpgJIDbpcuAZEpaFhQi/QFy9iPKh2iwfR5Bs6loaWgK5Ccrsu81QJZHQA==","shasum":"81fd71f08a92f4644322c269957cc2d66bab16c8","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.2.7-alpha.60.tgz","fileCount":9,"unpackedSize":17327,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpVPbCRA9TVsSAnZWagAAFqcQAIItb3GXD2UjklMVoyXx\nJNIUxC4A465QqVcoXdPNyErVqdp2lyWntKNslgGmWWXdwNzDE2/QwizLYtHz\n3UiHXbH1Aix0l2YsTODuPBuzzvi5+uLfeyFNUtMn7XamYMF+7LqhE7YyRVnt\nhcPPECMu/tgWYdNqX4pqG+2NcJIbK7zJkaG+FsJeHMpYAJLM1ng3j1CkIRjM\nX/Cpd5yezMfYaX/1dN2dk6z2URtK8ru0zaqO1PUuV3BPvT0fzAdSvcFoztAk\n337lVDikE+tTOY/DYiJMfKHraQBSgOrEXvjRjJOc//onwkKgjP6I39ThQe8h\nvstZttmAbPkd6H9lhlReLOpNY3LokJRAEFexYNNw3HkZ0D7o7K7/YKF/axRV\nANTWwPPWtxqlb+s87Dr/Bfi1FdrHUSXc9In75byt7Zz+ao0/C3c8VzcOTXBE\noO70rJdkPWoIO3pie0z77Jsytchlbd0cYRXxlWkII+2dpb8hEJWfMq0eF5fM\nle1ZIfZE4A4cD+cdMgI4PMiAMQJhCLD6izxNu5l0N/tXdewgWtugAnCKKu+a\nrw81atd1YOSPbJzi4+SkUe8mGkJiQiBvvXUXHlObXaps2G16lKyKxVQKAJjE\nVhYyi+U4qfFwJ1/D1pV96KjT4zdAZMRmkMCKQPnVfzuiw+m/93/aYLxziAG3\nRH0D\r\n=R7UO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCkgcf5cp7kLwDZwgNxad8r+IGLlYBOulvVUFoM/M1ouQIgAi/sUsz8ahixFhX9dvWnuLkQ3wcs2N91zhWyBKhbysA="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.2.7-alpha.60_1571115995227_0.08985236921406425"},"_hasShrinkwrap":false},"0.3.0":{"name":"@react-ssr/express","version":"0.3.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"b589d60f0395e712d3f106667b4c492918140e16","_id":"@react-ssr/express@0.3.0","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-ylsoZjjNRxmnoUKv5qizUqVlvafD5haR0Lr1yr+x/0w+aumQ8GMYQkzBUigKVUTsSN5vpKLrrC+zbwfT3cXoNA==","shasum":"ae39777015a821d2a46317b53fc2b2a886772eb6","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.0.tgz","fileCount":9,"unpackedSize":17310,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpVRZCRA9TVsSAnZWagAAKJ4QAJ+JB0Kt8RmhY22Aw6Ct\nUPjeDW8x/IGP2jdoDXi9a+fiPpUv+vhsjoiJ8nFTWZ0vI7bXDYxG4hwROGcr\n37jgwMOBciHodGu5Z5lDqGYJpIMS7o6w7jFD4q0cnDpHROtbSrQV31Tojxi+\nzMyzHRuCFYDhrgdOLK8laQ+H+bAFp0sCKy+NB3FF7tiLLw06ilNDZp2E+KR/\nB7UGAupCXGQ2KW/1DmVd+ddhI+LjfON0pKAqXNwlXKFvCb7VHjofSmq8s4mV\n0MWtLJM3VNn6owhDL9VBaL8HM5DPUO1Tk88Q52EGcUxZ2u5RiZdInnEuGuCW\nZKf9VzmJp0IfBOQXlnOL0NDDGKmYiuFYuiAceOkGfCn/QcF6yQUJ9xgDwCJ2\nE/cur1cKK8WwGMg+6kyP8Q0h06tKFYRdEZuzGyuYk1yuC48O0Fe8zSm+vo3u\nh7dyJuqMzEd1pjGpmBAmHaFfVTq+DLQ51y1YrlU2DAMrlAfZD0VBN82I6xkB\n8VpUcFNF3basuhcxwR0pfBmf4leK0Gbbcdg1bi6q6m2om1VPVnEZcAHUEf1x\nHL39a1bl9vYS7qd59ynS70U8f70XAvInqSjPzNKSldQtiQcJC+UBCI84RHrX\nUN7bR2jrKOyYoIIu0jcpMdjqnsFlgueczjPq7PDloUFlGU/o4kLeV5xS1KQM\nkWx+\r\n=3Q2t\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBvxPy0KzxNYt+KQNlHqpAgieBOYbfJZoI3QBWGWauZQAiAxTvdC2oTYwxM3voTAXX/O1d+1bhmbKNhhNaAdcGPg5g=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.0_1571116121157_0.8318728046399921"},"_hasShrinkwrap":false},"0.3.1-alpha.2":{"name":"@react-ssr/express","version":"0.3.1-alpha.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"e831ad4044cd01b006d328607d20da906b6b0476","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.1-alpha.2","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-2QgFxmFuXB7TiQRjgCu6eS3KBxJVoUiEm0qbpOyC7mKjrcnY4aLwI+FpCOpzcbftA35rrBPZhBWoJ+yThVJZvg==","shasum":"3fe382516ccdd65d3b902d4a4b0c41fcbc56c31f","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.1-alpha.2.tgz","fileCount":9,"unpackedSize":17293,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpV28CRA9TVsSAnZWagAAOywP/R7ie/c6fxV7zej40gLc\nFUMwgUiUS8sODfsN7tqZLZbKCUxcACMqV3X0FyGdOWlMbacdPlTFHJydf86E\nqTPFF6pbz4OCBYyYRM683fQRuv5LCoNpiR4+fqsjXHkja9q+iZHCWT6fxi/Y\nCaf4zAWUhCS5L9ejUhwtZbIfrcd8XfhkXGLpfPmVteVvcx4HuEdY1DC+w3e8\n3DjxwLUI9ksd++gSJBRam13yf2yP7gnl6cg/eB+YidyhWCE+GNcgrbBMmzRd\njJqXunxGWTAfjA5HnC84SfVgrUP4YMdO3rlpCufeJo3+Y0F+7lCQRXxBHfW9\ni+bqRBFYN1qHg1JJDLHp+KUN1DMSLg+aLMmBFcxM0ykBGrDjYhT15tg13Ttw\nCVPWqXIpRhDJNVCThfXhDXQtmJJFhzJ+w3psWMZGi4jVtQS3OEYVktQdmDpy\no5V7aW6OVILy/RszPLSVKzxV/J90Go+wWe6Ga9U3VlR9XIf7NDSmn9p2Aqys\nUj8tyizfCUZygc7sVyuMHEw780CTBozrOib/pEzIn8x+lm20+VFsBLiFQdEe\nN6a7IkLbfY9xCIDD9PUXIUxdAO3jAmXhv46VDGi0ln9ix4O1M6SHiYFi/lrF\nOVMMGzpwwC+Hs2XI+IMiPfDQ4S9syR9At4chILVgtnFZVdtyqh7QD7J9Hz4Z\nQU4l\r\n=DVay\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCNFtry8CT4ZQ8g3i0jAn828dqbWMkv6RoUIVv/y95MzQIhAL2bEZM5rE5It/0ZlT9G3ruPJRsg4g0oMXWPvTKKLttk"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.1-alpha.2_1571118524133_0.2056467547772025"},"_hasShrinkwrap":false},"0.3.1-alpha.3":{"name":"@react-ssr/express","version":"0.3.1-alpha.3","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"8ff09cf947e1e26fd830ae5b1eff36646840b33f","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.1-alpha.3","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-RQ7nOxnrj12wABN/gC9yXP5BAsmCM9ac14HUkAVG25O1B9P+eAVmx9zlI7ItkNKG9Z4qd+8Z0T7ymmCJ72vCfQ==","shasum":"3a6bfac400da6d4048410085bf8b41e2241ac09f","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.1-alpha.3.tgz","fileCount":9,"unpackedSize":17499,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpXb3CRA9TVsSAnZWagAALe4P/3OMOOGrdj3SMzD9i73s\n2AJdUjT+XPFL+QzSTy5iEiYxihw9JtaYqy0hbR4tH/5T5pKxaMyFUFNJ7kGe\ns5IsQkFVrFp53w7d0Sez7XxbG/CXVOPqNTWGi+uHu6rrR4OgcRBfZVVFTinf\nvCvok+fEK7EK2blbfhbtXukRXqvNNWPJ7lR/6/CRro2zlSNCbtfkq5tTo9wh\nWlv33zSO+eL8ni3tIA3WLCQe04MDcNK8ykCDYXQxDIV6C2TzndmS2V/fbqcv\nN1FBd6ojkMxbvJjQ0wD5D7IlUIOtSZjAgktqaIxLrQ2wCqks2o+uS3uiOd3c\nQ6E6XZXxlwLAAd7WlPr0tFe+UK1kOyccxlocFb8PffyHa9z1bsWF/eMxZiEZ\neRoTEmDEA121gJ9MfCbDmuEofJDajdmnH+lCjAG2FnLwowBFqe5Gz7sFNi7X\nAxmwKqE5a3cyHE1WoTxMbz4VcyTNAnU8zjNP54qUL/Jrm4FQoSJxt4kHs58y\nB/pivauZ6Wu2IPOtF/Ptx/shP7J/YyyRgHNGivvECm5NiOxzZKsvc3xLSFLA\nfiQAhHBCyqOoLEY47mb8HP2de9yo8jXZXdddDzKATrrdOAcILGJSQ/RhBwWP\nlmMqgAadfzhtbWI6TFWV6jg6RtwKMkzhlRm+Zg5c1K7cSEkuGr2DMPpIQ2fY\nPx8a\r\n=T6bF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDnGwjz76aPeaCgfkG7OP7ir0yklXOHlqwTm7zHhra18QIhANfIfWsZmGZiiOLlQG7isr7A97JW3hndjIU1sSYw/oFx"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.1-alpha.3_1571124982676_0.35833291000873957"},"_hasShrinkwrap":false},"0.3.1-alpha.4":{"name":"@react-ssr/express","version":"0.3.1-alpha.4","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"dccafc89c17a67273dbe3840800eb047ea1f9c39","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.1-alpha.4","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-55h00HwOtRyHBXKPmmkoZZdzG0hld4+etQbojy8jdOyu2exFfXgsHArg2C0ezyGTklEIVh/yJ64Uly7U5fwqug==","shasum":"241c4bae80d89be9091a5119751597c7bee876ba","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.1-alpha.4.tgz","fileCount":9,"unpackedSize":17507,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpXd0CRA9TVsSAnZWagAA3V0P/01HAh4XOjR/HxhoQoqh\nc7GUeT8YBLbzoaFOsMVqr8KqucEfQAmorKVrSv6HQAjL01oCgX+hCcuf5/X3\nhR4XKafmeRsroNwq5I9I5XpBd+gCV4qITEkvvoOXHnxMuMEu5q6IjEWTKQSG\ny/vPyEFTS5E6ViKt8+iF6YAdJ8wfNfG7N2zs2ww/HE2jkxQRqYvF+euU3i5q\nyZOu+TSNAH84W5x00fBb5FwMbUaI2yvcLi8bIMuxMyy3A8AB0dx++NhbRncD\njCe4aBu7vW9lBKKg+ZfNiceVqQhU+g+Ppqkc3bSY9uUSMmEMnuW2rcCurfOL\n7oeRNKR79WOi43cXAL2OVweOwoehHU0pRQISKC7ruqq55PRcoMxuPat3A2Yj\nPKlwCejUUo92DSPTjAHAKM4o9aE+s6qS4CmjcbYgrySvG/2SXvGYYzXIy7vs\n/jSTE0lv0d9e6jcD9sQ5xm56ryMuxm8H/px8Sbh/uc9bNQfYQhfUFCRFyM1z\n/VWnh/Np+f1q+PqOgJd6aoOZrv1/925cbyJD9DguFp7kDmy55SeOUOF+PVJ6\nrNEr9fswwgvtdBGy5mgc7y+piHBOuWJ2t/RaJCSe4iorF2zYD7dnpob3MUrx\nihZY2IYkyZglv2x3oA9sRd9Ot9yV8euepIUHflrPL8V5VxJOjKOxt7C0KdLq\n9hEO\r\n=HMMb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC9bPpaE2TwCVpU/A3MibybRzE9SuVj5acH5YPqEbnSpwIhAINs87FWjdqpW9X3HKz9Klh8/U6fNjx7HL9aZFZvm3no"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.1-alpha.4_1571125108212_0.12648791148490668"},"_hasShrinkwrap":false},"0.3.1-alpha.5":{"name":"@react-ssr/express","version":"0.3.1-alpha.5","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"cd11735a40f58405328bc9f4050381e55c8b6c36","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.1-alpha.5","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-M5tl+0+rYgk/DV7Go/1+OWUkGcQI+5IiqAG13iLf1TKJ6jTRWvWy/T+X7QMENrRbHlZ3GTTVkriaIxnFdLxiPw==","shasum":"bcc41361ef9d4acc4f9ca8b06ae57bda8ff3c399","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.1-alpha.5.tgz","fileCount":9,"unpackedSize":17817,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpXpeCRA9TVsSAnZWagAAwY4P+wXqftO1i2xIi1sI7alj\nFqxllIWvJZ1wuovrsTcjYBO64TjRAhC3vqOEagejSTb+ONO9W9wZZUO6Cs1N\n0wqfdIPySaeH3t9Sq3lSzwfXFOJBbw5I7S86YyL+i9vSvpchObQSOPuzPGuM\n9gBrDieubcpRrf5IBEazS5qp7yvJNTN4B7rHT33Y0t8gc5cBLP2IPDlBeNmC\nDK/izlK/Cjab0IaqXZ7sigGRBCtEQ55LYFvQV5pxiFNO3vlzPaNpK8sPSvc0\nTE1+NaEfNPhGaMzvLSVPoY89z+3sMX+mqpv06jNRMs/xaS/tLv7HyOTaH9ga\nf7RKY7bn1V5pndfhiJpiTlnzTXvSAgGSizsJWkHdaoigmI9Z1SIlGVdz6w3d\nSol5TJ/vwNzYpWf7udVi58goTyiI/Sz9VpaWiyfhA7dZxcFwU/4aHmwevNqA\niZ4g4i2uBUG0A4HcYHqpjD1UxPTd3R1ThKOCZUQLuRyYC6ItkBcEAVLsqE1a\nJN7MvG7rjXtZbY4xAnHhDkmvd0h60xes+eGG82A8FuIwIMbGXRcrW0SB8NL5\nVrs1jazqYRGxhf5ITYlIZCRIiP8/9fApDfLKcAsZd8TYVTTxsLXJ+tlmixUJ\nRw5C7GYIoIlljAhRW3sQhVwfkVkUihB7Ps4gLbShPTxdA4il4vVOUO/fYYoX\nveXO\r\n=RxI3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCEu3g+pDrD2sVwiV3REVhJAyBgp0kjeg7LRh2RbPFDtwIhAK9ay3opib7+Hrlh7tV6lcrVmG2JnP2USqbzOEz6Yn5u"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.1-alpha.5_1571125854447_0.5717616160959083"},"_hasShrinkwrap":false},"0.3.1-alpha.6":{"name":"@react-ssr/express","version":"0.3.1-alpha.6","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"6d192f656d6fd7415b431edea5c0ed81484b565b","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.1-alpha.6","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-LMlCf3/QufKGezD28NtMd3i5x70+PnsK47SGMpvL+MVwyjJka4JkC8lbQ/+CsDSeBwBweMaHdVa3ovr4CBxFCQ==","shasum":"da0b081abce286bb83332a74c0961ad6435e92d4","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.1-alpha.6.tgz","fileCount":9,"unpackedSize":17908,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpXzbCRA9TVsSAnZWagAAeSEP/i5E7O0tMublO8ZVNRep\nh6s94CmZjJKLkUTdRNTSxlz9Zk5IAYj0znovlrocbAMcrie3LdlCaTPGaCJ8\nsEZU77BD1QEktDEyLDXiAvAHgM/NaphKfaBZO8gFbxGhalq6JAxtlb/VumNI\nl2ai8UBxYjKf04+16RmyrUnnEbsEBBNcsf0AOrfQ+sbSAoj5MbS5aObK3V0H\n9a97S/f7+hGCDpU9AFoyogMBaZNVJGeWRjbxKWvQWxEK17gcVB82TPVNg3Vj\nb3E0BUyTQzr/NJUs+r97xVkRNeIyrd90WAy9tin3ktOdkzWkuP3oxlbHrCtP\nWFmOXQS4Jta9eL2+T49cMV4Bed9y1hE0+ztkV/aL5lv4E58Jnmk+CzlAWGE0\nW58ed6YnoUJ+1TMfj38UFw30o7j+oZFntAslgQa2c63xvRo9lGrBa0+gLFD9\nz+QuYXiiNLLM12cV38yWC3EX69oViw5VYfZ433gC/wRXiwByqw+8CqxPYEDU\nsj6q8ujxOIieOTFHZMqrDL+pGEc1vbIXiHKEBuPZ6LldKkyDwFjlEUNtXeek\nm6sd34xjp2Ky72gHUcqsgQDm/xAo4c3hndUnuhM+fS+/1teHEyVaDT8nRo/g\n1nba0P3xpZk5RdzFeoaurkZt5VOxHwl/nPmRS7zIoe2FEZ4rtcdL8u6Bi6bc\nHAQQ\r\n=Ep6f\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE5F6vn9y4C5VRAoRzA3L7M+buXttJZzev2uhczBRhULAiEAr1cYiJBXQddeF7JlTdV9VxO/I7mD+rsmk/2UnzVVTAA="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.1-alpha.6_1571126490492_0.874394059167446"},"_hasShrinkwrap":false},"0.3.1-alpha.7":{"name":"@react-ssr/express","version":"0.3.1-alpha.7","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"c8313aae2d691fe744b6d0bf2e90c4b21ff0c6fa","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.1-alpha.7","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-/Y08h0uIb/sJeBlXCLF+Scpf5seWhioKCODF3yMFxLuzgslp2QcZqWAiYf5D3Sp68r0VO0a+o+Cl2xPoIsCngA==","shasum":"1b0e905aba6eba5c76c9dd9613069acc221ebcce","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.1-alpha.7.tgz","fileCount":9,"unpackedSize":18008,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpX3lCRA9TVsSAnZWagAAAwMP/3YaG5ZsnK791zlBarRc\np3YHl+vU2svx80fUg93CB//G1jmL1eh6gf9NIHpj42c7v0SO+rW0kvpstQM+\nT2BtbixrarGZZEgS26kpGW1wDg7auwh0FHIV9spO2c/95qsWVDgIuB8brCFJ\nZw3I2ifl7DEk1mSnsVkOVqGy3L5cUZ6A5we0utDmf9n/gcf8+oFAKEWjg+2w\nTorPfX6by/LMGqKdZyMX3io065KUnVB3EMwsTIYJa9NefcZRM8qytrsYA+TA\n9WhW+j8l4qDEKiMkj+nZ4jSVOPI7uumYXmHOQSa+APoUsFJpkFilvbXFs6aA\n+4cEKfLzNNWMpz7KhufDMD0YQKHPdwKPrAoK6XRM8047twD9S7zdGeYDrCPT\n/2KqqNz8Nqzc1TyIQykyKi1zfDjCfrM2W1Lq3HpzgGner0v+Nd9THTEMih1K\naKXFdza6CemTmG+Fd0eujDeeMUJTinzCPUn8UV+JZ0nuI/NtljnNKewvOpWl\n9mIiyYReVteQw9zkAsNX24RnvwcJH+n8a/QUvWMyxSZoLsi7/bwDSlyPXGLP\n+X2ON+xqT6pw5GodQ45i55v+hPdfhYl+NxUaFL7ovs5GwWlhGR2UKucfTMoS\nDxld0dVIANQQiqMYVWOOXxlXY5fe7WPIxqjkVBmH5CrQAxG/R0wjOvkz8V3y\nh15/\r\n=5rbp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC+joUgapnO/9HxQq8lzavxHlzPfzwsviMdC6KVpG5UlAIgeoMFUljZnA0Tt6VOkBCt8VNLZiSZllhIISPgGmTuoZE="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.1-alpha.7_1571126756948_0.2954836045591893"},"_hasShrinkwrap":false},"0.3.1-alpha.8":{"name":"@react-ssr/express","version":"0.3.1-alpha.8","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"58e4d2c7a3d9043cf5e7def467cf7dae5dc61e6e","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.1-alpha.8","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-cl/+byX5rEzenaSph1e/HUQIdYpOnZoPsU9W8XmdAeN2YNSUK960BOES4WHdIkuniG8U1O4qtDFuMU97z2sZkQ==","shasum":"5d4e678673b6e8492408022d94a6d66a4c2b9e33","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.1-alpha.8.tgz","fileCount":9,"unpackedSize":18032,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpX6cCRA9TVsSAnZWagAAB7IP/jTRmU1HKueDDBstLhtS\neUSCkbog3hFVwBk12adS3bfk5VSAXRfIEdB93XlFvY8uJnwvcN1S4cagHYeQ\n6ioDmVfMPYjbnnjPLwDzme4yZoRw3ZeTBwdNsg1XTUV3cAJwg7fSbFm2avhB\nJx3bhQBZBp4IWkwhrO9OVLm+1gfuMj9SBAOtj3mM8msFNdbYb7MIBf3V7IhO\nw9yYrWAp20i25WSDcKe44Qcjqhn6iGTbvCjq3RVj5uyT5UvKl0q/wOBv+rhO\nq4APG6C5mKtLCohDhjz53D4W1MRQdC3dg11GVkVsBCxQo8TYvMYVWlcYkrzg\n68d5PZBLCWq+1DvrwsSXxy/kXhVHBktT1M4kep9/recgBX6/5bLUT7D4ZfSi\nBEIkXVV4YWZjBLFhjSF7MOZrDz1p4gxbLUzG1hhhaDKAJcTlzxrl0vNJZQwK\nybnxnFg6eGTE7LY344a0RMNMBD8LScm4Ncwcc3YHACoUBYVLjZjbZY7rj8Hj\nUBnXFoeUFO7R6D8NhtTqPr4z6q+l6EdoyrvE6XS/VMNoWbvfgCmjefWSxmf+\n7hJRR514px+a67IrTL7/a7PLnUboWSw0/w1812dYVc4f8cBcINmnzIxbpYZ3\nkbUbtE0Ne4OwtjreF/PyjvKT5u0NHpO1XRwYax8VPISJnHLvm0DNeQckJCXG\nFb9s\r\n=MgID\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDVjzIv9j/aOv/8wk51M3V2ejdF8dCVN7+dZbbEDxpuOgIgRa3L+7bCs5HkOZIMtRp9lAR819DLxTbxZfBU8qiatm8="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.1-alpha.8_1571126939645_0.7745488787045973"},"_hasShrinkwrap":false},"0.3.1-alpha.9":{"name":"@react-ssr/express","version":"0.3.1-alpha.9","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"5efd9ace5ec9a487a0d560478651f7a764d96846","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.1-alpha.9","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-vD7x8xEKCKge3fBmP5cpqJich6L1D3JCOsu3bQ+XRKOtxnHbLnWWsZ/mkHsuB7fQrm7hxMfq3qQU4f4xxaLS7g==","shasum":"366f4a7f34de8343008fb6330a95e42844ed558c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.1-alpha.9.tgz","fileCount":9,"unpackedSize":18050,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpX/pCRA9TVsSAnZWagAAMGMP/2CJrLNfiVq5cXybZSkV\n0YapIdkkRCev7aGfydNT7+TCN55CsgY6ktdWGf0WeKWb2JqabDwEirD63mus\nhK+F8bT8hUiGZer447QBdaNjwmTHySgwZQcuYbhjSo+D2uVfMD0RPcqDmnU0\nnEz8tM4RGabZGwSoUXHaz7jXwSurWeKdBeEaMIqVedQtfzVjw8dpZb11PfX/\nJkZE12Jh7gNrkGDwr83QJ7vMBrR23m3j4lh4c5TJ3o4p2dFb5qCfJw8jcGrz\nNAhgN+Aep78w/jPhlVK7hSNXJmrqC7pEk4fFB8De5+es1WwNerhgIFQDWcXR\nnROhJRr23znQ063WH3FlpGCEN4iPnfVIHQbGVw0SEo86VfelpXLbmrvkq1K7\nBZCe72ls6ojycR7Et0Qh+S5OUbB6MBp7Sg2vD0OlicZuvM/u+7cR7cVHpXfJ\noTnr1dJZBulNzqmmq3o59iNWhO/JXBwsTrqwBK9TT7a30bUQf6ZpFgVyFGt7\nNCOb/AqjvI4H9wWYOvZCVPxAMWUT271/Sig5rX9opBq9iu1f3jHP+noPhOh/\nBqIIeMvOBHgjHrFMUqrBmIw7uU2iAd1RzsIvmas1bITgT7sTGuf1eXIySjr9\niXVIafdiTMkh0X94YDwXYhzP3owDUZqzhoTyee1NdLjfaOf3AbHHooh5fnZo\noboV\r\n=6uIq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDSQ/8amvMsHc5jUJ6p8pyKYW5LBQ8qlZgQT04lT17Y1AiEApe8POWruETdpY/D1TppBFJDydo0ie95fch/t+HfLEjU="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.1-alpha.9_1571127273348_0.9246725080382345"},"_hasShrinkwrap":false},"0.3.1-alpha.10":{"name":"@react-ssr/express","version":"0.3.1-alpha.10","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"b59cce997fdf2de0c7955c44f760573cf1982150","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.1-alpha.10","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-qx+FLo4eNRSJOsg1ZlNm0YQgT7BhSmmkDbkyl/EopC8TljLvkjVP6z7szTkZXd8wUsUzFubGFIUQQM4/XUd99g==","shasum":"e8712addb2d26304f1d943a3320fe21caff10a64","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.1-alpha.10.tgz","fileCount":9,"unpackedSize":18053,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpYBkCRA9TVsSAnZWagAAIB4QAKDcdnK1oZnNxRTfZBl2\nlDLZZzbh7Lk/QNH5CScEB4QWVQzaCWjoh56bez/2Txdv9+nGcGnQbWILuZBW\nxnOmEqqImBxylosnmkQB4E0kgf5/vEEZY1++qvLp3q51gY3FI7s6gDUZDjBY\nuX+Z/Cg3aDL/LsjyhLTOkQVBfyfcZIjWUN/wLy7GtCpJXR2oXkWEzy7BM4mD\nol0TvngXG5nH+EzxywLAL5Je9g4ov5xj3yiQf08kFRK9QW7ZMzntmMR5BBxg\nrfSphToBq3eqcxf1PTIualuIUyvcQGDq5wj2Ydclt4hgFOhA7n9uE7+HaEju\nDTqxdhg9ZoDztG7rBRgucl4xSokKcke75fqet1dg52wzu5svzo7W3UiEJLvB\nag36bhkut8/nTiGnPCQ83Epg7H7zJKGNb4b7QLema+IfhwhLPYHXtPeMxDgZ\nW7mruxINafk6cBsOjcJ5Tr/Y2FIyp1aCg4SsSMhGp1ooLBYdBofsW/jipBiA\nGGS499ck6cj3KOohotT6GTX6AclTK5go8V8IAHlLxJB4hQOzycCvZMoTOe4K\nQFrOB2Q/kP5HRWih2AFr586A9GUEFYP5aQHbLcaPKhma7BXOuuiqgB22sCJd\nLaV2cCYtro2aiZBoa1xut7OdhtXKk4RuBYo11KTltxkngi2Mdi76Ss+FEPSU\nAAqC\r\n=qpeh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCkks71HO55cuLYGwSg852xTS7nOnuFeVrJLpQs85kI9wIgMiUZvo+D+8z4PgfiLvZbQPGM/smGZSOs9rp71kJc7gQ="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.1-alpha.10_1571127395479_0.24344995674799597"},"_hasShrinkwrap":false},"0.3.1-alpha.11":{"name":"@react-ssr/express","version":"0.3.1-alpha.11","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"dcc16d12024033b08d2b26c208d7828ffd6216de","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.1-alpha.11","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Y3avZEbN0cZJOTSTAua1lrCtFFPRvc2wac9/rQYc0+2b7IWi+ogKjYCm3MNcALVM3z106urDVhfkOBIpansS4A==","shasum":"af547d7b5d070a4c26d8d35e0efbccb05f253d9a","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.1-alpha.11.tgz","fileCount":9,"unpackedSize":18036,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpbF5CRA9TVsSAnZWagAA6rkQAIW8tSj94Xh7qrFssQMl\nHycs4lO+9IeRlxVo0CV8UmMhbSIBhfhaZPPcX3MXpqLitVc6FHPCrinRdekE\n/ULfgri8rEeZzpy7CTbcGhzfb4DErzHiqdre2MWKfCUXu84C7Ojk07GnmtXa\nxOulj4afP2w3W+bPgXdLBjyw4o3kgG/1a7VDAG6jhUSBwAyXbdX8KtM15HDx\n0NvNEQ80bMQdbbzxPplSP8MSAkkOSzyDrsstL4nRSVdWLwriT1P4/Sefrs1G\nxK6PT7QUvrDFapUYlZRWBIr0blYxS805WCHPR8+fRJhw4FmKxMp6AXQ5eVYY\nVPBUL6obyLgCWc9/AwtWK0uDW9K2PIlmKcUoAYUwVegBXHuGYS8ssXwtONg2\nmhjfZV/T+QNaAHwRaah0YPaBOaTk1sa7Qmfn/zV3LsjBswCLJWEDiwKPzJWI\nPcs8WAV4YNAV/ogqMqTG3t+qPZrCfcrcOytQLNu+eY8iWwaQR+oK1cZL2YuT\nqk4Xxg+IG2kNPS/TK2t7klwKQT5E0pm4eRCduLxxSrksFlrN1yuHDo5gLn87\nJGUXNDc5NG9e74jL6tsMFvRX9tSCxMZ2VLazKaKRXueCK/Q7Sd6smWHRyp8R\nJylO51sxp52q+DQZKCbgJHQSldOOBr/ckyeS4iry36NNhbG0i1VoghbTf3iv\ns2ju\r\n=L+pC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB1WyH+iSPj2YLIFLPfWCu4wUDDUOpUUihf6UhjOwXNrAiEArgytp4qwKW1ZCOpCt4kwlF2sCaw/ZxzcTFe/qtGregk="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.1-alpha.11_1571139960425_0.06748094595319776"},"_hasShrinkwrap":false},"0.3.1-alpha.12":{"name":"@react-ssr/express","version":"0.3.1-alpha.12","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"4275242a4874713fd03e6a2dfc125ef9ee1053ab","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.1-alpha.12","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-rytRW219XdPfIbzRUWUZWxsakbHJjcPtiINoi1myFTDrZl5r2pjAfxHLoAywLPmv0c/E321zwV7cMDnnRmb7Nw==","shasum":"bf40c519f870c2cd580b2ca1008a002c7506e16f","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.1-alpha.12.tgz","fileCount":9,"unpackedSize":18068,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpbQ2CRA9TVsSAnZWagAAe4wP/1kP08i5t9hE+hL3onWf\nqiZVvzwvjKznbN1bFbIzMTPq8t4PzxYJFc0uQbKUW6MhNsjRZ/OjA5WnAnxM\np+58jDZwqBm/dx2RyvvyOFYJIdAhas9uWxqbFwJ59FA21ohRc7gd9zpRI44T\n6/SRFrZ8QGm8AcLV1yTrdKOsPcFMQRHp4Ddw27xYttZV9ql6saLq8IId++S2\n4J56rCTYO1WVHZ1R7p5CktTaCOXCGawaTLU6mzk0/0QxduFdJL0E6TW2T23Z\nEgcg3L64Urn0uYQ0034xxzNdHLhlesZX0oKQvd5K7tx5v0VQaOOblpbldqpN\ngNjzqHbU9mr8C0+9Ou/+3HY9ykNM3rZjMjGrJo5meyz1mi5JkKq8N+lPLzyH\nacu1Ri8ZYoAKH2dQGuUmeHKnldSi1Wbi/eDbcEFPU+bAbTSqqM7X/NWU9/K5\nDxKTGjwd4gBSWZRM9pzKpr9IGsDNLsRaKxfZpF0xzPnKaBOau4pwgyLpx0/B\npWhrZUi9JpVuMWmd9mqxrI38RmRQFb2A9phY5+LAgLwDlduHR41C8IFLpr+i\nJdl9FGopPQfqtZFueuu7O2Qrz3VWTu55QhJ6RJRCcusZ3J7WM9hwVDtgMxSh\nZQUcrMQZbT/v2A/yrHDW4pqyT4yxlBdzFhUMKH0IbHX2SCM+Gn6nl2bi83Qm\nLq7+\r\n=8gvV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCkfGdLZos1+nRcHZgZ1fbCdmYlxKwz3HGbSpTuvsXRmgIhAOhQ+zgSxwnmTLbah0LZd4yVcZKsgRYm0aO4wFYBT7HG"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.1-alpha.12_1571140662054_0.521023607876975"},"_hasShrinkwrap":false},"0.3.1-alpha.13":{"name":"@react-ssr/express","version":"0.3.1-alpha.13","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"649d56e61ef5b18d16f72c4320a2ccea646479d9","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.1-alpha.13","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-tqHpuhZJ5FMedgEDJSnnYbNx7VvP7A7WfnKTjERr7oA/un87vHXweAYKjn6qrqb+mzmPp8HIk3JcJwDMXV54wg==","shasum":"06f300a3394d9760ce7b411a5da77ff6336e3e86","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.1-alpha.13.tgz","fileCount":9,"unpackedSize":19046,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpbrnCRA9TVsSAnZWagAA5f4P/2YhjzOpZTNBOIcPDOnu\nH34dgaRRAb7IZGsub2gV7Vu7b2RCgMaWnZiLznJHRTTi3MOFVo8Zc6OYy6Zq\npj5sAirLiGVMUe1LskG1HIAQSg2iO8quOj0AykHabLgDiW7dPrfrRduxQRCx\nLm5HKfMOK7+hCic6/4xv0MJ6SBs/1HJmqYpL52mXEHcDrwQqU0JjHdpvA7AT\n/11oprUYx2qQn1fzakYs+vn1l8HfPnENetgIYkJVQ2JiUKIri2Pu1SV8f3Cc\n6PrmhHD0/eK3KbLyOyMr5ylyQCD6ssgW4iaOb6DbQ4MbodBCvRbbzany3Y5B\nJ5bogORnz8yQKC5ppnBchjJIhUZ4gzvzne1bV1XgqKtuADQQff4se1wLO6EV\nyNel36lC4EsMmA+a5OkSCkVjWU1zwP6x6vcGZfYiT1zWuvpnEjBaeu/TOR/0\nz9PtGLBzi/xij819VQWwDu/mWhQy6LBEh/FyDf5dsEdFxhWSGs22RKBwFPum\n2byqnh8pf8qIjPvBp6PowisuzQTAQlMX0iAR+p7pBskwp/fa2YMhBNjHFXf8\n4CeMrFHaMmS2mNbCRGkbLBesJ82IQ5JOAgI6OsLe31woV8F1kehtANPbGx5x\nvS7COMrmPCsKTceKM9bHC7Pxw7VQ+CceWIx1h825wO7svsDKbBVoJRpA3Ubt\nQVzP\r\n=ZdoZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDVA8tfxvV0Bbclr3HroDExzdkBAEz/F3svn8AHAgP4KgIhAIN4DXRAU+z6YPrkIRVFC3BTi87tosPFI2U+sZoOVv87"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.1-alpha.13_1571142374720_0.9152445775319116"},"_hasShrinkwrap":false},"0.3.1-alpha.14":{"name":"@react-ssr/express","version":"0.3.1-alpha.14","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"6e99593253ebfa9e56fdc6273effb3ac6fa10ceb","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.1-alpha.14","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-GLgR0wzD/8a4tbpKRtnQ9L0fXoguXoTpa2SeH+nkwAsR/l+Vb1f9bY25fB/OSVEskaVnsNRUoSOBdv9cf4e/3w==","shasum":"2f76953a6831c5b62ecb8dfacc1f4f1c3252ecc8","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.1-alpha.14.tgz","fileCount":9,"unpackedSize":19104,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpbxDCRA9TVsSAnZWagAAfIEQAI0w1bQOzTJuOWirL8f7\nOAvLTY/Um5uGYfDVwOPhhMDUcWQK997o6grpwolPYYBjy/hXoE2AxMQYo2PF\neb//RDJniQzduude/6hWldl1nFghu79pkF7xvdeFXZqs77tMjeLyoAfjAmLj\n2t2ZssOwp6rvis2YXfEMvGYDyAGiFXJpv7yTMDtrRsyQY1vHqeH+WqKDZDHI\nEOxZbx1686B1DdXvsjjVd4hjrsEZyuG5+KiDrfF6pXkBQ4RL73dB+4N4aFp8\nLeaNAf2sJ2dZcDB2V0NlDyECDmJTGbDyWjXVlxVKfoF/OSBBtuTh0jZkbQ2E\nqLy2jxS6f4ohbJpbJAQMCy6NL1spEUAVyqQEKRoZbAQqA1YUjqRqHfiMjBvw\nfTr8gUjBG7gmq66bP5+E4o+V3fT27FCXryHR0k8LOJpdR3GWODbGgSLyDF20\nDKiJX2PREnC/1pFZrAlH22mmz2Le4n5zTfrExzn5cq3GIeL0AAzToYpfKYy+\nKxhvA/qoJwGCgvL1+SkBemQiWJf1TuhSs80IojtKxM6q2a235zBvPt7xLdlX\nGMYeeQ+Ny15HJ7qVbQ46UatjjSRjWBYcA98M6o661ms+8m+LhpOpgy8W56yj\n8kd7r1f09jdJNE0f2eMTVgDBfXnj5KFAZ/w8VzjlnPcVnUTyxUFAuAuTqouN\n4Ld9\r\n=XUm+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC75OxXEJDh6qwuOh9xbhN/jbXMJDGoassrHjWLGqfnqwIhAP7vHsKrU4yH9L5LAtg7I7Lxw/29XZXEAko0vcUP0KWa"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.1-alpha.14_1571142722891_0.4830639750982628"},"_hasShrinkwrap":false},"0.3.1-alpha.15":{"name":"@react-ssr/express","version":"0.3.1-alpha.15","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"2a870746417ab2d7dee8b2d0dc4f64be9648b9f1","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.1-alpha.15","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-FhQF72f39eASQiDGmfVjt4eucaU/B0IpM/2bBx1E8FfqtdLaPVguNHwKLjemxiygHDKpQyuDQUJAik3u+ABsLA==","shasum":"78d919da27f2b534b88d177ef3a27ddf43a05085","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.1-alpha.15.tgz","fileCount":9,"unpackedSize":18781,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpb77CRA9TVsSAnZWagAApD4P/29AF4AB7FbBeBcFOW5i\nyLY98LnvkwFkV3uncHQgZ5p0WuVI6YOQFFua2z21xCFSwKwra0roqv6RkBY/\n7aMXw4LRYS72mgrCJIcNmOzYYx/i6Iu3k3L6yXDvk/G3Keswx58K1icuvizr\nvnqtnrxuajZnn2FumbRR38NRn5dHmLk3u9rsuwgp5WCMTGwNGPfeOe12v6qO\nOLId9OYH7kwYl//zdfcQOF+s0rQ1LUTgc3aEL5PaYpJN7LC7XlrEUyDl1hx0\nwO4i4MicxMwE8stqJjeodxSyySYYwlJKyaRj5M8eLd3DTYLXIgEHWJV7CmnK\nyB4oLlFhpf+M20L5chXW+xfP/bVpdVTgOhClViAtA/fQMBrnQODuQ1Jy/OSG\ndb3I7XSR8RkTKKChLo6zy0klxwnsFiNVYhUfKv6MGo36cmeL4DfYbKoBKrAm\nJg5ZF58OsLL5c9WYZPKp0UEr4ebt0rC4wVPst0H/fgyOFxZzlp5H06O4lM00\nG+KctnOnAAmjwml1BccR1ZSYyQgPn8J5qnaUk42u6jP4oNBvjS8ZaoR7TSR/\n3BE+I6G6tj5nXN+/OdvMur+NW3I9alADlKK0J0Fx5uUxwp3ZPHs6bqrJKrOk\n/cs8ELwn2sVfpqbBVx+BiqVYSnI/5LyETkOhu6aPLcT6w0D1NBHZmcmxmq+W\nV1+W\r\n=nkU6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCGA40IkAMjaZqKk6HmA2tNTub1Llp8UqrNEOAnLT01wAIhAIGbcaiItXZxgXtYzSRdEqZcB3r5ni1jFDZFp8p8j40k"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.1-alpha.15_1571143419004_0.9730499341592429"},"_hasShrinkwrap":false},"0.3.1-alpha.16":{"name":"@react-ssr/express","version":"0.3.1-alpha.16","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"4320a445197453a5104d9b92874d93ab3cb0c3ea","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.1-alpha.16","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-puk/RV5U3ju0UBQNNs6+i86fF/k7RL/gxaFu2WiBbKyHThJDfqJbZiRQIwxmkI77IgR8IlTvcNVG8ZIALOXtBw==","shasum":"6674c40422e0d1312249f67346dfa46f6760430d","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.1-alpha.16.tgz","fileCount":9,"unpackedSize":18802,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpcDACRA9TVsSAnZWagAAKhYP/RmBtTo9HeK1v86AjZST\nL2gNQdEOlLdlDDzpKtY6lXSNW1A33+WtnhsMQhGWwy/R/cS41JKcTzilqM1F\n7wqtCHYwDeeRdFPlLUwBY5uooZTs+qs2qigvh7Kl4J83AcD25QBp7gKC8S2/\n54ZzVbMcq5GH9v8AZ8+VywRtthDkYBFB/Vb+jJA0mfWbXSWL3Z+dosngrDFA\nZj/1akURX+uTqh+xVPHyDM2WW/xJw6vEwn2TooP8m4iGf58vI5jIrxHkFxtA\nY6grZhkJKKw7dwdkQtTy//h1/aR4uvVSw7eBzzHLXaRrNdDszgV6yf7+i4th\nmcdMPK9zoorFyiSxurSRcTlXJU06xRjnfoF7gAMhse4INvBTi+VFzkTpFv/N\nvt6Zo5YaDUbu0hzm7eZg+zJnRwdgcQU2xMVA95RU5D2kZk2mpn33/mKOLLb0\nlS22AgoTPivtkeAhFeNFU8KkHJChlQq/3YL6iDF6fl6jOTxITjAjbfWugEwI\nQpe7Yalc8vsDjACd49C4LaDL6Kv4a5I1n6E8PIse6AVjGYroQbDBhfrV/uNB\np3VhdicN1HH/I9z+M2UBDdUIOsUWDNUyMRdEAdrx3TpRJ+U7KQ7EEkIBZB0n\nEzYYKQCL5eoCY4gUB7wjdA84DPt7DefUbIcPS8sMSC61Cc4m3Bg0mt8dMzUv\nc6AC\r\n=jBUc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCzWb5WuJX198aiKrPeg6EwUkNiseHbxrd+QBCBtUVhdgIhANjOvu8QL631Nq2ebbKyneIdMEoM4E9jHKZDAAJ36LCc"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.1-alpha.16_1571143871652_0.798950317782017"},"_hasShrinkwrap":false},"0.3.1-alpha.17":{"name":"@react-ssr/express","version":"0.3.1-alpha.17","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"26508acc890418d346a761e0e1292f824af17bd7","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.1-alpha.17","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-LgA93GiHMCSuST74apDLE6O9lCdL5iWhWiDhAd24xmY0SIoMGXwyu2yuODDE8wQHV7XuarAEz8iI1kT+HuYBzg==","shasum":"0ec603ed294dabe260045ceb338c235e61ea4cf4","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.1-alpha.17.tgz","fileCount":9,"unpackedSize":18790,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpcGGCRA9TVsSAnZWagAAeOkP/1hDWsUa06sornHLyDxS\nGvL4zQ9+E4ZhdbCPh1mbiYwprUiyN7ASA8ZsWrkcephJ+EbBIvFJV91noG78\nIehBHTHHk/AVoztdL4ve2/ViDQFwIr4lgAaCLl0N6a4yrXYZGD3PCKRS6WvL\nrUi7JhnSU5G2/7gu74dZSNAV19XxqYuL+p2xQ/iuzdx4KQLP5Aok5Z/h1bWO\nzZ6Ir6YaKgJyO63cF0tzIAQjoWA8TpYykDixugjnDPRjF1dFnGIj0jgjxPws\nyAJIhpjvy87KU9C7haDzvjYDyxy8Bhx5POcM8p5UU3GP+zdjPeS5KtsO/Oj5\nFKBDgsIDLGNxrl6XitcrYE1gv3uoetcW4zL7VzLhlIUnbwfqDiLY/bC44cgV\nSt8mw2219+lCgm9I3/U4iVO6Qit51uaMw2C08OIpGkP0FkzwMQLBfo8I1b4f\nU4k5x65lb+xENl1RK7Nxtqspaj1omC55q6BRBEuJkNrYx/W+eZsQm9D4Nwdg\n4Q6CgJHwIuXwm/4uBTr/dYndPxVzdh7HN0dljRucbDqnYn1XMRBe7nyPuISF\n2lv6BKO1hY51bPG8LYnK9UmMwCMwMvK3pokUNd4GyxW0OywMGFzZvZrCyePy\nXWRzkFGGpcorC5c/qSCBrP1oNoPHQaoFq54UYMhfOMZQ4HZlmOfwvukY6jMB\npYQJ\r\n=Mi25\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDufqoDYnzoDDrOUVLgPFFu/dokOh/QPyFQrhdOm28ajQIgEzMMtcyrNkayqgCiWI+2ZPe5CE9/lBy1sH+Wz7vkeEg="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.1-alpha.17_1571144070112_0.11182133205629063"},"_hasShrinkwrap":false},"0.3.1-alpha.18":{"name":"@react-ssr/express","version":"0.3.1-alpha.18","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"bb0672b9d608ef913ac8d47cb1f565c0e69d1a7a","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.1-alpha.18","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-jTHeFeWXXJtd1abuxAkp2uAZ0RBer5lkzaC8ZQnyX2YfhBfv7XQgk4QyNZcmeH5RCt8o5pLbBnOBgdg7ViZkxw==","shasum":"11eddf405c20944efafa66ab6f569ad0681fc7a5","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.1-alpha.18.tgz","fileCount":9,"unpackedSize":18752,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpcHuCRA9TVsSAnZWagAAkB0P/24/XU4l5DoxB/9LwJB/\nR37aQHtsC4XMKejmSC6o5DtCc3uwiD2Aq6fhijedcJfJ0iFyaVgQ59tg7hF3\n7s7QvcVdnkFgzu3NtYB0kdZdLAKzjjnnYKma48Ye8bd4bzFGCZD6z4QE8bYH\n1PpIzdP0D+JgU2yGB2Q7fQGzkEpmbPEUeCM8PjHV8QWvZyWfEvU+7ThD/7wj\nQrekJzjQgFoHF9EivpDnxp+hACfr40QF9NyQVtxU9ntnNccEaMDSkd+3+/l7\nH5TSH9yyil34Kh8yEJVnVgk5mlmPC6lCO3IjVWAYqJPZJ/elwL/CnhGAzkU4\nkNsh5MS9DemNTdJGl5eMMS99CPuyuajpIDcc6tjYDCli0f/EYqb73upInt19\nbw7LGS1JLzx6TN30asZZxAqF3ST43fSUOGI8WtDj+RguYyJ1pg6/3MiAaCIq\nVsH/ZKK+WUFBobrp4xyKwqxfxTF4nPZ042VRMiPOFhLvWwDBBIwuRfYWDkCn\nIoIUV+if9iGQ2c4Xxo7EZEN9t0wQ9xx6rs4fl3hkxMU1zqtuvADwj4tudME4\nX3VUMzDWwJsMtYOiA5dF8jeXwVPNYLef1Qh01HAloQPo3Dn1iVVI2UIqzYV1\n6MDxsWHsrqu7unn4x208vsdFGDIFg6q59gZd5RXhzs/yuBhl0bOwmBNCNNsX\ntLIz\r\n=vvAe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC8Y+PVHRdBRkqjBt6Ibgv/+9H5ILLaDtOO5wIqoHfszAiEAsFzpFMdLVY7Ptmf4S1nH+lOHOJunWxNNUL2a0ui7Qck="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.1-alpha.18_1571144173853_0.9836033169809009"},"_hasShrinkwrap":false},"0.3.1-alpha.19":{"name":"@react-ssr/express","version":"0.3.1-alpha.19","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"63bf6f4497d67b9875cb7fd6148de3d5e32a7557","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.1-alpha.19","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-2AtHgcUM1oMiYCHuMi8jeaw0C8X+OPn/Yrzp90O9HMAe+dPzl0yOP7sjV6ubHoCVKyH1IkY0tDWuqzIByurgxA==","shasum":"b49972671561b0a14e877479090f62ef1b228b05","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.1-alpha.19.tgz","fileCount":9,"unpackedSize":18847,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpcZ3CRA9TVsSAnZWagAA/ZsP/2hLL3VWpAE7YLbtmUvu\nBTy4FcSiWmNPdG1zgMQ3bIVOq1myWI7awPCLsrISy3Vd6MFcwxZ9f/rGJyVw\nBBmVlzc4LOFcL9yO2gOySTqX6CR/o+0U4RhzRkZHyRK8ttu+nEOJVUzQKkWs\n5pV+AnsO2gX+SlFZk6YRNYBfvN3oweU7nwy9lOdYPELGTrWL2AV9iuqWV91F\nHG9wq3KafYLHHI7isZIADKVmIAHsAMxiPEyiwft/0pl2YbEwmsYrpAci3x9i\nP1as/6OflodBXxkvkTM2TLS6q7h5OEb3lPBW1snzSyHXmOPnReNfsItzOqw9\nkrh3lJFo/md5ttyhk8wiwAqmE1f4753RJ9MbcNPl5a9L8s0inQSpPvuod1De\nstYcaZIG40C7Cpb5HMpB0YLOpgR4Rk90Az6ObTfLCS9ZJeFest0wdJF2Dgg6\nYGfcPzCWFiaxH9WF46GmZ8jVKK1DGzE/uJxn4mKaWUYvYk0VM3EbHGW0KqvL\n5bdbfZH3XgoZaIHiJ+at2usPl4E8w/U2igDuuNAyYIe9ftfA+z8L1e4LZF2T\nPysafnfZXnbrKdR/uKSrPt0vYH+ir1S9z0vF8nP4wZ8X8Y8NUy41YbAvfXm7\nklP89WKDJ6Fm1U3stmUm56Sx42n7Lk/v8dvqfGtNfSDJBR/loY52K4mX9C9e\nwXut\r\n=cB+U\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCa2dOijVZA7lKC1Y6gyWbVL3S9Ki3gPZXOmVTFJOKK3QIgWckwM+4KEDDKV4qfoVX05M3Cxav76z2NsMyaPgKD+0o="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.1-alpha.19_1571145334736_0.4138307828964134"},"_hasShrinkwrap":false},"0.3.1-alpha.20":{"name":"@react-ssr/express","version":"0.3.1-alpha.20","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-frame-component":"^4.1.1","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"5bfba4ca320d4a82ad8a5a0e7abb01df3f140a36","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.1-alpha.20","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Aplav/4JrUtuSJG+UkWMdrinUsYqcQA8E/mK0SEC92/T9QyTsqwEAhlg9Fqv3mKPgUgoaixCny9zIyU2ap7xLw==","shasum":"a558a7a890a1422b8d7ff22130487950c973f296","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.1-alpha.20.tgz","fileCount":9,"unpackedSize":18997,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpdDTCRA9TVsSAnZWagAA5OYP/05XRfLfChOLP7Znm8jW\nbcjUWw9bCMr9N7bnrSX/G699GkHZiT0CpV+38HF3ombHSVV6m9KXFQ/asOE5\nJvFJGFhZ6NemFuVfNTuLprZwqWR6qgykQxXqTMdZt5VIueIcyMs4wUEPiqs3\nqYoL2QqLGopgityynHl0E/YBFRN+da0QjgpqkcCPtfjxrw9bz/C1uO/bTpxI\nEEsl94AnKZVYaGdj/E5dSpp72meTdWNg4rkIy7HH6PbBV5+MJT07Wx6PPGiX\n91phqpdjnH9a/lMqwVyQQTZ32pSDTb+FoMIeWDIai1SWXSstD5mAF0+Wc2Bb\n7CZCD39/8m4v5pSGHSwFZPt8ZlgocBVyvd06l9tFupuCuEz2a4RyyjIeaQq9\n2k94/pCq1zCrkCWumcyqXdToRjCFoS+sIQlepqTaLR0rzMMHxYJ6lcvIii1d\nG2NkaslnooaEB84+jfKVF8fJriJsbOU/febHs09n04WEQObir2P6cBuckdUQ\nzXzixpwquiZ+nALTMgXObXwzR/hOYVlZf2RMgQTW37wURvBSq1M6obNgmM3s\nEnAY7g+Dz6aWJeL33WL4oZyYQjSkQwlRENeRftMvsoi6VVXH+7kcWvVsj3zD\nnWYWrot9VYqnfGveonIwU5JtZ8MfPqcm/R+djKJ2SPCUjOPjK3dB2cfaOL6t\n0BW2\r\n=3rv0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICpoIn3EGmwDZpaNlSCPHbE/fJAq2jsokWlT4HBR5EiUAiBMlcdaB1mJV8YflKuXGeiE0TYtXuB+p7JLrimM86qxyQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.1-alpha.20_1571147986350_0.24542790683833315"},"_hasShrinkwrap":false},"0.3.1-alpha.21":{"name":"@react-ssr/express","version":"0.3.1-alpha.21","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-frame-component":"^4.1.1","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"9b59e3c238f2d35409b213dcf66afd2e8c274054","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.1-alpha.21","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Q9j0gB1DskOdcFga/n/BGHJIAcEhsmD4TwmWeLIucmST5QJS+08cZDpYsh1tqQw4DUCemo/zEbNqHeS/8dxv8g==","shasum":"1e864a5e7f34f6533d8f501a7591614bf6122070","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.1-alpha.21.tgz","fileCount":9,"unpackedSize":19021,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpdGqCRA9TVsSAnZWagAAlDcP/2/Hjc6+B8XTM4m0bzz9\n+oiKIfYOfbNdHxd2XzdjNVMQpRtAGt8Lh8jk/hP22vrf51vDA2DMdLuE6F9o\nbQ1a3yIv6ojWcz/cLcpQluC3/pNc2K45WtXDgL7NXCKlqTRV9FrcfVmJB+zK\n0Arz0day1VlzFA6gPnhH6YEpQcgOcEYgwB64JUUUyRdSXLCKP4UaCgb/AnKe\nJu8fxqksBP+JW4A23YwfTx7p7HHGbPPFtwS+ei0rREcOsFmR7TTF4yL1v0E6\nkZDDJx0LthdkgBDEi/vd4po1RgHnQ1DOaQQ3/fSsSX68APT6ucb2qiPJRtlg\nT1rgMZvXrBNjpLu5rjEKTHLGBo+2hiWjbKPAnpCGgFXplqvAyE21bVgRYK8t\nabdYfOk+/MzOrevqon5qUSg93XJqGOHkUJm47JUByyu/c/niAaxQ6fmtzoRO\njC7xiCRoKpJlpuRSS79gd/Pk1FbEsH1id4+jMbaWqzIc34Vev2QgN5mNxzki\nJE/1L3EH3cJMQ/hhTzr5E66XWZRxwCHqe4kppMfXiBEl0AS92NCF9ZTg7NeR\nS4qSQwcehogB/uP59X5ZPSV1I7Uv0t7Upxd/OxEKpbhXdnhsGgfOd9oeWCMv\nOpR872p2x3rhYdhroG2NkYZcD5iTlNKlABh1lsdqS+q9spYa+zoQgB6SiWgj\nUIE1\r\n=PGAo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCd3cgike2MinESIqlm0YjdBEoLMsMdidBYv6XSPHBhNwIgOTaqaR6zb3I6x9hos4KZUVqcsxIcX9DcHzxubQQprS0="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.1-alpha.21_1571148201360_0.282746239864863"},"_hasShrinkwrap":false},"0.3.1-alpha.22":{"name":"@react-ssr/express","version":"0.3.1-alpha.22","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-frame-component":"^4.1.1","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"bb9e3537d3eb6583198ac63ca98d711847eaf1ba","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.1-alpha.22","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-G0IhbYLOxXuWR8y0PAdwEIwHO5G2cCE98D+i5priperFqQzHEeRbf1xMPyvTHroROD9ZoWo2FGtIR+fMDrHpew==","shasum":"6f283598df9c4a2f2834107e7918ef92302dbe0a","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.1-alpha.22.tgz","fileCount":9,"unpackedSize":19091,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpdKLCRA9TVsSAnZWagAAj5sQAI/Gy3YnGtNfjG51wbOO\nAM6J6cNaOWu0oS8cGBE6X8tvOln6dkQSWPySsmkX0P7NGk9IRf8kaQ68uwOg\nAGZuvnL1U9hPpO/ZxCAITZSZKplO8gxw9wPymUCRjOrEfEOphYdkXllxNa37\nGxjmMJq3WOyLzkBe9GN3GV61mBrADg8ji8wH8Emq/q1OdvBjj/ZbyNcwmkTj\nqX28G5y63jh8u1UkJB2xhwgBlcRux3qvVGcdqBdBz4X8QD3BucFUD1s1ZKCy\n8BmInPmyktVFCPBS7j1TlQ6pDj25sblqcO2pHLcKbp3mWz2e8YVSppdXihpF\n6fkjHGJ0Y0YOi2ZJiCR9nHxzbqPGU57KdSatcn0/VvWXNYOnnMGBeZg2vfxz\nwZRAPVinKLkPbbT36GZMReyTmDnfOmNVcdN/JWJCysfamxAuyx4soxD76Vzc\npwiLmNCLWBo7tD+DwGA8ocov3/9TfjM0mYG5L7MUq424KZFP7Qby2gHoNpFr\ngE+B8o9ZCP6hXAbljJMixKHYtPHGmuOVZbZ0eLKkptiwZjFlY4TSD3250bkv\nb1gJR3zAS2IF22/nwXapss14NS69I2dxatIdY47dAiaUGyhAXTIwnqM6WJw6\nb0jhH9UWWrqz8z64TT8Pgw4C7GsEGQP1k6zThG3igpX4LRdFxvyIR8ELepTI\nCc3c\r\n=vy2U\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDOeVTcXgUImteOJH83dzcOyQhc1Oq3fVdgJELjiMyoBgIhAKaIw56IcqNaWgJAPn+8Y3Fv06YSY5/js/LHNNDHriQ6"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.1-alpha.22_1571148427034_0.3038563672172898"},"_hasShrinkwrap":false},"0.3.1-alpha.23":{"name":"@react-ssr/express","version":"0.3.1-alpha.23","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-frame-component":"^4.1.1","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"4851f9fbd091f84d309e02c7dfc4ac6a81febf66","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.1-alpha.23","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-yH6s9iXQ6k9GSEdmRjazzvp4Jrk/NfmPgz+Q53QHDtvTdSJ5yWs1VJuoIF6SZlEm+Tym8tzwLhj/aVYtjhaKRA==","shasum":"d25cf434f7a60ab371788ecb90683ad4cdd70b3d","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.1-alpha.23.tgz","fileCount":9,"unpackedSize":19213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpdMqCRA9TVsSAnZWagAA9PgQAJ1GplpVnqEln6SBXEpF\nNBw/iIy2I9MUmJDmZiLMp/4Dkh/ItqdQCSsX0wj0XuRVaFAvbTfMvqixCDcu\nuovFd4om8gJEAmaLTYgCovHuPT8qG61IVnFku6DSjto0Gmr9gZc/GLc5NkMQ\nGMvW6opqK+NpRc8BZB4+ial8ek/1Y7ELYkwnJSsXTkH3RYZVpVoWfs1uWOtv\nJDwJg681aq8TVu38grgiMRbppBOL5fE5+BGHssHT4w6ZGs2/qzgl14YS5mPO\nkV6zYjabOyhwXc2RWgbSJu4X5USZF6fCeOdayAbuRiQJYGKNmRWm5jn33fkF\n5RYXJeNWAg9vVVIwiVV3u2E6bgzWOGvMnYaQ9a30c5zf96SG8k3UluKxuu5H\nuOO+QwR4TAUCRvW76ky2Dw8ptwkJpxBO0ZXurmzwU1wWn1ewOlwSVxxDIpi6\n+iZSg0KL0T+/kpsPoYgT4+ScLmK59YLaKiBZPa9kn2MeoJvVcpdFOkIzsBeZ\nFIWbSZLkhDLFXoOAxTvchse1NyRj5vebN4wNTKxy3jjgTKm0bEgrpUVB2Lqo\nKJMahwyN/GdXa77ze1H2HEuO3rCZGAbNIKbPvjShn65VOGACm3CIShQC8rPk\neTcvmoErvucd1GpffYD8Wbdurv8ANvTmFM4LnhEc8yMt76YVNyrgdBia1oyk\nbPMW\r\n=lfzD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCzHKhiYX74zU1e0KZPO85Ra2FPD9BoySCdvVQU5JT4YgIgI37ErkXnpgKJqIhf65feVOHGmqXh3jfDI6Wbwt4NZzo="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.1-alpha.23_1571148586122_0.1532778216362667"},"_hasShrinkwrap":false},"0.3.1-alpha.25":{"name":"@react-ssr/express","version":"0.3.1-alpha.25","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"80801723f4e3263132ff0160ef9d59aad5429d5c","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.1-alpha.25","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-HhV6ylcr/qASVPx1KpCV+BH5us0pRP+1S5ngpCBQFMG6rS738Oxt3wS8tBaJoLM8R6Kw7/lxv0PXWfvPNGrOXQ==","shasum":"ea9269982abecf479cb150becb81637d3f696206","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.1-alpha.25.tgz","fileCount":9,"unpackedSize":19055,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpdYYCRA9TVsSAnZWagAAiRIP/ihSRcbQa3bBcUcHFW3z\nb817zKqkafmKZNzC0IIiENLoQxSrPHhbJ4t3gxv/bOVlAQ4DrpXFAWPeZmC3\nXyC2OsXfjAqxfkKE6Ba27V1OXF8mw9cqZPH0ZL2YIM7cYotuRxMXjMY909SD\nyw46NBUitW0kuaiH1yn9lR/JZmLWILeQoSVt17DmJ6a3lHNYy/EzftIodW52\nhddKnFgANvuXFwqcdWjsLgsqiQXnyP5t3L+ib5RnH7Uj7vEl1D3Oi1yKOwG9\nVWTUxIozifKyxLlcsDcqqkeV/5vQrP+LUJGoHO0F6cWH5MAJr+iUIrhOzCMK\n7TNxOo/o3MabruxsLStLswqkHIOBlYe1ovcQQ9ETiYgOe9mzPbMJkZURL9Qy\n3PRFloUCOZIr9D3FECds3eszLGDFW2NSRS3NNdhoKgjpzx+uVFn+p2Q1Jhvb\nEr7XQyOA+0vH5vzF6tTeCcL/jgPbk+bu4K+oMVX8555addFcxxWelYucKW1v\n+MO00kZPkUMX9Jlt1TPRefaDLf1Ef0LE2oxg6vx1kVfKQDE8nNmS4WcgqjfZ\nPeY072bMRVAN0gdCGTR1mfz4otTXR8/uBwirFQYHGPsvR+qzFxX8BqyOer2i\n6Bnfb7VR5mIet7OdeRnOW0smTAOPuKGxUbz2bXKt7KVmB+9kroAtp8dJPXfg\nORZk\r\n=JWkn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGjvw7yzVTFDS3ZpRzhcL4fqGr6UdwiBlfPsw+hGIf1xAiEA8Xp0lHQh8fGaCI47/p0Q/0XWo5V0g8D1wH4UBAdAj7M="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.1-alpha.25_1571149336244_0.5525622334709459"},"_hasShrinkwrap":false},"0.3.1-alpha.26":{"name":"@react-ssr/express","version":"0.3.1-alpha.26","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"838900ada5c2d9d4f5d2ec6b0232e3f79bfd7070","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.1-alpha.26","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-64SbJdpgIrkoMCtDIA5MPJZ3J/WilxynGRW9f/WVvfubJWDWc2kvVteZhqfnrsdAGedUa5G88NMBszT+XQf8mg==","shasum":"0817b5e64e700d50aeea3a1f0bac476065c9c745","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.1-alpha.26.tgz","fileCount":9,"unpackedSize":18851,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpdb4CRA9TVsSAnZWagAAd3EQAIpRK6kZLKUp0+JYQ2uB\nlPqAHl643NaLHlRmOdlICO5fZm00UKed4dIG1xYyDoAKsgGpFpsDAzLszaqi\nGBrFmHV8+Q6JPfGq7Ys0/IhvQnEKKYCjjKd01Lj+vCI++H/STh5WZqGw9Q8Z\nZpFyUW79EZZBG10IZORfNExqyZMqy+j1Pyr6NjFVzhfRagaJvPs8Jb6C+Jpf\nI70R67578K63gq0eom4bKYbigDyhCsZGF10D0+cENk7ee+46TbM2UaC8lu+e\neFxbr/w6T2f4JVmgKWqTejHJEDS0vVoiSdjVC/DMDEld/rEjsQ5h/uCmr6Ug\nVymCAe6cyvYQs3DOl3KMqRooI2R2i1Z0mqL2WTPYPYCbvPWgLTLv9+u7x6rs\nbVOQwVDKCo5YmkfYQvG2WlS/P4mL/6UKYmlZOl4btYcaTkNLu/bxrDeX4ypU\nX8/hJHOAQfAQT1BU2KEZeAtNAuyL6Q2ctQ6YgxAomSn3exwwkh2reXYraISZ\nmM1JJQrT6j2fxSq0/G+1ylQCOJ+aHRQILtUNk2UVm9dhYbwMaN8h8X27igmw\n9PAHsXTmpAvdAd9ZYcnRfvuo7trZVMnYJ/XvX4p6KyIo6nZIKUm8APfx5LN2\nt9SyUEyhH2XoPByh7AL8HCjYhXZUU6SyVWeAe3TH7IA0M70eOfAaHMbR5lUV\nGnUM\r\n=lPsM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC3aiHqbFk1CHstWq4cGszW2nDovb+8m4kphdV4HrmWdAIgJLtbprMl3gbbaKfgdGawgw+pK1dOtzFr6c0DYBNP4Ko="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.1-alpha.26_1571149559867_0.25066132744939007"},"_hasShrinkwrap":false},"0.3.1-alpha.27":{"name":"@react-ssr/express","version":"0.3.1-alpha.27","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"3806545844e334a1c58c8203b99cec1eeba04ce9","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.1-alpha.27","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-IB4SgO6TPLs82ONlXUSHvgolSdt+ShmDJPYE8XFDYGfHZSWurZ7/aflW6HSmDOWTq7HQS/FOkBQyWnUphSjbEQ==","shasum":"071b90df540dfb06bedfd54cdef0fa0f56476e89","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.1-alpha.27.tgz","fileCount":9,"unpackedSize":18857,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpdgMCRA9TVsSAnZWagAAcpkQAIsru2CtMuzDr+4TVXCk\nmSJ6pYUWzPc2G6JgXZZFNEFUmrCfzM8kDxddUkiJjaFQxm9M5dkaM4y73vDq\nK61+oJp7nE+zKilspG7rUIVrCwUG2dlmAynEa5AE5BZClOV3VEOdYpfPOwq7\n9472btRjiOzIPjuvWnQD0FmQLvjVAt/M2EciNvG3UAnJH7d8lmuJHqCyFrQH\nMpvTnmxNx0c+ipT3z4L05UdaHVzqj+9y5H3iFP422rvAL4bhKhJQq8So2xPT\nmPjEQJIwVPm1mF+rPgD9Vvuqz2xeP1u2f2Ek4KQRKAwj60ynz3cb6hnGEI1S\nJD8L2LNmcgfgl9diZcNdBBexiTDW9zKiAaxdjZqCFNNooHaMcHnXCcXwQ/Gi\ngZfB5w3BaQu0p0avraAWvcnPBWx0ml3eBqAgb4bIb/z24G5VpCIoUwuR0O7s\nP+E5O8WMRStrnoi7/XfRA4W9nI/f+iHu0ujwMLxjbkmuTfEr7W6OonNMJL88\niktq3CO/9qcNkuiG3yt16CneLTF+uUXyWNIlxqWXiWzGV6Z8zxVDgbdKcfW9\nBdtrEZpOlk3dDx3B0p5hxcK2qAoR9ZzHSh8/Ucz3L+4yyYw8ObYLjddS92TH\nOJjFKCHxitDR2+Ik1Vvap9XpcEFuaxnc5DbHglxGUAtaDrwqUgSfNsR/fs5u\n3oLB\r\n=Z3wg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCjWnlXPY9azVXsD6GtJEUvepZhSFWmL3dxjGRzfyC2/AIgTHrjb7l3980Y4QfVVLpE3c9SO2uy4WAlUmf1wgMrQnw="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.1-alpha.27_1571149835791_0.9637984456800011"},"_hasShrinkwrap":false},"0.3.1-alpha.28":{"name":"@react-ssr/express","version":"0.3.1-alpha.28","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"406ee7237a6b508b67a2ba4711e33384cd833341","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.1-alpha.28","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-CY3r5Pg8vWHnj5vfdd2agiZNEszWbM9ZV0Sk3Xozx8rjwfQL6U5si5I7mfQ0IjNlgz7vTyBu58C3d9Fa4bwraQ==","shasum":"11ae3b7d09ebdb79f31a0e58bd2c18b840f28895","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.1-alpha.28.tgz","fileCount":9,"unpackedSize":18873,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpdj1CRA9TVsSAnZWagAAyuwP/icZ5Z7+vmh1iv1hnfuc\noLf9PLSq60eCCWh05j+kROcIns2yu+8jv7hVs+g3/wFjdHslN9bv6T0Qgebr\nWGJ6ILKIiDi1ucHd7RQysjEJlrHnJ44QoSKA9MdvWPahH/EdR4EiFQNwe+vI\nDTYNsDZAkExOJN7YmQSZxEpRz39S5ig7GVKLfWQPBIh+bfLqKkkWBhKSoNXI\nAV+FhwnF37A8SBItMbjmxOzchyGXL5Xsyn7j1M91Zm1J96Qhp6aI4e24RiMm\n4Z76MoomNPSdd7HMYP/oBUqXRMbYyi/lKojOdLPN82w+88f++9p2sDBpZHCK\nAJUeOJammwbOjy0cg0cOQCaIbTGTKyfYELUOF2U88qSafcPf/1LgCRt6vqLY\na7mVM0Ixhg2pqRtiY/af3ek8HuA/JtIKP5xDuz37T5AOm6DfBL/Dr1zXxgi/\nEIug28qV9ZtFl3QumNI9lW8E/Tlm/lq9tKjqg0HvOJ3uaZHBC4qYatNxHyXh\nz5X8n+SITdBtb0010Y61NDZqxasIpIAB1ym/l/rHMJD9kHGJAhMpE/VwcYr1\nZg9igmEnqp7XttHiPduRfhNMi5j94jSGhT6jAppJOvHOMYi7j+RrnJ02rgM+\nrYAndQt8n1aU8GNsmBSPVEwlVxwJ/fzuyHkhg1rMYnx42csjsSCX2IKpf9VF\nNHC0\r\n=93VJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDsC9psXz/6e1G58HV38uQS7/Yxin0oLHfQm+uSbZhXXQIgBQwQFTjzGvjJ+ooEiE/eZiTLKlnW3EemUCnfbXr8ypU="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.1-alpha.28_1571150068662_0.6417210492852687"},"_hasShrinkwrap":false},"0.3.1-alpha.29":{"name":"@react-ssr/express","version":"0.3.1-alpha.29","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"52cf93fee39496be53d5b86df699163aac6b92d8","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.1-alpha.29","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Lnjw7awHZ5x9ahweDbnLIF8M9NqMxI6BVtu8JrElhTpdFvXtErzimmb8PzeG3sgGTNdD8UhNCaFolrwCGokdJA==","shasum":"b972bdabc0cc931ceea87dc4f67347b302a6ed9b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.1-alpha.29.tgz","fileCount":9,"unpackedSize":18932,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpdpsCRA9TVsSAnZWagAAJzoP/1hhTOW6pCrayX10IP6s\nqePL0LH8FTdYrd9xqi6c5UwhQ9uxfT9fFMkq6Vw80jJ3CBHh2iHNcHsvCWBX\ne6FTlT1vsCdCAdoZ6BoZWEZSHWjaexjm1ae+L0sNSlV7n002Pn1f3dkQeF/z\nsWs+V+lGm2/TNw8OD976xCfEg3uNcmwxE/8QycVIV6xwJIqmKEcP1d0E/CPb\nmodEKfmLoJQEOfuFuNdrczVbrQzxB2jewgQNPgt3lsNwXCLjS9EFz0+Y5O1q\npRXm76R0g0h8iWaiSNzmzTrtd3JjG01McQkVNYadONKI1SMxzafhuIoW81AA\nZU6StcGNRftFzvOe2oiGCcyrVnxui+0k02E1bv/Dob9fYJ0/fIbM8MXGK0K8\n8PkIooBo0SxNiDzQAoDxL33CZd1PxqbQp5psxKcimuZFAlRr5TQtmQ2k5PVt\nir9i3RQNu7KDK4J3Upp6/tR3k8iumOyaF0BE+hiyeiDK0neS0AlzjLbdVNFy\n5IkACTh5xL2rKVdNj2iBRG1tMypQ81loYK54x7C0vDKgDZSMm9QEYD7ovP0A\nngzLZ1wqDzr1Cc44lC82jUVHGOEuqXkCKhk5PsUlHDHCiOZZU8ozZB5nLNCN\n+UBu78kkE37sUQVEpds96GdPEhKhWhjowgWXfRbavohDxAY3lYzsuM8b/XZt\nBdfQ\r\n=KWdt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD1nSex0ZKj9+bqw41yIc+0h30JhhqYl3SZkzGZNlZDZgIhAP0C/MQo8lUAAiW/qaH9MRJ/J2iZe/57NBC3VC90IsEP"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.1-alpha.29_1571150444207_0.23852778144428122"},"_hasShrinkwrap":false},"0.3.1-alpha.30":{"name":"@react-ssr/express","version":"0.3.1-alpha.30","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"2f7e83f57e1179f16579335b29c1403b96dd57a6","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.1-alpha.30","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-z10rMUd9mTKbJRJd5yearrFLwRRZRE4cXs/fCkH7jVyPfb6j8sDqWEN//oiYsm1hCRX35m3gBjG9ai5v4j1kZQ==","shasum":"cb466fe053f170aa769f74c1586980a94c9c26d0","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.1-alpha.30.tgz","fileCount":9,"unpackedSize":19018,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpdr8CRA9TVsSAnZWagAA99AP/1BTpexjYUzGaGzasPtf\n5UzVFDBsRyBqLhGwjugLAyXr+M9YqovmAZ195MPTISiHpIwWA+MlqQIfSzAg\n+P9kUE3ZYUEE3fbg2scVSw8iGR6DOuzimOUqJGv9S9+e7/5YJuwlpyTWQHbS\nsMWRz1myVlnPp+NhiLMYCJJrJyrBv4HnnQk9j9wSuMINq1rN95c3TwcQx4KI\n+nPbOMTqNUrsViLSOtYEEHAjN2W1Ofz/bzuFEQX/1YRld/tmUz9OhrWelPP6\ngb5DOgQ0irAv/LsEw9MTbOdn0V3JzkKF+rGVkKWGgkUrt8DDbri2cn1wk5pU\n0vxxYDW0H2qlSoFoj12XnG0EBXSQymcww59JNWhXRLq8+0ahKZVr0xfMz1mJ\npg8e2F326brqBiTHPWyalzP03++fB0pyjm/+5oIIJrkSex4MjiVpc0OKm2F4\nTQ8J2AX4fod8z5m7ipCfvCehNQI711lQFDYHA6BF2QLqv8b6DfncA6O8qzqV\n+qCMGpDIT/kEBo1AeaK6KTdHF0uCwff4hMjt268ccpN1nCsH5WwZsOkEkIYC\nTzqkJS3EFxoNWeSyURnpvyOCxIiFERuqGHWmAaAcPNDm6SqGf/m9quebbuD9\nqQZqyTFkfLEH7LS1EIBMK2SZjM2gdLzVfBlHZiSYUgIREZoKc4jyC8osgbr0\ns1au\r\n=hXh8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDdSPa/wY+9VokgJOCIJ802smN3iAuACFJH3u+TmK1ioQIgHzYfogAmFXBZD52bG2M34LE2Z7G6NYGeihuWdA+X/gQ="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.1-alpha.30_1571150587728_0.8673438214916993"},"_hasShrinkwrap":false},"0.3.1-alpha.31":{"name":"@react-ssr/express","version":"0.3.1-alpha.31","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"19207c1f14d3284a8c7a923051de0039a6f335e1","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.1-alpha.31","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-E5Pxi7KSKdloEvsR3WGx32Ad+qKZTuG6kbmcMdXaFsrmUeS7ub+zwaOptspA2qbFnV6dFpEj3fuB18L+clLAwQ==","shasum":"528ae665ead4604936b0feebc8e6ef00bdd9764f","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.1-alpha.31.tgz","fileCount":9,"unpackedSize":19025,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpdwdCRA9TVsSAnZWagAADiIQAJUDXx5tMVVeMKOS2ixT\nG8ArZAV15NX5ZQfEAfAm9P16RJ0FEtmm8jDZ26BPGgdW1TMf8U8BQzSCHLxC\nqXYSr/pC6YxGJd4YmGpj4RBtz4ePeVBJWzIvAKm1qYCMdETcWvD9lU3LxAVa\nl467rTT9CPdgtD/ViPj9WOqKXAXxQkXnNRHuDc5M0Z77cSK2HH1egWfwecs3\n6kR6gyheK6EBm2qQE3VIrJBDBD7MzMs9gsqFZJETYjyIflLalTzbusQQ1C+H\n9DqjaMVB4lIGr7Tv0G5uZFwdJ51mSeac/z60tzC/10IHCHFZhK7ImRBnWPKA\nsEcCF4pGk4FdUBQGejlzIKQlSosJkV3Fu3lQDTO8qbLkh9fW3GNsyTuKK1hm\nQWzhBuv4KbekcrZcc/gBSJRm1s4FBoOlA5QQazgiwY2hy9zjGTHAX0VUk35H\nJVvyWt2CFNvVO39UxM5xDiNuv9sK5BBo1L9d4ZXEtXBxPzBqGRd32IkAUHXU\nDT7cWy7kid276oCApmu/aow4SIy+O1RI3cPU4AWeSa/A/waGA9Q2FtT9zyDx\nOliwVGZKzwEX41GZlZGQjObaGZ/JcZhaJIvqMzBPOW+jjJct3R5kp+l1SSkW\nWIAWpTtJZ6WEnS6SI6E318wUVtUFPwCjBJNDwZuuqcIHFFvQNqSpn2BgqCo/\nD8VI\r\n=q0Oc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD8HyTbxJ+w68bL5q6Ji4vPRKYa4EeprKz8tIS5DRu1ggIgbj3iiY966G1bCzARWeV0IVE3Z3WR7S4eEzFW+DUQ2tg="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.1-alpha.31_1571150876729_0.6428927647053098"},"_hasShrinkwrap":false},"0.3.1-alpha.32":{"name":"@react-ssr/express","version":"0.3.1-alpha.32","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"ee14182ce4a591723bfc4cb8972778e96a283fa4","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.1-alpha.32","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-RAOobE+koT2Wr54dG+xH9a7qUb0vrmYzsKNzZ+jNa8ildpjY8QhafFzi0EgrYvO608jQmgesho5Z9815M5M+Yw==","shasum":"76fc92fb1768d1a52e56d40f0aee7a2f4777358e","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.1-alpha.32.tgz","fileCount":9,"unpackedSize":19002,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpdyFCRA9TVsSAnZWagAAcT8P/04s5EKNIsnz0BYSObsu\nrXdH2tQMSVuDUrZDQpxDcfUc0CEVDK/OlZV6xeHK89BJO9Rn3kP3RM0sOkGv\nZmy5iqIoOzsGHDZT6c/R8gHwchOtaXN4AHDoE5/gyBKqXEKu3VgUDkiauXN9\nEsdbIxmXfg210rMRxa2wccQwnZ51tbRHCGie64RrhJVH+yXrmX4uX48kHi0a\ncHdv7uVVuyJhE6r1SiP/XFfg5DcZpzBHX3s2u5aJ2cUDiUH+EX2mDi4PyuAh\nsgN0FFAS4w11XyXDpgEAJEhKNCbKv4SJLAi2Q2ExL7xFcKlfumAvZ2DEq+cW\nu0jxOsnlS72Nl+J/txVRcqkzs0V+kUQqpNs/JRziyJnsUIKBk/CK+WzB7lgN\nVQCj4TUt25/dbjfLORJKZ0C6H5rwqO0SzF4tWDF2uAuaPFJobog0LZU0grp3\n3QD4m/cS/cy+ezB77h9HFup2AvxUAaXDXBhggbWFQPmZibOjMD5ayK7dydHH\nY1Ck8gkGWStXCOQQQ8HFwSV8xY04nhPlGGw1ZAcUGxTaYrn0WCT2ieevKvbq\n9uv63gM85XW591S4ary5gO6QlRiSGXKem8CVWOFkKFVUOqe3yFhirINFFjXg\nByfYtQLb0Rwsu9/MSlwpyumWzQTevo7+9eVX+sWlgoz0TnTy2R/8xg1jyUvm\n9Edb\r\n=vyfu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGFlngWDKtP0bZPsoh0ThnNitJWlwikI1eOUImYuevPnAiEAkXx4gPwamH8VYTK8keipSamJximg0iFuFG3PQFO6L10="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.1-alpha.32_1571150980994_0.12008733892473855"},"_hasShrinkwrap":false},"0.3.1-alpha.33":{"name":"@react-ssr/express","version":"0.3.1-alpha.33","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"8aeef02acc553e1019d6c23b5a4ebfea5aa159ac","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.1-alpha.33","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-2Iyyn609jhx8rNfXwHlXRV79h3vpVe+y+1+dgHsEp2lr91CBVlsX/QFQ7k4lUOHKrRa7UqKvX9/PaZW0CCD7lQ==","shasum":"dd9f4726f7a2a8f8670a204a6e8f57049fb32589","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.1-alpha.33.tgz","fileCount":9,"unpackedSize":19066,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpd2OCRA9TVsSAnZWagAAk+wQAItxO0EeH25Qzc7Vya4C\nga883mCASRK36dQ5XeR68cFiT7aNMHOKQK8rxF460RJzxsQJilTC+WIUZ3wO\nzRd/D/a2XLYJK1QOJn//0jjxyOOrkreXmw6cXWUEuCWWXijVSqoK7WcgdX1k\nh2kjAOwiwGVc7KsBNpEDDqS966tsLMW0Li9htsHLSi3Y9iyKb13v0HBRIGvW\nFSAMCyD6HeSvQme1OPavTXTLAXIZRr0ZUJM5SyDKRt0DX2MtRtgB4orXptoR\ng02Qteiy42I7eGpaq81dGWmzaoMtLry0W0A5q9vwK+cLcEsK2wvXw4OnVxQ1\njalPL5gnU7YzPaj7FATvO2QS1S8ZZcGRGf6cxbCobyQSMel4TJjHroqSa6r+\nwpOY0x6Z9SLFYs4sgdvGw87lBv8/P5fjdaRfblIkMRv1r1C6MmeNezEzKNDN\nYzST0YrTddcn5LZ7+5JB8xGzLIuAfu8gsqykUuFo7d3elkznU3sNzSwPQX7b\nMUq/4P88k9Lbqm2apdh7FCroitEZSu8xlvpzH/B6o7lsQmam/TNdaC6HJolF\nl0ov2dXm1jS4jibYoYFUejnALCKvNE8JytlE1I/fraipmrWR1CD0iJBbiBSk\n0t8cyyywjyngdetGSbW3UKmkPijx/Rx8WtHEkf4dKmvhvkQ1WdzSKTeys9ck\nrxWo\r\n=Y8Fi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCbDo+bUn3sP5klNAEFIY7ia2V72b+rkoet7+ihjPPzgwIgMpizpk5e8BmRJE3hwF/j4JMCHG++ji9MFQ4S4uu2s3M="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.1-alpha.33_1571151246050_0.32748105823000184"},"_hasShrinkwrap":false},"0.3.1-alpha.34":{"name":"@react-ssr/express","version":"0.3.1-alpha.34","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"f41c7412761d3e378ee948c203a7ac3ef8549ac9","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.1-alpha.34","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-pfakHyXIQMBT7xx6XPRFPndl4ke8HfnKuKKaJV9NvP4l1gTa4+JySBaG1S6NVJr+qJ+Cvroi5jrKoZhGNT5J1w==","shasum":"4308d254c0b1a08fd6637804bd1e40e78f622489","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.1-alpha.34.tgz","fileCount":9,"unpackedSize":19148,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpd5jCRA9TVsSAnZWagAA+UoQAJsi7tg2D4gtLAaO6ZcP\nwzI8A30kutQRnJF3NfryscTlMF7lnHb1pJQHQv5ayrTt/QvQE0oPqWURBRrq\noBsxOx4qU1D+uFOB9iLBylVTdPEvkzFRbahIjKXuombd5nClmdWv6f/c6h3F\n3Fz6lX43AzZ/qUOwJRDcF8R21P2EJcU/Cgtt7NUf/IuAqnXZriaCFk91mFTd\nx6Uqm/1O9aocAhjsVjP8vSQwN51Xb9n1Q7usIc6YybXSpexj10HE+Ga6z35K\nmnCp5Sxm0q8QcLvOep5N+y3bt+mDWe5lnyT4jFyoxH0B3C75zVnsS5T4cA1O\nBrVfLgCMhqqsSta5JZwrptz7ANEt7/Frhx4wxyaw/bbywpRehC1TNnvFEg/t\nRBKQG8FXlJ2ZZWMotibyO3CMRSdnghr1PCZ+2gGJ7cfPMB9wiizXaFKEN5sB\ndlR0PX6t6/QkvxVFdpATrt9a15C89OVjQOTMi8bSXRsLNYG168UYghJtG7YM\n21BS4rIhRE8xT0nRajccqSWGg3XHJNbjB+7WkqB3Hi84L70RdB6DTc2RvZQK\n4BWJoQ3wGlZ+LDNWo6Hypt6gSoP1LxaiiOs3nSHU5+EatbcY6hh2JjFBLVqp\nnBtdWovI+vmgvfcTt9JwquDwwGT5EyQho5zeizx+G+kHCSOOYBrlCIMbNwr9\nyYz8\r\n=gFMV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF1beNGkSzRQj5TNeaX25KZh/5jld9iYUa5sYwI9PjgRAiEAkrJ6q1gsdU4NLvu50GhZHS9VO4GQN00lNR6E9hWqEGc="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.1-alpha.34_1571151458529_0.06049092142462942"},"_hasShrinkwrap":false},"0.3.1-alpha.35":{"name":"@react-ssr/express","version":"0.3.1-alpha.35","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"048b5881c1190a1668e8c7eac6777c8bc557545b","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.1-alpha.35","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-+8y0Or98sRsmxhmCn7D/M157Wmy8QdoDoWX40KjIw5U59FEbCoZcUav82ooQOnZn9qzLiaTsi4crQdf1Kwzfag==","shasum":"0bd584d824d486b8546932d91612f3c04c1a2d4d","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.1-alpha.35.tgz","fileCount":9,"unpackedSize":19075,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpd7qCRA9TVsSAnZWagAA70EP/37z1Vw2ABgXJtTjtAKW\nDvsHKCM817RHonF/1jCKkzlxjVxCc/5I1yeHq6tR1grbQ+bKST8nWqV/lnL/\nmo+Jlm09Ve7E2HHZh5tfc8AqQVIz+QLIjJ5mFESUhR9RksPr0FXpYhG+KexI\nT/MUhXS6Cb5ChavG62M4KWMLiTMVJFbERWNsbqes/lLVNCADTwhHXl++e1CU\nzRJOVDiTWao2mpV8h4A5ylgfgR1DgE0wVd/TcHgaxlt81piqd6bDd8Fn/Hf4\nJBqFy/ar3LOwTlWSBndlgNj/lO+qOYW4MOee3IIoWQWh7C89QkyJahrfRWVD\nSdkMUgcn4+I6ScBQfj1pOad6ak2oVDxlgGwyGawG2c7ihZKSO74rr7njcsW6\njZmG3c4C33hLr0dkp01KAZJOp4Qc8Vk77FYS7IA2bkzgGxVSI+3a8f8AXcH9\n9O8ACl+Zim/Lwo41YkuW8hl/bkCmglNyVbwvJrZBzimefSwBu5tE2gOM1ODQ\nwGml2CQcIPwKXyZd8jpdjnM165AwnzDaM6WHnvnxM+d0semdE0dlIDPaonRb\n5axjFFH9hwtdid2dBlU7FkfhK8sUMp5qzecmwuup5XcuehnoOMKhfN/TScaq\n4jOTJ3knsgZXpG87MFDiO9MIFTXRRF3RW4ggLlOoxZVkgJJA6PUR36SZmjd9\nI7i/\r\n=NgV1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCXslNVqGs/uBaIgxrWdJ1NLn9No4JOlpXWm6PlMi6F5wIgDMomCE1bJVCWqMUbPNGuLbJ7LW3JuI/TDDq2W0afmc8="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.1-alpha.35_1571151594142_0.28895343227262726"},"_hasShrinkwrap":false},"0.3.1-alpha.36":{"name":"@react-ssr/express","version":"0.3.1-alpha.36","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"b997af6aa3401cfda33d85d73b5df3eeed2c8db9","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.1-alpha.36","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-WgfccGv8b+PsO0IAMzsiP5zQis76ICz3KR06iae4346le4mtgKWn2hJx/4Pcx1fyG6peJoKSWUALLvaML7thHQ==","shasum":"069ddbabb3ef13397b262e0b48839d7b07cf53dc","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.1-alpha.36.tgz","fileCount":9,"unpackedSize":19081,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpd9BCRA9TVsSAnZWagAAiDEP/Ay7JAMKeWa7TeN30UbY\nX5MLt+m39ZhX+KkYsaC2tXCHuLUCPd51qXM7Ps2s23LAQw8vlp32RsWUViWY\nhtctJRhC4Vs7miYUdwOxEMt3Mh7E4DC3nh7Uzanm66qrb7kpuLXLMaeVrGQE\nlLRzQSl/YDx5CBlddkXZ1qswA7ST0sELbrr+L01wfbLg8GbTGhC8UyzLXn3p\nWWlBZ7CRejNzBVjKw3cexfW/tW+R6vaBTn01VNCvUetBgqLw8Nz3mGzEMqkB\ntQ/J9RUKyfpjHbpV5bzcoWjoDBhFGBI04sr94WZSjF1RbWN8SdoBdwD74sgQ\ndDbvNSizISmzWzWNLGxrgDxDUJQdrKtGG491Fc7K7PnqaUHy8uI4t0DiIY10\nQW3Q+M2C5A5jjUbafGX5xxPoWKOI9GJnUlY2EWWCm5rKZW0PF1ez6e+6BgXC\n0sXUUHzcQWw2cgRs8sq4tF+9LuzyeQasEqouub0FF5rmSUYs2N0rSfd8Hfyw\nv8XEPKSe2/ZOdm723jffs2BOLIBmzvkzpE9M/tsyKPshsIhf4jAKwSzhMeTV\ncdmrweRE0TjyCT6mvCZiQs0zfXrYUmTmHFMPbJffUOi9kjUtvDNKkBGHY9xO\niVepYStxolmycsmc1GVisGbSYPZagp5Qw5+K7eiPyEdSwn86kCBSryf0rzVj\n27Nc\r\n=VXTD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDN3k4DA7engkMVKQLOurveyRw7Ro1vWXIjfyhaKSpaNAiEAqolIla488rtzIsh/IEl6EK1W5wM0c2XXdpDpkZLzYjk="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.1-alpha.36_1571151680742_0.9246240237025078"},"_hasShrinkwrap":false},"0.3.1-alpha.37":{"name":"@react-ssr/express","version":"0.3.1-alpha.37","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"a726d690bfd49c810af0254aa6508ecac5fc89a5","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.1-alpha.37","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-EFQAPD1eC0MshJDibQYeqLSjgpQ9eiHC7vOOjsV557qsYo48jMNzb6Hix8AdrSsrS+xLkQ5eT8Ek+gcJ8yhhFw==","shasum":"e9e1078e06463a85859e629f7c4b78318bee358e","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.1-alpha.37.tgz","fileCount":9,"unpackedSize":19122,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpd+yCRA9TVsSAnZWagAAkPgQAJD3QHFbrS/Yx8fxHgs7\naxF5XGGcbPMgUfpGis0RqH2COh2LBR77W7y6ObElncd+B9fpSH1dUC/dS2gA\nFO5B7K8Vtf5uYrT2IyLPHQbtYsIgp4J+GTFwXdjlgLZn27mfdjD5zcOkvFrY\nsiBhYminTjL76WYV4atu2/swh18NzpqsZl4XC1KZevB3xBr/Ztly6RjDDyNg\nbsoWaYpWT4LAEOq+SnFzdSQ6VklrhY+GI1TSb+a3kr3VHFh8WHLyDd2t0xCr\nsH7UYo00LXisCPhqunulMW29my/mOxGaqmWMXPi2IYbM2kL+fEvZzpyPMeNc\nExs5WBVG1i47u1doP10dVMHlC71Dp1mxk/Cs/cyRwJBnnrbUV5DvsZ66bF69\nVKncVXeZig4LAU8Ek+nCVHotghXKNzHLX1zu9rffATckXeoIMDA1rub5lUNP\n3APJo1sVUwQa7wtWWmLcntf0DXqxoVcgzpq2R3ZOTlDfrAJrJVZgDsJV0azR\nAbE6n1RZXMzrenGzcRO9iP5nYOlARuTTe5IaBUN6qwCJgmcZKKmoYIeowZYt\n2lRPH1xiHe4voPc83zLDYcH6//TbHh3t8YIpPwvauaHPsLQLZ15dDIqkOj/Z\nH88CQGe5Zna1bFHJynR/tpxHSr4he/oZgQChhGcePjQgUdfWz4nSTR+8/tBM\nQ+LF\r\n=iKkD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICEmHi1bNPmtiybTa6ZP6oRHr/6QVKWMq3mhnx9d71mzAiBTBRSbDlQxOMdstkQ4HgK2XEd3oo5WqHijcSfolROigg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.1-alpha.37_1571151793501_0.2860414646581062"},"_hasShrinkwrap":false},"0.3.1-alpha.38":{"name":"@react-ssr/express","version":"0.3.1-alpha.38","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"d33fbbf28d55366634e321a1ca3f139ab7e42016","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.1-alpha.38","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-vG0qZt09yVlhVhFpqUVfJyNLpKVZFIM8QlfchkcykZrqJwQWOcaHrXNlYuNMxFsa4CL+N/IzQwUmXYCwm4nHcA==","shasum":"65cf074b93fb83dfeef989663c2de96db815b4fa","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.1-alpha.38.tgz","fileCount":9,"unpackedSize":19199,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpeCkCRA9TVsSAnZWagAArsYP/1TBcBWb3SwzrNkAVE+E\nftdZXYHYv78WHVKaU2XGUDyHW54QM7BQmXJprW8KPZV9DOv3u2TmjQfr2VWA\nltaFEnPEarfcwqm+mkYiVI8u6+aHgLnZ5xzY2hDh5JQxoz52Ipi07JXA6MVZ\nZTtgxvQ3tgQcIZKjH7fnQ7/r8z3o7uTM0OKaAM565LteZCNC12t0R0NOj57x\n+V7v+MXYk8r7FdQ8TOKi3x5+uiPm8gbdqmSj/mPcBbge2yZjLqvoPvjcuozC\nWeCnLN6+Ld9W5JvKrQYFuJvV04P/tZTtrHSyBKHJiHfHM+EHVsyRj5to6C4O\nx33s3QK1hRptX01ZfQ0US3QKnlRkqs8kCCtxRLsyYytfFczBe5BYChnAqlAS\ncuM4tp/J5pPofVdpfGpUxLNxdZ6jSfI1OyPDFstNsoYoi4pLYaOkZd1UYK0+\nbPv17thtfpoSsTmYj5wfKwXhekDKMiSaGz2+3wWHWl05GtQyTkGSZBIjbq3W\nPVMhF6vAmI1tX07iEYKqONMD4O8bsrB19HwkqoR3NwsmFuhVLGDhKV82gbjp\n5TtWM/jlY9I5l1td2Y43H1Ci8F53sHI3t020fH6rMkAFo9SlM35yGtjiMZCZ\nVpT5e1wpNVyDGnsUjf3MyiEM8DNnKOQtzy6hXQBlce5e+k6eBES2nch9+Dql\n+xNV\r\n=Vw9a\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDu/dqtjlXYZCyZx+TVO1tgTlPE3J3CaCAK3TPRTGL8nQIhAJDiHBrYi2mLEkjiMEfX2Eadd8LKAQtxuMg81owjBs7W"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.1-alpha.38_1571152035642_0.9272936687920985"},"_hasShrinkwrap":false},"0.3.1-alpha.39":{"name":"@react-ssr/express","version":"0.3.1-alpha.39","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"9746a83f68e4d431f7e506bbf0b5ea291fc7a739","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.1-alpha.39","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-2jfyAflYb0ZbdT6jGaf40bM/plSN9sfj7DcP2XxyOAoKaz0JfeKNLyj+Q8+QXaTzlCPtet/wltTRezPSsSQmwQ==","shasum":"3b84b5e3a7f1edcd5f1a6f06fa6ec30a6c965a72","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.1-alpha.39.tgz","fileCount":9,"unpackedSize":19282,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpeHUCRA9TVsSAnZWagAAeeMP/2II3wVFikIyb5PVXrSC\nsf2v4i1Sagec7LQ6aH17reAgbWeaJ0mPsAPJqaPpoebzCqmWt455hWeSkbP5\nGaOfzQ91M3gThEu1jsWwjOfFvvAOVATkg6xxJxcFHvntJ4o2JCVd/Y0pmayV\nKMpc6yyK9zde1l8Ga5yaaeEBakjXpY7oTA57Lf3BcYfX8JmzIULkDKhc9w0W\nl4CnbBX3pA68p1nxZ9F+bCu4uM0fhYojS2RaL5QZFSsfG4OneboLPJsFYHOg\nWkmtI1VTylpV9Ag2MyGGuGzNcwbX+4VHMJIop5HfaXIpLOvUbaoeEUJgHF+U\n90neVw+XMRbVrgKznqdubA2bQ6bRs24UCqBaT+1nlp7rabOKt/y8lz034GG0\n4GvuIoCoFKFYux5nI+GdJwYOAS0SZahWvH093sHzIoC405u1SGbmWz0c9B7X\n1qQ7BXmk3erz9RwYG4AfC46SSO+3E0TOKy4nr8ssZOndyaTG1S/R+0Ix5ItB\nwIKpXPVKWyYs6XgA2iCGKd4vHLr07Ez34QNwNyL5R1yYTJpGadjisrBmFgHp\nWG/X8AP2Gt+F1ycmUzAsHchhfDKfORq00vMiqLzlvtvDglO/RMl9c3sCiWHC\nYMIcSBsTjWzWGMCOkEBpesO/p5dgl+2kTJUBRVY/46SmilgfG+u4AscUT8/R\n31p5\r\n=42rx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCvPtqT7UdhUtSm8GN5396M9Q7Bje2/KIbxn2hXkV83swIhALyzsnBMLvShHxIS3B6QXxcckm1L/qyopJEE3wtGzJJE"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.1-alpha.39_1571152339339_0.10538989270181709"},"_hasShrinkwrap":false},"0.3.1-alpha.40":{"name":"@react-ssr/express","version":"0.3.1-alpha.40","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"9c8e010c2cb69c35808aeade5e7303c54bb1b3e0","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.1-alpha.40","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-quWS5LOsV9NrCry7YC3Z37NXlmOATfaIqbdcIhvcMhAYupGwpXgMcSc41YBo4YnC7xj5Ez8od1Z8xhmMAmHYeg==","shasum":"2393dd79e2fd8e2d2721cd8da1c59fad2327f436","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.1-alpha.40.tgz","fileCount":9,"unpackedSize":19298,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpeI7CRA9TVsSAnZWagAAjEUP/R6tfbCY53234C2jJn1v\nhbI0x04SfDGJHmFpQdn7mgN5Cmn3oqg2AXqDVt/XOnVL4bk5JCIpraeD7Glh\nSqPMGz6fQ0A43J/wDlSGfHBadLsLAt9xo5UspAVqa//IuWEsbCbjoBaAXOcB\ng4zkuGcHLG460Cx+XMTLkjh1NQE8hbN7u1VQqM8Fm/NJq2zIOrLcR8sBbAUz\nK8HLH0lQfoIpEf1HZmiZYFZwTfntwuMli+do5aAw4fkICtIg/yiFgSyFDIly\nj+Jm5Ktsv5+3b4h/F9BPfCwbJRRjFBTNXpARgBKU4CoeA3FczNCy/T3vF8gQ\nvZu6KVZ6swdy6s/LtJjE2f9S7kj38s3J33zmdyfUBAesf2dnZb3aQDgWVvWw\nCdHaIIwquz+8A0VO3Ii9T/WNn5BjFKCTLIo+I/nyWBaFZFfvn1BsudQUbLrG\nPP6Z3E89U9egWDXPzFrmDZMb5bI6LncOPKM+3R+OzLNJKawad9l7zXK4eOCj\n1cHWe1uSKLDQqofARXOlKNWSMYdFfjEUhzMpAyEbGmKOfta62/zPeXGiScIX\neEIWVuxc1OdXnHIEnaRDTMfEXkZ8FAa0VJs2Ql84bWOC8oYr0cuY+ERGZqfr\nZ2vqJGYM8AAcTSEBU0GyWft4xMal6TPn3kpvL1CP5626hwJiiGkFqkXPuOm6\nO05K\r\n=rp1j\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEQC/LqtJq7+6Ok91ock3Pc+SB/9muJ97+V1LgByM70sAiBmsLVg1xBlB3RBPy0oIR4Zu+jJXDPUnyRMo8f6aJy6BQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.1-alpha.40_1571152443283_0.1503828932359823"},"_hasShrinkwrap":false},"0.3.1-alpha.41":{"name":"@react-ssr/express","version":"0.3.1-alpha.41","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"9e805f57665d2d91d902fd50df8fc87b9cbe2228","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.1-alpha.41","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-KvMSjukgUi5Uq3k8QBx1oXiHDCM9REILxUiGSqNN2rKxJjddrZ7JmX6y16VArbhBmDaaU+EQil7RrazrqHfKFw==","shasum":"0f227f0b5521285d4e6b87c8edca2fba277397d8","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.1-alpha.41.tgz","fileCount":9,"unpackedSize":18406,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpePcCRA9TVsSAnZWagAA594QAJOABuhkttKplzuw1iMd\nopTtRwH78Ziy7LgM0pL68TlnUicmFCNwx75hLjH9uQcTVOanV3eXfx83VU+E\n/2c284G5NWWVhJQ4774WwgHUsbK4Wjopc6vMb2VEn120YVUq0xDYy62YRi4u\nrAophuhqCFKJExfgRlnyYqo+W+HIq0RNpNaa7xp7uVPCONR32fIbIW2yvRXU\nRYszxC0Lol8Ysun0OnF0pcIW41Pmx2jcOwnbjUw6ia2Sa+V2jw2oFwJG7Pz2\nZlbQhbCxdpsW+UAe6m27+LiXv4lSH7V2bhrhspvQvQaIdwrO41XiY81J37K/\n0u1ajGRIukDBNzve2zJFqfO52oktIp4n1bexf91WJuRZIUE+PiKtfpiUQN1s\nBHPacPTovisJMwDIlksQX/Qk8fQH/6Vw54BSqDdCg0mcCY9dUSAen7M4BYph\nlws8V32nZKJp2KLOFseDNGF1NAU7Fi3f++yxfldp6pUrhmwqb3zF1t6wnlKe\nAIeQdCPmzQZ/QvWTjVypwll8tDlFs37W7hj+2XSBLK8M6G8uj3+W+Ygkouu9\nnXuhN+ROCP8x4InFc4a0pPbJH31bEJDAdTWpoFLYZTKtYYU8Qj6IB5AvWTKB\nc/5GzdMOynN9L51WYHfLTgRY1AjRqbs1flMpExc/KOgETGULAxZLI0YrBMbl\n5kwX\r\n=BK0T\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCcb52iwGfnX2LU1OdDvYUK5TZktl50vlFDWqy95Fwc0AIgC75nBXRZM1oKxkvWbEPhjKSO4NxSuw3lluOeumOAvvw="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.1-alpha.41_1571152859674_0.4524233024442177"},"_hasShrinkwrap":false},"0.3.1-alpha.42":{"name":"@react-ssr/express","version":"0.3.1-alpha.42","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/cheerio":"^0.22.13","@types/express":"^4.17.1","@types/react-html-parser":"^2.0.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"9042277e62e007ae32f89798ff6d4588a054da2c","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.1-alpha.42","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-BRrH2GiV2gDJTHFoGlnSoXU7FeDcwulK72S1RbuF8EmP/1wLfra0WJZQCTMv51MFuWKH+g1zdd8igO9Jph68hw==","shasum":"9075b1131f951680ff1a1ef4f72e93704e57efce","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.1-alpha.42.tgz","fileCount":9,"unpackedSize":19035,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpeVqCRA9TVsSAnZWagAAObMP/RBoTomSdK4ji3Q5IbaI\nR9Bn92nxO1/koqabV/i1KsSNMfPfYTyLD3N7rxff8+9tFusrnYGND+8dQsXQ\nsEMKQFZOPdxLwVqDda0nXMnFCHl+Wsxo2ux2YinGZz5YNqc6oVHeoe2oKDoQ\nr2hYmX93AgaT3OqIlmDZM7XaJGV6PiqllUKy8rHz7FNd3TxGn0JED6nS4Yyc\naf2GyozmXJTZ72aS16Tpv5FRbV2EYdiIFz2AoVdnEUSlgGJocontLHpt0iYv\nvp0zAsGJYhCinyZKYzcOEwK7poaYR/xhic+wA9frZAEgmZEXfEDWr5U8XKON\nfpRjVggz3kdo1Ga8iPrBTST70wBtacQg/QdS8oRDYQNZPxdj3BVmHFl1g4sG\nWCSJkOPWp0Fu1B6nXKbda6TwBPe3tPC1GruZCicdK4P/Rje7SbdTYjELPNYd\nGMM9N1JmtRYyt9dYQiSfNMdcfxLBNCvYBeJZLk1HS6QKZVdzhs3EaqH6N2+J\npOJUXxyb1Bt+/RbtUXXiMDz1cXXI6jJ04kmqTrlFjTgx5pq/3Zk3EL8sxGk4\nXLyBmhInSMfQZ6OX4zE6FNCY4Ia8bqWXpWiPhb1vCcpplSLKu/iVtV2xqiIX\nqVbXXGSnlJhgj1YNs/tdrHOtcXQ4kt/fG3/svTeFqWALzkSIUFvNrKzjYZLW\nt4S8\r\n=UdpG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFJrmIgcWh6tg2FJzYG/qsvHFpSh1NPNC4BlwUpyqJ8dAiAC1nGYej9evK/x3jT7DtkGLjCJux8ri5od0W/Wk0rOdQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.1-alpha.42_1571153257515_0.3923842116320453"},"_hasShrinkwrap":false},"0.3.1-alpha.43":{"name":"@react-ssr/express","version":"0.3.1-alpha.43","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/cheerio":"^0.22.13","@types/express":"^4.17.1","@types/react-html-parser":"^2.0.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"21a4944ff7bb634add5851f4c72e63857c17f1bf","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.1-alpha.43","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-zhmgxmzmg8imqHrlVCXi8onH0QvwFVwGrf6oE33RypKsAwxp5NqP1NSJQexYOFwFSfEXO/gBH4sXugi87vWliQ==","shasum":"e65337906f74b1fd182c3e99c8d26b2a49c04b8c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.1-alpha.43.tgz","fileCount":9,"unpackedSize":19034,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpeb8CRA9TVsSAnZWagAAvfkP/RISUiymTamoBo1g4Ndp\nOLYouGYdxMGRzeZQt3x28sm/VE8gYAEHA2D3vFHH0mywaaW0quP3zcECjgzb\nWyMJLArSqQ9UocXao0w+MNiK5jQ6g41iMpWtLxZ6gv/E1Yn/sUSOYysu0BbI\n5UMzjnJlf73WcYKO5eG2bWfQfoYQU0s8O+W+bafC7B5AMBJcLrtq1C/1e5kz\nXaqfToAnQ4E8ad2E4snOPNbkiBQ2IW3ptUYQEFqcnv3eLtXEPtOxXkqYo48L\nDtO62Wi/twWulEGjPABbG45mQdofj1EAbNqs8+HOH/KdG+zgHNBx+Xk8TFIX\nFEf4mYvONYBKocShNhuiVDpJ96eg+wLMHsuG+vk5xxDH0VOFZ3OVZxBPUjQh\nryOedQuwzDxSJoNwjSLJRA0kRFEAUtddOTk1X2L4Sun3jUOpuXcmDjjwMeH7\nDT/zsXOPJHSfB9p3UqUSG0fUY7BRao28Szc/99T2VORyk0BG9A1iIrRwnrdq\nbkfRQ9ZrZTJWE15SnVMBdZ45H887DG7kNYkdXqAkenkDIqFbfv/3hSPhTH84\nY3ysty6esb+frUBqn0XGpAfuW6UKaYDsQ7OjxRCVoioEBzrU/3ShENkDBqjg\nfFsI3TQAZ2uBtDwcY61Cf9R88eQymC8McqD7DNYVwke9EyalOrkLAhAkfoOv\nCH/A\r\n=bV45\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD2s2W7stsehO7+bBBi2QSo2EEXBakuaLO08uJolHz4ZgIhANeUkqzkr3smyfg9nQFGpi+g487jp1g0ZgjWu0tp5f7J"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.1-alpha.43_1571153660017_0.20457664038723866"},"_hasShrinkwrap":false},"0.3.1":{"name":"@react-ssr/express","version":"0.3.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/cheerio":"^0.22.13","@types/express":"^4.17.1","@types/react-html-parser":"^2.0.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"c124fb81c0f6c7303abb4e12cefd5ffb7243c687","_id":"@react-ssr/express@0.3.1","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-f34f4ON8G6G+Fkm0l+RjTpTjzpl8w9C928YoiIvgYAmztyjVT6E/880FKH0LZa8Awmjx1fYKKAWlqnNwfSwA6Q==","shasum":"08ed3b98371d650c7e0ac2b7fc455d1c6a06ed57","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.1.tgz","fileCount":9,"unpackedSize":19017,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpeemCRA9TVsSAnZWagAA6JQQAKLjKx4E9XEBy1/90fNl\nRpeHV4RDd6zK6m4TqBY8cH8MOJ2DuYWlMuA4rEbqhIMOGb0vZqNbLqmmy2lh\n1yRsXEbCful76Xn/1Bk7X85sfsHmdnnWcfEvyu9u82XYxnSJjUXQkvjtg05m\n8Fmdism1iUSwYSTr1vzrjNuq5v1oytGV5qnx7Us2dqv8uCwqfEIJk4gmZw/t\n0NzieU0qCExfi8o7yg+R3lKw2HUI5igYLuuP3HhNrH87Kfwx7aLsb7tDDZ1Z\nck5TASlSEcciTeJEG0D7dUfVKC1r42Cqr3a8qx4JCNGhmj7DX+z2b34G+3VJ\noqxGr+przXID3XPZabLDtHz9wxGPNBLmW4O8sdPShoOM7yHXZB0Y/LXAOIgf\nTqoz0O8EWP9IMMBT7yQ04WBZqkY2a5wsvq7KXmScRSBkS1eyI4kOtHBhZu+J\n81kipAjrNOFNZ5iqzlRXj4AFkx/q0ZO4Md405Qcz8VIJAEi8C+SUTb8efHdD\nej7WhFptP7AI8egLDL5dQhVEXBpz4N1yWRBsZdgB60Ux/I1KcyVQWrHH63Yo\n0TYnB4WB35xdCfVf1PcXNxC/7qAsCykMTWRE0FY4zYCa+dHIT6i3QMtrJdt1\nvEqv6g6E0VUjhal4U46YnoNo6PBvoPy3WBQ891Fk8qIyhZ5ODXlMYbox8lxe\nDeIh\r\n=td6h\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDDg9mdgUOF1vpcqXceX+ZugNqwhYHQhgNjsWh+7BCnugIgAoopWaeuMgG0jpvIhOzYFs8r2hi0PsTRq0MZ7nHTFGw="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.1_1571153829735_0.2774978688557215"},"_hasShrinkwrap":false},"0.3.2-alpha.0":{"name":"@react-ssr/express","version":"0.3.2-alpha.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/cheerio":"^0.22.13","@types/express":"^4.17.1","@types/react-html-parser":"^2.0.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"cc9870a32805cbe3729ce07bb45739a43c5cbaf4","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.2-alpha.0","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-xuFFncdrJMN+YbyXxfenl+kLOFs2MsxWQohbuCsd/PYs7OHAYoB2ytGfRgIi2/vixgVydc8hLd/QvlNcK0bsAA==","shasum":"f36edfe90750e14db3027baaba965a93806650af","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.2-alpha.0.tgz","fileCount":9,"unpackedSize":19029,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpfzoCRA9TVsSAnZWagAAzVkP/3pAYbIK8IVxzXbIaeS7\n5CFj8rXQgecbCNtxwtseiZd3K2aAbYC1cEpjym1BnxrVc6Jx1mSJpifSxD0d\no1+q9/WV2iGrz4AH6WmTiBn77q5jzDahWPABoiFsVaj8EJ6c8DL8QcPel9xC\nxXUcadkIkq3X7+anN5ut+Rz7b7USOj9Shcjr0qW94UIEBS/GCDDghV1W/jRa\n4bq0UVoZOW16P8Y7wDs85YWo4aAOY71zlF4eEdg1qpiDMrhL0sm+bEu1m2ja\nwUPxiryN0oqFh9MOlDLbnV8cKxFOrd33ZEvLcqIUfdEN6CP0CFkg2ehA5okB\n8TTVLK94m1kEb6tMSGrsidtcdw3bcQl/2EM0Xqfy+zIX9FdSYh7dA/yoeh51\nsChoRCJuTeH+lj/8OVPgfMt0UBXiMvanX8iKbXf6DBAm4/tGCFaPWLd9TYgJ\n2xcPg0qP3d2h0j5/+lX2UNbfABYTbcnAhyX17AtIVNapfFL+TaiknEC1EyYC\n4VdrV1LinrJDLYsi8diaqP5hOK3a9ZmfIbVDixGj0fC3wxcH45EPTxruXdZV\n/6BlRetfpk/HlxuIiN9OEIwrd/LpWY43LzSqxd+ctggxyWzESmePIwCEGg9B\n5PuJAOS1eJ8tKpd8UqusrNQycKcBt2so2zK12JG6+N4g/+uAm+3Us3bWf3HM\nNfFM\r\n=6ev6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFsUlXSLBnPmLJ3SQcSGgtp+mM7dNz/18YoytRS6GY8nAiEAq/23+n+a6DzctxJXDFFs63N1BgFyu/1228kkNooQivY="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.2-alpha.0_1571159272065_0.07641811039631285"},"_hasShrinkwrap":false},"0.3.2-alpha.3":{"name":"@react-ssr/express","version":"0.3.2-alpha.3","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/cheerio":"^0.22.13","@types/express":"^4.17.1","@types/react-html-parser":"^2.0.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"c3adc1cc6f0878e5bfe03b552e935e2c608037d2","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.2-alpha.3","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-oAJJtOnVtI19ZL5lX9WS31F1oNaaihI6bGHCN+sZgPqtdf7ysTKPe6PLq9QYnZ+KHZGTlwMuJq+j19FNB9R7dg==","shasum":"7763b1587751902a2fdb8f4f2050accb04fa2907","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.2-alpha.3.tgz","fileCount":9,"unpackedSize":19035,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpmcZCRA9TVsSAnZWagAAmR4P/jGkMC5ujL1auQvogtvG\nKq4DxfXc/u4sZnCl+IzU6JHmqnqjvo/cjIikxWESPV8w1RHIKyekYza6o/Ez\n0DRMIRcKCj/KNY265Gj65IMsaqw4UHEGkmYYhfibpbiNtxkbhvC8ozJBKd4i\nIB9TgwTnDIHnuH38xWFyIneriIX5RDMhRfK7BZjx1hwkrI2Gw4xcGE/JXC3/\n72b+wkFmaOCncAp5bgdvdZ/A8H6qhUd6ED1dhDZrRdJf7Xp1K3rvirpBQ8SW\n6KE5lilOnDO4HA3qg23q0CwRfT51EVAOHfA2B52EDaUd6rSVAbhmEIibT1tj\nH0D/lgCWSwcnPGsVTz5Le6iPb7Ll7USlyeDdgX8lZQRXIwDl0AENnf2GeA8H\nNDMSsV8ytx1YWUrP86XIRZ4ftb6NNzB8i9qKqA9YnSDDWCP6kcCaKDlfSpaQ\n1uPQKbAd1Wkvv5gwzMVQZ6lZaREfLT3R5LshMvYO+jGt7fjrPDO5X45XaNan\nh3zCjbOigUR2/e4b87sm7KmbDVslHO6t61YqAizs1cqAEpP4TUxkTAgfbS32\nCvOxSIYTQTIMriravOJ4lFxozo4EiQ4GVQcw5D5iffsTH6e7hnNZ+iUIDEuI\nlySpNPLwk/0yzqIdF5EVAnO0ldLc9hLdUuEszkz6dlNZ29YPY1gg0hRnZl08\n3gnF\r\n=17wW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBI6gIa8N/s5GuHC6VMhXoQJHPg3UuuBCMVl7FnwVx2kAiB7Sy6gv6+vs2QZZO5lgjjAGrDfVal/Q4rhkPwsa3LzUQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.2-alpha.3_1571186456967_0.3066862072938814"},"_hasShrinkwrap":false},"0.3.2-alpha.4":{"name":"@react-ssr/express","version":"0.3.2-alpha.4","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/cheerio":"^0.22.13","@types/express":"^4.17.1","@types/react-html-parser":"^2.0.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"219d216ff6a6494aee91ec878b468183fd125352","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.2-alpha.4","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-mqpHJTDxmSPoBuyWM6LqOLUNVDET/sQ0cv2UVqyRUH1IyDgEQNpgx2+MjwoDxQ2qgQpA4SYtWgVdGT10MONEzg==","shasum":"8f855bb785788fec2819f58e2079a7acdd0f2cce","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.2-alpha.4.tgz","fileCount":9,"unpackedSize":18638,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdp6RZCRA9TVsSAnZWagAAMsIQAJ/1SV4DOrnrK4Gzvxq/\nob+q9ISqBES4Rjy76Ond2U4nNrO94FZJTupWSqKghIsasgAMTufD06D8qALl\nHLT+nvFGfKnPUslwriUMX75Z6J6JEedcUCgcyK3/VqF9SpxK29qSwbdJ80nm\n+u4OdgpTxLLDp8JGMHwJS4sNLWlOxJKjn4F6V91CkclfhoV8PTMAE8LERRzC\nuOECtPWBUAHEQUCy0QyFrRQRLoQS+P3FB0FrWNgBm/rX5AWAzj+jHVmBk6Ab\n4AUwSr6NrJwA/7kZ96LK+M4maTFDYvs+HVOFg6foj+IldYO/Tf6LLXGvMy9u\nVeBDiZOaOnviaVhRmnzZGLP5FNlJZ6uOwVzGhoVdAwWTA+3sDxn6T+0h5Zee\ni/Ij05RXLONCu2hjPWM9vLjpSN8qiZZwDDOXyPdVknP0breAxwYWb20i0aP4\nkR6+fDfu9T1OdUniYpskKK99AWYnxSbZ2UfXOzFishdn2UkUzeP54+pXI+yJ\naBqo6UdNUwTbqSgaFRBF8r2L64x6ZEUYIc1LhieSkgIUKh1Hoj9IIne21u7n\ntRbbzFGfTwuD8g2znQIZygwxFEllxZEkArO0sRTFEEfmt3fwBmE8msRmw8Kz\n9FmJ+tqZojdU/yNit+BTmTdMlbjz5SSMDf3zXlgLKHatcs4prwYtREwIDgO5\nMmac\r\n=W1Ee\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD2o73kCxycK8c1BtP2Rhk4+rBfRZbbFG1/BvZbwC5JWQIgORTqm5F92+PReY4hlRNHpym/aNzhGvT1DinOWGhE94Y="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.2-alpha.4_1571267672472_0.6588683042024641"},"_hasShrinkwrap":false},"0.3.2-alpha.5":{"name":"@react-ssr/express","version":"0.3.2-alpha.5","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/cheerio":"^0.22.13","@types/express":"^4.17.1","@types/react-html-parser":"^2.0.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"157bc8c61b0c335ca0b8c8aaf4ea59cf60d79230","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.2-alpha.5","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-2h1KzJor4dIdSc8NoSvNAeGfwisPKERFzkwetgrR//NWmPiGPGoIS6/x28nQp0I/sSbmNd+6ZvFjPczm9XFvpA==","shasum":"c81c700316c507ad667f933a0174b2eefd771600","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.2-alpha.5.tgz","fileCount":9,"unpackedSize":18653,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdp6YFCRA9TVsSAnZWagAA1oMP/RPyYfWyh2j5wuZ7IyIB\npHDXdTTqB5xIyqYYKhFNLa9ioBvYpGzknAARnXpiGT9/SfiFpbY7q+g8mLJo\ndcgpxRkIuYiU0kydzzopJAaSlG6i70pDVXK0yu9nsCovgEewbFuyEUzx4uGE\nnmIxGgCw8knL7nXXEGl67HIzOxw1/mkF2iQTj/HjWbvJbtZdJMtEIslTg80G\ngDn3B8zXY4TLzVsrnxB3Rc0Q2Dyi5e0r1QorcNxp8X/Zyroa1HdtyprvBHY/\n6BFVFauDc2e8UXS0g6tJhDapndReaRJaqbKWaoft+aD3rsUWNokF0x1BzsNs\nkF0fpMUBBjTqweOvo2nHBVv2S+5LJTRuxSWCxcpo7HDY9PNJjV/3XaaMBwsE\ns8pRb/u3jDKtEhA99nMIBGS7rZLRc+xiCyNE1QCw8A26Dl176ELKQTjExMWz\n0DadAmfzg6M+juRyiN13RLW8aNu53q/LtVXVEvyvS1bLxHc1HNoYQHfb39J/\nV3KtKfBPXrnuvGsc+AbzQP4CGY0Dz0O5leRha37RKj0RTZk0U7rSGPgY98tj\n+U2pIbKNRLa7Cmgdz9aX+TwBXb2jfToR+VHn8J4fnTmr51+szcJZlbRBeyCB\nTd9lSgfiT6MZYkDoxWHX5tGjY8N6VPc/Uxu6PpTBldiEmcpiELEwffshO2CC\ndGgw\r\n=Q7F3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFFQ76GUSQE+9q2oDSa5RVCpBzeq8PDi9mXXD3MfvhmMAiEAuBzA0WkGZcC6QLLRDYyL04VLbpW9LT0UR+HpQZ0Injg="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.2-alpha.5_1571268101201_0.7555723541757504"},"_hasShrinkwrap":false},"0.3.2-alpha.6":{"name":"@react-ssr/express","version":"0.3.2-alpha.6","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/cheerio":"^0.22.13","@types/express":"^4.17.1","@types/react-html-parser":"^2.0.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"84cf9522d81006425773b5c81e5423ada6e3d15d","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.2-alpha.6","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-8D4X52d9Kvg0KVqPrBqSR1XLzH0gpxy0esjs6cnh3frn6nQOjXcCpJSbPA/UeDUR0PHTiUGXoux66ihIKgmFrQ==","shasum":"e8fb3de5a8113506ffcc88abe1e5282cf5f681a7","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.2-alpha.6.tgz","fileCount":9,"unpackedSize":18701,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdp6evCRA9TVsSAnZWagAAjDgQAJ4lrCzTz2InHAywvld3\nLk+vqgcUDEw1VIKxTY3qUCWI01vdiUV7PneMgM7RQv4f1fe5B8MKoW/7ntGc\ngDt0hP1MPap/FzgurdyN37/V4zwO/Tbn4e+yKlY9P8nCFbDWGftFuWg+THGb\nLwenpywuFdwLp768X1kavpCr6A23bXBkcdx8cXsjOMaa00gTH/6+0JxLHDhI\ny9OVISwUlEHtIXixPgS68ihsoUeT3gFh65U3ybAS423qwXjnudouLdHWMg1p\nOrJmuGiRmYyie85YDTq08FOnoQAgviuh+nnbP4F+QPAc3eO/7wtL/qFgbs01\nXQ8ghG+daBBVNDzNlRikQJGPuCE6iVRxJJcHBxYLtyNqFleDdIgv6zw6g/WE\nq30MXv1RJxBDseoUwTKhNT6SRGUxq4hzm5l+F79Oo/pWamm0jlrfJPVJBAUt\naZ80JnNVCeZCqf1XJ50zX4HBzRyHHYsraeKkzXjfewyt9/0iEMEjgicV+xMa\niMcS4WnYv7Lk7UdBDqndqsA3/3fEeliJ6P91GPFsZgWQXTOGptpTINBAEGsc\nZKmsck5IJnEp9LLNDtErt56Bv8gJG090rrcvz6++yPkAjhg1IM/LCscZmQMo\n2sfWVhxZsLDDF73NiuG5jm7pyNZSwfMartOBXzw0WvRMgGwHWjmVL7t0HFJf\nbtiA\r\n=gd2O\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC3QVBGQyaoBSwf+4Ml+6mwHtwHQ+UiyEkuovhY+JaMVAiBlihMyafaFlGvuuLNzgOvrxNAlHL0Gx3h3W52QYkza1w=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.2-alpha.6_1571268526898_0.4399014233825753"},"_hasShrinkwrap":false},"0.3.2-alpha.7":{"name":"@react-ssr/express","version":"0.3.2-alpha.7","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/cheerio":"^0.22.13","@types/express":"^4.17.1","@types/react-html-parser":"^2.0.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"261285ba62ae6c367d9361545eb6ebe9a07f604e","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.2-alpha.7","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-T4/63RP6aw6VQznZUf6b1gjkkuTeser+gA+PzNzsOxHWnhyXW0DcOMpkHGmq9nartUy60Dc5YOeE/TAyWtNwvQ==","shasum":"0d1aca224cc31d124cdedcfbc571b53c8aa51f75","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.2-alpha.7.tgz","fileCount":9,"unpackedSize":18755,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdp6h7CRA9TVsSAnZWagAAFT0P/1QBvZeIFZyx1a4GbtJz\n4gpbgDy3PKRO1Ksl3ONFQyGlUXUki90rcJmqOzl2Ljth9kpZ0GTBfq0EnAj5\nEKzO3cwkyTNyBbQ8YMSlpSbcXKI2b0mRCiN+BDELiWpqAO6xvFlEbqfbxN+I\n9FE36Wnm5w3zI30DgKeV8M2wiDcpXPp1tWR+JSBe/TNWYewlmUT4oOZXLEqw\nM/T4w4REPyAyT3xW/EkC6ec//tb11vUQKGKC7AqumtC9kj7pAQmUcBpCD0B7\nkC2vUYBlfaBhFb2ocphueNTznlWd1YJzLqdn1Tui1fGubp71Y1U8+YHByGyO\n/5oUMlj5AbkvH3ehQaRUNTukwyosAFUebwjbAcfslYOLftQkp0lBw6WKP3RV\n0DyKPIA4mvqR/kw+ABN+je/LRE1tVM/KkHbBeaUZPluIPSAFu6QwrPysPvvI\nkINZ81jIUr30yIx6/NhL94OlZ1DdAvBwBeF1eFiTyQZBB++/9o56I76sITdI\nR/enACkVrN/qLp4NWmCsIKQBUbhLCtY4+cvIU2BqiRRoHrM7QT6SA2B6lllQ\nzmRJpo+tY4G9DcD/CreZ46DBPRgoUqY1Hdz4WUF00Shmi3jFC7KpdBJP2yfU\nE5PsDqZ1cbm3sFOcRsIIuHZsqjc5n2UtUV6QWcR61E4FZzPqOaBIz4cJMrCS\n3/aq\r\n=dP+z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDGeq3kE8vOhRYwv9LFlG6tVhQSLex27VIXSRCobcrGHAIgFRNPkQDfviWCxg+Chq1ogCrg7f32g7YP+msqurF/Y2c="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.2-alpha.7_1571268730479_0.24748261006620442"},"_hasShrinkwrap":false},"0.3.2-alpha.8":{"name":"@react-ssr/express","version":"0.3.2-alpha.8","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/cheerio":"^0.22.13","@types/express":"^4.17.1","@types/react-html-parser":"^2.0.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"18e47ecf7d8ee3493b618a96f34e83cf2f01d617","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.2-alpha.8","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-sjZ6dMYvcVO3Q7hfFhELeMmAEME7u0qdM9AujdaU5uzQo87y3i+f9pQRMf7ITzyADL3ImczrGgv671VJRQEPsg==","shasum":"25929e0e10960adeb4437211ccac532b971866c4","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.2-alpha.8.tgz","fileCount":9,"unpackedSize":18804,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdp6sTCRA9TVsSAnZWagAAagcP/3u1ohbsdwhw74Qo/Xcf\nLwzlfNPmmgnU0aXBIK7vW/1NWfXOrJrgapzeOICUpE3/5vmrFNYjxrEuKqLU\nvqI+6FXAWxgvY94lq+tYMH3EvYUGP4ds4xFKSPWhOCPUvsWLRYIdoSFtfi/k\nOSndWZzzUeUMtSbjr3uRxUNohF8ZM+9BbTWlmI7FbM1H6kXMn7CEw3Q8tole\nbZtKcTYsKjFP3nlnO/9dQlAXYw5gXZmH/1GutJM9PmVmh+vTTHOHcFL7wyXf\nRESdrIuBY/1kJhKk3cNt1HioObsIfUzphWgLMkGYfa1x+wV/zoqUv7Fezfx6\nC/vDurVLjwGYibnCZ/zXbGZ/F/HhWpt6TATLy5fOxJkKBQzES01EhVovWnMe\n6fVuivKwcMS/UV9Xcx0JjJnkzNfCGo4qJ2cQz6LqFePeZCHOqLYs+WrUMRR4\noHwciiToVA/kNQZ3DHXDMCwU2+L/sP0kKN1vTTtnV+gsq4Z//+LhkmSCzIFf\nYcFxnXMhIGvFOq8yyPpctySjtk6CZNlUJT8EyRGFVn3P3vGWg7cenjoZJSnI\nv6eWwxRmbWGZ/hD4H7YHITqqjm5g0RA+Li5kYZjPHG+rdqX0/Uhoh2FEbd5G\ntLih4ElbfiDZoH1+lj7TopDN5Tm+F/8M7lYxlj4V3i9PayBsIWhGWBz35dkR\nXRuZ\r\n=c6BQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDU7v0XJQyFEqUK5sLM4vsQxo/M84HiOxaq8IgE/baiXAiEAi3VEcIwaKRUMsDqcF+9MooPK8Q3OelKzYYe10WaO5x0="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.2-alpha.8_1571269394974_0.8211860733827538"},"_hasShrinkwrap":false},"0.3.2-alpha.9":{"name":"@react-ssr/express","version":"0.3.2-alpha.9","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/cheerio":"^0.22.13","@types/express":"^4.17.1","@types/react-html-parser":"^2.0.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"dd46b53ce7f46e09c5c6d869d9e6ad7956dc2de4","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.2-alpha.9","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-rTsis6mTBxHNNomwLP6z9KbaNAWkPtGR6AIsfeJl6GFHFUem4T4+gxpu41PkmfmUjpOz5Kjjt3zrGHs11CpAuw==","shasum":"a44741fcd36ef6ea48bf73b271f85fe65f208780","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.2-alpha.9.tgz","fileCount":9,"unpackedSize":19389,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdp6v4CRA9TVsSAnZWagAA0i0P/1TcvLLH7WccmykEztB+\nDuV14zTdBgpHGDVvQ+ejaDrUCZevUHl5BtNPvWVPM4WVIGidrUNX1X/cXPfl\nTpV7DsUEAbrmbXA+YxDJu5JcU1rQc2lsXch04tuJU/haDsidZfvptHtrkNiL\nln9dJc9p8p3yDtLqQ8naJGAt24VjhTA5Gx+QfasTnVJC5WB52XVtU2oaTGfn\nOHozSp37hcc0GwrnsC1GLEqTkJ/GI5lc1+o9643mVNOrK72B9NaSeTxhtEyx\nc+Ezx0HjM6zkpBI6ooHhPfPFHGjGYNcq8QwIdJqJRlF6MxLC0KhndGbvO2J0\nUEACfx0XUKcR1TNzzWsPpuAGmd1mMhIOtZ/dJFbVsO/g11mxAcjjiY7SpCqp\nW6S7oUwJGbS6xfDLTxN/Kdrdjg7LFo1gDspj+E6PuOMyXsb13IQNeh0ZlqDH\nl1iCM5e6/l8ZDFGW60U/7cAtgFZgzCbXK7sgQiYLBlVcVUt1yXBhH+iiOeAN\ncUbLlMOqaULtXgQhTl1ufNLgoXe2zFLB9sBjM604fHlV14aLPR+khQmZ4CNy\nJ4+VsIOcadOYah7exYZGxfJVKpWqwvz9n253F2Mys5DhOhpv173p2siBL2kv\nYw3wRwjS7duKoevQujjAYqKyD8wmH9f0I4MbGG6NuaFWNNEffZMUS8UjBQSj\noLUe\r\n=d8hO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDpz2UbX+9sQTnITfN0B1dMNLvCylDzSRhz63C9Mq4/DQIgSbsuShqkrkNEcZOHK1hT0crvrxoMGAaAbyaEfefhw6c="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.2-alpha.9_1571269623642_0.012970388275390654"},"_hasShrinkwrap":false},"0.3.2-alpha.10":{"name":"@react-ssr/express","version":"0.3.2-alpha.10","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/cheerio":"^0.22.13","@types/express":"^4.17.1","@types/react-html-parser":"^2.0.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","got":"^9.6.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/got":"^9.6.7","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"3f8bb3846d9fd87ccb7c8e7dad332106333cdc07","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.2-alpha.10","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-m1TOUMWt2Qw2RO1mddQmMwxaR4By71N8Kgykw9YaEzHD+x7cd38Y0PqA6kQpDMuYs1bb45e5W2nVXjFOGp+cAw==","shasum":"03bf2923d7bd151aa0472e51e6861e18be8768b7","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.2-alpha.10.tgz","fileCount":9,"unpackedSize":19484,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdp7WxCRA9TVsSAnZWagAAg8EP/iPL4xo5i5TwVSSLv3CX\nmqhpfJvbUUPTHuFdUmjNrhkg3fVp/eg1quMV/5Ma72yfSr0aiIjMnHRMI2o+\nV970HxiWcjHXq7y7zCe4vVozD+qSpW9dAUQDm9GbGLoUqVzDbQajSx6MDr2B\n4kZMpnHdzclgC/lqbVQZrBQI3QtjONnng/TEGLN0yPtCiXFpsTmHR8iNoKWd\nfOeeQ1CLKzBTzsTN58oTUkZ799rFp4+JKsIfVnLm1tEBjlQopqKWVgk4K4XU\nYYgyQHrG9BaVjHdWAVuzur0nUDFdTD7+Hf5wQ03QsCurVoAXYHijofCVtl4z\nIatLxLHu3g7Wu7E2j4d8URaw1rTzfp2+KP39CfphldWhi1FciFbZDoJsagwP\nX4pswNfjyTT03Xl8pukKduYG5ODLb5IUqaWK/hDeoVRkr44dETOjK9h0SVCZ\nSxpMjYqzT4C3tRZjw+cVukDcOgBl/PPbVJvrjHdUAURFmXWAvLMxZqPWGTNW\n1VuiIGGzJSiXmi7qU6dJNLcPAxQpDpvjvqymdp4BNx/yC9AV7KCbWAUzMw+C\nKibg4qaLDaYFMpc7S7gw/wz1pkZb527MvNMlybfshMcSVyxNVI0zCr+Gjix1\n5PmdhGlOtDo+F2InEz+yD/vTee3dmPkiNc1mcil+dNaCaLipiW7eOr97Fc2v\nB4Zf\r\n=InF4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC8kBvc60A/4GMSyOpIvThGBBv/vcGRnOQ5iGxTniOeWgIgWBNXaJU/XqSULfJ5C6c3TNRaQjEVU2dFSyYrnmwgf4k="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.2-alpha.10_1571272113016_0.06667656693216895"},"_hasShrinkwrap":false},"0.3.2-alpha.11":{"name":"@react-ssr/express","version":"0.3.2-alpha.11","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/cheerio":"^0.22.13","@types/express":"^4.17.1","@types/react-html-parser":"^2.0.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","got":"^9.6.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/got":"^9.6.7","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"28932172063efe92f8cfbf35932efb52618dd41a","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.2-alpha.11","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-R6CRHsQcMADQypEHDQdTaSWEd+mVhv+7PgNCTdVzFdCc9/4rB90/vkTlezQfoc8T9GhPWjFBViw50OorLZ5fbQ==","shasum":"f3eda3ca796f04d92cbd7e651f1134960a1f28ce","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.2-alpha.11.tgz","fileCount":9,"unpackedSize":19443,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdp7Y0CRA9TVsSAnZWagAABM0QAJamk35tLqATjERbyQvQ\nqetRCRWZ4yMDTrcrpEqSnD/6ErVXQlETKGv1ZN9sANRXlyhEJat9pAKdduOz\n76G7ktagwuZZF1fsKSUuRH3UDsv26UyXGESuJStTHtwzIMyRFlV3aoZjGUX3\n6Ghj0m/JAtFzgCxfeZDvMWe+ZmpS8s+N+vOVo4e6WU9LncvfGtqoI4Ci3j26\nd3VCImQTANbotD9XUB00JzYq/ifEzMrNpXVoDcLK/VANxkCMPDgxBiLRxSY1\nTrgPlBJO8sYBazxCqYOLh3xwl9RaJa76m2Mq/5FWKRS3mlzXslOloHW7ctAJ\nx4aljntysoFERjeiyOQD2k0IRZcRKlZRKbmJXdwaxnAmo6wa4subtxkKCq+r\nyqd/rf2y8YKxacqKPUWjURfyQPWeGZcZUZkI3NNfc8/9volga6BnMia/9ea9\nCRtpQtRVX+nT6IUStKU2YPK0F9Und5dS0ED7RXhLeW4wiYgouVwwM87aOoDG\nJVQ5qvAehkIfa8PrPUgT0VTb4iCto5aI5f0Y5fOInpQxca7pJ81Woe4186ST\nZFf+e6qCqRuDQL3VuE3RwgnsaSe32STCtsvC9p817ys2MXCZzxflUunwnJ0E\n+nzKXaSdYXzAZtPz/wyumYyqzqOTJxW959TSZTxg48qVECaVek27EaYUJCZ4\njcrt\r\n=6IBN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDV33OLijHf909Rqnlr4ncoETDgRsF7hnypbj1dNyW6KQIgchqkR0kbdGGUXWOKGM/JzZRDYVMYLmTLNqvca4ltRQg="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.2-alpha.11_1571272244341_0.09119573622061017"},"_hasShrinkwrap":false},"0.3.2-alpha.12":{"name":"@react-ssr/express","version":"0.3.2-alpha.12","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/cheerio":"^0.22.13","@types/express":"^4.17.1","@types/react-html-parser":"^2.0.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","got":"^9.6.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/got":"^9.6.7","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"4b122171b992ba69bf72ceb069bd64d3cbb8a2fe","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.2-alpha.12","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-c5TIMemFhxMCX8zmcS97/CtE1y0ZTuu141GAvI/Qe0D4GZjxOkwEkcGcXBhYJEQihr6h8q5MVbCU2UR7igtJsg==","shasum":"7bbd6d2fa1f542661584e12eb426473c5a28cdc8","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.2-alpha.12.tgz","fileCount":9,"unpackedSize":19371,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdp/d5CRA9TVsSAnZWagAABncP/0sZMvBwEVSr005whbwb\ncRtVIhufNEFV1YKkqq7IufWm1018CUl1f9T+ViKOYpoYLD2xuUanOf66azBK\nka3XZfb1ddnUoxw38cPV8tNHknrqoJVVxHXMuIqHoB4+BCYIVRNdwLMHx390\n1LHN4bOLBmwbh9Y2kR0hdlA+0Wy4xOmCul0gzY/ccTKhfcqGRQYTzRoSLeUA\nvF62gwrQzu1L7qbMqNWrNPl/supuK49IFyA88Jnrefx8W9/7heqqF6AD5a6+\nKOn1ZP2Xx3LfpuFgI5ch+J8y1at/L3itkdLj2XDRL4Wwj6aX5ag5/MRniir7\n6pxbRFCw++XGj1Nbd7FmesTa4FNJQ4UHTj6gKFN++3mn4QrIewGMjQlcpdm7\npgJluxElYW9N6J8tXypuViWr1cciuriZaX0Z/rcjuOzi9GITFTWBvG2/vKZb\nxGc7G3IKR78WzLxDiK5+JcRYFugXjB2hrGFUIi2Eb4pUWVBPh0ghMDzKg6mM\n7w7QdJW+3A9s80von/xVTd1lKhBpM1hZJtCnyqeSzZjKZW+JoQ549veQrngB\nW7kXs3PiOBX9M/WcJ+xNN11XQhUghKWy8R+zmEzHaRTNzn2IAqOz4rfus2BF\nD4Vjc6hXgJ16rBRcgjRS0glwg19ZbKiRqbboSRUfVsS2Sa1pgA67L0JFr70o\nxSUk\r\n=M5hS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDMo1CHXGlQNXwWhwZDIh81RpJo66f7EfUkIVSYRHwidwIhAI4F/88Aq2pEwuk5sTl82K1sj/CcA6o2YGEquMGbe/Ek"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.2-alpha.12_1571288953205_0.7763193733558702"},"_hasShrinkwrap":false},"0.3.2-alpha.13":{"name":"@react-ssr/express","version":"0.3.2-alpha.13","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/cheerio":"^0.22.13","@types/express":"^4.17.1","@types/react-html-parser":"^2.0.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","got":"^9.6.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/got":"^9.6.7","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"a1e42f8dcb4e31fed435a576762e6ec8d9cb7ee1","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.2-alpha.13","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-w+BILM+KUOP+k+j2gCGo5rijtPt8N/tZvjcnuQEnEe4bb+0Ij1AAUsMvzPCamSfix+lmMZawcdG5ADX0Cqr2Zg==","shasum":"bdf007633aaf9eafabf682d7bb984acede0897da","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.2-alpha.13.tgz","fileCount":9,"unpackedSize":19259,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdp/k+CRA9TVsSAnZWagAAXt0QAIFO1yGfl7t6EiflBOxk\n8h/5fsbAKqIIHycUn165oGvEkoCWJSPCJtVR14QV8jfZJ4YlQ+XpiZcHKU3B\nzG8Sl2cIhBI9Fx1fXeLidknjLsya1ICTI1JeZc2ILELvQwz6E63HuO4aAJpo\npA9JEEdm7vQnX54JG+pz9njwMxYdEEh9MdqHhy4J4xqPmv4FHR2caluNVytA\nbAVbRqcRFgvnf/JYfopoxXPgUrdADyz3LvgLGBEGRP0uiB8AEpq1r3zsyV5e\nXOXXpoNPEw4NKHoNfIeuZbE9WjTZeP/sJWCz/NA0IgDMziZYvexWw298Fytv\nG0HYQtKzNqQnZLh1cXUmIsmMVIkSXd9j5nnTppAuNH5mkSskPXG+GWbce0vp\nzV9GHNBU7C3xiJfjxSExNjQ96bXI/nt1YeYcfp195IGpOvZOCZnfVRUNHXwu\nxdCu8sMBNZKMXF3r3jD01jZbg8ZxTeDDcMN9QTNzCe7WViY4q7ShXzrQSWaq\nbEosmbWGF7pVwMkVImqLeeMaAGPnwLe1y8jg5QRJM4FHRFbnUqJWme3Wr7MY\nnYG7Nao5UT6ku463n8/K54+2119Az+Z45T5NFRQs2ADNoxEdeQGzH1mNz8wL\nRPzDRhXRvE4A5PoKgL1koQV3Z5gXx4604ZIOHM5kEGhA8WLF9yanSm8wNgjg\ne7SN\r\n=e1Kr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH10/Vk4e6O7tSxippC6tcuLBgWuUX9tTXYS0eIExjAaAiAs4jH8cc4UxG6uroj31xijmz5YXBRFOus00hIe2KfeQQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.2-alpha.13_1571289405745_0.2766488941718268"},"_hasShrinkwrap":false},"0.3.2-alpha.14":{"name":"@react-ssr/express","version":"0.3.2-alpha.14","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/cheerio":"^0.22.13","@types/express":"^4.17.1","@types/react-html-parser":"^2.0.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","got":"^9.6.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/got":"^9.6.7","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"9c8cc882b52719ffae0345eac4f23737b4495b30","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.2-alpha.14","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-UvrN8V5DTjhlOMKErEcbLm6+mRGeDY135vqDDotaes8Y7V6Egx05Dsxgfqdl8cucW3gt3HJ6lmbj9kORvIbgUw==","shasum":"31dac7298dcef3481e7becd58e02d1612f8b6dd6","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.2-alpha.14.tgz","fileCount":9,"unpackedSize":19278,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdp/nICRA9TVsSAnZWagAAQmUP+wR3lJhHxyESiSthiVqz\n7ZL1sZ/KGYlYKS92+/6l413lGYrR+tPiLeBZzlYA30w/YnrXCUonDuofw6T0\nWZhZTp5nyw6MzKtyPKZXfWpug1VqQhNSG9odW1ZpqkAMpLHWEWWVLprYDgSJ\nFEgp/EPcJucEybrNe1B+oi+iyHPX+i2NUYvTlCMr0c6wZ0eHjqpGVHdrLOUt\nafnYs5NRoz8UAkZAfMjRXY7k+hNezRdIfU3S+Tsl5Hm97/KFRRRpiushRKHX\nhUDohVkSrk3A8ID/GfaUhtSnYa84QUMBfy4CUh2D7KuAK/8AK22pk9KlSoEr\nSNGHGC+t5O1kXucb+HwGEFaZcKs46SWpVv9dskF6r6ZfOuDh+lKtnBpqBza/\n6SYvz1T7k/qkaf0XNpIvqrPBW1yuE0hj3zfujDE6IpeavPDlcCRgh3zkifGU\nEFSnhZZUrXpETrVaw2CwDi4wNOBqGpkDUP3IvjHToZGQgTbn7ga/g+cKTbgP\ndcW8shmL74MfdLtRgPGO8H+oz+9H3uZ6eXgq0HH1KHwtK2pA8C9Wlm02RHCb\n5Mxzo4c/jhm/J4A6Gyhe83VGx31kzCk0ACtMusomt8M0tATV3PtCIqBUunr5\nPlZAd6xCiO8PciQkcgJXCuTmE0SeG3OwubBCXzdR5A9VgOyz8Y4ow5W3Rc90\nwm4n\r\n=wWHC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDIGOdJZEP9LJcZkCArRn6qv86Vuhi2semtSEfrfnAUNgIhAMfb0EZwQgpwY96X4Myan9hWpGWyHIco9gf6ERrmyAtn"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.2-alpha.14_1571289543477_0.13491679653051403"},"_hasShrinkwrap":false},"0.3.2-alpha.15":{"name":"@react-ssr/express","version":"0.3.2-alpha.15","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/cheerio":"^0.22.13","@types/express":"^4.17.1","@types/react-html-parser":"^2.0.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","got":"^9.6.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/got":"^9.6.7","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"a40ef234969ccc69b1e5c68f91baa4c9d2f2151b","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.2-alpha.15","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-CmH6/CqXnzHkphWtLoAiqEEjuMAi7ERWiq0gHuQXymD2D6gxP9OYNBmcmyXd4F/daczLmURj0bNI6r1XVfpX5g==","shasum":"7eb22bfff5921dc70ed6ad5f8b6f2e73ffed78cc","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.2-alpha.15.tgz","fileCount":9,"unpackedSize":19205,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdp/rOCRA9TVsSAnZWagAAqf4P/1QT/LWgQevYQFoasGKv\n3LB+5IdEeD5iqXiRVFpERctzW+E2Z9xDa/CGeFWY8eV7MGJb9veDQIh0o4x0\nrKtrgqXg1wUiKWOB1bh7vmHJF+sv8v6bbLEDd1y7XGdzBAYzQwm4rU3oI0PD\nVfX/MsHyu9+Fa2e5I4kd2WKZ5KR7o44TysvF2oevTaoB1EyCA7M/oOFikdG0\npYiyW4hXg5+MCBjKXx9IV3weHiI6VOi/XKp1iIgjyPzH9/YzAkb7w/fYGbfm\nMViHoLWv6NQt9z/TxqDKavA++TPIx1AXs9xvMpecs0ksJX7EDkxWkGEKdYPu\nrbC+FQjNDnn5VRIkl5auO3Bb8LYJR/PZ2GhlGheLDSsSIKi++yi4m51Spf/s\neo0maGjdfYz4GS2Ge+AscX6UwiU3QdRxUJosQKaBx9namNc33F7YtD7+UiI1\nz8ejMnL3gieKkHCXp7+7YbZ7VtswQkxcG8RgRlhA641MOz9XBM/4Lazj1nhz\nm/W2F1+FSDWkgd1fFsiILAScL8Mccqx0dVMR0eU5FcI14Zzp4/mxiKskkrSF\nXpnZ50/jwSUU30HkQTw5o2ScLTr3w0O74fkNK+IDMGBSejqB9X0CasmGmIMY\ncgGVXdQLAe10Ky/kO1hVbTQrnqgv56tcV35wrsO/DonVlIR+Mt0P+ZIFhDi1\ndDv4\r\n=nal9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCjCPcYM5hwmQi6bmNZJqQJVvZ7MhTSByUILc/m648bxgIgDAkwFG52CRfupoXp0jpVr6u7j8yjdSQCY+hmN09OBJY="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.2-alpha.15_1571289805505_0.8212918142433636"},"_hasShrinkwrap":false},"0.3.2-alpha.17":{"name":"@react-ssr/express","version":"0.3.2-alpha.17","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/cheerio":"^0.22.13","@types/express":"^4.17.1","@types/react-html-parser":"^2.0.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","got":"^9.6.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/got":"^9.6.7","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"a944a080729ff9c4fa2494fa95c2d54a80d9dd1d","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.2-alpha.17","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-SIqGl1Ma33p4+ud3ePscScSU5/FqVZzZqpv+e9ewIOWSkL3sy8L29bqDmYx01V/X32HBTifLrpNqJJpYT9ySBQ==","shasum":"7cf8cd140c14ea0474ff88d7f541d45c3ceee181","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.2-alpha.17.tgz","fileCount":9,"unpackedSize":19202,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdp/wACRA9TVsSAnZWagAAb10P/35unNtPJgjH1eHHSJss\nvMIvHzYa6ISVmpi9ZFoPCZ9Fhhg0sQtpLmJQDgbkvOMRnBLrjWklYCYze3uR\nrAR2Di8UZmANclEzhqSsZhKc21ZPK+6oSXCZRcIRWzH65DZVoxj/Ycs5gpUU\nLwsMjCeNXzubmSEfWQflvFIDxWf8q5oOokRNHqAg4+ASle+E46XfNoByLYZQ\nXuPV4xeSosz52AQz0hALbBpchy+9YyyWA0Wd80GAL/vw+i77YdtsDYZcVUsq\nkSbJE6NB7LrwBmesO30nAA9KAkajphWG2C9MTe4JHeiv7TpRavxbC7WXfT7R\nUeoVtPss/xqEwvwcwsvdMxesrHdbM8XbfYQ6HJvKSFZp1rC24FJLx6L3p4N+\n+r/xtplTBoAUCthpe/yLXYmQjPlsy8ebv+bwPRt8dxEQ0m1jRWL+IHSHBXx9\nv0tpe+MxH3oPZadLFyoHO/WHg2z89uCJ4tJ8S+MBDVODPgRlWaEQsavYYT3n\n0nB6utze1/P6pwIOGcuuWBgc0JKux/yPDfk1OO89fLoXUkY3vGaQE2JsrQEq\nZrJdQLEUJWA6kw5Z3oMpqRZJUNj35DS70yRCPF9Kr8C9oZ9jKDWRnfegQARa\nL9vhDuKT1o+8pwPyvEfywTOl8vG/vMSQBd8HUPDC2VdBSBGeoGgu56dXYHr0\nHrTR\r\n=Kz2C\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFe1m65TjAw1AaYwCvvw8kJC89Au5eNEMLVt8h7uIxAHAiEA4Hblxe510xwkth6hVLeFQoolzAWTKCryB65pDkr8F4g="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.2-alpha.17_1571290111931_0.7382870040085701"},"_hasShrinkwrap":false},"0.3.2-alpha.18":{"name":"@react-ssr/express","version":"0.3.2-alpha.18","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/cheerio":"^0.22.13","@types/express":"^4.17.1","@types/react-html-parser":"^2.0.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","got":"^9.6.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/got":"^9.6.7","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"3bd2de2124b857ae6fa28af89158e5a331c1e1ff","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.2-alpha.18","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-HUTVk26yJrtIwTuDWOpUWXMCyfJ8pugY4z0/WnnlvDz3vOSWejdC8wd3Ev6PDuNblBTe6EzZ+dCsRArVCIBS/Q==","shasum":"dfc1d69ccba1b80c9b42ee042dab303f01b132ca","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.2-alpha.18.tgz","fileCount":9,"unpackedSize":19461,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdp/3FCRA9TVsSAnZWagAAjYUQAKA50c+LSw3xNtsQxiTe\npsQ14Q28Iv6khFpfDj5ApC7nB3nuFGL40inc1K4XAI6p+NQ3RXuZPQA+htfc\nzet3WYDc40K1dbDi2L0joDlQXXPNt3KyE30GjSKBIAbxEFuqpXxqHPa5UN8k\n0uwYr4AaTL7d3DMYOtB7GIqPQMrnCVlO7BvoTYswTP+vXO+thKEkNglNnZR5\n3ajXcpCAIC4nLIlAxfW0aoTdTZQPtbXm2d9SBl3qwbaVq/vIsanG3AznhHrc\ngOWqGswUZn/lMOQX7dCku8HyyDbX+FdrT9kKtCfnAxzhxdBgy2IkvA7WL9zF\nruLXnx6Ga/9VzPx4aGp9Evd8bo8VTJGVjdgRDeNBW7z/Z1xsBNloKIRzhMe7\nLGEwIo8eNXFnYQpCfCsPEtTKjpdbOz6Q9EmXEJ6L4Q9Qiv0cwgG6bgQFXa3O\n39lM1qhkz+NxaNA2GpPi1hbE9uoiz7KGa+DFlN686ugp/Ia7mpPCrMXgXorl\ns0W99OnOZonDJu12OvtycRH2IgvhMuYW0CJ8CqT5+7bnyBGjrmHUTOBgDbbT\nIL/QsECZv+m/4U9VekLm9slQPnm/EoL/Eo7Ktyi8JSY/ExzW4/X4pItndqRX\nMQSK7dPVeZTMYDWvDDbem9l/Vm+PO8H2YKVIOigYS9y8TQ3n9YYMV/tLwh6w\nYs2P\r\n=LkOy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBBuYqtMzU7XwAQqbPUg198WjllpFhBsMsVTziORwllWAiEAs7lCBo3V3SPNX3tSYszfrXTxg2nQ7hQetPY+wy57VAw="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.2-alpha.18_1571290565065_0.5895926578868724"},"_hasShrinkwrap":false},"0.3.2-alpha.19":{"name":"@react-ssr/express","version":"0.3.2-alpha.19","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/cheerio":"^0.22.13","@types/express":"^4.17.1","@types/react-html-parser":"^2.0.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","got":"^9.6.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/got":"^9.6.7","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"475093bb6acdedf515b171aa117680cf0526b298","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.2-alpha.19","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-WDe/+KUSeRvo0JHAj4zruXWzgxa9z04DQ04a4Q+/R2gxB/+OMyz7sjmTq0flpnbpmup7jw/NSHCC46qt+0xclQ==","shasum":"67502621019bcf232825eb41dc8d216c06909789","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.2-alpha.19.tgz","fileCount":9,"unpackedSize":19456,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdp/6sCRA9TVsSAnZWagAA+r4P/RH8lb0F7DY1QcpD3mkJ\nztCAZj8meMnuUy7FVyLIAzfHhytRbvCa2fxEuA6r6uLqcjsakfRxveIKpQMO\n+f82HsVOvAvrssNchIiEUCE8Qy7ntNf3z/s1+vgz5tugusooThAQoTghvQL8\n4UPtR/NGOuFvUrihV6L7TJPAuVs4Jh5eGDNJZTmdhVmvQDm0Ff35l3tsNgtm\nJ4em2n9Duym7Gg6re+XSGTmo8ZitNVV2BkVBotTkXurMiUyOMvfmr3aP307N\ngOx64fqnhVdUs6u0Uv9xggUDr+OnQvXNfkMxDc+R3q49ICWrpMk87qg8naT3\ntoAsjp8szsqSOeKCo8tdPb/ng8AFco4VMXEAHtSNv22zNSbVUkufNG42KkFR\nCrX6rBqbJiM0aX/+W6zDba8n0NzxrEJmjvE7VyooGHgc9KY9ybASJWm94Jhj\nzzSljgTGoQmIA+Aai406LBO7aYOlVi3RnFwbbZVTJQgeZCHzdtcrAwaD5cl5\nDZusJsDI6ybfZyG8lx0adkBeK/ebPN/SfVnU81NK+QXzT0dHmqAmGfxs3R4u\nR0BVKXQYjetVj88QURTH7auWK7eHL2edllVsKJd0Jke4nauXcpWDaw1i6DUV\nx+ppPFaXUWOTnt0jDtEcl3l4l5AaZ0qmrbILSlkRZVbnlnp5XnEVTZ+dHpWK\nZ53h\r\n=OYp9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCKk/gUOFOWlhoCNzVC8kyVKzECIjhXh31pEo/sWDnSpQIhAJ8fssvX9mrGFbeQUYO1GRtIrWBT7CuQsuJK9uGkVumH"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.2-alpha.19_1571290796110_0.9545209253060865"},"_hasShrinkwrap":false},"0.3.2-alpha.20":{"name":"@react-ssr/express","version":"0.3.2-alpha.20","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/cheerio":"^0.22.13","@types/express":"^4.17.1","@types/react-html-parser":"^2.0.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","got":"^9.6.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/got":"^9.6.7","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"b5c4c422f257ab95bc36a82cc185baaff8b3f916","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.2-alpha.20","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-3c9B7JpJULtqixhny/+ZOgkob+mufJuNMo4XwLXpZlJhjhdUuN2d+MMZd4/QhBIu0cCX5yt5lr72WFRsAM4/Ig==","shasum":"ea87c6be593df736177fb7def9cef071e2b0e9ec","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.2-alpha.20.tgz","fileCount":9,"unpackedSize":19478,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqAAsCRA9TVsSAnZWagAA1P8QAIFufF9VZDTEMiu6Znas\nXBT3XcmpEpLu7wd6bmDy69zTvIsHy6Vn2abnM130xT7Lynwvo4JUZpkCCS28\nSWAB42pDqSd2e/GbFt9JWW4Gb6vhWL4dhioBQQQM9VNI6LUmfeYYnaEwlIgg\nJ1AVi2eTJtBT7XN8Cq1+/g+MtOjTvb2vB47nHWXStm46aX+khMVJ57Vz/M/I\nS4gY0Juo7dJhZkDWUSGNWgYvggtIEB56glrfqLuF1dVqAcWhJ9eHWK6HcyfF\ni7xjt/zVfpz2Y2+7LS2rKwHVZ13CNBvLbdzMBecstwPDrwZc/QHVkweFLzNm\n2kAbziNNRL7vcsFIOyc9DZho5+ylzDVtWX2Hf+ERyNziwUTf2euXjpzQ1Zs+\n66FQDrJyk9uWabrljopTPyS778wyI11rfYRilRwTUqtPzTvM1QueYOPWuafC\nq5ISHVihzekOzkZpgMOXKdd1/os9bEshJmdFOV3k07giKLVYUoud0m/ow6G1\nm45QttgtGFZI/tfDAArFkHHOlaKkoR79y8vnjmVZrjHllh7oWs94S2lScBft\nCUxR0g/szfnRviqs1OLpdJHon/+rX+yLBAXnjV27JQH94VHlF2dB4qrY74Xs\nd8b3YFJylzO7wVCQcNLlP2Rjq9/A/v58WwrU1Ra8ZZikMrrL520FVa2R+8YQ\nrSuJ\r\n=kNu8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCcIptQk/diAKOpJG3nSkAghRJAHeZK/wl8OulH/pqtWwIgKJL15YvNUgwiNvfzJ1ryVQQASGcKy1FTi6cvZA1leCc="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.2-alpha.20_1571291179779_0.10724712119580704"},"_hasShrinkwrap":false},"0.3.2-alpha.24":{"name":"@react-ssr/express","version":"0.3.2-alpha.24","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/cheerio":"^0.22.13","@types/express":"^4.17.1","@types/react-html-parser":"^2.0.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","got":"^9.6.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/got":"^9.6.7","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"f56734c7bf6486cfcaaab236de108d25278cfb3a","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.2-alpha.24","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Dd1K+62fbF7EdvInTz/0kH7aU+Z/Xum+sAHA4qM9NOMquqLgNe+7A8J4E61tHqvhnnLLARTuxTQL5GO2vacM/w==","shasum":"8c268560d38a40f294fff020124f209b0e0bcc13","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.2-alpha.24.tgz","fileCount":9,"unpackedSize":19861,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqAjSCRA9TVsSAnZWagAA/jcP+wQKIFxu92SlICkXBv3Z\nxxe1kfPLw4m/MkFPAe7u4qpeiTr69GvYN1Dv3JiV5qPoq22CHnaC3IcYw+GH\n69gzP9rI1rz6ha6t71q+qYGwXq+bmdwrF6EKj7v2JNm06s9rY53aeFwSfRtj\n65v5QEnwpwKprD6JUdG5fRXo5oWZutYm/Nem4PNiFTJwODR8zwnWoARNd97u\nsV/xyEiHKmeGBvMoAkeOWgC+DvS13j5nJMJ0B5bab0e6NUVvhZArRf+Fw7Xh\n3/qlybbO/vaamAGndwPqg205bvRU9tWYYzfjAOK6id5bWazuW6Blfb8cj9Pn\nM/AmoaHmcoJJZ5eztD4ryS/+j5gSP1MBGW9VCAwvsbcqoR0hvIow2LI8bHJM\nrisH+9+2WbEGyA/UgfomgKvSUe/KOfGcS6lyHoEBwFyI1i4iZ3/6NN+AsM7U\nhepwyB8VK6joRpfETt47+ap8XdFbOtxuv58V0RvD2sabLWsLdfkvYoZGDYJ1\nrDRNevCUc8Dd4+3VPhQjO9Sh85hF61riWkp0ffJtazojCFOPZyXoPHyDButW\n/ammP057+Eq2u+oa+iSHqH6fSH6pZn5kg972jupnvNiWcj80JukkZ9D9ejM1\nd5Q5catn5MqhZQkL3qn0fjeLmKrR75F3sMdAzVrdS4Zs5IuQCTY0+az1nS31\nCgRh\r\n=kJJU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDsXnEYsZHpc19QYqyFs7m2NJOhCZbeywNilRZsV9uTRQIhAKtkfBBokRW32ejHsD8uwu24c8nVJnU3xGOTIrMdrZ5W"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.2-alpha.24_1571293394229_0.05243277534238744"},"_hasShrinkwrap":false},"0.3.2-alpha.25":{"name":"@react-ssr/express","version":"0.3.2-alpha.25","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/cheerio":"^0.22.13","@types/express":"^4.17.1","@types/react-html-parser":"^2.0.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","got":"^9.6.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/got":"^9.6.7","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"862e1b9b17e2ceeeabb8f20674550d5ebbe7fa08","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.2-alpha.25","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-HbFnA7NW1CfMFyoVWTNwIkqyySSZhYX8WB8axnWO1cHSSlPLz02F3JJ3f5nYOytBTzzTCmE/GwPT9WrcWRA1YA==","shasum":"e4ee4e7a65eb1754c7076251585ce001d8466084","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.2-alpha.25.tgz","fileCount":9,"unpackedSize":19966,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqAnDCRA9TVsSAnZWagAAh4sP/2CDQfesYajXXFXqXcWE\ntHuzu3nAoKS3ISvePD3moJ8vK2pl3KWl+Vi5sBRRQjptpfUDQuKTeuC6zWmx\nUAgcUlpQToxyCo0E3NKP/gluYwezaCkLa1NViYGrrZZgxaZNvFEmg3/wx6HS\nEva2P1GkCZRFSzeonC9po/fnzm5+AhwbV09IMn/PzGD/bJTx7ZQbW0gOCgzP\nLGWWmoQA1sIYHNTIJd9T9YJz10Jqvr9E2Rj1e/sDZdmr/nxHqVOtAv8ItlDK\nUVvy6I5voHMdBpx8f97vrJWN2p6QoHb//w0HooR12ORB4hsOfTzr0nFSdJ2e\nFLP/t0bgOUIxYPkjR5JWXDxQ/SGi3xq3gbspKmgFPiE7DazeGba50lNNcgqN\nd8cu1JFirk1SIkhphvSswDfOuAgNc4PBjfUibtHITpM7y4ysJK77NhZYAeV3\nD4d3tJzdbfH9SC40jumj1GB8QMN4n23saO+fAjPCm+66qQDVp4mQSgpySxDe\nD951oXpOrgjWUX52UaOEgbYIgHPqtkIwxqNTn9ZhuhM2Ki1dE+bhzIxEQYbn\nn7oBriN0rbx4bq8KczCA4MLBDcRe90KhUr2yWkMvulTDeXdBDiTfXEf7x/6f\nk9lWd7NSVIZ6W/vabEMXftwjVFaUaYG6MmsX3QaJvdffRL0mDHVCzEJhujSC\nZ36t\r\n=2Vc8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDPMfvm1t6V3Sw948DsKgDjJm18XAP91Shbi2TjzCud6AIgGnDsKFt/4G0P4mWF93gBMy07N/4WqfasMKtStkBrZdk="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.2-alpha.25_1571293635177_0.8989015401175162"},"_hasShrinkwrap":false},"0.3.2-alpha.26":{"name":"@react-ssr/express","version":"0.3.2-alpha.26","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/cheerio":"^0.22.13","@types/express":"^4.17.1","@types/react-html-parser":"^2.0.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","got":"^9.6.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/got":"^9.6.7","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"d90cb3005a08c08dafcd800572466d4c1b866cb2","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.2-alpha.26","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-r47olRFVfQ9zHHhaLZLopYbYeVAp9t3HaylsIZgM8zHnfGjRueFxPc86EIUuNzEA0pG8fIC7LV97wqPBWBiNtA==","shasum":"55adeab4d63b90ae3f40de0bf9df9eb8245d3865","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.2-alpha.26.tgz","fileCount":9,"unpackedSize":19958,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqApoCRA9TVsSAnZWagAAy8UP+gMjiTrwSLGfVhiNx2eb\nqQf6k7BSf6WvRAdnX8m/JWukAKDhwltWSLRlYiM5ndRat4r22XxlrW/G4q8q\nb3Nzl8hTJOgtqgNdlKythUmkPrMmNFwfPpPcXdaOq/aoyG1DyNKnHDuFcGrp\nhm8jbS4dtO7tpYfG5Rbe9PlQL3qrNs/EBHGZyesSwL4owkjR9te+kHpFh8ep\nNsiNCR6anH1wIYQavB9+Aa6d17RYg4IG+L8ZedXD61MDItncPJfsnPsxd1RG\nfsFYu01UDa/DhyUkSccQ+yfJ8EHygPsoC5/ktYeBwHPCLmBgff/CQjroXm4f\nmsHClbO5025pKo18QhEn2SVCq68fMdgYE5GhT672H8Y0wFa1Cac1prlK/7xA\n/aQxbQNMRVu3wf5YLZMEkNsq2ziFZUL0NLcw4+sLVOP8rISicxufmPR6Z4mk\n5Pu/vWQuXBh64Jl71OPK0EQGkCIEONcZGrZHEC6VVxZPOlIxKQ7r1EgjPNTa\nNz4Jz0ncc8ItoeURXRTE8p4Nrrsh8fMbPUrKzZnCJ0f8NVj+nJIWcjgY6eUS\nZCaAaPu6HOKvz98cC24tgBMk5XkMpz7aB9fxNra3Zi7BN4MB2Oiw/WvPSN4M\nMRBO7alq3rnoHTuSIDboBIj8UQFFYtglBp2AVR/vIUSs9Lk0yIqjuuHHIPKS\nbRSp\r\n=CzvR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD9mnNIV1Sr4l3HR30daWJ4HKgK5GetE9D/G8N+NMlmtAIhALnCUL+3E7S4W73bB8590NaxmX9Xtq/oVBt3Cgu/bedO"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.2-alpha.26_1571293799930_0.04984230506088427"},"_hasShrinkwrap":false},"0.3.2-alpha.27":{"name":"@react-ssr/express","version":"0.3.2-alpha.27","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/cheerio":"^0.22.13","@types/express":"^4.17.1","@types/react-html-parser":"^2.0.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","got":"^9.6.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/got":"^9.6.7","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"ca159d1b535132c470409d2fe6ecffae544e5062","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.2-alpha.27","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-yOLzNILwwErU71dWMrsHD8gdSg8zNcsSqJhQ11Y+u0SFLHN9xhZIMYZ8Zl3Yk7SUedskd0PQc4Dyx0oPtQ+y5w==","shasum":"26fdbc8cca2cf2665e513080cd4c4e2c004d4883","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.2-alpha.27.tgz","fileCount":9,"unpackedSize":20119,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqA0SCRA9TVsSAnZWagAAFDcP/Rc7ArA+23rnmSrQwnAK\nl2U+5R/LwnXCtRLEvAt2RJJvQjda/hd6uhpr5UNOUIJGW/uv0ndwaf54V1iO\nUQFOlpLHoeQz2aZ1PTL2dAHz5KYdQtAvL7qSzMcrnmTodPYaBXhjAnOrIBU5\nX+F7wxANWYT06ioj2D7wrdmLjHSJIjtT0RNo9pfu6MPq7GevriRY8t32y2Ki\nvhoVT1ZfFHx7wyxMfSbynJ3ZwrfEnDvneWlg5rH6URAjX9F7l55zj23sII82\numshX+scMR/AHj7kXNTpY4/KVTl8JitkbYm4OrfsI4BkE1nEeOJ2Is+6mC2T\nwEx9BrMpObY05zgdJ6PN70ZJvY8tbsfT4U5wovLyiNXbIPNCTaZ1fNTaONWC\nCu0sPEC+PYaTQwhSxLHIVwhQjh5W2CwngQJZmCKDr24Bjf1JK5GctK/4meu1\n5RQ6O4g83Pi4UifIHUGaKPWRK2kVYK0UZ46ymOgCyznX6SQf7oE8SEubEl9o\nYimiA7kUOlCZJKfk4ZbItze3LmAkqPmkagsxeePcdNUIEJuLl8w63Yvrp1Oq\n3SC5Erj1OYu3NDYATQ3i0csMZkimLpz7B/WNQf/7tGIKnvIzX+FH+jiOZ2ou\nzqKw3lnYLRuoEFI5HNn+Mf17RXB4lKJ4lyevFkzPVxiHSCqW9YAWCtE/7jon\npXsy\r\n=yAbm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDoHTR5mzSiO9u4soX6O2unTJ6vLop3bEQjd6UgLNtxLAIhAMPQohSnWH7v9mRcEz4fz4qsu7/dWA5F4TCW4Cl2HmzH"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.2-alpha.27_1571294481388_0.16017327337931597"},"_hasShrinkwrap":false},"0.3.2-alpha.28":{"name":"@react-ssr/express","version":"0.3.2-alpha.28","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/cheerio":"^0.22.13","@types/express":"^4.17.1","@types/react-html-parser":"^2.0.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","got":"^9.6.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/got":"^9.6.7","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"c220e731ba7a972efcb04efd78c56d368b3f89e9","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.2-alpha.28","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-ll3DbT8dOtKAo9mXoCDTJA34GBmfoXbuZg5CgJXgrbZ7d12ZxLjB97vLjgYfu5X3B6Qh1y3p0oTqj+txhCdv3A==","shasum":"fa8a58006a0f52eac7a745005fe3aa693af6ba31","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.2-alpha.28.tgz","fileCount":9,"unpackedSize":20211,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqA6iCRA9TVsSAnZWagAAfkgP/jYgaskeWOE5StWl+vOA\ndM+jUAPxB3jIKRUVnW8F/sY793W52xrr72nHgUF7cpo+OSEjbDGdJH1HB8H3\n4woBcn53se0hicMXbCPSekHa1hVSuOOvmHRGNqPnnZ2wHinT/vQc5ebSaFza\nXGYX+XcmoUsebh0nZEB8vTLKlsR5VqFNvPMOcUoPno7QYuB+axqixzkG+EP+\nsGKkqN+waY+YwjZJyWWXexYOliG/M+JjRR/GPSKRMehSV4RwTqoCpp2yH1dZ\nrByaWZcSP28DfaepxLRkzL0tUUkh0JCYlpaIEIdDB/In+ILt0jEblDtfY74P\ncVZNPEGcPyxi4eCC/AZxd3tTvlJ4qulhcVRBp2Ad2q+JN0pNoHyY5TKz46/r\ny6oBBrDmPrmteovInJxjjHLTnia9mNUx6vSn/4ngAn2LXOuNuByKgkcVinw9\nFGTyHNUxV5HHuHH6TUdZawbFu8DAMpDblz5u5PTYpfRGn1FSiUAexQOEbsWx\nmkrpMN4uZet8jz0CHQ+4uEuVhg9lxZeXMRQCS5KBEWL3l+TPOV6I6EqCYldG\nk6Fzomxs++I05HAqdz6BwHjEBSGPDgwjDkDJlyDzXHrWn/VwS780AJzCj/hS\nAr+Fe1EtHxIPOnNrPd4E+9t26t/2U/Rnp8bgE5EbPTz83e0LygwG3bNq9L53\nItAu\r\n=aFMV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCY15BEALW5r72VaL+yk4GmQa3h4ge5LpmuDs50yMT/SwIhALDnyKxqljgOyg5JC0xwIohCsfPe5cFId4IrmYzlleFz"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.2-alpha.28_1571294882362_0.6752031504020133"},"_hasShrinkwrap":false},"0.3.2-alpha.29":{"name":"@react-ssr/express","version":"0.3.2-alpha.29","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/cheerio":"^0.22.13","@types/express":"^4.17.1","@types/react-html-parser":"^2.0.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","got":"^9.6.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/got":"^9.6.7","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"8c5dd02623bfbe0051bd7c50be68811b7c1de247","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.2-alpha.29","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-01Do5IhiALmEOigeBOV59OO+mMkKfQG/HUg3r0veYtNh+B/iQmgP8IhOPzCXMZgLZBKmrZTPlph3Cpy/6b2A5g==","shasum":"b4acfea5c336af6b04bb6312dd712e15dc0ddff7","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.2-alpha.29.tgz","fileCount":9,"unpackedSize":20027,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqBINCRA9TVsSAnZWagAA7m8P/2Y/mw4gspSNP6lBePYU\nfpkxVRL0RY3vEFR9febMHDGJ9K/GHEcfDI+flzS9FWYtHaUjtDuEvDsReylV\nvKsQTiyh4pGbiwRrR5oucknGLIuTfKZovD2dZtnh42h14DX6VQCHDktWdnhH\nsbkuvbovpe4Ktd5ZUOojUCcJejd/7ZnzsCNNqnbYYRCvTAz1ffSlLceKWyqz\nW6dZVc9+/90HZUMrdebkKFMi+00EyQ3pop9bcCrrHLAnQ+AgJXO3Q6ibgq4m\nTgXyKnWLHH03euIxLndAgjQuN8fgcggKOAB/oZbEbpdOitR8f3CMFTKsH/A0\nWASx1fq/jZtAD1EsUFd821iL6CbG1lDYJT4g0E1gK5G4SMYf0LAroGSbHFLF\n4v82hkCr+0YyG7fvi1HgYOj5LlFVC7PLjAbMQHQEBinH29k5+VVwU/kMz5b+\nhV5Q2bB4nKWAh/4V8/XwamrnX3otFbCuVQr9ywZzu91o3HTf12NbONedAm4F\nQasJn3M2dLo6M4dG228mNMw2qRDi03jhuk2Ue7laJjnqUXKJhz91XAvsjEla\nv/hPgaZkkfFQBLQU8pPb7nt0QOSqlV/1vlu3iY/cuz2v2jjvAEX7qOXIb88h\nswH9C2MCkRqjsK00Tt43YE9Q45vAoSzF910k8e15AgOq5ObUnE91Q8VNuH/e\nzdg6\r\n=0UnP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDMT2yaoBU5TVFpKCAzGM2Ftk4E4IXWIrGpFUW/zzU7zAIhANRdC0V9jFkeLtBXLUuBPzvxpyzK5gQo2oBewb/wflAw"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.2-alpha.29_1571295756709_0.6160545206858328"},"_hasShrinkwrap":false},"0.3.2-alpha.30":{"name":"@react-ssr/express","version":"0.3.2-alpha.30","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/cheerio":"^0.22.13","@types/express":"^4.17.1","@types/react-html-parser":"^2.0.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","got":"^9.6.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/got":"^9.6.7","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"212392837d8e77218ae33b6ffaaffb6847f13d7f","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.2-alpha.30","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-0hu0HrAAFW1u1ZiqaSJEKGp44yZz4q7tS3bLigrxdqcZE805KgTOg8mnZZtWROHCs6YuQAqpbSwLWZSpLlwrcQ==","shasum":"2c4041204a88b6c9753fc709eefeab8fb579b0e1","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.2-alpha.30.tgz","fileCount":9,"unpackedSize":19934,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqBN8CRA9TVsSAnZWagAAU4cP/3dCM+or3zlLxX7F1P5k\ntN7lGjyWej70MS3PW1uFGnkHkU31qMxxu/l8ubi5UpzHQx27fjKDmF/64PLJ\nInC1wwb5r1MY7cIellqDnsKbGWNy5CfOeNsH5QvuR5/oRrf6MciUS2SMtRHc\nkrB06Hn0dARp5z/3r8SwXnFe/jz9HjLSQCb6iFjOn/IHxUloNjRnOdVRHUyA\n4thjEUzP5AcXvVaqqz6/6uaHzKYvQ8czwbfzJCst7GtxI0IiuFY4vkQsrcHI\ncwLASZ/s8nGh4gKIF643+oxr3pJRP4i7Q27r60mceBNWxIQsb5YFyn2udu1F\nWrdK3wQAW5/RmRcwoNUts0cXs9mUCunZ0mUIbSOj6FSD06mGBFMYfOPF44MT\n4fmDGBEzO1XogdFEiAVdtEwADtdI2HWs+HeoYFDVEpmHaFFkYf0V9AN5RaCO\n9xS0tS8ZimLYeMeFAP1wFJ3Lpa4k0pQd+OT4bRoyZ5FRfeaeLapYk+Ky3lHN\nZTIlKdqzgx9Z1HnsP8JR1VdmuG8tM8kqPUH0fWdTCAEV64EKsA9g8CtZcEfd\nDXgykrP4WlgvPO6IrnGsnDS3Q6jehWUXhnQ+gqP6zfk9r4ymhhQV9wRVjGYS\nxD26Mvj649xrRAxxPS0yU1Erhb2FOZe3FJwLsHjpSocDcdFN+rey3hhh+SJ1\nhfmR\r\n=qwtn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCn8m8cNYTxAaK88eBTHpGga1xgiyfPQPF/2MAoN9hg8wIgTZAfdmPKqU/lO7MbN/xmlrALJ+gKE/sanXFjYl9s0C8="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.2-alpha.30_1571296123960_0.8978731453457107"},"_hasShrinkwrap":false},"0.3.2-alpha.32":{"name":"@react-ssr/express","version":"0.3.2-alpha.32","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/cheerio":"^0.22.13","@types/express":"^4.17.1","@types/react-html-parser":"^2.0.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","got":"^9.6.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/got":"^9.6.7","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"a2aba901d372e0e13140cbe8c86dce3e880e5f9a","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.2-alpha.32","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-gdCnU6e9LzYjKV3pnrGtQuRBtsfSLQ0583NL/I0P9exxzRm7XzCgLJ8hca/T2U/7EuacMn1nYkXGXIh2/ehNGQ==","shasum":"ba6376b183d6eb754e7662d2cd452c6b010e0021","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.2-alpha.32.tgz","fileCount":10,"unpackedSize":19027,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqCMKCRA9TVsSAnZWagAAIgoP/1m+dEE2QqLOqzCgY60O\npAZP0/37nyPoGrJCm3MQLsGT6BNQevUnJWp8WB3IJl1wpDjc7ngY0G7oO4ne\nZd/2J4wCDNNmounS6t7Q+QKOJF3VCKxMUF3LQW2HwJ3GLZ0c57Wg0V3fmuYC\ngyqeGg2hc/BTnxmwKXbr96T5jX2xDng+CDEqUEMc6083jyGMkOexRmJ3AaIL\nqn86+4Ug8+ZMRebm+lKiWce7asxSxzkpjnTyAZmr+KHYnfCSW/Fw3/fhcvn8\nsFPP3+QHOXgEx/hGHH1t9hEbiatg8L1cS31mPWHW3j0KzDeL0QxITdsw1wun\nrxc+kPX6kwzpX/iK4v9YKkpRcTnRS6y6gdnc3GoCmIm3NGn0s9ru3NxH7kXq\nUnOl8Oqzg9cRzckwTchGqllNXdMsiNv72Y9TRR5g7X/RiI6LY9tLxxcJE6Lg\noN6gjSDvqN9+iFZd15mhUql9zkq9rA7xgXF4NkWgeHjH7OK8bcVXNR62EYmA\nTSJyqo9rx0jvciiL6RBCOCjYjMoXDhIarCq14GU1T0RYTWwPleoSoCfQtFwB\n3RT0QvJIzu3l4fsROkfvCgG3/ePTAgeJGa1dGA1PlMFSsIMHwIlzQceehX1u\n6sY4xTZ9yzy9AUcmBT6ouqS4x/a+voFcROwYKAiU4hqtwbY2l8cq2SNNjGoo\n4sE2\r\n=Lmby\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDJ4DzeHxF0M4/olRdrpTeSda4XJn1+mpqVO+2jPI+LYQIgDYpqYE1aC1+Y5tMmSooKxlusnBTPQyU7Yj0z/l60g/k="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.2-alpha.32_1571300106169_0.7983424681784881"},"_hasShrinkwrap":false},"0.3.2-alpha.34":{"name":"@react-ssr/express","version":"0.3.2-alpha.34","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/cheerio":"^0.22.13","@types/express":"^4.17.1","@types/react-html-parser":"^2.0.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","got":"^9.6.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/got":"^9.6.7","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"2bd2237f53e8f6a23f8c458aaaa1d10a139b9891","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.2-alpha.34","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-iN6akb1fZEv/gFgFvYJVmda1XnBsHrE3FZXZ189DGncxXnSj55/DPUb2muhHs6Mr59C5MmhxdS+beG5OxqsiXw==","shasum":"cdefe212cbcf029eb43bc2e368030a2590431299","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.2-alpha.34.tgz","fileCount":10,"unpackedSize":19027,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqCVZCRA9TVsSAnZWagAAgwMQAJ+93gNodK2kEvtpskTP\noxr4xGzmM9n8bzSgkY5NwltOOOuHKrTtGXZHghqD6Vv1U18dUK+oBNH1n67z\nDeNra3qvd9Ya5Tu+dAtTfsVQqo8wT/PVm1LPNm/2C9x3bW2XNVjfM7MdIB9V\noph2bmyOIZFDkYb5JTf4rYSDDHvQvPJVzkhhU8UnL6GnWwt3Y6du6hO7izs6\n7YMjET7BSbLcx/B28v4sjxmWMVFsJOTEV05ybCES5Fq+Cq/49EVthcXR8KoU\ntUv4qlu9uASFvTJFaR7c9Wc3xj7fg3xhJokgl13+E+J9nJ2jI35PIA5oSmG7\n3YGJBzkxjxH89UyCdjTHhJ7rRs7U1RY7PqK4FOvJbdp1zLz08pyhcTY3RNbr\nyGmtS+/rHwJ5hBarK+0KhFpfD10T6G/hgriayS8y2iJGXI5tLLqI06KaA0gW\ndPGHpgb7Z0le9WkR//Z84MCGjS05ZPx9dK59pao8OyA3Jr2bOn4fm7u9qPLY\nDBFvGaVP3oZcx1s2+Th6tscP6f+VoeWQtHaK/iLvv5QJDkMp7NuGFLGMM9zg\npPwtG1L5OiAoC6QhGyEzHy05DbDeIN5fPoYis8I4fVbIZ3eWsg3JcEhl+5Kf\nHKr1BHqSZ2omrTiPZZhqwsXK4AXr+7fhJSMWap/YmV53uFVXutk6eQp2dAz3\nnozW\r\n=Sl9Q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHEkbWngVmn6nXpSaAihITqszjHfaO6YKe8y6ixtswDwAiAbRchMaOK/4O6tJrA3VdK3ZCUpVU6aKKYL4Zp36yUkSA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.2-alpha.34_1571300697130_0.1488187367586853"},"_hasShrinkwrap":false},"0.3.2-alpha.35":{"name":"@react-ssr/express","version":"0.3.2-alpha.35","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/cheerio":"^0.22.13","@types/express":"^4.17.1","@types/react-html-parser":"^2.0.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","got":"^9.6.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/got":"^9.6.7","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"8853356bb09a8104e6d3f271ad505fc9d4ccfd5d","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.2-alpha.35","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-1tRtp3jY+7EARGPk7h2W3P4PiKphlb/iCmB92gzn7+jl4D7iKNFD3krOVeVUHaqztr8hYroFmM59kQ5CKwPIzQ==","shasum":"82dd27f50dd412d101efb735c766a173707ce323","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.2-alpha.35.tgz","fileCount":11,"unpackedSize":19204,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqCf9CRA9TVsSAnZWagAA1+gP/iXBuEFD80ihlaoaF3XQ\nb8qabWR9tRqz7LUrRnbMxhCu0UUDjiMMt4CfDvnACRpb948NgFF3GYm/45Yw\nXIijKbNSzvXITX510pWGTAm8UDoy2RcG0bh+B0TLlKZ2Rmx53G3UdJjhl7AN\n9Wim7U8KxeOjKEZN4uKmWzvOq71lggt9F7e2XP7r6mc9y6MCmjK9UHUp2Ivg\n6Z5df8mc5WQwOVEQsZEzv0AoVpzHuabBai11E5qu674QtYrtQmESbXOaerkI\nNlyTI2Mr/3zNB3I+Raib0WK75Al9OZOpCkFCUo6IuOFZoOySLsjIosWhWDJ9\n/pMeOVEfsUCfH4qTQzZnq84GZIBydXG+4gul9CvUkwhn3Gz5ZQn9wF7oyaSX\ndUf1oOItWze7GAkhANgfhbB9/aG3cVjxmJtZ39EIMlFLyT2oX5C3stEvUm7E\n6+OOoQuMs2Kwo4wqg2aivYA+MTXF/J4I7N0U2I7lvqzYbU5AsnQ/uuH7VwDa\nWTLZ2tWBL5GBOG6paOOkurU7FNqezsvlRq3cvWf6PnUuee6GxUbKKfbg+Hoa\n33gGw6OveU3yQJpnTVu9LF3B7KvgWcbvt/tQdLJlNYkXtux1NONorqtdeCxk\nVp5oretGrNvGsLG5cCQVCUEuE4OcPrUdqGCww7IGlmDiZunh5fiOtbJ2odlc\nDXAE\r\n=3xsE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH7qmgamBKddnFIE6MKA+Anhv9xHLdbV4/hDMc/lylahAiBf6gX268q1M5KePt6LIq2A19kH/Q/1skPAeeBcBRZbLw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.2-alpha.35_1571301373109_0.959781738801383"},"_hasShrinkwrap":false},"0.3.2-alpha.36":{"name":"@react-ssr/express","version":"0.3.2-alpha.36","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/cheerio":"^0.22.13","@types/express":"^4.17.1","@types/react-html-parser":"^2.0.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","got":"^9.6.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/got":"^9.6.7","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"b7487b752c05f209f454801574e994e468b18534","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.2-alpha.36","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-39MHFexU8JNQNUZfxtvgO7bW9zghOvy0bdX8Yv9bcHYvQwUwi6lEtYzzmpPzWpAZj/qDGziFVPuhbE9MI6QJZg==","shasum":"936e5064c1fa46977636f9f332380ef3004f6f8e","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.2-alpha.36.tgz","fileCount":11,"unpackedSize":19152,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqClnCRA9TVsSAnZWagAAlYgP/0R2fszQAeYNH0gHsyi3\nSF4lUpaaythDWi49hW39Qd5IM33Jrr7tYDicNi7kxxyQp+Z5PwauDcxSYJof\ner/WVps8XoKs8Lrc0xPA/iJO2tzORcFe5t4DAV93fim0yxKuKhF2Spv1dTpZ\nhFE3LJC9CglybQD8nD1zv5TVTHAtjhBeesOvXWVVhSuiqxWcai91d9/oQOD2\nI5kjBQEzO9CwMS/Zby2IQYrlRVclsvN0cjBFgn9wMA280TnZZ0CJNmCJ4Rv6\nGEql5vHOV6yCCsqoHputf5uJuBk2BThEznNwufgIV60BPFFpAHAO8UKZ1WXE\nTdwjSkluJ1tx2A/Pd3lKCNZgbg0vjx11vL13qEU71FHpH0BdjUEeMZDiT7YS\nxqPzEm7zINyu+PBGzuK7CoOeVwjVYrHHmy5gnD0vreKbDRffRhhYesdWhxm9\ntOhmQ2Br9cd3juTrtjpmzqu0si/AP2OrSD+3bVy14B3Tz/8KBR1kdPA3064h\nPBONspAR5li/Y77qNRPo62hdzZV8f2d1u1aj7C16M03lYAPTjEK7bDFYSg+b\nm8i4x9LV42YKXJn2HZ4gpPYqpe/hZXOo6eTP/Bh/tG172EXruranLN6xDBB9\nWRGAypqNhMAvJO2z3sTwNm4qnGalAggIsSolNpdDB4TAwXIBRtm1XEjuQLk0\n2zhS\r\n=Qayx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFZCtNbginwzdW7tpY/hLiznwUEGonY0Ty05oq8o6qEmAiBwiXV1zeCNdyshiQAjaPtYQHVlnO4bkn1C0zv9F2IZbQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.2-alpha.36_1571301735116_0.2665808630738382"},"_hasShrinkwrap":false},"0.3.2-alpha.37":{"name":"@react-ssr/express","version":"0.3.2-alpha.37","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/cheerio":"^0.22.13","@types/express":"^4.17.1","@types/react-html-parser":"^2.0.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","got":"^9.6.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/got":"^9.6.7","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"7e27e515f3d0b30d9157f57e39f300b246950abf","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.2-alpha.37","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-7tK5js5lHj6oLWMMyozdMlUew4WaxacMSLDA28ZKb4MOdkkOLMVmf5UgxXvvleqGM5GhnaEipi6GiSl0DCo1HA==","shasum":"c6ca5210319c973e2b19164b5adb6ac8e7980999","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.2-alpha.37.tgz","fileCount":11,"unpackedSize":19007,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqCr7CRA9TVsSAnZWagAA430P/in6gXjvkTMNR++AKO67\nqnXiyjsdHMQ2u6VxRVk7VUCvrrGEH6WiIQGCcY0/yWHu/4bEKyPw3k8vPz0h\nYsbDQivDnGk5zfZXvd59uSelaF4fcsv/mRmr169VaCIJXVcIhz6IifqIZxCf\nAnW+fxSoWi+5RWtRPCgTETi6idFEUNzM6eDDuaw426KKRQSAFGFaKDOL9+AT\nby4eRVF18ylOSu3SDW5MWs63jeJR/Aqop9HRNmyudPt+LACDscHKpU+gS4zW\na+UG3hlMbAHZ0exnHKGdcVlMJTRgk0dOSKp1+1kxXY2TLcH2nOFN7xUQDh7K\necvTBX7dPCvtqlrJObwbkPOAC7zLQL24gcHRRa6jpPMcXpdBV0N3D1yfj1cH\nRzlfCci13kNjyo8XPQm/9yqUShfug4h2A/RJJr8A2Npwlc8pQmQzoaN1H7Sg\n6J1jA5R3hEnWE4aPMISav9fnsHgXnjNdi+Dvus7y9kSjx/JV3BOcAK+FfYHe\nb3sXlX9Pj6ijZ086ukP/PdTV60l3+xz8CjVdV4nMjYYnGDrqGAnrTmDwaoJ5\nxdTtsewH57Ylrs85IDN0Qml5kRt1+2/R31iOLe2zF1MF+J2pcuruPGEfofs1\n/o9BTzPigWZ+Po8jQWZX7D7rJZ9/dodPRZslczmn1UMpwaKgTug9jWRrleJ+\n276j\r\n=vGhM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEa7osft9LYtwS3b/WG4WXlc+eS7fz5INrzgd6m51gr7AiA4KHDfGPXfkOMUVBEeIRL1b1otiYct4LbZE8cYrK/mCQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.2-alpha.37_1571302138610_0.44511498085847356"},"_hasShrinkwrap":false},"0.3.2-alpha.38":{"name":"@react-ssr/express","version":"0.3.2-alpha.38","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/cheerio":"^0.22.13","@types/express":"^4.17.1","@types/react-html-parser":"^2.0.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","got":"^9.6.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/got":"^9.6.7","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"da74c65990515de67d2fffa379e31aa32f69a20c","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.2-alpha.38","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-hBrsimYflvmSQ6HtfVoM6QZL0lCWEjDiMY6/eSX8HojcBTHHHsTkg13UXlLOoXiDgEjdH0Nj9JWNAbk7gOpWHw==","shasum":"29d61472c595188c5fda30dbda56b15678a37b59","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.2-alpha.38.tgz","fileCount":11,"unpackedSize":18991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqCu/CRA9TVsSAnZWagAAW3EP/1zYAaZ5IN5otXUccogE\n1HpGAxZthgmXqv4RCC09LVsS/dWdOG+UW8lbZBef7bQmlBER8sNofy8x62Q8\n7NJBGuNYwHJXyCC9z46x4+BLhgfD5XDIS9AOcTaOwnBn9mhT/Qi6N2WAO8Ij\n0CsWMvHrR2BsZcfVef2yo7IeyZ0vFXBJZmSnj0RtMJWp0lM2dOeW8LJ1kkBn\nEgmyyErOBx6gblRKVm9UvcO9y+wF2p2UBhauVHgPuA0PwLYdwXlQzvXOWrac\nbl1h9HBG7OUz+b0Bfyj2shOS2TpT63Iz1j+7QXkXo2vAJoyKybRdxEm1xAxz\nqrFRq+mjebpOj9qLNx1bR4FH+jcCjR/GoMPtMkRz2MgQC0TvRbozQuVpno0t\n9ccKMsAZmLNnok4cE+qOeDP2gEDdAN6gJFIMKM1FeCIfugHdY1eK0Kn7ceHn\nh3bH4QTASmFht/7t9qyPWx57Ni7KJUBzQ51ZmdjZzQZBQR+tNFJL/cjoZdJs\na+J3xA0zgzsBwzlaHxtbsfNAKdXZAjgKXO6bDMhHd1CG8SYtHe6yg4tpKwfC\noj0tzH6grffOrmpqTIYz4oSrRfxreMuVi2TLsGJlOFIQUIpHImNRcgJxOgoc\naAvjCRdwS6E5OD6Zby9qpd1CihHr6GNRLOzjQvaE9u3O+FSiz2lIkC/7XQFl\nGKXG\r\n=0ysT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC1udbcCdzwXT57ohdmAaEEXtM7fP92fGe3RTg7w/ylcAIgOZUmr1hk7K9Q/7IfmwizYk2CLqWAxfEvgRPlA+P9bqY="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.2-alpha.38_1571302334923_0.5378205110820466"},"_hasShrinkwrap":false},"0.3.2-alpha.39":{"name":"@react-ssr/express","version":"0.3.2-alpha.39","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/cheerio":"^0.22.13","@types/express":"^4.17.1","@types/react-html-parser":"^2.0.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","got":"^9.6.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/got":"^9.6.7","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"e6f689a9acf3809f4a3b09a654631cd1053a1938","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.2-alpha.39","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-wBXScqAlwLBDdk2WqQib+Xrj9eTm7FVcrfGQr9GRQYEXqFvKeHw7VRWHG8QUEx2gv6it6CYrWIJUUEpcEOM1CQ==","shasum":"d2aa1129840b3012425d7e78b0af8fba34b1cfb2","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.2-alpha.39.tgz","fileCount":11,"unpackedSize":18994,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqC1ICRA9TVsSAnZWagAALQAQAJXLLqPynVvFxOVMT3TU\nqvQVDAqwhRHV1bXBxIaaYw9pr3+tLbb5vw38trCUMLis6pQg1dn8X9D/CUCY\n/+N5YgWrPTcmbHo18smAlNaQC/T5LvjtITovacUq5O+0yWpwn20ZPDSDp8mK\nJo6IC6R3kbV6RlvF4MQV4/fzxvizMSzm426VG/nKdekgv41LNxUPc2NHClqm\ndOa+yGXBRfkf4nhjJdBNJLcAqG+9lEhwgIN9TIE16M3mBfCREXFPBTuuD6Cl\nZ5Q829wqIkYqeOiqO7AgFAdddD7v7EZyeQm5qOIWqgfzzdXxjb27FyLkmvhS\nwIW+IHwRKrQnN8GT9LaIA706auB3RiVtk8KF0pcrD1CFVogr2KQbMZ7zztxo\n+gk5Oe3zdpAivSAXCJOBjNdpZJ+ejxrQJCld/2dArAi1V5ruuO2wHn1/uM6G\ntEvpW4jFLR0P+kNrNnF4usDcezcTIBgOxsBHPdIzddsA4gcTO/fQIIstbUTL\nHkliGqgB2NaeeYhqc1cW7xz5Xe7ZlCf/770rZHF0TIydLki7z7z/nRg45Fc4\nGaTq+93KoJvuWAePeaSnVa2GRSgqAVDDxRvZFQbHVs+CKikaOku5WUHc+aay\n7h8ltu/4NjBz9wc+qnapcHaa4vgy6MOUYwmUb/ft5jz5hXkRoxIwXM2t6163\nfZNz\r\n=9Znd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHnpIkeKpgL7297FsgQS451KVaJB+nRIMXfZ3US420/kAiAkteDdIcol36lYpRfJfKBbgU0H3gqiPDD4RVgKbDZdDg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.2-alpha.39_1571302728054_0.03430014342863097"},"_hasShrinkwrap":false},"0.3.2-alpha.40":{"name":"@react-ssr/express","version":"0.3.2-alpha.40","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/cheerio":"^0.22.13","@types/express":"^4.17.1","@types/react-html-parser":"^2.0.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","got":"^9.6.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/got":"^9.6.7","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"338b8f89dc8767bc3c310a0c7cf12018347a9a58","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.2-alpha.40","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-o9hyrfXx9qjvDz80YfhDwXO9jr0+3+UX2B0oqCbgmewfn5bn7wXBCW4565q1n/GmjP2+4jwVvURKKpOXeA2eMQ==","shasum":"96e21f6cd28fdc2395bd97f9e55e9928c3507d04","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.2-alpha.40.tgz","fileCount":11,"unpackedSize":18994,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqC3tCRA9TVsSAnZWagAALCAP/0UJPhg4LmX6PPT07OWv\nE3mu4bLtkNb3m3EM4mpI4fJue5CeRDEqv0MF9ICOFCGoGuIBOMus+SuuFhsV\nDTusnKkBN3EZ1L712Y4cR0BLDF62tBmsCpY5NSof0N67NivZEP/Pd/DtpxBA\niWQCxMIfeD35STkFYHMl1cNy+6FxbIiCsAXNfEJxqLxzNSaNJBiB8RrTyFOd\n9enHlKNWpMoqX8XsJ1EhNwV6ujyEKx5ewOUjR8uVcA/FLRhu2UgEP4v5pCq6\niXvTpZykuuXaaJ+QnLYSJkBdsXY++BrO713sreRrVjsIDWx8itm00bPNGcal\nuiawqFbofjstfQDGA5jOI18c9lL8g59xU7gsoWMq5qx4m4whtHMjUieOmx43\nb8lpcgaB6quiJ3Jfg4emLxcTxAWjYJLhT+HwO4+NwBGJBu0gr98v94rkrwgY\ncxIS/WNGsAh3VsELLkDnUjm6FzFwe08yxoyB62lLgvjd+Y0xiYiubMHwmo+8\n6HluSx8k1KFwgfLpXOpR1TPdnyJ6/jnmR1tOH5zKOD0MTcfm7IIFVKk/t0df\nXkG9/lwZaq/sUQ33LWu5uWlZUMZ8TkG8DIeORDPVijrDjdrZIeojTpreVP2q\nzTUUUMjKIQqBUCQ9tFC8ulMh2wOMm/1MCGn2TNRAVlVfJU9eD6uk3BoQc4DX\npi1C\r\n=nZj9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGuvGcRWYhibWMJ6QH96J8u6aKzqbLqv9Sz2q0CPxRzpAiBsN4ugFmCd+DXrGhNuBIQH67orKvxhbd+jdj4SORCQhA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.2-alpha.40_1571302893076_0.09110425053185045"},"_hasShrinkwrap":false},"0.3.2-alpha.41":{"name":"@react-ssr/express","version":"0.3.2-alpha.41","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/cheerio":"^0.22.13","@types/express":"^4.17.1","@types/react-html-parser":"^2.0.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","got":"^9.6.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/got":"^9.6.7","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"3973f4720bccb42b314499e21cc7e75ed318f0dd","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.2-alpha.41","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-iO2W/rr4Hq4o8YivqK/mrTvStpv399fpGGxkMWhvztND5GFs9QCDcWyxv+XJx5FMZUJeZT1cbKpgCSljto10hg==","shasum":"d644f046aa4edeaf8300d0682a677e101742bd42","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.2-alpha.41.tgz","fileCount":11,"unpackedSize":18994,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqC5mCRA9TVsSAnZWagAAomQP/jjftyQBsKhvieIQre9t\nM8xXFbAYdcMIlNG9bussjBURJHbFRogm0eXjl3ntoJsSHcawcbDzzSIPCZWQ\nI+FjjMIFmutzsHZQnJuyxHa7MaM95wmKqOSxB3boDZ1iHzYj/8CviB67r/2J\nWxnmN2uWe063rYpOUB0YLKWAqzKCmXVZpjG1QMk7YgOgedKIo4kOYyywZ22r\n1p/RM0maPSPmCYOInTAmu8Js8E9DqQ9QpwK87wpSftd3R2BPp79Y9a/rs49I\nck2CYn5P9Gy4dgZMiG0tLjDThHw1/AWATOo07iUPcmbExcUCVr6/ti18V4h3\nieAK22Vs9r0VLAfVb9jk8uYevM/1UedXw22LM9yQCgL7ojF3sk/Bpfbd5P9d\nHOt6cYHiUGkNXraGt1fbnYtN9Xa3eMvshwy/fTaNQo2IrxsSiZe9CeLNo2pv\niYaJVAetqnqUzpr8oCEds0yqGRgb3VBSv1tie1KlfmaQegBPduNemwq92HGN\ntlTmwsBdtbsEMN0wRnjr3kTA8tE8cQ16e3uA3iFZAiid4WUMxIunisGLNt6V\notaohcc3mwDZKrY3jSjdlnhGqhasYHLAmwkNaIcGAzK0JGeFrCg2Qxh5QY7x\nU9hfNFAZTbQ9TCU83c0kIStaFqJJa12UzV7zbCP4aH2ER1kiUD8XVjEHXwW+\nv/N7\r\n=GzCM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFde0SPC95H+1cH2GhdwIaGgZuHZMLd4lsotp268ME/bAiEA2BG1cn/xAkgp9jbOEaA0keKWkX0LnRh9dxdMxYTUb9k="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.2-alpha.41_1571303013438_0.15239275013682452"},"_hasShrinkwrap":false},"0.3.2-alpha.43":{"name":"@react-ssr/express","version":"0.3.2-alpha.43","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","got":"^9.6.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/got":"^9.6.7","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"d804522fa6b62775cae7043898378eaab6afd52d","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.3.2-alpha.43","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-a3/Dew/MY272W1I6HfrlS9ZA7rbZr2xdiITcd+maXTuPqD/S/uZZtySccuj0+CE3CbQ84ifN63NR1oYtQLWRkw==","shasum":"7cc8493f5db7808e01e6e0e6c1d455d49dd8cd67","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.3.2-alpha.43.tgz","fileCount":11,"unpackedSize":18853,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqC/1CRA9TVsSAnZWagAA5lAP/0JA241/x/mwT2J95ZLE\nz/OpjIrU75mAMAwG37Z5hgv3yM/49MrXzUus88KnAbES54nwD0/nVcEGMjro\n1ITYBAys2tGfWi1UTwjEStE/FgjIW3yhjwquQoktJK6P9Galy9ztodJM0PGa\n8GYLu3pZLLTzQAuUwhEff4hoFihk6/zTfwH2QGdrZtgzWuNV55eecDCWN7Yw\nf4DNZJmEAtoUbjua+YS3/qdySvOp87SiAsn9hekeCgwh+Ciuw0ui/Ci4k0YU\n127eUC275cbRExV9XjTYgzk8Gw67MQAY/qw6Epfm/spiXV61UJDoirdOF008\nwGKXbEWctcqtImtPLDKSBsU6H/+AH5EKZOJUXuRsSpUROdtkxPM635eSvB6V\n2KjxSOuJ8GdwNwKG/Ol5JqK02laQ6BTHlgWiIGt+Q8uNiNmmTnBm/tgjq9SE\nCmpR2WYAM3YX2k+l3F1fD0Zl0/tHRpo2va8x38IIzfeXU6FkDmBoLqEQElkY\ndsQE+sFiuLYfGSG3vnHhHuEMiMy230R13fpdD94yyB63iQE2pilJlxMe8zds\n/72nQ1H2VBia63SSVTb+8Eb4hlKnbUxsrBLJSbJ5A658Xgq+TfTjuFLBWzQ9\nShse6dA1ad/2SPRYavuZhDE5zDSKs1W+H2LJgA8EFuftYCpAWX7R9aIHBeJj\nXnBC\r\n=i3Kl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD8GxT6ZHat7nfwmc/lpVPWpnWSW25JFhrDJW9o/00Y1gIgDy63yRJtgvdbT2PA8gGERggaSx0rkn+5JGT5bw50nZQ="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.3.2-alpha.43_1571303413152_0.4087979947567253"},"_hasShrinkwrap":false},"0.4.0":{"name":"@react-ssr/express","version":"0.4.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","got":"^9.6.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/got":"^9.6.7","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"d879b7416cbabf566afce3cded23b2d3edff7404","_id":"@react-ssr/express@0.4.0","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-nYAQZ0dJK2QOA86RRIMCc9RUswMcO+rrGqBGcQ2bbDtjBRorjftckYimVfU7kW4+JSqm83OJLvjgR14KigHyRw==","shasum":"86123e2b32f70d9fbe9e254d1d6e5ceb643a5371","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.0.tgz","fileCount":11,"unpackedSize":18836,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqDHWCRA9TVsSAnZWagAA0x8QAIuGWk8yreDJuJOGSMXW\nbheCkFzCUiUnWw6TCRdXBzGEddOt/H6vRP6Hg6qK86NvranB4G9pIpjAroJK\nHIDEB9ImEKGURxv7oMF9UnBF+wJXk5XUjC95UiGzDJ3WaZtWBN2/qZViSPlk\n/ZATemyj/eU28MTC/LzYqa2xwQrulAQq37OKKNsiGgfH3rlQAmyTMayCyILy\nytpHCHQjPzZINKR5ccQ8DFDBu4qoMo5wP/hzLFKHqY5Xbhey01lxhvkQk5OC\nlkB8mkq4OgX+t9CwlcXUa+Ek3LGB20824oK1xoY/Bcn1coFM7ApZ29qj97IV\nbmMmZcAOr/1lWfZxN+42D+q6vi4lZ2r4YRoHrjjg4eaorKhTGID6h1ne0Dc/\nl3qdb7bDiRif5THe0DsM7r6qZk+3TyFlA+g8kyJdE5cB2XE5WaKJjWIOgiPG\n/K/pekJmrdfO1iIWH/eIPUP7RLVKrdRZSvvpGNqAggVSeb9Qn4LW0EKwO/Eu\n+w5StR1rih8P878t4bCepZElNIZrjhAUfOt19UPvqCzW1rLpO87va8o8SmnB\nzLZIyl7ADNmV1eG4GU3PM6YTdgiw85q7Hmg0c5d9QLYk5MlLrKM7Z+KG0T5P\n27PG0Gi2uVbbsg0nMizUMpjlw6pWO7eS/PuU8IFanHZMzuVP0xjHxXY732wZ\nEpBe\r\n=4+VM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDS7lJrLog3AaamsSIAHf06FKHip+E33IrdGbGgnrUTKAiEA9BJ9wv3D6xw6Mo1jCuUeXRG4lh0GrjI93udc78vAZXI="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.0_1571303894209_0.8301699862828384"},"_hasShrinkwrap":false},"0.4.1":{"name":"@react-ssr/express","version":"0.4.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.1","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","hasha":"^5.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.1"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.23.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"22a4b6e14aa85edd79853978bd7fb0f17b8b7382","_id":"@react-ssr/express@0.4.1","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-ROcxPtpUmAyxI/uxeve7WI5OnOVqj9rLWz8k/PdUmwmmfsg1W7sr9/ZEOnmmmlXFEHkimCcFuNblp/RN/5FK4g==","shasum":"740b5da7fcfa7fe8fb4229cac9e3a3a7da329b4c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.1.tgz","fileCount":11,"unpackedSize":18787,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqDJjCRA9TVsSAnZWagAAuF4QAIPoPEeHngDSUG2RLQ7J\n6C7IwlVW52aWK2q6w6Rno3XDgCwf/UV86zdVea+HiRX7jto7/VXvxIZDAZQP\nycplOkyTFVu8EHyO6eZFhEvpdaT24IAIQnA3xE59iB6S/uA90US+4ik0P+Il\n1FFMRohu7hzgDvleJBW81C9XaZBzIYMAfX2OZEY0m+Bfs1VHV+ptiKD3x5W5\nQkI+5/evfEkG4OmjbZtG/EAUUKBG5VcaIkizfxoOuMkp4XFdChuCgLti8uqK\nTnPDWVfFVaMo9+gGB77uEmgdPHBOZI8/UOjq+wTioVc/NQdA29e17+kqv+S5\nJ1o9Zj5TY38HTEZJWaITkX3ZbKDwKz5qPD3Ms01lKt90wjJU56O4NTkNSXYd\nG0Nddj8ea8VOCvmT3Qq8uUajpwn1l2uL3tUq7KlJ2QCPt5B9qSVyf95ATBxy\nR+mlq/XAyVcJkLq7STzVaHf5Sxfalnfluu0+hZzQ9kWA2N4MVSW1w7jB1Heu\nPwsGjMXnYOtGISZKB8FkJ3IwHd6/kXktrMC5pghPFQv412d+UXcL4JZVYA76\n9JpdaTPjSn/D9zUvb2KrXRgQCdigJRuQHQ4KHWgVIRLH2/y2eu2khAGG96vk\nsInd6CIoaK1/ohL9DbuamAiB9x51/5izb2EkUUJQXOZciWpl/3x67PgbxivW\nAArn\r\n=RCr7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDxOOeqEy8sziNRhbYqyRv++V3piV48RhkQHLZbyx67RQIhANEN//6OonrlOzTUTHnBUfUsswgmXzdhYtt9qpUXIN8M"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.1_1571304034813_0.624884664361667"},"_hasShrinkwrap":false},"0.4.2-alpha.3":{"name":"@react-ssr/express","version":"0.4.2-alpha.3","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"337c06bca3a9f9071cf808ceb36cbe3351c33591","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.4.2-alpha.3","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-YQ22FnW98b7cov1fbIzLgXErwvLoQEoQLFl0YnXFXNirUkSUxAXqBOM2ONO+x7mUGe1tVzkkoE/3/YgHE0M3jQ==","shasum":"9d7a4a84d99abb982b8d888e2e4c90788b806555","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.2-alpha.3.tgz","fileCount":11,"unpackedSize":18747,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqEvyCRA9TVsSAnZWagAAkgsQAIATTQ0rHU9LR0xt24Qg\nWhdIQwI4pjqkl0xPaq1H1x5asg7FtBgbZsRxUpimbaKIQxZJOBKGc3UdIA2T\ncgx1Dfcd72PhLD/YdVdt9soBnpk6Vk1NVBB0TwJBD1lnT7N+td020aafkbAn\njJNJx2oJCz99u3Animmbi/ZHZ0w3TGDYhO46KqlEkNdQ9K1gpLHCAYiKnomY\n2UFU3x7swRDJNBzukKGS5Nj5c4hlOzYlRfr2f1dMlikXZVkpskVsnycdib5H\nBZuMHHAIxYcqj1/z0Y3YSOHIDGSz3WmNXQVy+MwBHW/kCIrCdsDFztVSCnLr\nORmSgkqUTVKbjWXVw8OiJwY49cmvdfXueNw3QNUB/6jTebjeBI3NQXzb7yD6\nahREAluMBsavmX7vHwhBKTRflNWgO1M67VD/9CJuk/3PeM2FpO/s33Li2moC\nvMOi0SlB/tQwLqh9FObldOuyaLk2kEk2blYqa3X099RERC01r4JDol7JTff3\noXaPxXAfawusiHfgSwlnYiTFlXkUImI5QrRr/aOoYVMFtWbEOpvJSSTWEQeE\nr9+SLQ1FCayDTs+qqS9Yk7fi4Fb9NALrYXYJFlzv94pOMC0AjPYbDItnAH4R\npW3AGjyd3zRBr9kkDFMk8htAJtVpVqYZF1UW2E7vxW/GDBOqI2Xhj2AX5vQ+\nqFau\r\n=LPKh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID2gkAf7P8EzRKgDLR6PB17d0+cJ9ZB6tlnBbXWduesYAiAk3EEwvjPK/ugpWqQSMLC57ZFrsMj5Hat1lAoZSh1hmQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.2-alpha.3_1571310578248_0.22669592645944125"},"_hasShrinkwrap":false},"0.4.2-alpha.4":{"name":"@react-ssr/express","version":"0.4.2-alpha.4","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"7ebccbee8214662232da132735f2c46777297ac6","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.4.2-alpha.4","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-u0D3n4aLEQvqFg1hzLMc0VrmpdlCJH0spAaYYtxqi6JXHXPCP5lWiUY3Ig5BOnvudzPyLYAiiPsVKRuPhtgVgA==","shasum":"6a32f19d8388d942999f104052354e7af1d2015b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.2-alpha.4.tgz","fileCount":11,"unpackedSize":18768,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqE0YCRA9TVsSAnZWagAA+XQQAIUknpXEv3SrCAG22/bz\nBhJopTWSCmHQUn1NAhCEaWaM5/OjbaDva7X/3dltm5vfMeDVCw+6sUFmmI1E\n6I6lPY3VlvqZ/2VxNgAglyhnuoQwMgCxsyoIk8rBk+yuxxoGI4CzDOH9SJoN\nNR9a15DDvzJl9C7rHKdjYK3Ja0O2RsaGfkkch6yUwu4Ck6ylq/XZHbshxudp\no0+7wz0deBgHLG8JR+poDkpdUAHwFOX+O6x8XaSh0KLfKY5yS90n7zD5cvUz\nTRbSGwFxfoS1jmttAFCODUUCzACjI8C8LhAjgJ3FQP6D/RXC79v3MikdXa7S\naDxdglVo6BktANrnztA/bj7xVJrDHsWS2Km8Uy/gQYF2YIe0aet1KAJd0XCd\nSlirslbDB7FTzQDbp88urFKL1PG08kj6/DgxRouYzSWkNMYoBDNx+qoDxkH3\nOa/exmnXqU2qo63d9QRA6Aim2ve2ANK3YCq34gzUU6xFQBieMeVquZ9OeJj8\nad6k6fGsPW13mKOt7baIDiHGCpajRxQ0PLVeN0G6pccUMRHuHB/Auvo2GpiD\n6pxruh1B3sKoJ4kG6lnNgNaz5kOXE3S457rXB5QFudgD+njPkal7KsqPflW4\nHvOCwhH3jMwep+a8Luza5xItbS3RP0c4qXl0R0F9bSz1gAw+P7FG77o4LdJy\n5+9q\r\n=GDco\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBcZVywFhHiwFsoB3iWvxLq8+bYzVJUkH/Oc3+JR6Nq2AiEAx1LfG+tSKfQjbMoebg6CK3urI01AGEUlAvVACkcsgFo="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.2-alpha.4_1571310872052_0.9347086779718048"},"_hasShrinkwrap":false},"0.4.2-alpha.5":{"name":"@react-ssr/express","version":"0.4.2-alpha.5","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"c8ad034b09ceb2ae67e4c43709c8c7d1db448136","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.4.2-alpha.5","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-mAyaRpyLBC/i5CnKWu/+FqkRu7AKaA0ltSzXUmM5PsGzP6CjQG0VkFir9nExyfai37RYwi0BeXEBUINbWTWyGQ==","shasum":"7fd5c37becdb7f1e2b1476725b9eaa02e583d1ce","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.2-alpha.5.tgz","fileCount":11,"unpackedSize":18838,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqE5gCRA9TVsSAnZWagAAbCwP/RvUTzeSVwrU9EzEEVqX\n+2CJhtH5suToq1MhjdGEi5ACEYRCrh0Kut/fMStTbLXqCst6clciZKhSTCpK\nxplcfuoSntSnKx+hqrdQWmfjEROYwEBKaijCvqSpNVg4UiLugiLRYiDTR20x\nRoy3lJSOgd/LSpu4axpwV5qoEGLac7V0qxj5FB//CuAs6Ad1juLVbjPIkcVc\n0bBzaYovdD4wtiL4FD8utr8mwkVgReyXNoN973sy9JobXF44gHXbd9rxZLnn\noL899MDW0ff4MqTzgZU9+CWX1/KX63wJ7IpegykAA9m8OV475YWu71c/wx7Q\n2wbywMi+WSiqXdMVGdcPagu1hOWXepL6z4SY3URTv3eLU/ZOgLp3AgnC/my/\nB4pSxNvnKC/q39fa6wo6ZuOZNMl1er0nWKN3GOOHbuaE3is5DPxmWKewONqp\nt235YZRLYJUcw9nuIa6t97vcztxdMwfGvob/dHenu+6a9mAYavoVNDK/NawL\nIVFKZzyggfJ4ykc3mzKQpLyyMOEus/353FbIBVR+kiN/vyk3WDn0i/pbN4rF\nDHlPcue+gN/Q7ZonEiHKs/MTmlSvxJF6G+Uae6yYpiZPNqjZ9uCyZAbynydl\nEUaxoH0mlsMLxYKCX5TZGlOvgTyKJXc7X2+vdhCfwLmnMcTUCZnVUe7V3spS\n9QN7\r\n=xfNg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCIGYe163Oe3bGwrl9bq0nMER94ou3R45l9j3o7kFP69QIgXFWcGbuF2jqnk3DF4EMcg33kXJg83+QTe6O2sH5pHvI="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.2-alpha.5_1571311199705_0.8189526115785659"},"_hasShrinkwrap":false},"0.4.2-alpha.8":{"name":"@react-ssr/express","version":"0.4.2-alpha.8","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"965fcb8fa621e79192dda8b2e861d08e4649eb22","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.4.2-alpha.8","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-7ofWyGMAvi62QROr2jP127HdFSJ00hb1TOYzDf0jRwbBJrWuv6nyX9cvytOUTAVbr6dtJFzTdjeNfymr9F7QPg==","shasum":"54456b4d7b5509f2d8b40a39bacf0c65dfc304e6","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.2-alpha.8.tgz","fileCount":11,"unpackedSize":18654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqGA1CRA9TVsSAnZWagAAiK8P+wZYtAbBveU/XaTjJbbp\nIjTqXqUvHUxcaZ/PWY2fcUNJ/hnhe3CHCPUmshFol3bp0+Ha41XIId3qLTf4\n31UiALBT9fc/XD/Lt1sv5DY5U7RzsQbR8urqi5euaJUjXbvD3NstOUeMlzxw\ntDoeX4X8vaJ3ZYZMYSq6VbpANO5FQKU7I4xbwQUdoH4sPCS7skCHYS+reJ5y\nED0Qf+Z40pMFm8XrmzEdme/RsK8ezPdW2U2BzTRI2Y8k3rONIOAP0XQCbHVS\ndFA6x4WYhfPMlXmwXzQ/1nG+7qlVJ9dvpY3j5X0gsjv2qVAhlDigBsz5Iwnb\nrQ9fWKFOrrxBYzBozqCSBVAOzABqzcitzsHN4SLrKkVvFrUWtywLs2jZb2lM\ngbh0pvITX5ic46Snaz+0z/yd6Ol94cSDcfpL0S+rZtU9nS1uhezilKMPEcGc\nSPKSuyC8ZSfqqcOoeSNKy/kvwrYLayZFX2qjCbtFQFVVJEpoUo+Rqu5GXcuR\n/WHCOvU+ntvr5Oa7jcKIq2c2edaZgjtAzr9TtzIOsTDxc7A0YnQXxgaw3RQo\n77SJorAAgtfbSY9HYyyXuACGKv9drInoMaUDDcmN7tescpbzVBiiZas0DI1P\nsKBiHoXDe9oFnDL5uU+mf0ziGEJ5woVfIPCdRv5MFfMBeun2F6CxeLSKjkG3\nnE5D\r\n=+Y6M\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBvKu3ctq4Mrt/oX5Fpu0GnBUaErzM1yzMWFXnXEtWYtAiBArgsqxHvkbj71iKRRBpccOyZ2TJHvcw+ecUUeIOcVuA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.2-alpha.8_1571315765102_0.843048695620249"},"_hasShrinkwrap":false},"0.4.2-alpha.9":{"name":"@react-ssr/express","version":"0.4.2-alpha.9","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"0033d6050d4911032d084821fc4b44dc146c129b","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.4.2-alpha.9","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-4im6CvFGKzd91hf61zprK9xQHaxO7AbH1QRrddd8pGKsEztNNbo5CSu7OvlrnRMVrsu81Hw9ZzfzyjgG4GLNWw==","shasum":"e16aff83308773f010e1883fed389bc215636c6a","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.2-alpha.9.tgz","fileCount":11,"unpackedSize":18586,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqGJQCRA9TVsSAnZWagAA+Y0P/RNjg9Cr1/VYjBGjoceC\n+QGfZzYTO6l8LwKE5McWsamEm5m9L5cXGG4A0jxOaURqCgXR5nRoDf3BTU9X\nWkQ+NAt6emw1FXG6dqjfALZuzSFj6Gk2V719B5jGSsnHXG6eFFO9QYsrgNEa\nmgeAdnwbRoSIN2bDyssj8q3AyY3KNummc7hwdAj5s0Zg3XVS6j6lJi1Ru5Tt\nSi4TEqbVgxDoM7gQBgOwF2sEmr/FeA3kDUFvOYPm/uBO8k++a6Z7ZwbToT5D\nIXazUlIZ3mRfFHSXu45pEC+A7tHb3ZlMCONBOxyO31YfNLWIaKyfNh+k8Gwn\novpzxoajd9O9VYQBUnGuXrrdWvJQzfvTnA8IsMmmnyrvFgTxHYigKYYpiO6h\n/kExlA7xIxRPVxih3AJ82UXKNQw1aQp4tY2nRFLuJoxZBysqfsNIcrfsEhq2\nX5Ptcsrfw86PKlKuQXgkGYSy6lDKEYp/xDTw0rcAi23EtOQ2rxt7dEqAUqCT\nXZSGyWbq/bWVkswTtnRabwjccOYtenIo4wJr7g/SaIhigsjtREmndMC1arfi\n8sWtKCRLoCierpWZx5N20bSwbB2vM2cZvFNDLllWRDV157ZKQxOX7h4F2PRD\nbPZHjYb6eTWRHH3fCETjAhLha2mmieGjS3VRrCaNw4Hs0a1sS1UQ2a0UsbqU\nidvb\r\n=Sl6T\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDCkNKjxBhO7OvwqJqqH5xBIxVNRR4DC0Ea6pw2VZpyUQIhAKRJRa6ZTSn97yBvN7WHvw7boWDBL+iivnL38rhMxkGW"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.2-alpha.9_1571316304043_0.9926750229601036"},"_hasShrinkwrap":false},"0.4.2-alpha.10":{"name":"@react-ssr/express","version":"0.4.2-alpha.10","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"b3dff060d6da28de74ed1f4198c67829a2d4461c","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.4.2-alpha.10","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-qHvgGMM7msvkvRQMg+Xsq6MQOx0mbep1SVCGPNZmi9bkCWLd+/A6YsfGuJoO/uJWkRR8GM35aJ6kHJIrip7MkA==","shasum":"b2800f548f5ce12794772ac33005eb4d6f3e02be","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.2-alpha.10.tgz","fileCount":11,"unpackedSize":18448,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqGX2CRA9TVsSAnZWagAAr9EP/0GBvHiPMcNIJQf8u4c3\nqLBY6Vw2XvpC8V5pB9ma/fpvOX+EXn+GbXOfxfzR9XTWzZNVIokKPqlSK6xJ\niq9Y8kABt8s5vXpoeZYqyHGxXAVsJVTMYfRnGOomEMSmC2KeZwAkgkz4gM9j\nSpn46hNrExiNcqIOzCW7smYEAHLZWr+ElkPniHz/uwm88XvBW9Z1+3gQumDz\n1qwpiIzE4RdW7tckrSGajHJCWR84/sC9Dn22sUtuw5jhg6elovkBAypT9G97\n6CZFT3vPDPYGp/+FnxqjpY9oCe8q7eMjaRU6G6gZTh6iGe+lWD19qMn2oRYp\nKCwiKncH+1n55lY0XE5oecfJeSaayCnadUWDA7pvTRKNpS+jD848bqsgmDzF\nbEPKTACpX91Q74QZmJsVQoHu/An4FwIEPs9yWHmIBNqbK2rGIktjIVK1FiL2\nZ1UTuJj0HABl8yyyUE0hccCffd4cMrw3LMnTpZDYhEkIYn42jVFdTEP2I19D\nChmsME2NfAx28D3PkFmbLJcUIsq1u3aUqQUMA3ysjreg7/M7knBf1e6ASEZA\nbwk8AzTneaOM+vWeHKamn5IkkMULpdzN4MSaXWcGfm+IogOLjkWhrf4AMRvc\n7yJRukHEPLpgeslAOOewBskziBkkN67dP3uh/Iughu9i+xqkZZQRBqD6QOv4\ntNYu\r\n=kLkO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCVAF0Zft50WGnw16peILQkCjPmxczqQZaCFbGF5D6JnwIgGfP3btAQnxvuCZQsir+0RYC5z3d+2wvZeHbs8/gJcw4="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.2-alpha.10_1571317238207_0.8487413526328844"},"_hasShrinkwrap":false},"0.4.2-alpha.13":{"name":"@react-ssr/express","version":"0.4.2-alpha.13","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"76b9b57680173346f2e81e32eef858e9e7344393","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.4.2-alpha.13","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-kfx84kyZAJpXbA+bt5IDBqpPBeVQSdpybkAqfmL9TjI+anT0QSd9GHivFGKUih6rRugHTJKSGc45CvHzb4aChg==","shasum":"3d9045d2aa5ca4f6c30a5cf00df082938b1371df","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.2-alpha.13.tgz","fileCount":11,"unpackedSize":18495,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqGgPCRA9TVsSAnZWagAA6UsP/A7E0UE4SDh1+8aweqmY\nSSSnD0kcvWOjmCPf/rGPULCVPA62UAoDRgPHwQ7ovg8EZ2sqTYfBDBgUP2AX\n5i5wEEbm0+djFzDgeMIRVS0WIIm+ikBBXj2y978sY5FniZ7OuFVVpol9af2s\nS9Xx5FdGNd0X0iYkMcJTPOF3zztv6EVU8fZWFSI2jW89pD56/YdxxnGZjHdi\np2N5jkCD/FLlI4LsYJMjg1lvioO1mAx+/YaYpVdtODdSnqgTV6SEvSv4Fwut\nur/5ak4H1SMcfS/Joffx/wu5VDxNRbHY5qsCgrx/9yg3G4sIlVmQwkcqZUP1\n3AUnjqIcAue8by1iomQ/ylNEOMuhmR4oJbu2+u1DzsLPBzsS6dVSV37uEg19\nvfIlhGAwy/NKsw4MCgHL3DxLDuMF1SkU0wHpXVyUjgtwplKzyw1Do2BKGLS6\nODmDQxat+koycrYycUFxC9xjE7xvhb3Mvvw2sfrWj5WO9+9pnkaOdGEtrKTk\nQ6yd1eP8D7GHcWVyS/NIoPn24WMUR+erxuZg1V4c8oOeVCU/rGaGaqNKAgkV\nc1Yo2d9DSWRHQtC7I9U66Zid1rt0gHKbKvoh2T5jv3pFfH5C4L7fNr6FHX4K\nx5A0C9yoyPitDCDLkYDic0HntcXp23+NK3+owDndLh9vezz+DY2fNa+MLQ56\nkw9a\r\n=erjA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHgRCg+2IPyKDpIaCkbSOYU0n/Qm4X7svKqG79tk9VmgAiEAvzu/Dy1FoIC+ngPYgOa3CvyW4lzjv6Q7z/+E7dWyP/I="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.2-alpha.13_1571317774654_0.5637316344073753"},"_hasShrinkwrap":false},"0.4.2-alpha.15":{"name":"@react-ssr/express","version":"0.4.2-alpha.15","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"6b04126b91f082a4a86dc4b9b603e3f1c27e9230","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.4.2-alpha.15","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Tc2v1XwZthcsZKeNKf72Z0j+OOV9/hEy5pQtRvt2ltA+teBKFcndSUSGHTZ9fVMW+yD/na55DoPQ/3MNGlHWdQ==","shasum":"d4c07e7b30cb73c8b5fe39fe8dbe6a0b888eec6d","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.2-alpha.15.tgz","fileCount":11,"unpackedSize":18569,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqGowCRA9TVsSAnZWagAAvh4P/isTEZGR/MnfE+T71laQ\nCGixbRdQAiNiJUBsS93LO5uxNXUwOgwFyTv/3DZdvm2+itWnSSzhyMjDtiKQ\n0H43QRn6203tVvPlUcGdQBLtuRaOd6znE53k30GIBPPnHYbqKRBSJSK4xXw2\n0PTBrBnlYwc+UeBqxKpghWBzpubqneH1NfLyo8NcLOVFuWF5RCg0qBwGyR3w\nPhKTvac4ZvaIac4rVnhFH4G5eP2v70853800nbKWYoO5ixQyTwOFf3W1VMh8\nMa0E2i++wTfQgpzeb0BBYYKO3wDeAMNagVKpXuDKq2SKVOIjbx6FtYbOR2/n\nnbp26fpaWEZBzJhAjTe8Ywkcunx3ez5499olAzehGYMCa912L/0hT4RBtbtg\nbI8wH2+M4uPGGtXZAnk8pSNf4qcWB3Z3x0jFh2TNfGX5dDQtbEcbr6j8VTiL\nCrdS0lsDhRBlgdMLjKo4im+omsEMTOH3E8IpGoVaq86SsSz3pB5WUFEZXWgi\no/9n+60HQx6xFMy8JUMp7ZesXTsVpzTjItikwwn4UX4DVoL8kPApzJxxkr/w\n9ibSU4r26i38NUBhX3fjMTlCbIlzaDTcJUZ7GDIWD/8Pf+uv0CpeAESOVq+S\nfWPSKGs7xGToF1LQEYeJbs7nmbHu/PzM1v5anL61ZGfFPQWh/ShQJ9rT/QGO\n3wVL\r\n=aPB7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBFhk9zb0YNVz9Sbtx8HoCBuWD3+fTMmm6n8HucFBIYdAiA45qA0lWlz2xCM17YXIfqsOkafRcGkL9DzuLyZgUgNrw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.2-alpha.15_1571318320101_0.3480157460618065"},"_hasShrinkwrap":false},"0.4.2-alpha.18":{"name":"@react-ssr/express","version":"0.4.2-alpha.18","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"4c24ca3b006260e5dcf3335cfab0cba3415b3d18","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.4.2-alpha.18","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-QnBxy7FLJIzjZFm9JMbrhQf8POP58Ak3KnmPcPbZLHv9axySz+V6VsxL7pHgedmzXpnZQs+A7f8WoVg2xsmfIQ==","shasum":"66024ab4966c4568c56a7b37d5436c42936d520c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.2-alpha.18.tgz","fileCount":11,"unpackedSize":18585,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqGz4CRA9TVsSAnZWagAAejcQAJYH/oD/ymW6n3FNf6Dj\nyUvlmZ4yXAc10Iv4NeV3dfwC6IPEegjr135I/H1l018+HxCcG3jfY1mpiYSH\nMRCEwsKkJahZLjLCpNSPQXiFOq4jOCJgkSP6e0OifbOliWJVzvEOJt9E1gYY\njt+/Nm68EzJh9q0XMtzxo0ec9pIqJw/KV9C5EDrEJ75LBXpnjQpEGQhvcnyx\nA7QYlMlYxCP42Kpu6mGU4HgTeo0tx/llTcH2tzIgA7Ugh8qeOFUBFGyQtrc0\n+fxwUI/bMANd1cQjhQVasQBRDBGz9CAtUg8p9kcTxcCO3dJOiLeqBzAJ+L7X\nmyVXfhyIDxL1FlUzrBivLzHUuaqyKo0bEmYl/Evz3lFZbRhawZkiGQqWYz06\nr51we+1uMtlNzJq0eMAww0owT9X1IgqMeXdrzaR+XqQCvLItWwhSofSbn++g\n611d1TOzGLqwXCi82wJ24JxxfhAPP9mC+bCYfMI8ori3edixiv/r/Q8eugCd\n+bNwSzuEG44bWW3t0kDeadQJ9ZdtvOHm3rzZkE0KNg+nLfYXEemoKVBQ/CFb\nIm1Ph0ywGMRThPS9oYBZoc2rGBFINLuBNDbke6ZVLF6XFUE1cGwWK3y7i91C\nfN/vsp4Jud2sqy0Laj0rf7cjWekRo9FNIV2T1j/7eyour4OyNf+x7v+wHGj7\nx1C8\r\n=DBAr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDYF31iWoMsuvgXVaCdBFKEJvGsDsm9yLi1mYmFYjaTlAiEA28pkhSTTYJ+WJfoqmwYTa5mLgKPzosTRUzhIDWuuN+U="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.2-alpha.18_1571319031498_0.9208230426706834"},"_hasShrinkwrap":false},"0.4.2":{"name":"@react-ssr/express","version":"0.4.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"e07d18843e5ea2585e40ab7ad921b2e6729316d6","_id":"@react-ssr/express@0.4.2","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-V/C7z2sjSuywSYkZXjs3scpThhMyky710WMu80FxzkuizEkFR6Y0kYJyeUySPeth+7SoFl9bcM64lfm+0HXQaQ==","shasum":"304091dab8ad5c54858a6b0dcd34de219967adda","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.2.tgz","fileCount":11,"unpackedSize":18568,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqG5CCRA9TVsSAnZWagAAxHAP/1jN7WSUzRqGLRg1eRx9\nGh2fgMynKL5RTBiU8/uYNucqof3qNp4gJSSapGmNPB4HMKJbGeC1fFZCSl+2\nxD5kWSbHhEfdEdHjgzZfMwu4pKrA7U3u9kScVdDMEIBfrWdmumsxKH1aJYxh\nPB8JhdTZXvNkO/YWTLla6LsqSejb80hmFbxyhPi7BXHNM7/FYHMBkUbWbZBg\naof4GzOsV3rkqQ+3hsQ8GISXs3tgtGl+5z2NpNLGR1gwrVXGkWImFCJUr6uh\nJoi05TXsjn4BewUJGe5yJSqRWCbyaj49nBg3nM7nCq1iz1tHzrGSYgvnFVCl\nkC4uv5DJDCiUw0qah5RKUQXn65rOHRoO9HCbP3bG7z6gOkTtJDxArKTjVqOL\nt7q76YyZeATNLGzcfyszpdLCc2CUpGVOFkLarsNNR9pDQPezFbbd//LRJRie\nMB9t6RAFVH4MWQ1UtZTjUa3pfGZcSMaueLYJJPOGEjfGN1U2ynIViCRd/u2D\njf5Z6OkNJ+KiWC99/l3ZjTpE3bfEdXYfh7bkCJaHyNxD8dUUAI/MyrV4mJfO\nrELUuz0UXwQN+N5t4dRlOc9I0UICQ+kTQdGVDUfIQTObwb15z/NebhFz4UT8\n5ri2cPmMuXevr4qTGNmI6YFtEHcNySI1fHNx/rpf/Xphv9jygdKyW4HModL1\nNLSl\r\n=utiC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEwadMaKGy+nvuggJNKIUzGLie+lCYZKC4arTy9Lx4/JAiEAhSpLwLb3hG3kFLOtgZMq9lSclZd0y3/Laz6x2iV55ik="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.2_1571319362063_0.28087895438222454"},"_hasShrinkwrap":false},"0.4.3-alpha.0":{"name":"@react-ssr/express","version":"0.4.3-alpha.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"d2755aedc23c6cb8676d8e38bd325e9c2f6af9d2","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.4.3-alpha.0","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-zxeWzo9azqDk8W+hlD4tBZ7HNqhKt+PrMoYsjcuT8zaTEu/EW+zHXjn8/buWVe4KntlTIKIlC87eP4JQae6BXA==","shasum":"30d02a037ac4fb13e51d6cf91a311104d66b46da","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.3-alpha.0.tgz","fileCount":11,"unpackedSize":18580,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqHIMCRA9TVsSAnZWagAAwxUP/AuUXpEAYm5DqHEIhQeX\no7+++2p96F88fU7+gUXas5WYXK8yuE5U0X4i6aSIZ+PwGq4kBFgJIhF45kW1\n74Yuwgjl2OE4KSS3YDnukRa5NjDfumiPJict+6IPMeq1gGB9OV6r2N+fYRUh\n/HOVMVzUUPKwcylMr5RgsFIMw9Jbu0/Unv/6X6kwEYB1+ioEp9mWrZob0B7l\nTw6dMYQEs4dH7BVzUa01ClRPFfcrF3HA6t5TvZ/h1oYPgPMzHjstx2nXP0OL\nPiRg1xAJYd08swvAqLlbomhtIe0qNcy9j7X/48pUKJRGxqvKQJkrUBhvbcjm\nftNEnvKTzdsyaRvyMpZ6PncDy80PNvv8iYk8N2cgFMLYFU4QOl79Q3yzVhwZ\nxT7Pwpi3aNA+T5W+uwuK/L476kkkiDabGsDDkac22nalx0msncJP0MBspiAz\n4/QGr9IQR6uMjH5MPLtfB/V4roPgNxN0cIad+3DsYop4HTGS9NdtqH7PBtq2\nUsbs88FUuLjjyvPpT4DM4VzFFZ0e6J1oPkFB2VKaBIZDR1ZmL+QA/fckYi4F\nLWBVc7+wgCiZ1FL9dGmTN5bxqwWZ37HvdWSCMclWGfaBs7j3P9E97wmyWvoC\nMiW+/FdM/Ox2ysz3wI/lrzuSVHlzSp3lRSpG1m9hBV+hvHmQj3QWNR5vGZWK\nfR3v\r\n=eEuo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC1LqDxwYarVOdFaZdJa+ofUznMg6X2Jqj3Z1z9qoxpsAiEAw4sQnUMr2YfiUD+QruhqwcE3JuM8ACY+pD007vAqqZs="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.3-alpha.0_1571320331320_0.6257143920324177"},"_hasShrinkwrap":false},"0.4.3-alpha.1":{"name":"@react-ssr/express","version":"0.4.3-alpha.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"2f5f0a9a1a54f748e5206b07eccb2a7a1c61058c","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.4.3-alpha.1","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-BuxFCALWkz1+2r+0GYSJAtowFk0YH2beV29HnxU+Jy/jA7FS74GiAuYRIQixVcSqT370Y8k6kJGMftBfC9PosA==","shasum":"3bd9f138886d70d6b38a67dcae3b141e9682dc36","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.3-alpha.1.tgz","fileCount":11,"unpackedSize":18623,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqHORCRA9TVsSAnZWagAABlYP/3f7YbPwEJ3NPr7csygQ\nOvDpGcEwUZmYdWsI+zghYhVFCgu7KeAbDW146fszSG6HVEd+p3g8Fzy+5Ia8\no/LDIEaBiKaBwq9x0eo9dIA1ZehpAs2caJ6L35DmFJlSHVBQdsNxLtgmJ9AM\nIQgaC+EjCCuku4GynSwEi0j3vdqeEyyQN0hBF5UlcXzptrbs888m3/LXmOhP\n5frnU9iv+DprJmiua/iW5dC7/kBWy9Lyak12NPAWnkDBQvCVb/hvWXvkl01I\nX2aet7ACIuaTwi8usDUp5e+OycLB5CwYNURuPaV0u7zg1a7ClItpPgcC6a2x\nnFFzk0Yf3lL482Wj7OgQeqozZ3woyv63Uu9BOPsuP2CDpVJcAkoy/HXBf6GR\nzvxypjx1VU75RhAY6Y0lktWWQ63XZxjEGsQ7jisKEk8j8qRR2zcAl/WGdoZ5\nu5WfbjrjVb+ySYMax27yOERMYLR36qavxk5LTSi2E0mI187uDb9/wLcdwM1j\nT5lqcHh085fgKa0FCrgeZfS3ZSG6WjN/z8afqYOJNrgXfIlFEkoDjIdOlMBs\nHiXOzzml1UajTItX0fEMko7UEsg+lmaLyLaNZbOKOx5TLY1mjPYFabj/Expk\nMKYOBwC3aIxlkLTXAzSHJdNRZg0T7lbL+IaLfLxPmlsSV9MWevxON/ke2I5K\nd3f6\r\n=efmY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDOANDmHdQSRUu2+7VcFXY7So7Ft444uKhifue4eQ7/nAiA3qMkEw1OEd7z9plXpoLNjDumzYw7KhPuZFBmDa+ImcA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.3-alpha.1_1571320720625_0.6919035683547621"},"_hasShrinkwrap":false},"0.4.3":{"name":"@react-ssr/express","version":"0.4.3","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"6272381ccf1a094fe681f6fd0ba569259a665825","_id":"@react-ssr/express@0.4.3","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-50TRtsSTQTCzdABEeNp2/nU8HWFVcGpESWqIissr/cCZhdTfCCvZBD7nslt9ubnKMrYw8pZbpcs790xoX8tVNQ==","shasum":"cc7acf2ea9fdaf85d50c86e676ef899d8a7de73d","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.3.tgz","fileCount":11,"unpackedSize":18620,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqHSkCRA9TVsSAnZWagAA6QgP/1KLUmfsjr+TDMGB2Own\nxMbrt7cD6XHiogwDzBsvlN/d1PbKRPx6mFyfsttdSdcrB39unErwcGYQtitE\nyDRLGBy7u7xFm5Y10gp9YYBjsw/Paj9lGqLdDAa5CmKfVOSN6V4eSZK7m01K\n0UHXThAca9piBVR/gb2DDQYrv0EoW7smW4ufHUC2r68DyT2eyooXtd1BrAi0\n00zUU/7ne59J8HaIY92uTZW+j2sqrAUkAANiNfxuQ7vejOtUfBrEK20emMoc\niXRyjyMOhY+lQsa3UeUCX2ESBDfTHnswbFOyJwkalCxuNq4KsEWTG9lwFbBZ\nblI2ZkHyRgY6AlV7V95xRIvbEjrqNjI0FlV22PpiQR7o/b9Wj7N7FPEkwxOP\nmXIyKeLk/uovacKu0ZruoNFughBWfhnk2EYVOvFsi6YSExfFiVDm9gI78SZQ\ne1rjeEsLVOtmVDfFtHkuEYQvh1do8BP8XErusbeYMljMQRd88X9buZSUNsvd\n7TBMjPvUI20m4uJkY4ktRSQY8lCzYAWWa9dTWZore7s4mW88QqiYkyGoEV/5\nQfOkM89pP6DwfyaVtNDGPrEvhy/rJgDoroYOPigXOenComyyK/gx1M/8ry/Z\nSqTJY2Yy3qTSoKY+F7T/banGkuFX6Mylgm31sdqIFK3pET4wS37d5V7qRB1q\nQ8N5\r\n=G0Ja\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCfr5UDRVkSU2/ifwUdH06/+9SJHxcSB123emqddytfZQIgQZuNBPBfS3cCwMrvsjlmjeagDSpcwqFyRzlUmT1r/zo="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.3_1571320996009_0.25474579406659825"},"_hasShrinkwrap":false},"0.4.4-alpha.0":{"name":"@react-ssr/express","version":"0.4.4-alpha.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"b2241dc3a5e6f836c445e2b28acf2cc73ec8bc6e","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.4.4-alpha.0","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-0FUgrgIgZkqYxiQszbpfJjg+Y/EEbA2XlLo9V06ttu9k759FlbDTmLO6W0Csbc3SKLOGcZfbsUZ3n/b2R7E1qA==","shasum":"dd5d7a683dc1d4dccff1b03aa144f87e5e269d85","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.4-alpha.0.tgz","fileCount":11,"unpackedSize":18692,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqHcjCRA9TVsSAnZWagAAx18QAJRtWzYcPgusWd+WWtNl\nCSsr6ijtZcjLuynaQWRyCnwifJzB0ATzzpfZn2guqqIABw7Khpp+EVgvpw9x\nrkkGKFxbfvtGgzN24Rl51OBzvrqsCV+S4sXpSD2Bgz4Wy9IPwrI+/StO6sX2\n5trHuL84twx45KKcZCmY3wsgpZXH5iiajdcdZOA4hSvpvJCeBs4XvfMPzuA0\nX9waWdCh9gdw7fszaLd2yflaa914G8bQLkKvqO+4TMo/EvxcRh0O4n7SupRS\nVqhWtwR+VGAxJLvy7OZDhxageM0X1yfrQiOxT6iZM9bFPFUwBX1BcVrTjBT1\nM+PcOe34kj15LeGUYlyTssvmfkP8owLH87S9gA+L81QJwVw+ERsoCiLyNbZG\nLbHTFxaoR3BOVTtQLyxEGToEFmAH1+N4TSPqYEf4MGu82vaM0eaX1ByOCfRY\nU3CU69wBj6q2m5N1VpV3L3ulTwMoGhC2UQLOl/Co7rP+eWh+Xd+PIzxazz87\n+E7l+ikMz8WBtxWqwAxRnbq1HQgwYEY/S2/syEViX9av3uFqUu5uCpc6w5AV\nC38YA61Oi/tyPsSI9gyKtHv0u8m6sW2HVZ6xQidnqwdDTrRvX3RpHyUDYcnH\ntlYBp0tayCwDjKvIN6ZbZddmPULnl8n1W4xWHxY6axwms5zB4k1HH7OBgxmt\nt/jO\r\n=7A5x\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAVzXiKHWwo9QTHA5t5jd/vaEJSF2pgvxfaTBPSLWUKhAiEA0s6jPVomdePhJjjAY8hMBIjVo9Ae8ocYoA3KboOIiYk="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.4-alpha.0_1571321634727_0.8062484009322135"},"_hasShrinkwrap":false},"0.4.4-alpha.1":{"name":"@react-ssr/express","version":"0.4.4-alpha.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"0e151aa69b8327201901e1ecca8dfc451798a8cf","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.4.4-alpha.1","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-+Wa+wd/JitrSpDtj3p1e5tE7N7FpXNf4UmHSdxDe8Q5yMjJJsw+GRdAu/V4PbjC4g2fKu1AVriF232AzU4VTbg==","shasum":"19d52d0dac85066c6a144fb0efa33568c79e899e","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.4-alpha.1.tgz","fileCount":11,"unpackedSize":18636,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqHhsCRA9TVsSAnZWagAABDcP/iWvCynE+ZlN7R1JbLAw\nyGo2YlQVGhfwxDRVLaymQgCnWhBrevWjcu/wnZ+eJR0NbAb2zqmz/ZdvCJh4\n31nnr5t8nQwX2qdxvNnZ+xJx33WCcJzwYNgx82q0JpQV5XVXVahJt9RxTG0V\ng0Rc1NS0RQ0enoHdIqbfLaksShkaiVMLTT7n+BR4zQIfBlofcM0uizl2GqTJ\n/vU2BrmYhI20wW67TyzgVKGK+LBbA15If7V2xYFw2uuQGV4X6ow1DZPIKrO5\nDGIgHhyjEOihNWSpqeRLHlxFFVhUvljhqDMgSfqYpEdvvFtO/sMiB5LD5K9w\nB/xLc6TSIbaa/lwwVRya9JLefGgp97IvbONvuOp/yLbGoWPOsbyjFqcfXQ0Q\nS+BNU4EQZ32q6KAwHvELB78COnqNQMDowZB8bJMoi9aAGcEQXZPc9cvuTtrv\n/x8sqKZ6fXgVebJrq2hUrxEt0xmOuXYQVAbIqidVzQPQsATTq4P/QYC0ft0Z\nYfPBusCrvlx+1X7j6PrNF/UrrxjH/S5NayaDGVjhBhzvF358aLZeP31pm3qO\nE1Cw1OOI++zwOACJhySeQFU2av6pAPmXLfbUhMoaywAIiJyIhoVzC/TvYo3x\nEyLIq+HLooTsbID+MSN94Ew5ZUo5EbGPF0P5lwBOvvAs/DsIadeoWwJ4yUfx\ngUtv\r\n=PEf8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC7l/Sp3+FDtoISUpMefrKlwiZHuHFSiYv6Q7BS6KObIgIhAPxGaSV4iec0AE3Egr25DYBvr4Iganx1erAUB5btv8Gl"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.4-alpha.1_1571321963594_0.3402916312043185"},"_hasShrinkwrap":false},"0.4.4-alpha.2":{"name":"@react-ssr/express","version":"0.4.4-alpha.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"4650ac02b4057b2e21e77e80cad1db9691d21772","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.4.4-alpha.2","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-UgcsXUbUp/kLw+mZZ1Tf8UTk+FATQ5Caw4lhWke0zYSYP5rvyNly8MsUNSNPuHlFePmpweEl0G8++ZbSW3NfrQ==","shasum":"08f6e28291d346847ef69a4c7cd906cf0c6cb4e8","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.4-alpha.2.tgz","fileCount":11,"unpackedSize":18741,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqHoLCRA9TVsSAnZWagAAI0sP/AkV6ux8AOaduenJXsVl\nrozQDZgG8xlutQfHkbzUVZ1MHzyUdIvyISINsWGs+BroZUde11nB9pzU+bIF\nI6jWOcyhMc0BlmDPqlQ1ypsHX6dDhi05AWVam3dGTdNtmbfu9n7EM9fzGoGJ\nVnjqKR+UPzrVuvTouERy/Mn0trg1d43a13zKr8Dzk4scgESKc28hOXPzOA4x\nZVLk18AVZ/5My5lUvxy3sikrNaI4R61njKqhMRs5ZvQUqvBHjuZN6W5dfPBZ\n9d20ZTvRD+VF+b2e18O8UEvcPn9gBKGNNK5oB5QrGg+RcErQEZ90u+/JvW2L\ntYCY3JN6fLQz5eovdMzRwRRPJZmJJrHxlPAJ51T5mM7y4jCLmOeAY2HsY3DP\nA5tcqnkXIK0rUvEuuQZzp2Pkcsswt/OSIecuusYeMdBWBV0m0MuvQa3buXOj\n53efRpLbsfSgSKo8efHDkJ/bGrKI7KhC3lc+dIzemyPG2DZYM+Imm+PIOb9p\n3N1oKLoIgecmxSgL2XbJ9M4/zF4wEOjC7ujcFs2Ds/JG5h6FSVHmQNSQ3B/x\n1um+rL7U6RNVhFR5qPW4x5h5+srVAz60QCz4P+jDm7Lnhrd4PaQE+eqeKd+x\nqd2DF5eSzi+FWkeENNe19AuZi2hC5fw67cGbyrODH+HH1XrxUw9sQu0ms5UL\nbJFv\r\n=ucex\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHk0jbJsWKYbw6kBmZ5/10E5dbwLlTYBtzKmJ3SnGBOJAiAzEWXNJgOZyqKPqn17I2Qp9hzZSk1UzYV9HD5QoK6Evw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.4-alpha.2_1571322378716_0.13018951028142123"},"_hasShrinkwrap":false},"0.4.4-alpha.3":{"name":"@react-ssr/express","version":"0.4.4-alpha.3","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"12ded241ce615290fff24b0ac2820a1449483b90","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.4.4-alpha.3","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-TmkDRw1zPxKvrkn5+VfZm9nv34L+GSnQLHqXxCtk1YQgByFFdw4rP1ATOkb9EGvRwhFvPPXeTq99+TRA/hj9gg==","shasum":"4b6d8f6cbb4a25ff2789e6b555c016494c6bcf03","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.4-alpha.3.tgz","fileCount":11,"unpackedSize":18763,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqHvuCRA9TVsSAnZWagAA5kIQAIijwnjxGrgY8BRwMpcl\nykI3Bs0mEHCw7mBOtqFpBjGYEZgDRKNtyBdAnnW6zb5F6Q80bzsXvxKtz+9k\n4Gvax/R/UsrtqmufbgmaKaCHvsqrDixM/t4OeMDe/fJLwRendqouk3p3/QJK\n5qgeXb6cUnWVEUZAQ6EB3QCDpqL5/4H8msXLrSJfjRsmMA+TH4b7CDR6ZlGE\ncNvyLVN76jHyB0NKAUINrLsQ1TgS+ocwYN3QkMt0xUKuidCh+9XusaqrYtMn\nLU6oqQKS5HA9oPUGs48aC7w+V0q6qsmG+RPS1CS+bC9erkXgU55JQ/74yNiS\n/hVbtu3bPxq9Ld0Rft1TsiJu1jJnJZagZ7NstEbQCVJ0nZLfiPDC3aTGMEJf\n7aofWRIEuZCoxCAXRf5FOdzEiPdsoIQFjEz7xCrQOjTsEUzN/0qS5TKbQgJH\nPcSXbwzuNocMrEzdsMLbEUxU4ctuDh5Db89lN2BtfBPgOudbX7V9dXdDDrvZ\njp3X/2EuHxI81982DhzwGNAnkmPXXhzdvjSfBYWRQRcqMjHJm3ZASKLpvWFf\n8gWd8rev7gtsSd07K7gD3sKZ4r3AgEqKrVMFs9cFdLtBFJcoITEeorO6MxNm\ntmcSlsxlRVmtj/NbRTo3hs2HL8JRABNlN1kWP0VyBBpYhI/HCn3v8ANXTH5w\ng/xA\r\n=zAFG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGzecLBntd+BLAqDqDN8NRj1N5V5AWNUuZSC5pVTo8ZtAiAD/TtU+7+PX2hzmIZQYeb+yo1LL/N90ybfY926nHCB1A=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.4-alpha.3_1571322862120_0.5344062892742072"},"_hasShrinkwrap":false},"0.4.4-alpha.4":{"name":"@react-ssr/express","version":"0.4.4-alpha.4","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"0f91355c621f5d1d1f46924d433ee683600f9eb1","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.4.4-alpha.4","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-01gYh8fL/VF5sow1bNerpwnuQgSLuneWs9e7YD7ZtjD0BzQC9ysY9cZTIGGLjaCiV0ezfWsX2B9GC26V1Pu/dw==","shasum":"1fceec56383c1b8f7c904599f92e15abc648e198","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.4-alpha.4.tgz","fileCount":11,"unpackedSize":18145,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqH2HCRA9TVsSAnZWagAAQqcP/2035ayG55FBnjfVaWMT\n02PtCGP43m4XrjE6uX5qHSrs3XMZwztG99WMgHT9EchfpOwPrTyYcKx54t/a\nr/Q0aGbPPPBgLOpMYSWQASsHM5jwRHZUrR4QMi/w2v12VdSxYG09gexCev/2\nhtg1C0cAVEK8aP10fFQVWwAnHswr9ZS0u2j2WPr33RgL9kGC0TjF2J/j5GGX\n2XycE139y1VtdjkNbhVBskGKUm+gXyZPUwHfiLwYtCVPcsiAw2XOSE+TxZX9\nEdOGmRNFXYYJKQ6buuXS89sVM6nj4Czn4r/NTBU0im6OQkE8PBS8CzIP6wyU\ncScMaiOhgXMEPh4q53hcRDjP7SYLwF3Wj2K2cQ0O6WUm89n4tZjfrv1j+sKn\nvvCgeCJ8dCgQsy8uKpZoJIkUXEN1Tx7ThOBc/SuvN3AJ/Rpu3CMSDvMfOokA\n/BRzrgSTdmyWDw+/jd+fA5AR+ZpTz6/rzDvD3c+TAQ8yI4PwrU//4lsTshjA\nBMvJZIvuCbAujD8kpZd6PboSGxGmwmAQZtCcgpR6Ia71+Ea/Os84NoGiHKS5\nqfkr6EY3QXekOiUV/CCYfrwDCT7WPc4Sw8I0EoPmSdHctH05TaiaiVvN0/8/\nN7XtBHP4XG5zyLMM4J+S/RnNCTrRX4vWtNOTYZNqY7EOmg40+EwSGATJTHvK\nz7f8\r\n=fN0G\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGNIekzTUm2/GqKHp2oBvh74r6d6ckdaA/RYDDFZGSOLAiEAwIO8fy5gi6ZKZsCXyEpwGtR5FbKlwDdPoIeeO8zo1sY="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.4-alpha.4_1571323270608_0.7714800735316576"},"_hasShrinkwrap":false},"0.4.4-alpha.5":{"name":"@react-ssr/express","version":"0.4.4-alpha.5","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"046cc687e114cdf914545fde801d097f4d195cca","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.4.4-alpha.5","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-utJfk6+Qgk/gOiFT8yjvY6UddP5zHidYlo5/07nfan+kfhW2JGRc4uCRRcqEm34PTvZIIWBPzzpx8aVsDMe33Q==","shasum":"564c30ef5d52e9d0cfcc7b67a73c533eb858659a","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.4-alpha.5.tgz","fileCount":11,"unpackedSize":18177,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqH4wCRA9TVsSAnZWagAAMrMP/27LPcX62+jL990oiJuh\naBJckZOsg6ESQom7es/WX9WpopbVl/0J0jIErW+YNln7rwRO6K1nk8oHYa62\ni7KKqd8qF0VpRB9bpVovms1TH8KEg/Y0b5hm59kEMbZRN7gn3e5Z801c8GDy\nukgd8TfCptsemKlC1dQS0OLNq6YJtaqr4Lv4w2ucS9bsBfYteCJDmMPeJL0k\npU4ZsJD0HUMT+736OoaQyzPbFtY7nkOJQll1v+mrY+rmTsRALJN1P+O26U7D\ndc+S8+57Jda/BDzOwLKt7GBVytlsxRVkW8qvTBCTOq8KWrl9abph4nhclUd1\nQszYppdyuBXcab1WBb8/iLUVW0zUGB5yuJBYDL45RMuTJcnozDP70d5gY/E8\nupKD0cYH4WMmcVlNGP6cKvRFsp37Xb0k5VLvJy9vLGXpsCicRXlrM3h5f/cP\nvJQlTctl/nO34+KKAAwNHN6FTt1y5nx7hECsYKosED7DH25s7ON37MxrgNCW\nehSVWxp/oXlRo9PDeM/1Xs/M58PbBY64FWkadeGGkYd5N8XaWhK098ZIlIRD\nHp/eZTInR5I5Bi/rAzakeUAW270DNgF8KwR/YRvpH9nse7VqTRRdfR5GMHeB\nzSaHwdhQ6xIipcukIwboNw2RYDmbu7aeZZp+dAOMgX4MIS3gd7I9x/atc8Ae\nZZxs\r\n=Cw1E\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH6htv8HE/cfUl6ze0whvxcahjyv16DhmM3ULtQK94qbAiBZkyqCMHKabsL3fX00jGWi+tF7Z1JSrJ+cykhk5xxBxA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.4-alpha.5_1571323440071_0.6394887973284109"},"_hasShrinkwrap":false},"0.4.4-alpha.6":{"name":"@react-ssr/express","version":"0.4.4-alpha.6","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"bda2493c3d02d10b1bf517879d7e83ea3dde3939","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.4.4-alpha.6","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-03VGhu7rJZ/AejTVrJ4Kv5eMXngQShBhB1u3dIURNkYg7YZ7Ef+bT3m5ky183322/6ckrVUT40N30tJtpMwW3g==","shasum":"9452fc76fcc49e2cf1e02c4cf425eb6fe0866c58","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.4-alpha.6.tgz","fileCount":11,"unpackedSize":18222,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqH6cCRA9TVsSAnZWagAAD6IQAJbDhmRjdUOVHPfzfk2J\npdxG4P+Al8l5NVzPl7ko5l9ba9nEQQqWWaclk99OmTX+TnKDMMeQx7mKRZDa\nI4ydp0yfkKbq77RZu8iU/5InvQZtc1myim+X4ilf9n7rt2lyx/8KspyM6Y1E\nlaiHFJAuI+0BzfsOke1vWV/Yn1GuQXJjOH51mUBFyN/JYMYiXgQQUDVhcBEy\ndhuq1zf7djWtBrPVL9tv6Bd6Spz6JS38szWeCQ5CX3XFocwcl93RvB7ifFqw\nlebYJ6Zmgr/yETYSb4YXNpmvwZk9K+DIoGDGJkWntzEPNhEx+9bRtkcdtiXY\nDRN7HbFTo1wNwETWhbvD5uO1SPDXEnrXxjAKQnBprWtHZ0ngGOaHsGSh/RoH\n0j6pUWj4AtVmagDEnDvV847MbzoFVGfKAvh7Bjk567Zv4QkQSxdML0+fSlK/\n9afVfaaSDqrqWbcY8jKyi3vy0ytscsW3USGXQMtOUEd7j4rmSs5neNrDEik1\nT7MAIHo6CQCBiwR33VjDh2K0ynMoFJu8J04mUGaH8Re+qxQeVMd3W7d08f0v\n4QjotF/jtRU8Vc/bYTw+sHD3rYkVSHx+nV4UlAiTH3YHuk7dv/Pxs/fcUSfG\nbnKEMOPY99a/c83XFxslUXdwlyJAKmaTRqkMjngNlhSphmRm8m/1slCvZ2+d\nelc9\r\n=MQEL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID+90MRFBwWBAnzGK6E78DnZ0DTVnFaUhsDEIwAUj3WMAiEAhXF0nkuyMTxeLgDtf2sfLKejdOUASSQ4G+h7ze0tD9A="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.4-alpha.6_1571323548166_0.2588389074759001"},"_hasShrinkwrap":false},"0.4.4-alpha.7":{"name":"@react-ssr/express","version":"0.4.4-alpha.7","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"85920fee64278084c7c863e8e121921d00a14701","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.4.4-alpha.7","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-95YNPrnBqtRg0sDt0HcjbWKNdQrnDoXU7PvSmr09tzWkKaFFmgx9fwKdepExbcoYb2O4GRnqzntsCuYf7JcAWQ==","shasum":"56cbeed29699a48c59920b18f603b741b364ca1e","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.4-alpha.7.tgz","fileCount":11,"unpackedSize":18214,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqH8cCRA9TVsSAnZWagAAn4UP/RfikydW9XScN94CW1NI\n5pm4xSwNYi/X99kkO7+npalwIHmf5tHKijf3dDYdakF/sznUs7DfWhpmtHsc\nqtAoRH0bFL3wH/XAgXC2YxsvJfH7OXBapcxyZH/LuP1k2y6/9agcl3JquESX\nHmX10kM3FuFo5kRViSLMnqG6CEDJZMwXgwpRVcgSKvxHgeeynLy/G0RcwrPD\na03MagnOo77I5noEPXfbSmZWzmwDZhaA3B55jcwHRfY4TX+F7xXs73bntCVp\nAVNS1hFEvh17GoiDHnTIMpZ36w7aTnoKHy891P3I5Y7PFY+uQ2ptYT7BA7e0\nhRxI+qoqkl6pZ+g9pFaCnfVx/RPAm10Vt0TWbk1sAP8hBkAkEvYUS503rGur\n0Wjl+d5jCxgigSY7ot5dxLXSm754a5Cs7OZl+gyP1jD+Dqja43t1HrkB7icG\n/alIqrVRaeTLpidPEeNnDKRMXi+JxJMFSUIn8cFZ7j34fdZ/zotFsJz3fWmo\nrAFjc1jSbbXUio/U6xe1VqCX/eQPvL45eioH7kGBmMRZA79pgZy9UyRZIo2v\nnXCCcxDedWTGTdr7VWI7z5/rH/3tePPl1Q4O5221LC9Y30QnvSjTfht2EjoR\n/yW5jV9lc4Bz6nvIKtFbxl2fO9mN/YogE+aH3bDaXZnAMU+IDBd4pu87cMZj\n2PYH\r\n=Msp+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHrmwwl8iSnvC60dFshtcLgYeE42dToaPVGV4KFAx5IMAiEAtOfs3LC8dY2hbBH/43o5wpmUwRC+WK7wAtJQzocCA5Y="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.4-alpha.7_1571323676287_0.8416425942245462"},"_hasShrinkwrap":false},"0.4.4-alpha.8":{"name":"@react-ssr/express","version":"0.4.4-alpha.8","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"db6abfeb0255e8e0e4963fb95a6362fbfaec00ce","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.4.4-alpha.8","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-85GbHy0xYb1FeF+MOZhPTYhzpgURV0C3cntvDoc36FAktpaxXYLW8jyMu2JAqOxlGSh2BOYZcKvcdWLFBZrRlw==","shasum":"33a8d21e7c75091e2ad06a22c407ce5974952567","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.4-alpha.8.tgz","fileCount":11,"unpackedSize":17783,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqIFCCRA9TVsSAnZWagAA99kP/Rw7qI72143OnKwVf/XT\ncyvIewpL9Otcm3rFMtlszRXGpa8AotoDKPsKRWZV8Z0zjaWvNcPPGqWfrsvG\ndP7LVQGngj1M0bh7YvjZWcn3NLs+78vnZzrsVl5c7uFOJocDB7ZeR+S7G11I\nYwxw6rfHAlgI8KEzYVqz9h2rqUQQ79JWc+UcpV62+C8ElASWdcAR+O5x8hxO\nvBqsEIbK0Z6b0dDhff37Mb3OzKADwvAQEsbV77Gob96qcr8Q/X/e7T+klJH0\nRDbZDNXxdxq+foUUk74Pj0tl+YGfrbzSuMZImNamy9+yC6ol+tE8lxRX+jKh\nnntPDJgxnvOBIQvyw5c4SMtFluHuk65KYL5yJw+mC2l5pvO4B1Jrpft6xYG2\nsFjiGFF+mAooUf0fJ7QV7Fze/mn9DDxgzVS6RH59tRHjCs6WDOKrYO0xUdEC\nw13xn2dWJClTXB1mlNVuX/jEPmLob8f4VmprBQSNqPBj8E1RljQ7HmlIRBp1\n0+HyZKMi1J/m64hirtFcC1P5kbRGTNJ8wMR6uGpYPTLqrFCJOy93/ELC/hry\n0AN8USz+rOUAVJxl6vCvaSciHcenfi/EYqDB+79JrdwKKlVNvOiRBv1q7Frg\nSQivTpAdut82f2Slh64DQiv4ZTod2O/ZfCSGEZsnBZA+d+5SqA+nwu1TX4W4\ndlRh\r\n=DqAY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFMihkhJo68TA8kHkxzkiEGYRrl134al0sHl8VYZHjmmAiEA8IfzGq908VdQ+f83E/NEdS7bQKHM3eNKuLtHQy28A5E="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.4-alpha.8_1571324225770_0.5999751135821183"},"_hasShrinkwrap":false},"0.4.4-alpha.9":{"name":"@react-ssr/express","version":"0.4.4-alpha.9","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"6496b7cbd317c2b007d57c01662e8f1b4f939371","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.4.4-alpha.9","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-kN+zvxMvrjami/d024sc3BxJIddV6uAzp8Ztt95BVg31C+NMJD98wNbaNsC400gQBArWw2gpu0JQlhRR9odx/w==","shasum":"0d10b422a3295dac02f29c55db72362e0de4caf1","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.4-alpha.9.tgz","fileCount":11,"unpackedSize":17788,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqIKHCRA9TVsSAnZWagAAXNcP+QHzyu7x+as+/A6spuAx\nWdbCOoOaKrmd6LNY9bWaAe8loIz6cJfRNKm+Us7A/HsaCDxQkf7Cg3WBuuwj\n+LdxFln6QdJqq+vWg4TYbS/SbDydnnxDaXokXjZRUW0Uu7RhdNNyOtXhZbTk\ncAyuMYWc5JrKuID7rQ6AlhAoHtx3El+ecXBlO4WoXLlSXzEgfwVKgCJIV+7f\nNYnsLanRllBRKIFnfueIn09+3w4vPOweaJZHKDHB6RbDM8z7X+lmzdzbbdiK\nn6t0ShEaQ1ju4Cew3Doqat6/OggedcDe/VqLPKmRR0rUFlpPXuyBM77rctXU\nWxxiiZoa85DsJcT5QpCLQaugGW6ep2bGPnwZqXmmgPJsuDgXWwykFcLLglSo\nkyXOyRtyM7D8v4xnQIafR7inY1cmjYl21krSnrojVdBNHO5LjpsTfgiQeg6Z\nkaScNRNbDVZ7JAwmEf1SQUbrU8Fxwo+DjdTCwMKb/9L0nuxyEtNkoUTJDFhb\nKCQo4t2aBQBYoPPCvsm+6mJVqvG4W3ami0jaJ+IAGRnipxF3k1qVgPWcGwkE\n2h3iItVGIVV+aeif8hV+mSFaZXg9w2zd9faC3811kXEqjzHxwfQ+fAc/u8ro\n6YtJkjimtYwOsFvFGmt3rsuKJa2FAxkRpz3SFsLDKG+3KLVEYTOSiWqjw48f\nDGdu\r\n=GVnQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF5NHRI9Ynai2j94JsSUQQ120GMr+VBbkx2qwTCeTFAsAiBGpelZd0dJb1qI6pR5oU5xbdlUy0P2ZLxS4bN3kCmKtg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.4-alpha.9_1571324550945_0.8446387352592797"},"_hasShrinkwrap":false},"0.4.4-alpha.10":{"name":"@react-ssr/express","version":"0.4.4-alpha.10","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"4ab2d6bf1c5ee03c9d42746d5e90f63ecb14a2c2","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.4.4-alpha.10","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-PvRGpd9XxkJ5icNYJjUJClaKg0NAcGSrLcHVP/WaHK7LOwB1Y3LfvqfiAZXDh5O1w2cOHfq6BMI3KLpqbNyKBg==","shasum":"e99acd02b92047bfafcaf5a20cc51c165b6f2c1e","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.4-alpha.10.tgz","fileCount":11,"unpackedSize":17792,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqIVGCRA9TVsSAnZWagAA6LkP/Ao42PV4wqmuUWFW2pC5\ntaaUjwRp973Bg5j1V+4YlbtwxeG9RSEt9e8Be+MlUjoBNLqwPqSCeVA9PoYW\nIKJ34RPKHLZ8IdMvqCyNXhIf6tGVHfNxkRJUCq2XBL0jrHTsKrGsL5eNAVss\npM6L57pZaGOqc7rlOWwCuE3AgloldLi3s5wp0cnUunjFhW2d3r7Z2QRmqiMk\n0JNZEaksfEcBg30bxyaBJCfUpBwM+8N6wDipYykL+NdtTkdT50ClKnoyh7C6\nwsaKIeNc/BsXKpRFJ4I5Nl9rideKhqZC2GLjDjXTOstybmqk56/VXRlZ5afR\nwmXK/iHCV9loX3iJkUv3W2yoDj5wUbfgOdZXXlBguqwFOiTstMrnjEUB8ljt\n8PkyhvTbqepQRwSuKem/fRRtLpBQsW5MkCnun1VLGnG+JJwNf0BHQw3p/qHn\nzPOLkDFOUcdVCQKoOnZnLbpoChDF5GWfQLX4q24IbilD9WzVIv+aEWGP7prQ\nV7dZrpr5nMbIlt/gf/jsmlUItwft6QixAxbhNOBlFAoEO6ePuOQnIetGQgCE\nZM+2VRPiMsR/UEcNzpNsOzrNnPMgQZhnDJ1gtiAIEL7Q3Hb/xRrqS7242Hyh\niePzmRscaXHOLRdfgxQWGt/GkR6qLQStKYHol9kiE0+9iOiQq7gLKg1B/Ip+\nwOex\r\n=a15T\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBgoOTliyk5pDMikzAPyl6r/AUjMo5gu3rHOIqb7cXiMAiAVriNPo4zmsToa1vW+Q44QcR6fdqMt7AP986yVSGidig=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.4-alpha.10_1571325254105_0.3179308448220304"},"_hasShrinkwrap":false},"0.4.4-alpha.11":{"name":"@react-ssr/express","version":"0.4.4-alpha.11","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memfs":"^2.15.5","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"096f0a40ee86826dee3b09b892844d62c2e874ab","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.4.4-alpha.11","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-pqduTK8SCwL5awy3phsr8XK/Ej8t4xu4HKAjzKzoSIkDFzYvDwDRIDgu7U6SF1VsWSb+aqQWIRGqLQkdV1zl5A==","shasum":"4c617ba1fa3d8597da89c7f080fd7496c6ff2acd","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.4-alpha.11.tgz","fileCount":11,"unpackedSize":17833,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqIoCCRA9TVsSAnZWagAAdB8P/RKlPs201apevB0OrcVg\nkk3KIgJ1dnhdVm1fRp0/70AmiNAA+rPuHbrBTMLPSMElS/4f2UzS46S/obAU\n1hpUirCQEqxAzV04Wl73cpeIY0NG8Dm0Lahd94nWJ/RaCa5f9ZuZKX9tebF8\n4JY7yXraHBN7GKD8abqeHLUmUSJ4GlT60Qs7UP9ufZv6OjMhQ1/o3z2j/b8W\n257Grker/dqUvEpiJC7GeT/6ZrFFj+bImeUyi+tIzi1sNqcyUNZmXKaQHSSJ\nTgb1nziERmuEe4PGJpKl4hRY/LVDpW0gsA7itYRetq0/YiLKyR7os/O3t5aC\nmu4BfpDpUx0ZJhcO4BNFf8OsCZGZ9XFA0qltbnEgH7r/vrcs13KN8G7JKSA4\nYBZav+YI1zMJ+kd+CW5aujPsrhfNcgY9oqT4VL0rpfiwH+e/URcfRZqIABL1\nh12ef2NXGOowEleM+5iao+C8s3rItYlw/K0DUhsn1bCGpUCvew7SypnX2b5p\nIG7EvSS9GJe9BMWVxzOWgIG6mmXFj+JYFDCdRCyRvexqOVgj1qtDYq6VJumF\nrGwpTjfijAfSf/b4KyokDd1flCXIaH5av9k3fJv3SF9TkmzvPWWONvmVYcAr\nU9vcn7jBTdjyVWXiGPqfqbUiI+DwksYtlnJhXFlV678YhX8TxABNFkCgzgkt\nBpR+\r\n=xA18\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCOVC15qOeB3HCqY5VWMos9JgFm5Y+3zQXKDBy7L2pyqQIgZpbQlBdIavmRbyU7+PMyoGSutHDVq0GzQaMhIyNmKls="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.4-alpha.11_1571326465492_0.4410555237021754"},"_hasShrinkwrap":false},"0.4.4-alpha.12":{"name":"@react-ssr/express","version":"0.4.4-alpha.12","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memfs":"^2.15.5","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"7e86b34852ffaed80dde6cd05865d08631fdba20","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.4.4-alpha.12","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-NSrM3beO6VjWKBWECn3iX4rxnGsDleBZ2mPI4zYHYwFVG9/sBAZhWBDmQ+638O1Cbr/q8Ghqkc5fv6uABYmNfw==","shasum":"3eabd720f686ab3f1795680444db3706bc8d2745","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.4-alpha.12.tgz","fileCount":11,"unpackedSize":17874,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqIsrCRA9TVsSAnZWagAApMAP/2q8N3enlMWces3CwbOx\ni2XOtZjBkYO7+mnbcYCR6soTBIEN818nqJVmpztIgkFue4v/6ezUOz94RG2I\nYGwFF8POly90p0YiYXH0XsnyNNAwBD28z7vE2BtYyGxFyf9zkKZb/oZ6KOhf\nxVrHe/3URBWe8Lhkk33mcCJVaeXxL3t0thnoroCO5cVudlD2dHYHSWSd07Pw\nX3t8DIi3a29DdgkBkzjgJPO2cem6Or5vm2sItKJG5dbO6I/ZBP0+Nr095b9Q\nWZlNBmgvevWzgZj+Z5pT4vW2s5rxa7+2Zd4li8zPbQxfy884RDP9XdvQGqXz\n6mfe9ZWUDzfTdBrPr3UoLXd9+p5epI3aZydmAiTUuAm4oN33m/CBX7oCbjbk\nhjBqGG5gkaMo29occqxrFkDO0i6PgGiMCyYPsFBheVQEImHdVU41DZJY8qgY\nkFgAISpQXF9LWq9Gl1/84dKE4wogglrPumq+j9kGI98RIpg1iPqzZx51KTwC\nq64qvO1rwTT9VCqJ43KIQd4VjGB2QFGnp/ufJWwQXZQ5RRptMlx3RBCws/6Y\n00V5J1pMwuodQhtq8OjojBVNbt3xrl3+UfMFHixtwVkb5kbZivJqt+h6ahML\nSGnLf5mzbscaDSC4s5vdFPBm6cVMGRxeUDbunT8+MvwKJMA/Dnt5Y/FZ7Wr0\nF8PZ\r\n=CeVN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDiK6Agd1FwmgSVnzZMMrU2ydn+WqUB4+Gbhz1wYXbsAQIgV4fsuKH4zmWLOBsfaNmaU8ypulfPLxWTT5YYIQGvv5M="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.4-alpha.12_1571326762554_0.11425925994633568"},"_hasShrinkwrap":false},"0.4.4-alpha.13":{"name":"@react-ssr/express","version":"0.4.4-alpha.13","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memfs":"^2.15.5","memory-fs":"^0.5.0","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/webpack":"^4.39.3","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"52e1a3183a58494de8fbf6bef99eeca35452ae3d","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.4.4-alpha.13","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-AUQwl8iRwikDUVW8fnNJZs8TOeM7XaVvYq112knYFJvp5FD3oYA6VidjtwLf9BUYWW2euISK1RcPS6EK7uL+3Q==","shasum":"4d925bd62ab8603aa3a5a043fcbf9e402d4eb0e2","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.4-alpha.13.tgz","fileCount":11,"unpackedSize":17968,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqIx8CRA9TVsSAnZWagAAfT0P/isHlG55EAgSEggSxKsF\n+J/nfOoo5hv/R9IN3e3r5br0B3ggL1uR9jNEH5YzcebW+gHHUhaQ218Xj4/x\nlXiYa4Y4mxggqujiLagtYM+efR8fJoZMIdkH0FAosdN2Te9HNmQYTgw8j5Qm\nmscxrAYKTeTQMI6l2eXC/W6/DwgdewQ4ACGtGYM2QQ2+VpEVz23xcXZaA6WG\n5mjDOWf+W961UJri4llYn620StoRvav5PO+G/xy5uRHzbmkChrMxzxZD7Kaf\nqeHFCqXzdJsrptXSuSE7E1z2ECU0I5JyrDPVCvs2M13cjGRwfW0jZ/nO1/Tz\nwghOOy4bVPWtWWJ7Ues1Zg6QFCc1I0fQ8ozK3woJriUqG1qxCc7pyhJe20qv\nURgbeRwzdCnz8yBYpr2BZwbuX0C9TvS+FPPMGuVRp2P4csRvSFMq3WKVDHCM\nU2TcJgzKDmvkDj6F97DET59cQnpf5QoOPeedZG8GuuBo/Bg7J1IVlyiEAHBb\nj3KXnmn+ARX2JGHpQUp/KvpJCxkqRKBdF/xykz4yNS8eNwrn4s9irFxN+f3q\nS0A27oPXjPo02zwzJSz/8PrJCVrPmemzwR76YCKevMs0S//BqhcnoTwMZrz1\nAkJKSj9hJskGEoqFF6RKT0c9K3QbBv5W1ogamEA3UJGgmOyUXb6vTOT4XBVu\nFkxZ\r\n=9Iau\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD27YDS8nMiYdOaXbYD9FFEifxM8QTYiS2rBQmYTAV3BwIgERgesQgbvideE1DCjnuXVqYKZmBEDetKPv4NQaw4RQA="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.4-alpha.13_1571327099898_0.9552706978902608"},"_hasShrinkwrap":false},"0.4.4-alpha.14":{"name":"@react-ssr/express","version":"0.4.4-alpha.14","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memfs":"^2.15.5","memory-fs":"^0.5.0","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"ee8252e338125500c0a6a79e4d9baa004011dc1a","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.4.4-alpha.14","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Bv6kYxr/g5Tk5tO5FZezCm/7ov/5JUGeelekPVfl3FLPER4bhCTDBmezM6Sazr27xv1S3vQy9u/xOJYLt47JJQ==","shasum":"8b98cef1c605f5f939a014849987656ba0e67738","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.4-alpha.14.tgz","fileCount":11,"unpackedSize":18743,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqI9ACRA9TVsSAnZWagAA2o8P/R/0XypNMDn9bpgL1q25\nuvG6Qw1iLIPE2o7JULtf8MeIkFeGkVNjXQMWiji1KYH7K+Sor2I2qJLLDlPl\njo/O0MPfylKf15bgMt8CxIt2LHqL894Xinz3NHs9VHxuZn3FkYDGtjXKNE9N\nYHqbcC3nK4kgqrwhmrBVrWkpBxyUVMsgoJdEk03/DJLvNZHuwZtCWNVXRLhe\nhPBA2MeCUNQN2ARjjPswO+3FIjOrHHFaflVp7ZXiTc6x3wjMK60GTMvz6YEt\nst66bRUGV3lf5LjCcaaD6Ge+qyQ/7i9qrZkRDWwkkwLa2AOhIBuDaQHdoIYA\nTwfZESlHYObDq4x3MbFmhfomNchkY4K6SPQ9cgdiKNaAOs/rWswpqIKHZF/Q\nV4iTgAt8NL/+pKklTsm0RVUhqJwDb08OVX8TtfhEFEjt7Q4kwtlJrPgtVa2A\nDk4do1H6pcSOlc/dD7uH/H4mMlg3naDo8wbEcXVaiEYqXg+m8Oj4KXl1PdwU\nMW/LJp8J/MSf3vM3zEhjTLtnIUOCvkDWfgU7KgBmbi7lePNRG7+z/WpEDIpK\nrP+uMggJdM1/4NU1SbYEgV9xibGJcrnr5hRwPPnvhWAud5ajWwJzCF92mtOd\nfcd4xLe9xJ1+DDHdeE+SRSDVnn1QbO/wBxbrklB5ye+LE1sM10oi7q7KRT6h\nzXxy\r\n=4KsP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCbFUhdUDip990ZKFUdN+9KO9B5Uu2bk+v/YC17Ov6SAwIhANSqL5QYb+YVOES4ND7B4yewxWeqVptKxHm8VGh/fgxG"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.4-alpha.14_1571327807455_0.7083850349066878"},"_hasShrinkwrap":false},"0.4.4-alpha.15":{"name":"@react-ssr/express","version":"0.4.4-alpha.15","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memfs":"^2.15.5","memory-fs":"^0.5.0","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"7c6df7072f7526fa2799a71b192e4495f785dd5f","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.4.4-alpha.15","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-oiclGiP9n86azSq0T7wbikZ8D12z2wSNtWkF7eSrOw9afAscE/IibepL5XNznRHMVrrIXEGd2UwHk3DSFZWBVw==","shasum":"409f7f1f2120499eee98277a7b9c24c7daa2a488","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.4-alpha.15.tgz","fileCount":11,"unpackedSize":18647,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqI+vCRA9TVsSAnZWagAAoDEP/2Ist8f41KPcnHAPzVtf\nM5d6QEt/FejQCa6U0dZVqdz63qlLmPjJRf94KR/VFawOjypC/Ke0gmHYjoT/\nCs07NxrjEZqEBMweZBMZClL4eRtXSzSYwdkTZZWGuPCZdaLb4nu9KRZ43S4A\n21HKeHpBMtAMMk++LafYcu3Y3RxIS8r2nxoALzdjnxQbHDbTqpmpxdQgQAg9\nIhNw3QktVDos43bUc+6im14Q4kWMNbLF6n6qiAtvFHJ24STgna4j1BX8NZ0M\nivrf5Z2Pu3uCJjhvHTwgJj6YylVwVJU43+hf0RjMZ9Gba0rAdRwg7cZv8MWb\nXjzX5q0G0ryYoR4yz55qeK8aLSXD5LvalkGqaK+8WB2YrLZGeAmXF/Ca0nx4\nwgfFMrC+EOFV5+outDMiOeSZNsQ88PfT6pn8X9dBadu7kulZaCb1Neo86ar8\nTugu9HymzpPf7zZwvw7lWMBr8txjEr1/mvqFhP23loUDmKx4zdtiSK+P+pQ1\nVtdXNZNNLho5IKVDO5X9Jpr85urRe+eknOEArJ8l1CTPtFyasrOlwj8hWUgM\nG4InsUQiSG8WTFnpKHnToSHnZa1gPtYOy0n1Ef2SUSzHDoN//gCjndvRfU2S\noBmho7Kyh02grUsLHohrouByKwOQ3HwMfajQNPlbhAVLlEdeP06u6EYLa81O\nbp0I\r\n=TjYX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDq/guN7VGPJkecjTIVSkPb49Bgo1dQcWL1WlKDVAh1LAiBHCzfe4rGj2YWgns12vEQC7rM6zQPq4DsiyMMm/LrZAA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.4-alpha.15_1571327918822_0.8698874476800971"},"_hasShrinkwrap":false},"0.4.4-alpha.16":{"name":"@react-ssr/express","version":"0.4.4-alpha.16","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memfs":"^2.15.5","memory-fs":"^0.5.0","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"988bb7085e9463b73cbcfdaea926d5270ca1b164","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.4.4-alpha.16","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-JwnDRJPETrcUhsBrMhNCO+ESDvZPjYWTS98CIrvgCDRzYmuV5fQITwirQAEzAYPKD4/YBpAb+JFZts7P6/Mn1g==","shasum":"b96b7ca7fd554502228dd8a4baa1788dd615975f","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.4-alpha.16.tgz","fileCount":11,"unpackedSize":18641,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqJBoCRA9TVsSAnZWagAA66oP/3AP8HHHv4uf3H/DvLFg\nw0VzpbJkfPIzVyRa1jJoQXxZXTIB39fh0GoHLW+N4xaM41wotSyulHaBFtRf\nI30LgwSH0QOcaznEWReAlKcT7R5KICyFfbS0hy/TX5TiOc7ysW+dmGTGzIvU\nF4bwdwqlUsSSTcqGfT4gTZnRk6xS6NlTGpJhkbgWxnpBAZkRdiSB0VTHAgQC\nylzeCnylaAVuH0jn1QoYI1gANIHBK3xHNssLHCrNyOU3okVDT4+vMWmleIMY\nstSxU6kcF1lezmHXMSRZbpGGKWgrphLlX4CkefqkLXeByMMv9v8AQ5xob9MV\nC5Dj4zYDoq0JRB6/L92I8i5YqYQDXx857Bk7FmgOz7GMU9F5VJEwikIvbt+i\nUmKYoFDbUoidXNZUzGFU6hoz1ESt2cucEZI73DZ4cTg0voKqw6L6RY5MMA3P\nJ2acJomQOyr1HHwYIl0q+deQ5/a+uotPixHlojeNsv8t3kGTEqVugY449BC6\n/vtT621buPDibbDPezIaYkY/zzmgPExJoEI9n+49uoSg0coey6ybnlWB2Tcn\nDzu1XDnLBySSxDwq1roguLfaan5F3Cb6dE+AcW85mwVb9SeJM+NnKJLe60BB\nEyQx3C5J+RIOV3gWE9HcKQkSSl6vE76SBPJbcdt/ng7fSKxb5JdLx7w1bZXx\ns+Tp\r\n=aftJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDuZ2V42a4j+6OQkvexDjPs5R9d8Rj1YMV8LX1jdJ1NaQIgZztYBLnwfUCjcEXWg6qhgpp191TewH2i2aj4/v8xEns="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.4-alpha.16_1571328104068_0.20265208218744846"},"_hasShrinkwrap":false},"0.4.4-alpha.17":{"name":"@react-ssr/express","version":"0.4.4-alpha.17","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memfs":"^2.15.5","memory-fs":"^0.5.0","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"e81d490aeaf0def37e85b4ce6216e2fb64e5a64c","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.4.4-alpha.17","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-w44C8NH0xqBCzknvDx2uNOGyx6mGY4uNi9X5PpX0ZRaWGhv5hFUxMJZ8QFkRyf5djCJe5aVBYQxeeXSU/ugXGA==","shasum":"45f8b4bae988a802181aa31ba9c50c7520150ea3","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.4-alpha.17.tgz","fileCount":11,"unpackedSize":18512,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqJC6CRA9TVsSAnZWagAAWv0P/jUS5fsy5KtKKLBtjxnz\n1xZczzlnmEM71z+ugGtfGr/eZvuA/OVrJF9u/PJy+i6vayVKXJwdWT2AsIoq\n5fc8dTpnK/d+/G3pr+nZEAevUQWb14n1iUfuePEAH2r2KH0MlBEo5ZiokS0e\n0CpqiG1nZKyFSRRprzw7Pn1Z3KtN5b04J8qTMvTXBJF33Kn/LcNaSOYUDQVO\n/t7WIClPoHPoTbHYQbqiDy1PfICZYJnQRO4Plv8shrakvjQ9kDBXnK72E4KK\nt/jYTq2ITnSuDcnO/m1pUQmZXXFLzIjd0SDAsCDvk8VVkDRYSQlGtG/OKOsx\nvao+gnqtfiUgF0m2sIPtHoZS4SolkeexVBkSzWnDPQIcDYwzUtp0SHpY7Nt/\nC1dGimhhEAJ5p+2ZSiBrcf2oRojvGECMsfbMAb6dJFSbqaEZ8ATzrAwpXq75\n+EGhiok6mJo3X8rwxOm8NGglf+BjQueQYOxEjLFvKDu1P8AoMzE90Y5ZEueV\nTiJH/i9Qd2+HqdfxQgi9XwtVsL6p0z8AXF7Zdnww7dCEw0KUHFkDHz9cCDpa\noPuGr/usTXoJ4HYIuTIh0spQ76/f6AnebHpGetaBK0RYlRRPz6NTmuw4NFuy\nHgHg7gPryo5rA1cSw9cv9P99ktSJIilMLg4SdmC09jRZ6BZ3sf+K8AhL9tum\nhXfk\r\n=KG53\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCDxPBw2fAsXsoh6xdmVoo2c7mnYSnX3qRGiXLjQn615AIhALvzGnk8Sfw2LK64+IvIeA04oCxrkHpbErnh8bug4VQ1"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.4-alpha.17_1571328185823_0.2939332436112143"},"_hasShrinkwrap":false},"0.4.4-alpha.18":{"name":"@react-ssr/express","version":"0.4.4-alpha.18","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memfs":"^2.15.5","memory-fs":"^0.5.0","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"399c0c5c8bcedc4ab3e94e75562e7a77d93907ce","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.4.4-alpha.18","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-KuEzMRc7AZMe0yhgBOEG00VJnT2ubftKYoT0lauxfVxW7CX3BMTZOTU5wDXOlBdz2EOziesxXrxrLhK1ZSQc6Q==","shasum":"671259e859ea6ba205a27dac84d812ebc708ab0b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.4-alpha.18.tgz","fileCount":11,"unpackedSize":18732,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqJElCRA9TVsSAnZWagAAPIsP/0dpbZ6vSkHUHWFtq4NB\nkb+0YltUM2TkCjJorSTSt1cKBSZOj1W2JIblEyjMtJ6wmYc55dG/RbWGQmmP\nIsH691ZSnZ4qQD4Sz/kCGKIldQsedlhQoL32tZK2YoYLiLNN69+Gp5faYYTI\nfz52tI4gjL03rSAlGk8lbyk9ziNw3MhSeuUOYfAA9GXuNADptF5VEycqM1YR\nBw8+zj4ZD7naPx6Gzr2sGHqM4OND72cgA5gai2RzFzEgYomkRivjozARl/f4\naViKhm7D1cM3coHKZrM7fPMd9kRzBXhaT6J4IVe/wV8qu+XRFDK5wqhYqOx3\nE2RPueqFPAVl9iqEyaUTbaO8me8zyOoXgFoR6WyKAE1dkHjlxxE8VprTYVJp\nyXzMmvrV8dQD6qbCGPCX8aoxDtBk3dA6jacLzoSazFnRfu1I+1nh0B6GMlS5\n7pZc57oIK+KSF5GlHUxy9lV+C9Oxz6CfaZxDQfDHtC1Ij3fmSrh80FWf0fvc\nMbOA/kylTPsT2rzbU5zNn05aLuEfZC8jJW9zSNTawUAveCHY+zrE3cqSTDCK\n4G67xvmifD5CAz80sk0UQRTdicveGmqwHGeAmbwhy+9cdNlirm1aTQXWTR/U\nyjPO5iAPFLseD6xjVruxkAkoPuGY6gN1rETmyhiZMz/ve+KlbTlO1etb/HZd\nHrE7\r\n=8Fxy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDVnWtBlDLKHj2C9JbTv73NaHthvQkZlbomIJYeRY4ilAIhAMHgvUrBz2UWwhTLvtCUowQy86EWAMGILUv+bV8pjKBO"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.4-alpha.18_1571328292523_0.948119830423189"},"_hasShrinkwrap":false},"0.4.4-alpha.19":{"name":"@react-ssr/express","version":"0.4.4-alpha.19","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memfs":"^2.15.5","memory-fs":"^0.5.0","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"dff0fc374d0f5ed6dc62debf8fc7e6e5428c8d40","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.4.4-alpha.19","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-uwVGP7QYIhYRSD3nIu197AWFRPviacVcB8X8gCBiImQJGWFOHcdxEbke2o6OmvNhxFfHzharoRNp8O+CZhNXkw==","shasum":"d6c723f69b11f1c2f170d3ad72fe63fa2259bc23","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.4-alpha.19.tgz","fileCount":11,"unpackedSize":18713,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqJFyCRA9TVsSAnZWagAAHvgP/RYZ6qjqGdWAFjT+Ruvk\nsz/f0LbmoMcqfokCQg7ZHd2+gNTqDgu0PNnA7q3BpL6WUB1Eg9SrHcwUd+eV\naBIVxZQR+SLZXpCT1zCE0m9YAV16QoJSwzy3GKTVlFTduzzmlyca4G4VDAZB\ni33FiDHc1pWWwTywVftBJJ1VZ+iK4C1E63N6+gMW0UosOMUQUjuG4xVCdTSP\ntTfY2lFl8g/QMOYpkrUHHPySnyTn54Wa9SjzZVdvefKtyWiiR8NX4oOmdzRP\nMiyzt50yu27pB4Kp6eyTGsDZ/NNcjkdMzVTffKAZVr8oCW2Jwj5TLW48VodR\n+4LMECwXZNqKdyxWSJqW7ojnbk2fiQDc3/hFDsQ0n9WDEFFFj9yDq8qT8EfY\n7wDv8XGqXHm/VqFhXCMEe2QIyfqDUNO7J6/KxcNaE1x3Vszk0ileop3LMhRR\nvjiglB95kRwXeB+NULRhsA8kKjbM6BMJw2XUjw0fD2PvifbCc0SYtmg4Qh6u\nP5o5kIwihlKJLMHrem3yRBqt1yG7wJ9V2dfKNL8ZGo2snRD5ptlvf0wfsJ5x\n4KIHCTqB6kpQPU6unOYpNOcpkKzymH1JGFOTgk99BFIxqqAwQmMn+81KFZJ1\nThATXq8WDjPre/sUdG/NcboQQTQbSfInhE73Q0oZYpbUJzjORpEv6EetPDcM\nVMY2\r\n=GVsw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBnoONJDdMIN/5zDRUwCU0fJEz+nZUmXbs6VafyDBDFyAiB6g2yBHi/Ptct8R1BZcy/ImnleRNKUS3390N5uRY0Xiw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.4-alpha.19_1571328369944_0.21118875033331697"},"_hasShrinkwrap":false},"0.4.4-alpha.20":{"name":"@react-ssr/express","version":"0.4.4-alpha.20","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memfs":"^2.15.5","memory-fs":"^0.5.0","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"bd8a57d0cce7c2411e19145c393abaa2f5dda520","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.4.4-alpha.20","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-//ZSsYNLDWzLtuJbMSzHWIbIjvrxCqJypvW/rV3ssmOqQ9AYRGyGVcVUgwKsAWmclO7UYkmmvceRUQgQqZcVvg==","shasum":"c64a72c8395f646c16e9ffb138527a12b85600cd","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.4-alpha.20.tgz","fileCount":11,"unpackedSize":18647,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqJGgCRA9TVsSAnZWagAAvfkP/0QEeBHTZkvJ1tvz7kKy\n9DQdQG++PWN9MwDZ31F5+EzLdT8Ctk0r4RnGaCcAiP4Mw5ZNWWiAEtkl0ZKc\n/4d5tNTKN2TzlK76OXDrxeV9rWkR3vXLc2ktEuRKOf6s3McFCXIEJDMdGjsP\nL5nB/u9qaOTParU/sBnG4AqKLVjeclLEbrplEweWEjH91rCvPeyBaov+ndID\nDI/56sKUliXIeqBXdwDMuOfu7P3/rrd6urygT4XbCwD3V88/1HQhfCE+ng4i\nmOLny/gE+kfPD42FGBEAz0dSk+yI55zqbl/fVuHz665LLuShWqEZcF/bokHI\nnuiV7P7/HWlJ6eIe2vRe72tDOX4InN79kp67Fol4qm8VVA4Y/lbsyQ5h5vZV\nX7qtKbFEDFsxeTJFp22RhhEOF1RhU+M1G0sfk5Dj7Z4GX7l23SVim3TyMeE+\ndfD6COs4xhpVwcTSh//g/ayi/f2W1d+fy5O77gDZHZbkf1cJOlvjbsxhLJNK\njRd+LFfk0ZM+lmokbiYUN1ggoPLe69uiyMjIahGnsebe8mzD00LEzXKrnalL\nV3sQbe3iDF3tcITMLHJAzD+evgrzEjM5MwdJAyNIq+imBukuimveSd4fbB21\nuUi9JuOiq5dhLvQWWIj+fdHfJJ1voGV9/9MtH8TrKS/ax2GEZgopjNwLifoU\n1Wuq\r\n=esZO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDzSw+jpAE1o/ERf2sVJti5ExoHsvekR9FLnBlbE39YywIgeRs9oD7Y+71/8CyRsRnq183T9ty7rP66SlxQjVvc8wc="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.4-alpha.20_1571328415918_0.34417771860872315"},"_hasShrinkwrap":false},"0.4.4-alpha.21":{"name":"@react-ssr/express","version":"0.4.4-alpha.21","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memfs":"^2.15.5","memory-fs":"^0.5.0","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"594c131ec113095f5a0a4e4bca80f8a82b9413e6","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.4.4-alpha.21","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-6PJlQgoeZqD8rNDA77lFqeO2jqm3dHpmhL0ivkPyHdWLOSTJZvf/Wcqgz+bV85BfN7dyUxzJ1xCRIC7pjS2h1w==","shasum":"171a69d9d0794163635297a3acdf73e951b6bbad","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.4-alpha.21.tgz","fileCount":11,"unpackedSize":18422,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqJH8CRA9TVsSAnZWagAAegwP/RSloncf/g4Bt6Hrgtem\njFeWPR/wrCCEY7gE3tTn4WQHs8ZF21xuJydat0lo2GUBH9oS0K0RtnrtEMYg\nx+Zqj5t8KLTP5AZvm1JFszZwHQjyMfj8uL0tu6WymSJZAbq7iLKy2uvGa2QK\nM6O69fDuzxONwvvdBQPYTkjeSZZIHpa9GrKnKsNFBoZ+eEnFNoX5XIphjzsq\nhc4f9fT6cSiK/2qxMRbPR0P2AUo/zi4Wbrtxl89BYA7jXE+cizDgmsPVWUal\nusMYtpRoken2uDZZ+wpzVc0+qycsjwT8fvLtRGJDuvaCG8b+fOm78cl9qVvT\nXB4oqkXEKkNpAiP+LamTpVS/+hZebZiSFjPrtG5eK7haSq2/tKbZ2USMPcm3\nx0FNNdKAc5+yJ8PjIw2KUbwbq09KKMTH1h+XCfUzr/ngXBTqb+EPLzI4ONt8\ntEOviQVxYxjzmErN33v1wWYMDvImN2KVhhAc2ASXoWHAsITm1BWL/B+spc7j\nSg2sGb6qUwSuD6TWXmnw71bbt/fbYYtAKfq5YiDhUL25NOlsCiaj9B5h7Grk\nHasoiizJz3IdHSd59dS2nQVGA+CFcJJNvgZYu71VqIFu2sENGPhH+tjva/jg\nyvB2ZdHrfUJp8A0eb05ma9+WclX9ers1wLfRYq447tmYuLR7Obz/xpArpFBf\n0//Z\r\n=PM9u\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCM8zd3L/I/qusutOZAmZ6yU8fmekxWAa4YN5I9DA7gFQIhAJXHXz44ZAiPYKLl3gwqOL2rlRpX/YxLY6NbewZ3VVPu"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.4-alpha.21_1571328507888_0.06508793783824451"},"_hasShrinkwrap":false},"0.4.4-alpha.22":{"name":"@react-ssr/express","version":"0.4.4-alpha.22","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memfs":"^2.15.5","memory-fs":"^0.5.0","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"00d6f96c6b137abc4e9629781665846047edef62","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.4.4-alpha.22","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-wxkjLQupU3ZeWK+fhZlSzF3memY24a+/2EH7w3Zt11Fc90Ex9b3W6y0ehsdp9HPdvw1eZLyfMpPxWD/0WYb3Ww==","shasum":"70f913259a763d509a332f78974395796c9341d1","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.4-alpha.22.tgz","fileCount":11,"unpackedSize":18289,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqJIsCRA9TVsSAnZWagAAh2QP/3KNCsvyhgQ/FpHrmg2f\n3XL15HeLjsRNzI/Puq2j+AJjjGtkMNnNOUpbjzoYvV63RlgrlHI3x8d1XKl5\nOsvMg+YX2ozONmDZGf2D2bcCAw2JiK8pLA79nHSeX/KYDPB4kdCy3f6VYmx/\nuGrMfPnzZP2cgU9ycSe5C+CC+Pq1fga6qJ/w8wWJiCG+fm0CHSXesh8ObbIx\nTTd6nTuvlHHaztnKtpWBj/cj22+C15QM2Re2q0Wu93dMssqubYuuhKbQfx5a\n0kyl0aK6gqEnAL7Kz+HXxShAvs7XBK1E5LooqdF7eUcuLUZ5STqoZFimAM/5\nrYpoxN8yHWIE5PmowLMfZ4BqS0yfJ4p+B1qrQDZDXzMFC5Xsj2Qi3SX42xBK\nt+CZ5q/0e9eYk5fUcOOI/VPvfjxZADgas33/dZyDufqkpAvi1tI7v15ugfHj\ng8vroi/pcTKIptDHjx2jxmeGzYhAesQM5GWoDXVRJM6Z4vNNltHAEwDM7uJf\nxK8HQS06vtndAAi4yvfllOkkg/CyP5Ys2xA86pi424ztDbaJfdY4fnlJ1R4u\nLR33AZu2m/iPA0uxb9Dzr+jA36AyHfXfJK9rQpVviw6aFNYddAEls/Q1m8F2\nAyMdgLbV779zsH/C+0r8ks1u0s6Je/hwFk7OmP2w5XFa5IzGq9pJqx8l82ih\ndF9E\r\n=TLgl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCgusNIDvgzd8EE6YozIumfG7WuGp8abU5ZDd/L18iIkAIgNuHA2T1Ysl7nYQvdn7ShD4MVgQ8bFBIqofzxMKbCL/E="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.4-alpha.22_1571328555580_0.17837714308930064"},"_hasShrinkwrap":false},"0.4.4-alpha.23":{"name":"@react-ssr/express","version":"0.4.4-alpha.23","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memfs":"^2.15.5","memory-fs":"^0.5.0","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"a41268841f68dd954f8d48d906c8cb9c1eaf4d76","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.4.4-alpha.23","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-cWZ1V+K+zdeyMnTmMJgxM0TEO9+EVsmG0XJ914PDwNIJuMpZNZOhQs2WIqLWIlMYip0s1nOQ4XA2WeW63OImxA==","shasum":"70ef7465ee322620ac9715c0afe627fd16572604","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.4-alpha.23.tgz","fileCount":11,"unpackedSize":18556,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqJKKCRA9TVsSAnZWagAAYaoP/0Gj+fbn2RsNj3c6gOfY\nOo0FH6j4lGwkLtcMO2NJhHlcKOCihUQdHJjbY5F9cSS6S9LntdarbmcVlzSM\npVmg2Yxd3GP8Z6l/mvdZRnHuwaEy1Wpvo0M8wc4nPoLbIviWIfvOzY0UyIXL\nVReyR+KpHr/ZfyQoCNyvMoW3KnDvgLbbtBHQ69UPYI8gsLw4249y95qPqkIf\nLWUYt498KytJa1YPUcMfknfiBPOB4KEnC6ubG5pQq7wFtroecsEmd6URah63\nCNRv1a58kT9T1c7YTRsWVH/xaoSTpJl4OefH+iLG4Q/UXq1dku9q+OMWfTXe\nLcT9Td2m8oZn9qJGZ2sNZF0azJHED4fGT3ICTGls6Pr0ZKmcMXf1Oee2G/nT\nmETf46OeXLGault2vjCoRYitseDiMX/a2ngDxQnYqpZQs+a9WPQg39quVnsB\nC23ydE2ktrwuByetEMIdWLIBRKDx1R8ov0dE4SWCu7U0m8kNmhAaEVCYTuKW\n68TpOO//3bnl+YpH3ISThkDcP7yrtkWLoXloSUoZ1+BFpAN9wLx6+kQV25Fp\n/35Auj3gOzjLry8MYx3XIPWFF27XGI2XNrR+fLF9GAYy8Twef+K/FBIGGCpR\nnOcOCApyf6r8ozlcm6vu7hcXuprD7sYVTvGWXUDVVnIy9K+qFV8AlNvA9gqP\nzG8/\r\n=oNT7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC6Xdgxvn9YJ8LJUhFDDce7jnGZOM6ay7LG9Y0n/odNTAIgOd2WR/nzs/G78wMl8c/sOHOHo3DQ9IVkFygcc+OOn7g="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.4-alpha.23_1571328650064_0.7513676774185041"},"_hasShrinkwrap":false},"0.4.4-alpha.24":{"name":"@react-ssr/express","version":"0.4.4-alpha.24","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memfs":"^2.15.5","memory-fs":"^0.5.0","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"855f2652ce9464b6b99c432f3fdb477941757e42","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.4.4-alpha.24","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-MUqwZ3eHewDIooKEt4BW7JZyOE/9EiR7sNPw97kwVgahRimW6peaKdt7l2fWUIgw8UOlCF1uxdZDmfdgvaFgew==","shasum":"ebd1fe223505a70aa7dc457341aafafc162f0ce2","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.4-alpha.24.tgz","fileCount":11,"unpackedSize":18487,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqJLBCRA9TVsSAnZWagAAvWQQAIGtwXOigNyehamYNw6M\ny2jWmYwsI7T3MQsWiH8DAJ1GOsTPB7ru0DZPnN7F9NXnaMi0vE9vo/JIlTRp\nlu/ha8kUn+QlbzccEz0iXW/shNVt7vTMllTjPxb+pbwuGQ0VE+ak9RdaijXM\nN92iFdsoUKL8L5N170FfsmfBVrNoV/Ccltth+O0/sL+XM2nwl895phPRFJ26\nnqKyXyD8RaFaSYzuaQA1YQzeaJuInL83g3bL+bkrgkHI/IdI8ykbL+L2Wu0b\nvkrXCVcDEFwHC/gOP0amN+/EhpmenskfwyhMY2Bl4DFA5I9CmZDYNCed9f6O\nTHmS05PF6K+SGg0zqdTT5i24veeR9aqbny/X2c4zbLPDdelLvy/tsy6acvSX\nsggAPb2kPbnrh+u2VkceoShSyY2zaB3An84tJ+RQVXnneYSNTtmGA2zh2SoU\nYUgsWspeg3PGwCJLSPj0Dfs1MNeSeNfesKbvOdfnrAv24XjfRX1GtelF7VYw\nKn5ZdZKbwFcDOCI44M8yzPJl23DYux8aGFv44MdbNKae3h+dCc/TInB4CIgY\n3YWGO7y8SBwO4TA3DUMkbpZBeZpg7rHxDl06FgDVzugNH5B+V9Mw95a8V0p3\n15PtaW8lYPWNmK4ydC3BYZWT8xU2bRzAYO+kJ2zm6cmpQDmN9dovrnB8aL13\nvquu\r\n=BXXm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBnJW1PiKYGb03kggNqqYuWZQvztg3knv56RzJh6CDcZAiEA1ctZSuMCe1u0DN8GgBsBoW/ePEC41RRulkdrx4tDprM="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.4-alpha.24_1571328704583_0.9682779686986662"},"_hasShrinkwrap":false},"0.4.4-alpha.25":{"name":"@react-ssr/express","version":"0.4.4-alpha.25","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memfs":"^2.15.5","memory-fs":"^0.5.0","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"be38bd86d26e4271b2c4bfe664300bef075fd9db","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.4.4-alpha.25","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-CO6NANyq+c04yV8xsHwhCmO1JDWhoRbZmtfE4eqqvyortQMlr2Un5vux99+OXjBfh0kgqGoHtYpMT49Sm3hcOw==","shasum":"7d187dd4af0c1d1da9121436c03efdd174b4c997","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.4-alpha.25.tgz","fileCount":11,"unpackedSize":18421,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqJLnCRA9TVsSAnZWagAAGUcP+QBBlqeEaXZFdgzO3s1l\nS8KyKDlf6/g0SHZ2B1H/JAJJKO6pu8b9uPodDGWwTBvWZD0SkGin4X+pRw1G\nWfMDvVif0Bl0Hv5xNjNb0a22VdPGkaSwQoVcZEGdf1xxbTq930DeV9vrkcjL\n5mK4vIjCWsGxhyYeABBjjdQO9j6J/eYEwMnM9e9qLJj7nA7Up/6amNhgx/pd\n21hqtIzdRrbolKmZFt692bPYHBoR7t1FlxFujwN99Rhc7p3WWU+4rVQOVeTt\nWsplZK7iTn3ECNEriJktayaF3w8I+Nn+0E//qrGFRrIPNGJvT+L42UkudQhx\n6I+FoUP85FBc22va7VtXimIbmmDOY9ciJiyOVBbk39MC0WdUcx9k10XvI7TJ\nlmRt+dzhSGk52K3LwiN5qjDAvfc/Sqhx881p7ORakChj8fxwCutlMMB1dokb\nvAm7UMW3LDnioBC4wz1sC/BmtPhvI5lxu/zjle+yFgQgPmEB3TMSnYgXh5S5\nt6uV68JhovzP7xT/8IeMOfdVxH6VInxMzETnxm5QfHiJhehTYAD00xRTYVxW\nGCXFbpd5eTL4GL0lj2PIv0hv6PKh/F8XZFnnglk3TJn1XnUeku8Cdi4xcWp/\nEOptnfE7LXJ4adJWEcVbjj81MKLd3cqWnSe2t3ZTxBZ4ZArzGleZAZx+ssHx\nOfsH\r\n=m66E\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCl7jKzYvXTcxgEZ8hnc1Xa84aro3kqSioKrGig6POPMAIgcIqO3ceU1cMtKISxlWjexlK9PaE0atT1oQPosx1MLcw="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.4-alpha.25_1571328742899_0.7094958322050804"},"_hasShrinkwrap":false},"0.4.4-alpha.26":{"name":"@react-ssr/express","version":"0.4.4-alpha.26","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memfs":"^2.15.5","memory-fs":"^0.5.0","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"1a14e0ffdc9a080e1c09f879a824c3c06080451f","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.4.4-alpha.26","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-GmHVVvd2kvPoFlLOD1FZuPk+BMcILrHE3fv+8eLFgpEiayP4SBWTJmN45r2CYFb3vTuByBT7i5FejyPf7lrxdQ==","shasum":"430ea68c03424b06b30fd58ee922bda4e6ea7a25","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.4-alpha.26.tgz","fileCount":11,"unpackedSize":18371,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqJMVCRA9TVsSAnZWagAAlQ8QAImBT3YbXyxaZNJXG4Ed\nnEzAAqOqTjJhn69EzNFybSliYTUHMq1ViiEtR1vaPreqrATcydg1MkWFNe8V\nzeRw4y3eHvyggFBnQBSK/YuFVpmftMXnIvoWyca1t+mJQ5W+i+p3tz3eBcdL\nMpwAKW3OL+wIk2UYaIKn4E0C7TnSnkHlWHFX+LnR8CYzCa/Ppjdi4kwnbF3p\nB2mVwoWKXyjqFQZ1qw84boghnr2sOsVujzGk4+40ndRIryCEQq7HPtmE95c7\n3G/el/tyz5YqFScLzapD2tVFxpc35k2AX8KI4uKnhaLJ4U8Hex17BfU963R0\nJG7Emjybz1psFD3HfoOMntER29AvY7z/RzSVg6EDQgNnAxwH66V0iCU80ZCl\nVz40C8//OVfy+tkpcRt7uKSnS1qvifz6L4NaGPhcw4ZeWwk+FwlQ5v3KM4tQ\nE9DHC3L0/b9KN73grWwkcRDCJhMGgxsm4srCuDzfMNl7Lh0S0amzQ1/RZu8g\nW9UnSfdLt445diTbP2pcQoX/XjhTSLmyyCTXDcwH8uYvrvrkxf0Csnk0ZYNa\nJx2H8c/e+3evqZOrWhnaIFNwANbTH4SZT9DXZQeBvHglGqNddA2xepNcwAg5\nS1N0zNzlUW/q04pqwxdmfB5aoGPF+4mdkD3Qi7EdJ4lzlffmosJx1BSXZst0\nfDej\r\n=hVC2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBJyZgF1lVN0Li6JZOSpjE02htZtNmdhkJAG9FFCUKKOAiAbo1Zfupjx/8lpYLqhcjUNOhWBz7c+Flzr0NcmInNskA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.4-alpha.26_1571328788632_0.2997857536280666"},"_hasShrinkwrap":false},"0.4.4-alpha.27":{"name":"@react-ssr/express","version":"0.4.4-alpha.27","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memfs":"^2.15.5","memory-fs":"^0.5.0","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"d5b2ab3200f3c0382102dbc1d9b8ed2137b2d827","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.4.4-alpha.27","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-DKnrM34TyOQk3rj2eca4GujnOagd0+bm/lv/o5IGFMYMt86oXrm0piCWveITUx6+RO5OvrL0ByE//sRvOz/7dw==","shasum":"0c345c9436a68f9b5ac623085f9ac3b1f2e4e72a","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.4-alpha.27.tgz","fileCount":11,"unpackedSize":18392,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqJOFCRA9TVsSAnZWagAAfUcP/iXUjRZ+wwyZc3WzlUNG\nNMtFK8owvaunveokRTEEWHMFeMfguDRhpdBfhGpL3tH5qz6nNwI5QMKC4EmY\npXh8HpyR8MmVW7XUNWJN2szVBsC4whywBJIWQKehNM1jjEPvkxRTcbMDY5Qz\nV+kP7pv7l+GvMu4f2HahV/xULl63+CoN68Ij4+P7/oMzXEj5HMa+W23Yba4D\nL+7GXRhUHrzwUpAJ39jspxY6jueYf18wj+6tHa0woDRGi82NjJTAZ8DdvKYo\nf7TUSROkx+qtqdhE1oNeOXHMKPlkvc1w23Q8rXq3s6KL9n+UrCh2fVI/Xk5o\nVfxSBepb9gxJgHCJvtfEunN3aGuXccgvJycpk6xLylHPSbLLg8z90WlOGqy0\nMLmyqu8XOSjGsQMqgIT4HLqTXcHxm457De58f+2hGggJo3eEHVoJ7kvsrJla\nmfiuMOZycjkwKWE5gqhFZM8hPRxzuW+qwGY5bQPC5jg6gNwtgoFSPQ38ZC3n\nObSAelYuKVmAICYzIJ0qtR6WMZDiyfOI3Tu+oJxvkJ6dc6NXGy0UOvmBP+p4\nPTaNLb2tnzlcx1kXmOBHjx7SfNsLhHvuOpx93U9J5hQooiE1A49ifv0XnAAl\nd0U3XCUxApC5RdzAgWjLw9kauxCmBj9mMzmAsbNQNgBQ/+ZPT/qQG693rv93\nMpAG\r\n=6bCG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEX+nre9L1gaomTkQBKPzxdAIhex05c7Fo/LXkTx9Cb9AiAp5vpBY3gQZbVMN1Xd7aWt/jvCzOaeqCGFSqZYrOX35w=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.4-alpha.27_1571328900539_0.7356201143734382"},"_hasShrinkwrap":false},"0.4.4-alpha.28":{"name":"@react-ssr/express","version":"0.4.4-alpha.28","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memfs":"^2.15.5","memory-fs":"^0.5.0","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"8d3a43eafe48049c74afbfa1ab4fb37b44117497","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.4.4-alpha.28","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-N2Scokm5iVWI+qQSiGmJ/UMWTWLtcbrl0/t88mQemZhnbeU//kirspwAZ1o5ReApxZbXANBBNMWrZ410hE0HCw==","shasum":"785258fa3b5a4adca2e4eb9c976a0ed07d8356bf","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.4-alpha.28.tgz","fileCount":11,"unpackedSize":18471,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqJOtCRA9TVsSAnZWagAAjx4QAJ/QCtc12qO7b9nyp86P\nZVUwVMB2Ds6WDvC94sbBlhRBTjKTHWnM0jexN0OsBDg31zv5CJB83NEC9i4e\nQ2u8iBEPyowXrs/cZQSMToJiBiHvDgo4yAM0NXCXzr5BI9KYrBueFteaj5L7\nlLyWZ8cM7OTkNg/eV7gAkiwDlZ+sOIiVBx7hv+bmW4obIqHlUvexNCv1LnBV\nTQduDtNqZvIh+D7BokX5c0Kw1phEsJrnMNlg1d08ZN5mACZGFtAk+rCB7uiN\nNl7hcHb+19/jAMImChDCFMZigKjKglRkUFiW/oDSrT3i4Biy8LrMvt9K6+3X\ne+EyN74Uz8nLlv3t28Wq7WikxyiJQmPfrv/i8M1cmY9sWITUAvL8phYRbdPo\nysfJ3VfIA8347qOtjx5xol4kz776V3hGteU3t0fyBWL7n+M5dobBDcp87cTt\nG/QtVTBTmudFl1XsA2jkfECy0cmUmGtQXTqZsVWVxyFwumP4Rlh5Pn30i3df\neO0RvXH3QIUgxJHfgMMACYeTpSwM+zTgq87t83DBdNVKDV+rXm/bSra6sVvT\nh8UrqOEAUzjp8wzgrbY1skTXiuXHY1uskNFnSaykPWbbfkv0XqJKB2Dnz0M/\nq14rgvDX7ZZ2xlFKxOp4NK9xwBrY0UGE/oETG3uH2K77mmnJnzjTHobdPPEj\nOV/9\r\n=aarR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCUvGXefPSNIAb/50uHgysxd0JV+NlqhC/o1uFyWN/ISQIhAJP/MaAiualyVubJVcEedzZwTeZjtjDWtk0Lh3GJ4Vny"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.4-alpha.28_1571328940417_0.24255480471490487"},"_hasShrinkwrap":false},"0.4.4-alpha.29":{"name":"@react-ssr/express","version":"0.4.4-alpha.29","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memfs":"^2.15.5","memory-fs":"^0.5.0","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"c71595dced299645f9e16c6c4af641b16778b101","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.4.4-alpha.29","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-pnQkpUToYHetgE4PLLc16azVzWOKz9R9PjLPvaHDq263MHTbJBki91ngNmb6CtVFyFu0rWijrv3A7b8oyFgxdg==","shasum":"de440784f84adf616c15038597666347649bd230","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.4-alpha.29.tgz","fileCount":11,"unpackedSize":18608,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqJPlCRA9TVsSAnZWagAA9FIP/R6MjmZgIBVejmXUatbV\nIv9GMq8THObqk8z7muObaJ7U4ZN3cTQ0XQLFmJXe95caEWAvrWHvavY/W2i1\nUdgm18j+VwV9/RQX9lBQZHwjSJ4Ir1clGmVvPuxsYixUVaRaqmHUhT0IgYVy\nA3cjwnrMb+MrhmS0jLtj1DbCcSJ8lz4fTg4f8dOwmUqK0CXrDrFEcQ6hDDmM\nes754eZdOcRijH8V6ougfqB2YxRT9OoJb459yfVF1XXvlLSySZWbN1sNgUX9\nF45fudrNhbsvwlmgrCI4JHt79McGpM3YUccqCBjkh2Ci2doxhhymXAzM/t3K\nAsS3zONUtqy265nPZTTEAPP8dujiE8Je99L9uVDCl+Sgxr/WRv58BAy+nMgd\nwGMiYbAtWy5gEB83Sm+7yVwTim4fJjCSb4p18MFNQzRlVd4o8hPW2vp8kHT6\nqBPk7rSsM8OGlfDfpyHr87E2mklnU9UTWppitye3SKYVXMoQ8u7crhi+ndfZ\nQbdXZKSJ2wf6rnpq7om5l0qNnPMtCSA9TfEmeejRb9NVzSDWYERxp3dJUIpQ\nqlXQNvltPyio7VIkBnpSypE8O+z8uKKY7NlOo8WwenXl2O52eqFU8JBAEd/p\nWFveJDp/bAhxpangWcRJv/b6zyfoP0jUgm8cNtiApqT2UmIz9I+yj70XWOAs\n/zsf\r\n=dZTM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDaGJ9Wap5gGiijT/gM3qL9udsqfT4ORMQq2aQ4Z4IEnwIhALVBac2yztggPFtUygxN/NhSQk22rWaK98OTphEmm2ij"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.4-alpha.29_1571328997044_0.7951038130116646"},"_hasShrinkwrap":false},"0.4.4-alpha.30":{"name":"@react-ssr/express","version":"0.4.4-alpha.30","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memfs":"^2.15.5","memory-fs":"^0.5.0","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"20fe56e06241da36759055aa349c93fe68652800","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.4.4-alpha.30","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-W6C7Z9u4pWLtUretjaAKplY3O/dXMRBHaughr8oj79zWPhyA9bLixEcv05s2eeaLDkwaBYwns4I2GOc5bRS01g==","shasum":"526dd78a406be9e7a83fa54726e2115907704aee","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.4-alpha.30.tgz","fileCount":11,"unpackedSize":18677,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqJQrCRA9TVsSAnZWagAAj+wP/053Cz/ZCGiYAqP9I6sO\nQFNvVNNJH52qeModES84Pm1NxXnW4JA3LqpVv2eDpQ2Pbo7wStj1iS1GUKeh\nO8eH3Ob4wfMncWPBhMorDLSAKDDHeYTJ0UAU1kcKxEVfmO7Xl1MfiPbEpCEd\nfZyTtXEgLYJtMNrg/WJrllpuE4V10GOm1oc9sN7avw7wdyawD38XrNumAuaf\nbKWiQjFDmr5+pojtAPcU7DgUuxld4Mcy+EPwMr+ABllhWQtPYj7CFRpcqFY8\niTMiry0ya+wv3Us4JgIesE/dnkdG1Y1LCl330Y5/3sdm3sAsedZ37qCQA0x2\nK7XpWax1GIaHX2O01P1TaiiTOoxYIsF3NGw6jAiup8JXatkZPpLeN9pMH92Q\nQuGt4n162PbUP5K7u/qDG9iRrXaomceZ8WWiVTCEzpU3YxYn+Pll4IZC+OAr\nGhToawJcHqYClWVy4MagspoEx62xuq9OXp8m3zO8bWFv7XIVLSkfDcZ6gK1P\nS5iKJ3R4iFrzr9IEjvL0O8xVITQTTGhGMrUSKHfJjnrH8SNjw4y/nvkuEbAi\nOacSHjDr5IrZ4p9tyF6jEk8Swr9NuVKpsdksfp6cJHSxj9SHR5PXW0/XTzMc\nVq/Q20yETIoDu9a3wIcUfvpyUyj5p3ah/GMdQCT2KXS7nhb2USdqFhsC2ym6\n5sGN\r\n=hfU6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID8MGbjOE9kPP2XAVAaYgyi4w1XzmWzWl8HWo+llPlaaAiBqZIQjscaH/pgmare6VB0BPO95xTPDDQHEZwU9GEV0nw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.4-alpha.30_1571329066765_0.3086313135002481"},"_hasShrinkwrap":false},"0.4.4-alpha.31":{"name":"@react-ssr/express","version":"0.4.4-alpha.31","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memfs":"^2.15.5","memory-fs":"^0.5.0","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"3869efb1edddd114e34784e72e31bb56b49fb662","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.4.4-alpha.31","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-FZKI8ZvGOAY+5kzAU/9NJseVG18H4F6avB4ZduEqTSpZs551OcMXYNJdYPFRja9XHUo9JozRa07cD+rgrXUH5g==","shasum":"4f85cef803c7abfab0350246b2dd1b0c2dbe0556","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.4-alpha.31.tgz","fileCount":11,"unpackedSize":18728,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqJRmCRA9TVsSAnZWagAADoQP/iZ6JWr7mJ7aUS4+PhYf\n4+JoY/j1KcKXSGk/YT7gmDBIsdyqRKsQ8OtKU5QqJUn6J41mHimvrRNz+SX/\nePXh6EPDlbDK9uAm/mccq0vTI93tshNbvXm+H34bnC/oaRkEIBMSNAk+48CC\nxbUF3qhZaf1qlHn4odBYWQT/5prJ3tvojEO7/mSL1qlkt3gis/aq2G5M3HmM\ngtOKezFUIfRozh4AUb3ImZdmn5A9Z83ycEJKWDX0hFbVa+fkY0nMeSm7etB5\nGRORGDmMzPCtquW+EtSoqczTs5TtYt2kBaMByo4HfjK0JEQbjXIndEB6jlbq\nKtN8MUKZjqSKhynD62IzCj0bs9px/cgxloAX8Yhr1zNcGXFliuKzIaVZwA4p\nbGRb3Kqld/wM949xBtV/oxmnUXAwNt2WBLUt9htKwsHxH4Ehn/H6fcapyqpp\n6TUD/eb4vH/2mIyO6+CqJk0LPzE83j89+p7ov78s/ipfRVO6jbcZo7+UrYQ8\nkdjV0Tgy/MoovrTDri2jmcbw8NQzxl34nwIqsUEp5zflThXG7+B770VkbX4C\nWwziGyZ3XqjZmiduySmnRf+yEl5sBxe9lD4psaL3OwH2mNckZpTJcYfQT8NX\nQPXcD7XHeqiOTrz9jQkZOhJYDAGqjAMYS2BFm+yvHmGxkqbIvDa26NMTQHiT\n/qpD\r\n=zuHm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEVT7MxVVuLgKnrqhtBiHTP3oCI57tVDL8ph0paPU9oeAiEAmTQTrrmycxLqavgz/UP1fxGxIBrXCTVF2iSjRXwi25c="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.4-alpha.31_1571329126168_0.6109820425043853"},"_hasShrinkwrap":false},"0.4.4-alpha.32":{"name":"@react-ssr/express","version":"0.4.4-alpha.32","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memfs":"^2.15.5","memory-fs":"^0.5.0","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"1eb065c4e97c6db7f991d778884c3f5db2d7aca1","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.4.4-alpha.32","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-k2+rnV0X14tn4yMzab9lovhdyKkiumUOngK9F/83UqU0TVN9KzD3JQEXZ6d/qSszpP5w0urqeBYLGAsm3Dv18w==","shasum":"a03f892fb54fa93888333780c1aa681a70afc461","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.4-alpha.32.tgz","fileCount":11,"unpackedSize":18677,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqJSfCRA9TVsSAnZWagAA4e8QAJaVvGTggOPHnCok5rbv\nHv7A13Q2FGbP04KYsD9s7cJAXH8kzXzPEcOoYuaIAVc8ox2dBcrYg5lepYP6\nTkGZEh1rlW+uD05AzA/U1pgAuidx4dp7PK/pkIDqmA6zyKsv0oh6rjTmTpwh\npmU2j5+cLjR1giOhUY2ihYjhmvcDV/M6Bux4v4mhQfdhNJw9G+OkNr3m+eEH\nbTw4v7K2y+yTccYTiGyusZ52FYYGgqtamloqjoNbqp+rxfmr5Fep7chSxU2u\no7QB9DrUqLCeDTIBtrNSVdoxfv+aBYa7HjA7R+ZGY9KVoqmk5knNc6MTCx+q\nGqd0m0LH8ZDTBcahe/9GWzFWEQI31gQAmlgqWDKA9gibiFkPfFV98JfhATVw\nkvqDv2YM2R7YBiVZr72UG9TYCzjEfe9tXS321cHQlhvzZJo1RcweG+lBeD2P\n2XTUTfHh/pz0oFgl4HtZIvzoxXQTCEeOqsw0EaqaO73gxiEzTkrGGUYRMZK5\nvsH01QVqhxa9ZnJSgOpcHDixTUkcTrT9CUT1q1l8qY2AvNEug19lJUhkUoiL\nprFlwGWAMrcxmSHSK0384p0iPUwzpmTj6gHHSfNS22qcvYi8ELB6plIzQuxA\nlcFeBEtux24pSKbAlquNxGkRAqvcVqLR1JCXBPgocDY37QDWeN3YbqvTe4Iy\nUjXO\r\n=4j+s\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAk0cbboP95R+72/zZCJNhYIiN0EGMJyFCfcNFbF5yxNAiBGYmCwQZK4ngucpfKTXqL3/9kdqDd+0qToJ6psPiHC3g=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.4-alpha.32_1571329182938_0.10835098665603726"},"_hasShrinkwrap":false},"0.4.4-alpha.34":{"name":"@react-ssr/express","version":"0.4.4-alpha.34","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"318bde124ea5ef0f8ddc6370f1603b368db11475","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.4.4-alpha.34","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-rmSqLYrmQNnkuPDN2jCAGC36tX8BfarF7OE1lz9a6w5BygMp3VxEQyx9hyEAbQN2zWDvkFRK1jHPVYfZIi7Bsw==","shasum":"64d04f1f24f78fb80c3a7711889697f2fc85a3b4","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.4-alpha.34.tgz","fileCount":11,"unpackedSize":19367,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqJjPCRA9TVsSAnZWagAA9hcP/0mBRpdT/y0s44sfjrnE\n3oTTccJVD2rH9ElU6Y8obqeWOdTs9CKsM+EACX/hFvo0D3WV41z4+2h6Bdqj\nXVbnu9B5U6s0Ba6RQWQ1MAKG4gfk/WWwxZW3Xsq121SMonu8LUau07G4pz9F\nz+MkVRRnp8KhkNHUOrJ1w/pDDQjgno4nOLv+5FViAt7x/Yg6ah3wLO20t67t\nvuQXaE6RvzwH5ezeOZ7qxkruyhYGH7/fJY28IMWir5kzSQXVhr3B4urF1xA/\nLRQEvneJZV5Tj62trueve5Oot7Id394NBmbHRgkmYwg1arLyjSsx7f6C4ywt\nutxgjgiMUYbyYOW8KTPSh8pevhOx1Oux3szVevJNlqTwb9pJK2Y3iIBEI6LU\n/HhpGiw7xtftWFRJqmUMVUm8aKPe17/FuswQfz0WLEkVs6/24/SV1YuAMR4W\ntbLwNKrUysv8LVH3HsBRQlb8sW0dIjNoTb7fikRFr/k1wfNLUvcl4DkVqYpV\nWPQCBQavpmsUdM86zP9YpwG5W6eWDtDMuNmMgEP8hXczmLoO7NXWQlQxG6Dv\nB/ViQuouQH2k4FpWadQxjNs7dNsELZGMJiD2QinSyushM2FDeaCAM+ynI+i1\n1TlMRbzzZJOZ2mtJQniuaqhFgqNzpx4FFtUHZe2x2kzyYQea9RJkoUnMGe1C\niRe9\r\n=5JQe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICMHKL94eVNvx4xCxKqI+VQAytXXe/Ifdz7dORO25nPCAiB8egElN6zLgEI4q9NF4eBzXOhv4jLMxTzPjJHmHByqfA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.4-alpha.34_1571330255292_0.5061436372925434"},"_hasShrinkwrap":false},"0.4.4-alpha.35":{"name":"@react-ssr/express","version":"0.4.4-alpha.35","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"41e14500bb2ca91de2ca2df2e36ab1dca67cbc97","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.4.4-alpha.35","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-2LVWX+zdYd6DkfjaZWTmlrO6iQ4XIje3TrUzpvZdtij5F86A6AkiHrujogflS+lTGUELcaEvycwpELxZMweOzg==","shasum":"680b8f2cad0a2f999d17b44c1fe2be285042eeca","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.4-alpha.35.tgz","fileCount":11,"unpackedSize":19407,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqJmaCRA9TVsSAnZWagAAS7gP/08OGtRiKd++u617C4z3\n1zcAqqsf1c2UUU/DjrvgWaKwWHc9WUzOdEhYCMwh+xSJYZ1K/5QOAv1SsX0c\nc6Mv6NPEKgC/g+KAcF3feeWuISXp8jB0pu+w/hI6AzbVkEKIJSoaVzA0bqDN\n0GVYPEcRe5SLhKMLHS42Yf+gtcAK/CZKNCd41igV8xjX27HmOH1gmy7lxzOH\nGue7tm/+SWi3WDd5eu3qSe0XeCN+w6Mzl6gYIixUxlg636h1PCLKSKaAF6tA\nqzQ0XBN/CKUP8a2hRkvDHdZjrehEQllipvb89CYEco9lST4/xWC9eyCD4ZEi\nacHT74yFKhhT6sI/IALjIDnfW5LWV9Klq9c9D9EJwwOPefUYwFzNjjQv0RLX\n7+fIMzHEMY3A8IgBdqY68U3e3b3/VE+4AoORNBNe28295Yh02pAGFOcVLDk4\nyItLBe5v1hfOHH0JgmLQaqzri0u03QobSwauzADwBR5ZkuJz2CUG8vXygnb3\ninepxciAog66ZJVXz9pgnO7wkpxK7eksteoL4MVUQZ2Uzbdfoo40OCKPmgIx\nSpG96g+wAqZ2jmafSSXNUSWOGVSqTkPWn5pv0k3a6DIz9NQXXQgRSjt+INp4\nSg/bnA9I1xUtZZ7kanw4u4HS/dRQGuS1T1bYGpAVlxOCvrAorwtRLFFUjY7r\nQpYn\r\n=0Kxt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDtNkAIn/AyEqAOhy5FWAtz/tYxc8E/fxQAejLziM5LnQIgVc0Ty9WVm3ehQOpPxF1Hecos4n7PystxAlKPHVABDbw="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.4-alpha.35_1571330457373_0.15974412993039033"},"_hasShrinkwrap":false},"0.4.4-alpha.36":{"name":"@react-ssr/express","version":"0.4.4-alpha.36","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"a2aeb7f8929a1f16d1a8dadcebde8a58e9c06aec","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.4.4-alpha.36","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-55fDpDu2wBw6my7zoZEpMcGNfmQ2pvxWkCWv/+JTzeVWaPY4PyBkorOXzv6wcM0zhoG1PimBUl105B++/zf5vg==","shasum":"797a03560b2b0e2186629ddcd2105048a338f882","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.4-alpha.36.tgz","fileCount":11,"unpackedSize":19410,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqJowCRA9TVsSAnZWagAAkM8P/0A+sIcaORdmLlO29H/y\nLrSTxlccbUGGiOuYPLrdql3sUls9nS1FTlQUuI3foV67ulMVI66pz88GmkbA\nhO2YmJVtpSZzdNiZXLJdymrSDPEaFytWhhNOwIk98li8NioJOkNdtSRNAi9j\nXpQiA1tP1heF2HqemOUgAJH2vklmJIJiB1Uu0pVKFmyW+mmFIZvTmBNGKa2L\n3o8nEYyJ5geg3CZ6wZwV4sd3+aZRXIxP0/efdvDAiviGO8wwz37Rg2cVnGhG\nAOo0jrUi/a7utAHqztxoU/746ULJepzkNONck3tGQ0qxWBj/Gr04AQyjl0+G\nxPVuDuNVicn/63wZC2T7nTUQWurMNNRiVbXKpS/dLGz5MSRX5DoHEwPQW1kd\nJbCULkrCC+9dSN/NGlQflKK6gJpwZFfotjPrbkcAas55DWlBg3nxgh2JMPB1\nxQDH485tD7vA8cfFF+yAefOvttrln+UI5tS1POSTbGZJP79sVu5SU+k49iX6\ntasX+EoT0ls3sKNr5Rc6AHLNq0WkFeIKfk5Y9tWoUQDeHJWJa1xEGp7/uGax\n+L00x1odocY/p/Ax9bu7FEzh684lOY7nhZxD/qJ3ZNQkYABi63N915QE6Vjn\nN/Jgkq9mQLxlKRykrLjih0zdE4f1Joue3BBOuNJRmlVg7jbYV3Ri+Fp6BejN\nv1Qk\r\n=EWIJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDaJ/8+IPWUo4PJypDRu/+TL3Jpvnbxlz7Sd1olTsCi0QIhAIysFFq95ooXrIXx/7GY0QnMvMvYG2J2OCrDtWexRr48"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.4-alpha.36_1571330607627_0.8684823851158172"},"_hasShrinkwrap":false},"0.4.4-alpha.37":{"name":"@react-ssr/express","version":"0.4.4-alpha.37","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"af5bbee56d8676b93e72b5fd9f1bc061e73e7cdb","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.4.4-alpha.37","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-ZAw4nuby7HuYbVh6uz7wPAdQNK8SLwiz1h/db81PwmVxa6g3T2VUgBSL6fH0BYHfvy+4o3pOakOV8Ov5sFLY3g==","shasum":"c8ecd1e12dae3d91f8ac0ccb2044f2fd43332990","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.4-alpha.37.tgz","fileCount":11,"unpackedSize":19440,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqJrpCRA9TVsSAnZWagAAR7EQAJnr5KR6iZQMElpuMnXc\nc6AfqqKU7cE3NYDuimCs10wbQ3L9hLVmBvRMIq4zZE50eHQbox9Bad7WxEi1\n1AyERSOBabCWTI0uMXl1NGmHsarjqZJ2URFmLwRWOj3JIdNBlvFot4Q6lRz4\nihPpurJfFd54F1szL2D0sSmC2doQ/jvwMvXknLtM3LDojE3MJfk8dRcCrtue\nmB5/3Aqe5wtn5ngZPz2VBZrlUnJg6dDTj6dUvrdJAt9+aBi0ccopVTX8dMBm\n/jaGtF/1uHjYUep+t5QAukFz9dNcFZTMnVSiNyBoE7wPNJiKNQ3vW5szXS02\nMrJjLzQv4s8LzU3Aqh0gYaLE2vhPOw/wWLcnDEerXMuLQMeyH9c7yci9rZqF\nwhB18/X+XFA5DO+lgR6Hd6tuDEdoxbBLh0ugDtC3NtFK5PYvhTf0u2HDkg7d\njg3/oU6MIAfJDBiuC9h2fJ9Zf7C2vxSaIhHvkAC2hSqZt0QYy2QN8yssYrPX\nCqZxHkaG+/3tsecAOfrTfDHIQOUlQ5YvesW8cFO2ueE+JX/D/TUmZdceu696\nWoRn9MrpkKYgl/T+JWubU8WTEU7/H935k3vmPzx0+XWXm7WLF5Al67wofvN9\nIqABpzlxs7SxbwVmUT+ERow73aeJk66MtLuQ16I+GrIGb5ZLLK56Muv0PbBW\n4hdw\r\n=6v+3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGnSSeIjvnNJPli28mgf3982mUlbbrnCeeBrGvTa5LouAiEAiWFbEXmI1kMa5J10oo02jQwLVDUJMgb2geYzO7wIb4o="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.4-alpha.37_1571330793283_0.5568095692252613"},"_hasShrinkwrap":false},"0.4.4-alpha.38":{"name":"@react-ssr/express","version":"0.4.4-alpha.38","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"873c7406e005ff5b8ff64bdf5b9c7a3e64158b81","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.4.4-alpha.38","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-PbtIDkhNFWyFrsh/DeGWS3pVu0AygbwVIvQoYKGT/bzBlHRpEYqPeeF7Z8YdpAi4/FzyM6dW8I+7IrPAGfuRkA==","shasum":"d86ca1b503c80e78b066a38eed0ee4f29afa7a9d","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.4-alpha.38.tgz","fileCount":11,"unpackedSize":19410,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqJvgCRA9TVsSAnZWagAAs0gP/R6njLvchCH9RIzqpTAj\nQkHwydIj1WMc5wIXqjaErReYZMrGEJBjc4zCQtbFGvB2U7wM2VxHltuM+hYZ\nUGbUx+rips5gh13tra0QeTM89h46zqKo/JHSYgXc342D0+1xY5HwIs3JOBbK\nr+UlCG8R0BQCn2SD5QKGLHY+es08330qQl7qVBUZRtsAM07+r4qkXi5ldYZ/\nbMe+lWymSEVjEdl4TEbGlS/CLNEuhvs2PpVXw2KXvLH2uHFFD7h7l7t9sn0w\nRoONQYQscYYFTpa2/Jwz6W4aofsK8LkdWrrcTPq77Jpr3rkzdK6C6BbpEgK/\nFkqkDtH30NPzOdGMUKEDfPfd7W3NCrV3A0oyD1eiXN9ml24yiPaFxr0Qzl0h\n5p5mnZp0OV4W7Np1uj1oNz991GgKTvtnDLSYzyh9Frvpt/fNZY6PyndX8loV\ngZX/2IvtrWdTLJUUfgqgiJMav26mY5divvX9lg8dKKOK7uHBQIuOtGtoLAQe\nziSOQH085kyqSYdW/GmCj+QVLfU8r4Vm5mEObrfM9XKozkTUzucyCOY6HBnY\nTttEaGA3MlQ8JHJv0wL9xTUPZZyqopLKDSJkfD02tqAGhr9etgEvbaDzon4Y\nxNUPizCBUTTH3Xwbx+5z1lA2rKt5ta+KMMv3EvxEcL1LFzZKb/Iqjiy5OkkH\n1bH/\r\n=zKk3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICByNWWrk5wBKakQm13ZqSsp3IfEwLbFdYILKbooSvV9AiAkPevHNSN0Vjrdd42vH8OEUIW9pieb9GkkmUk6Ygnmqg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.4-alpha.38_1571331039810_0.2681442595383059"},"_hasShrinkwrap":false},"0.4.4-alpha.39":{"name":"@react-ssr/express","version":"0.4.4-alpha.39","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"9c20ed52c23cde346fb1725d982ee5eebe58be2a","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.4.4-alpha.39","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-YvYAEglx2yDmVkpcOBPDBeGEQt4e20BLD8x+G1MMVtG85BlHBcQjwmR6t8GCy9cR3sZ0aRj7vQa3lXI4sAftdQ==","shasum":"1f6e7a8f84c049ca221f72b2dbccaa341e26abee","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.4-alpha.39.tgz","fileCount":11,"unpackedSize":19427,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqJybCRA9TVsSAnZWagAAPc4P/i48iPP7vbe3NeOOSua0\nNbwW1FgtZ20yU/OvhPiBA628PEvOfC2WgO6S+q1TboZdSw/YriiSwgZJjGr6\nT/mE3m46G2meCsMwuO8I6kD2e9/S7Ka9QVNFBcm2gdSn1dNE/s563ek9DPrq\n+BlwQ495nE83TpUxfivNvvOnDWPcy8xJJ1+yIkFFX/TTYMWqahV6xt65AMwr\n/SuGlpdzDbiHfLYH9EuyE9B3uJgfpXCZjic02ZPX8q6YKA+rjr3YbvZQzC1n\nbkOJiqz/qxHhO0UTjH7wzn8y95JbnzoDpGHGB34gLD3Qb/5kLqvpUfuyxNwE\nnXVkcJbvw3myB5z2wLr9088p6nVw/0bEYjxmcLnqO/lGsgQfKY5vAn+f9cf4\npiDEDj62IGe229zSqdSusabgnyToWdxR8RTEtZWF+esezvQ/8vz80dnrh/nq\nNquh/0gJUipMmAilXcMPuz+jJYl1sg5uRl8HCdizFYtwldejR0BlwEQ8BJl0\nEymJyROb7H20L3KDNVOxnQ3ba7/0T4nQgInKAIcDKKQzcsAehLicS750lW08\nrLEokeK9UURF9t/X7/ep4Vdxn9wnrV+0+YhjF7AgbNtSqh79tPEviZ8bqeLW\nm3W83KkKjL0p+FPqcB3GeS1M26czCyfjawoqWBORAghvtQX6oElnO1tu6mfI\ne9uv\r\n=UUhW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEHCaL/a3dQRmOFRQpBOuqQSjqYF8qjEBFmrc0rwQ1RQAiEAoKxfvhTehpvbvS9mHb+K6dkhj3IlLIv5G0uhlRFVy1w="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.4-alpha.39_1571331227356_0.04273100098769311"},"_hasShrinkwrap":false},"0.4.4-alpha.40":{"name":"@react-ssr/express","version":"0.4.4-alpha.40","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"29946c8f5bfe57ccbc35815bca7929b8aa83ba33","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.4.4-alpha.40","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-aAjl6G2smnMzH4PYkdVleX9qKY3O57YE0pclji/CmB1/sNCwZgLdpHAXhxb8oAbT3O7qyQFjyWcITcPk74VZWA==","shasum":"96a55acf5cf5c948aff45137c0f9822aa867ef71","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.4-alpha.40.tgz","fileCount":11,"unpackedSize":19427,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqJ0ECRA9TVsSAnZWagAAPTEP/0EntWlrH7NQqd+vVWjA\n3N7ghMFRvOZA64/r+YklVULbGSogj/9RQnNpq7ii0LOh0LkZGIJKR6okCTza\nGObUPWJxlZ59axcpKymgrDONQrJRUGxohpJlTnWIHUXLSwVME1a3AuBXzNhs\nyXSgL0oa+b4wmrlEDspY8Ov2A5VAwJhyWuER0QnzjaU5KriYaz0Lz4YpXzup\n56unUIId9upqj7tRbck7njEUqTGPhJKb72kRDRfChfgfVKyE287G1/GzG5dF\nWYAArE3XRGrZ47I2P+K/HUl6UuAo5jWIfRYPTtrNzfOC8BT4oSqAR+hm8YkB\ntXyjxY/KOwwYjfTBMcTKtplivf9zZtloWGcIYBV+ojQxXTDmce8acu530DF9\nlr8crFW5nwuF7bcNVU+OCLMxrNdNp6hS03MXXmpNMVFF5mUV+e/lVAQhfdhT\n7sEuNSfv+NDR2ZB8TAMsGdnJJNGjb9BkERK7UHl6IlSCfD+b9LGu8SWuzNio\nQT0fBgcpNg/McJeR/4xKPagxpVG8H3qhjx5gTv2CSF/nyNGj9CNMg/+UlVso\nbj/MJGoXExDQbHZMnCSzNZxypnm7g4Ni5PPFNS4J65Eulw/jaxFKRetkh9Nl\n+yPrFD+X2qAy7vmL6UlcMetyZ5pTviWCT5gwki3tGXY/fFp+wXvc/xGapzis\nZ0ZW\r\n=LUKE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFsCzGewa5qAbKNatmgMqKnZCo/Ks7hspt9+1kzlayrtAiALJ+gsLfZNXM3FTaI15/4aCxhflr9htWadjbAW3JnzKg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.4-alpha.40_1571331331601_0.6492435668860366"},"_hasShrinkwrap":false},"0.4.4-alpha.41":{"name":"@react-ssr/express","version":"0.4.4-alpha.41","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"64321b0e1daec246d9a94b13e83ebc0852592d68","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.4.4-alpha.41","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-zv9tVZgomlZCP7JSA0EmIrWEADz60k6ML96bPmABo6jTOhcoePzDp+qT0isAnbmJ283XlQ/uGlisIgD/bamXQw==","shasum":"5392ac4f715029ed8be0fc91cbfa44e6383b09b0","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.4-alpha.41.tgz","fileCount":11,"unpackedSize":19462,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqJ4lCRA9TVsSAnZWagAAffoP/2Xl7sWGVMHmx+e2oMnx\nNSW9/cxIvqI520Lq7bTXvuSEK7WVuKh8Xho3y2lafNqQaPQAdawvIWKDuUYA\n3Jn3NivGxy5jIwR4Z4/SO8DHoBOcitXuuFQ/HxSy9aed/AYigLGrQ5ZVs2jU\nRqmCwY+UukrCg7ZpKEd8B/hNYBfwaVBfy25fi7AymB1Fu5tQnXs/j0SR436N\ntD1XnGCObpM/yDOGjrUvS59TMIeNIbTuZcSnr+VxMnLOjniATv3QR9gZiMva\nlylpGn7sbduim2YaOVjzQiFqgs+3p1yRw7fKumdtUB3/8Yx9MndHPDbCp9VP\nQz+eTzCa5sGQ9izl0J/ef0fn9N/SDeZC5u5UfDp+2GkO8fupfK5T7dtV27I4\n2JgvyjnFNy2ex9UVkuplPfoEKQK1tnbx7oCPhjgvH75kolsZACAoKP6IwnlT\nqoWeqhG8noxOIOAsH3+sTLCUQjd5crWJS/hi5XG27ntBUROjCh+1oU+OKe0F\nur97yiA0/yXcNGzc/d4yZP01mD9NSW2tf6pIPIXYVnLnUOitN7+yI0AoKa40\nzBNYlaMIlDTxjfBPoZsSkPfvI2q0tb9vS1ewD+myrqghHzRbDnuIBCMn7/Xs\nMDjYyt+f4RaFEw2Y5qlKV+RzG2n2X7xIrgNZS0QtvQJYWt/VmGy70LKp0/q9\nSuw+\r\n=1LuN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDemHHdCDC99RaMSIl9PpjSyVqqVbx3jdoK6HFLBFp5GAiEAm/NET42UL+Bz9sfABAuYrIz7s+O0ptmr710A3zh4Fag="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.4-alpha.41_1571331620376_0.17384176438700183"},"_hasShrinkwrap":false},"0.4.4-alpha.42":{"name":"@react-ssr/express","version":"0.4.4-alpha.42","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"db99a5cf2a7a18f98820bf8eedf0b2599e4ed097","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.4.4-alpha.42","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-L17OLuKOn28dZYLyClThr5yASSaKDEDi6VekB35P2YYXq5w6dj8FHLo1p/SjT2MhaT/VpElnzsqBcsqYrNb7EQ==","shasum":"69ca58692d27990b5231535a33e66ea6c2a322ba","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.4-alpha.42.tgz","fileCount":11,"unpackedSize":19494,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqJ7iCRA9TVsSAnZWagAAn3cP/1fSP/a4hC3gpfOKX6lA\n3cd3s9licVYps84vUbYUeXcxRCHPScboXM8kZycr0mKdRfAnqAghZIvToBLP\n4ZjJJxzbVu1OveY9h3MQT9edeOkKNVMewQq/+NU4k8J+XS0eI7aoqIFvuuQa\n0iiox8BvEFBIPefV3CmoEFpOtorDZPQXloyoOiGM6rSLPfPRqyzJpBtxH+Qj\nk3Rcp4yAJcMSbpKBd0racN+KF9+93nBseS3ZxJ4pAxmeggQHEhxyIoBmEa6C\nI1DyLfTJl34Ss4rRomsIDjwESObv+CcoumzUy1VjerEaR2SzzvleRaAynvgx\nyOMfcjR3Rc0FDwqJ5DpprmhnudOA4hd1xE0w7iH7jQZs9Ba/ASMoneXD3Ym5\nFyzfRnXSiwnM86toV96omf22/EIwImmj309KlKIKxe7zqB0sYaaGntSUEKkt\nXuwU/G3FMAizcNlf5Uteyfm1KEBhGscr/KrwRpeq+OOIO8SBm9eNSO3x8Sej\nspULfbRmKPBNuqP6Lb+sq5bLrpY7qtFUKU9fmJh980A9SrbAWxHmlCX+ZP7e\nqqOyMTB+mCz9N0f/Wy9KSvcqkQaKV34jPUw0GleBLOjQ4C8xeLUP0oGf1etn\ny/SnoTshSBj3o+cY0o7anunPlAg8d/jL9uohPViEnVHLkcwz/Em1XyvsBZHp\n8PR+\r\n=CX7q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCVBqBk9f0jTdWv/Qzv15xbuwVIZoLW5XKy6DDPg75EowIhAMYNQ3kq7h41EiMe9aYJV/8iKp528a3NR/kMY9uWrBsa"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.4-alpha.42_1571331810220_0.46545957509211244"},"_hasShrinkwrap":false},"0.4.4-alpha.43":{"name":"@react-ssr/express","version":"0.4.4-alpha.43","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"1e06ce4119f8ceb27a1bff9a1651511f81443121","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.4.4-alpha.43","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-IiDR6g+la79SayPsVs5jymj1nlsPBbUwhtO4hsRFazZKQp+33HhvyWkba60Ak1br1v/fAJogJNmlqifAPzHYig==","shasum":"af3aebecaed45a147290595916522c0c0715af20","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.4.4-alpha.43.tgz","fileCount":11,"unpackedSize":19533,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqJ+1CRA9TVsSAnZWagAAyIoP/iBUmFb3mh3lEkuAB1k+\ndJ25EFWaSecWRvTt45ykUTmYw6cIu1f8R7SfgMaK6sPUpkn8Yo5xvn1ykrC5\nhZrulMsfMcI+0KiIYxonB0U7ilOx6rz0jDVpUpNAtmTmRYGgKshGTSVLNHuf\n99tsjS+IXnmnJm6H97ec+OM/0OEMX+UqZ6kFNAzjZzP8uq3QeGZ9W193gvB5\nVpjKz1jsDJ3OP767wuO/B0SVSK5F4clMvZqDqivuET9ValLFg4vquCFwtT/f\n1X2o9hWUF0kDSn+HN+oQclACHQOVrYNuW7TTw88mh6YkGCnQ8fyL0WoaC0Tl\nLLpjXOvPcbfMwdtuwAWzGyaBBCZZukX9vbvHh5UEPIoTlIXw8o1Y9Ur467Uq\n3w3ylbuOkvB+eeJfa8Ngx0OtZ0QLZfAZiRbtQdOctpILMbbyye3WlCtpIYsS\nfmc/tlxzdQjtHWTEyRUVmOGNalDoOytKDlUjoMY2t73d9WSbDTX39Z7zVWXn\naQcJgpd75pH54fuYJxt47+7IvGZoeWRRshOT+bxqdrXA7RpHMXk6N8SJEnKp\nQ7CAtEQSktacVfpWrGOevhqPS1BuTBkhYvLpJO2X1N4w6QP8KI4Qnr0Naetw\nFSpcKxFPlrN7edSRXt5ixFymtom9WTmDSzIpCjK4vVE1gCm1EjWL3EqnWK4O\nS9CC\r\n=W4vO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD1RSoHPKjBmPv8pHXJcTAkmNS7+Vcvic51lKv7zzvXegIgflu4bOqBfYz+x/JDUHxLgZZXStGUBqNDDNXn3pvPiik="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.4.4-alpha.43_1571332021164_0.31132085709530055"},"_hasShrinkwrap":false},"0.5.0":{"name":"@react-ssr/express","version":"0.5.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"94e5db13a2202b32cf2e852919371ac04b3b9753","_id":"@react-ssr/express@0.5.0","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-NRNAp7cYruSKLSqyxbn1FUx/4A3w2az0v8gY3A00S0P3hyk81bUzJ4tpiqXBERCN8bG9JI16jTkv2B7+DaHKeg==","shasum":"872a04779bac506bc2212895edb912b1e2d9d6c6","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.0.tgz","fileCount":11,"unpackedSize":19516,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqKBcCRA9TVsSAnZWagAAHhsP/2WIhjWnRmClvp+MLJFC\nLp3W9GNuch7uhXAqG/ETywIGO4oQmcD2imUcHHy/CcgaZHQPbABRMmifZi6n\ng3058D6HO4xjxA0eJtemBpa3/m5eIz8rKHoLRpDRdTzCNT5uX23h5WjbMrBs\nl6tzpdOCOhf+22TwM8woWympj6gDn+VLV6mXlQFrY37gP39/sRK39///V3xn\npOaoD7WePF4pK7bNEXhtoCarPQT1pZi9kGa3Aj4lGwp3s5hNiRt+jkVmDEme\nSblMX4RnsUbSPhTb1KbNXqpOHItRokfjo4pck8+ZolHYeMmcWxKjag6Z5jzd\nvhQlZdPEv/7J7R5wdHP1kDWxdeRt41S6s3ic9gSFyn66fI7b4152LdZ7qo5f\nqzADNOP5gMWHwG79BWa7EBzcU7/xu23jsRsDFfRfWzTOVxLE2ixRtTox6Qxz\nDcuQLHK8jGQworhqFcvttEw6iFe6ee/z8tOEvxzm/S+BVwuyn6b+k9Vl99ts\nM1rzOj/vwJe4ezNd1DBbPwg/OVVYDFTnECnNloqwl2cOH3ADkYQnKTjoEm1x\nN1F/z/s2T9NT+rhcWZw/mT/BqA22j+SExh+Yb8fOhL/Mnd+IBrfHXrkhfNEq\nJCgChbzNjbvxvZLOOtRqyZzaZGUUCYsgnUogI427Kps6+f2X/Ao51SagU2l1\nBhVl\r\n=A1js\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA4vsM0U9JlvD7XhVnhlmThupJ9WnzTPmpueRlyki5B4AiEA5q/PhjGx03WAPDiu4/QF3ZywXUIX6/mk4z+xq9a/UYQ="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.0_1571332188031_0.22785403014005823"},"_hasShrinkwrap":false},"0.5.1-alpha.1":{"name":"@react-ssr/express","version":"0.5.1-alpha.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"d1518fc7fd40ab7836af93739225b82784bc9560","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.1-alpha.1","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.17.0/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-bmSrRk1/IZfe6ZLqXmAqH66TsVA0nd3qNr8twsHprR3fiFTKOvqa27bgCcCykwjpkejJe4tMMYUK+GSUBdgmOA==","shasum":"5da70a22614d91efa0f0033e3129dac51b750e9d","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.1-alpha.1.tgz","fileCount":11,"unpackedSize":19533,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqKL5CRA9TVsSAnZWagAAhakP/RHekvg9qZ/nvlCt5kll\n2RkjbjXk/EOeH1jKxuyHLrpYDZeZ1Yr6e1iW4GC4ef7eBT5iAv6QosH2QEAv\ntx/TZi1G3blCHXvRNgZSiTKHRUF3xXkTn/vMP5HnEokkPaW5zugh2QYRQ0j4\nZh8YbZOq6csIWgIwWdgNeGq86XPHC0M81n13m/qcbMZ4eZH33sDdnoRHkjqa\nZo749vOZ5unTZivSpSafk+EWvrnB6BGg2C99sKfqX8f0ywifFripEhjJdPRU\nGxDCPYXBIGu+CutY1ylJNBOhYfePfuQ2Duk6Ig+q7wg4xD523i6hp0rfpwmO\n2YKMxrBPVvn9AWK/Uiph35u1lQ8ar3f2XhRqjOJsQShHqHqkYDlz9CkwfTKu\nef/vRJ91GTPLTUMw3eb7fM8xNnj62f6gCy0e/vhnb85vjb0poWdULWaneA5D\nkcCJt7TjX0g21SrMZMA1GVGsfwJvoQRUoZte9xX2L6UAE6JMLn0W8rC/UyC/\nhauOf5F1XgxKrxA2UERX2NK9logT6h+zi6dQCV3KAM7oc5SOt9vhJ62dNxWb\n2MWVH1hsiU64P2AH/ZeKpGEkuuwAocuNJHpTTEa9oKCsqu4BdoIU8GQlB2h6\nAWtYz6LGc7ccLAZ/pgcGq24+pDTH7Pz17u2FtD7PWQ+ke5kDak3zGBqdBHqo\noZR2\r\n=P7Ey\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFK9RLl0sn1i7TYj5fm+C2YXeMuSVS+Upi1bPtvX3mIvAiBUZE5mjhP3/nVg1guOb1CVhSGp778PTLX4pBL7kqNRRw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.1-alpha.1_1571332856919_0.07992970834154023"},"_hasShrinkwrap":false},"0.5.1-alpha.6":{"name":"@react-ssr/express","version":"0.5.1-alpha.6","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"d39ba24439a6b4a9c9b2d93022af23d49c1200ea","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.1-alpha.6","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-4nAQGYyrM8GBgNStqBwP4nmDGd9frOmiShkQS4XJo7sd0rFRvqf9gIsnhpMrzDAIMJ/mV6gbpS+tLlgHwph2nw==","shasum":"93289f28894128583c8e7c9c006b3397cf65800e","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.1-alpha.6.tgz","fileCount":11,"unpackedSize":19491,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqOdUCRA9TVsSAnZWagAA4cEP/An4j8qBcjMsvsPoMqOY\n2ZXkMHwqvIM/hGqJk4ZaER/ls/badj0X0ztTgPyYKo1NT5LKbEyKt0fvg8UT\nt7kpsP57itwclTpdXhSSGcNzMAyYG29YWbpUrg7qFbdFmwQdNlbn6eI3mb1p\n020S9kaaBjbf+7xibvZj+WbQSNbgFIpNU5mZMq/wcTwpI4fZeb7ICeFWyIVT\n4VsGNGCLEoS8weF+qqhsT36yoUbU4tlZCPAfn5qGKTJq/p2b6rn8ujzy+1Y/\ntgmgGiW2cnQMTeQJ2jg/S24grpptqFof1qnBQxibczuzmOpCjYfhs5U0C3RB\n5y4J4Wy67xVmAoiw4utxZW1Qce3JExsPNAK9I0Q5+aQcEs4XDPsisc33lAiq\ncsFbW5ltdjNpjWrkObKZeIUFRwDkIfVUSTZ029pisUaDXV+BqIow/Jwv7LIk\nYR3aefBQuOHkm7N74fdW1wVXkjL5cV2gjb2vzOVnXWRvxgBwqhL21HTAFTqs\nn5PckGd7C3vz5w9mC2hQon7tWko11msqh22T6+cjKt0TbNqw6xj6zim29OCu\n97Mia+6xPc/VrUPKgA7zgJQnbba7Y2h9rMSX6yi9xlnPbvN8dWZm9Hr4XT9A\nzTeTNBQO0XuJ+ES6fXbLZub62ehCNhLuG1MlAOJ765Tu+ZhDzPr+cyJrjOxm\n/Xm1\r\n=c2qF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIElOXb/zzHzjnQ77SwOVivy/SuP01cWrkGzRqNNl7v+mAiA6UJjVjERSZ1KLNGX1F6CRQPU4SufxpbDJ+PpdP4iD9w=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.1-alpha.6_1571350356037_0.8957442401592197"},"_hasShrinkwrap":false},"0.5.1-alpha.7":{"name":"@react-ssr/express","version":"0.5.1-alpha.7","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"ad5229fa3376d7d0ecbee174ec7f231f90205dc2","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.1-alpha.7","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-GhO0vXLjskLMg5QWrml8iOkXVRW0RORpL5qgkV8VgTKGCD39yLABuplLlwJboRCAxEahARehltwCuYcd7s73+g==","shasum":"ff5d3845b1b1e9954e9716aa5333d8ac6edb3af8","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.1-alpha.7.tgz","fileCount":11,"unpackedSize":19462,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqOg7CRA9TVsSAnZWagAAZ9IP/30iNNKfK/rTcHU2S995\nK51Dh+mFQ5XDPOqiAHVbAlSayCLeS0huQaHE3t8BPPul3hCviX6fQ/9/XEeE\nhSlEl/3Gi9oIuOidruLzhYP7fGWllzuZLPzFrg4+1O+5ftKrm+K7dmojcbyq\nai85ADhvXl80a1JYbER6IMkZaG/ZPk+7pOPljmX4cdcI8v6NuVFV4p0/5Xfh\nI3gA2QThYRjktvn6O7k4Bx54sDtgSJ4iIfKaz6ZjswS9Xh+Dsa4PREEuF4Cm\nCtTAgmq8rKaEn0IfUbHnK9Sf0Ego2X7PkeIK14UOvVQMifyJlmZetAyB88YP\nskRaNhHVaM+vFq74Zeqdjr4tpDON01lAI/psIbYNSmCrTqCmImLXmZWIKKYH\nnEntlqBWjEqYauqJDkZcTfL/IHOSnftrAioEpAc55cZ3jCNxfOB16L/jVMhH\nKz3j1lYsGONuoe7YH8Ssb1ve3GXFVOXtJmjOLU97S08wPaEpj2Kz5ijzSOKl\nzkTT0M+gFRcSM2TnTKk3S0cMb0RfikMkmq4y/rINurA/+pQhGM917xYtOOoh\n/NthjUrq33Qs1QF/K9s7etbQuRNrY39Dxa9QZ4FnPepjPQ+IrCtkxsc4+ue0\nAv9C8uH2l8P9LFONMPzmA6OIlo9eekFIJQl5QRqBPkDLGHfeuJikCRt3UqGr\nOkeJ\r\n=x9Ge\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHpFZ2B2gY7w78wwfbu/Rr+3Gtce9SGupnYZFnMcNe9NAiEAuLsqTn/0zQxSA1/bFbFfkQUKwai2PG7pt1vAO6zSgU0="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.1-alpha.7_1571350587198_0.21415656055346277"},"_hasShrinkwrap":false},"0.5.1-alpha.8":{"name":"@react-ssr/express","version":"0.5.1-alpha.8","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"f41fbb7fb00305dbfd5a357598ff80298015ca4f","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.1-alpha.8","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-OedaXcxsLXJWE3ZASPpu8EkAc7UXoxpSj84SL9d5Ckmh0zwV2wkEBUCat9uedioA69Il+7etWn2HpUSYASSGYw==","shasum":"03b4544dc9dd5e8b58a715eb3bc34bd2bd547143","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.1-alpha.8.tgz","fileCount":11,"unpackedSize":19434,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqOjDCRA9TVsSAnZWagAAp0YP/jetkTAARsWGeAqF39Hg\nZ6moxI7hwsFqI9ouDPY3zH4xFKhXIbwyEVAA/2RC8u50m3yTKfoiLMSw1juF\nesw62j2psDmEgXSzLsnUeZ5Z2Kk7aylrFS7M2NqWWMVU8QZkq5QqlJhL3yWD\nGItHNvIXvAwEwZlUkdbJdSaHAzEjbaXowCrFyXI3gOCwqqLe5hbS8lbpfJEn\n8bCWi+e6g0fp4t4kc/H/KUTaan7b00avc9bicH/cMIRtUy8dT88WTQdHuMvv\nF0o8o1X6TBVzV7djwBjFZQpOSkGL0w8cXeKiAwKZaZlUrK2QIwh6g2xpQsx+\n34DnvcZS5eXImeV3+eZ4O3Gk5SG3BKbq4uonNy8LLxaD7kYOVODHf9SdEe/Z\nBT6uvonDrZzekJ3bAoaBt+WuUDWZeMkJe1e1rUv7zK2DbjVwbujYjrQo83eQ\nJWapPVEFEM+VSGZJMcdG14fJXurE70FlUoagJFiWAtiaEicZ0d3cpz4urfWL\novkfhSEv8UhW2Wg5NL1o06yxUbpnx/a5D9t85r6UdVtfkUyQAz8BTrgmQmP2\nHOGtU73PwXKJ3XMyO4HL6sCo+v4Oa8H6/YD+LNto+E7vVx5o5eVdHGdbENd8\nVRBmz1ZGVJJjNfxDdfHOoglxDDqzpznYjcQBzeR+bHlNZoZ0Nz0Hf0Aii08k\n0cyj\r\n=ieAd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGTR3TCvCpfbvHF+/b0MRwqrgfZDYpwl/OoKAon8n8WNAiBTv4Ul1g9qaCp61iSJ+JiXIDzX2sMH3wZ6dPQcS1SSRQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.1-alpha.8_1571350723173_0.966401013667306"},"_hasShrinkwrap":false},"0.5.1-alpha.9":{"name":"@react-ssr/express","version":"0.5.1-alpha.9","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"308b9e198b6da9510afc7f1dfe992c0a1fad117d","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.1-alpha.9","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-CB0ifPNCyPnDb1j/EHIVT0m/DPX6z/FPugpnGanPY+ar9QKH4THqGvVXE8qeKeDzkIE8IUuarLO+GHnYfgRXjw==","shasum":"f921104ef25403917b5f236013c26bb253b57af6","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.1-alpha.9.tgz","fileCount":11,"unpackedSize":19494,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqOmNCRA9TVsSAnZWagAALuIP/0+oaGGfKxL/BPOEdJ6S\nBbZ+zqMTINzKxOI6BsCBzERFL3T1IsLkunV8oEwiu5zlj19yt9mVRaWEkPKx\n931Q6F9V89qJiBzOS+kIse1ys/Z4fAMm5piEpB286/UfzlkkoB4BjcrRCpjh\nufR3/9eauqCMA4AM2QQXaW90+AzgCqlEOSI/9lHD14p46OEnZTE/BTPwin6i\n1ItVVGS5sxCMtcobQ3xSjegc3K4egDXm+Z6dD0n5Mv890FEWYvLaNt5Ky5av\nt6tY1N3x2d66+IGQO+H3oxc3Asetbaroqc/c0CMwwTrQEVPAkRYjD3rb0D5r\nvNHpnUHmxZxcWL7YZa5AudqgG102nvnLqXVr/2tAPdUG9mthvWIqESafGjb2\n52gpujplMKhdaX0eGlq6InBLRNE/VTWf46jTdr/Tsun87ogI4LKOo6LvW9ta\nFsDAPhYj+DxTBp9ugTCFc8E7gcpecdq6D3+cIFaGUtqzySwBq4W0ccr9dfPk\nuguNvgCQOUbZDsf7uzqxWIAMIzFJqeNQaNvDDIoORdiMc4E8t+uFVmlyZ5GN\nEcLUy+lnJjzwxrQ79BE7FRAVkprlozpA43daXBnssPlTCDntNiOzMePmdc6w\nGLKHyvMfUG512Uvdy8+O0PQ1dSiYndVcNtDCpc8FtcUfnUDFQRC9iAvttC5/\n301L\r\n=BvHD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBbEfaT/euoMciMp+Sd4QMlSQvTkfoJxJRKGygQWWgfDAiEA9Jn9AZFrsZusjf9UCf1mBn8oXVQGDZmEfRby0X3yM7g="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.1-alpha.9_1571350924635_0.6028239057464206"},"_hasShrinkwrap":false},"0.5.1-alpha.10":{"name":"@react-ssr/express","version":"0.5.1-alpha.10","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"c7866cf3ef3c6209454ddae0bd4a94322c8145cf","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.1-alpha.10","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-yQeAedfZ0jvqrWXXlNFgy+90MzXwQIwX6VtE6zUhGPsY2Mx9WKSGw+3rs2AfEJ8XHNvCprkf7IRN62IaHN9h3w==","shasum":"71c532943bbe47a29e616a85a62520d789e93e44","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.1-alpha.10.tgz","fileCount":11,"unpackedSize":19240,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqOraCRA9TVsSAnZWagAAw2MP/jSjlYraB+y1rNR2AkdY\nVqww9URw2Lw75XYikgeSH8W/5ViLsyjAST9Qe1d0ehwBO99TlaNlHk4mYbRM\nky+t9kphOUi00H7xriELe7tFXTFUZOaJcA0B7DZpSTj0hpna2IbGojwwuijG\nh8If9SGxyiZm+yORndsj7cTeV2xdK7HiFL1zdjQM/94nhkX6g3okrGQzIMF0\nv7doSrQiMrqbMlSPbluoJEt7MXiwMkA/qXhD+dYE+j3uzSB/xjqObyFnoosz\nhybzNb6fKprQN/icDivRTHEIx+KxviNClZuq1mry0DQUe1vOyLW/vSxlX0af\n+yBC3upWnRPGDHjwc1B6lzlvIEfd3ExV5M6cpDmDSRrJhFzduZKhJIGIVW1a\nC74Clq78MG8p13bBH10gRgLdbuHzP0YBUweeCagxmfAMEx822KmfVYw+jcuC\nchH9bTLXOQfjFgFCv33zGSS6gwMnUalxmuXs9yc16xx/5VvkaPUYGjROKuBx\n2YMbJhEsJa8oKyz1PdkW0UqcTH9IWiO5pCqqHsZqDFu2E0AxXaICHzDdKB1z\nVBxis+L0V0QbxckqvL98pUOLXUWmOR8Ad4GZsUkVfOM0s7FCsDi2Tn7N6mLh\nFCoPT/EKn+8PpB0I3kU0G0wjaYO58Pf4SWQr2ibk3ZbLCMEO+EFNMYpU1IdL\nNoyY\r\n=xvP1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDipI2Uq3MF1rSja0bfMNdiVKv9yqWmK8DIyaYVLn6vTAiEAt9oOYj5/TBL6sTn2mG40zaEoFPGDSHkhCSox9Tfk6zM="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.1-alpha.10_1571351258215_0.7838844269125946"},"_hasShrinkwrap":false},"0.5.1-alpha.11":{"name":"@react-ssr/express","version":"0.5.1-alpha.11","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"87901a6d4b9f5620e14b6acb70706cd94280350b","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.1-alpha.11","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-JjnyCCp+JZ40ut0AsKy003Cuuxocf1GmeAyFLiwoSsKxKXaT6VZdyMXlp9miF5URGzpqhUY6ZfvEu1Q5wBV/vw==","shasum":"4b4d1099ffb9e7f09aaccdb990ddd641fe9026ed","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.1-alpha.11.tgz","fileCount":11,"unpackedSize":19240,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqOu+CRA9TVsSAnZWagAAT04P/1i0fIfvgTBAEzXc5ZOy\nIKs3ZEmS6mo1/NayaHWX62TbwfIr9/py2n8uW8lf5AVEwmj/jzgt1/gBvEfv\nOdv22FclMLLzAZDOmwSsQCGnsIVCeuVQXKXWePMURmSjBSqm9WsnXAMwbpLU\ntgyuTjJbM/6/MmLgnvEwKMvvx40Qq7lLrZQhmoa7tdBXWwHqmV7Cv1g/P+ex\nBWjN7UMVTXrFOIu2xkMcx0Rj8jOnqgvC8tHPk0hYdzLhyF3eckQIbAmmsB6p\niJqH4SmKuoiNU2i1EJ4CdKANi72G5X0rEWHVu1neuZTOWxJDr9JjVicN+wOM\nHQi2uvimbGWfGCCWZlN3KSiGwywZW0wK/HjyVgZ9cUm5y+xDkwlc0rk1FeYF\nfD8tYkxQGIepF0RD6msTQeFfVqCdha0LZGt2c4wUnJtn3Ubeyg6IoWARDilf\nlaDLAY4ThfpwLqzWrELEGvyx/9WCXTvOD5I28/AYTNlxljMr3n2S6MsmraCX\ndwSmJrYJhGSdZaKksCao7oCi1x16jVpvox4mQKzytk/cejI0tFckD2Vy34hZ\n+9zSN/co+TFeQ4996rhN4J82eBLVVr++mKkLM/aNqXmRndHFyfIkQ44MKK/b\nq1VifFLHsicghWVeqX7vkZttNWFRDsVHm15NU9vDyTNa4dNykIbb8JL+CTxT\nHDnB\r\n=jEWG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDQTzqArn1Oah55ouqqL70rq7Y0i8Rki5NDLW+7/vjS0AiEA1ez8g8y8oTqWQoJIcELaUFItdQlFsm6e7bO6rTr0VuE="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.1-alpha.11_1571351485629_0.7939502839859089"},"_hasShrinkwrap":false},"0.5.1-alpha.12":{"name":"@react-ssr/express","version":"0.5.1-alpha.12","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"b9a8b00a8a2bdda14749f7cca17112e45d06e2d8","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.1-alpha.12","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-F8Qu/CRLuGnvcNT5Cl+9wBLwkintOgrw47tgNGGr6LjVpo0y3PIsaR/1mUOYMABvEPo+mdS8btQxWJavRIPGsw==","shasum":"93433db1859c74a7d9914bb261e49a8eed8ee484","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.1-alpha.12.tgz","fileCount":11,"unpackedSize":19165,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqOy5CRA9TVsSAnZWagAAfWAP/jYXf919awM3zGRDTd61\nr2f+Ranm+AG+vCu42ArxP7iRtS+/W6wN0W1gdJzm0SXq/04VEel/NJR4ju0y\nIvlU8X7WLSoeQtmCj4C3v2XiDu6m+103JUUayQ/6phk3AqlL1QqSfyyVHPt+\nJyb1FXu2mnUmhlnxbHH4+gpweJea7x1UJ2XCv1AeRvO0O8UCeUvt5ADzsBOk\n6QBId7dKUqSm3szMCTXtN3UIxRHhlsRW8qX9wcJ9U1DWnZLojSBKzdhfrlQB\nXCKlSGYNduvJHvpFzVHlhTpP7KWg7t3IFXVC+bKyxeoDaJxYcEZA380fInnH\n1HylrBu43s+ToRbsNsB+FnkqNSo5UPfbxTvyO+7Z9GH3Ky878o2/2OqT+KCM\nfPvLVAA0DnRKfVZXoi5CwsfOxBZbmzoooIJBuGxrA/7SnvqAMTpZGQLwnH7K\nXTL78CTeXnP8D9Sq/+oPsU93CuZYIsrZyLmW4GfYpsFajxw7pofozkNvABkD\nid9h58TuKyEofjdiT8b81eFMMmOfqpC76H8M51+Gt62LlSMLsKDc2ATyyz7i\nYwYP3FwNuDT08RCNLlElHwPkuRxX4NRwMpEEdgxZnqM0vWZDV+l7W3JiG0+d\nMEh/ysOzw7z5bM21B0Y26Chp1DXRFt/KRnfQ4nfnsBlmhJ5iSUwx20T7lNeb\nyxdw\r\n=2qUM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEU35u0JVsBbRSYh5Hv7k3rnXpbWHpyFVs1yvZo4rN50AiAya9SDNZ5Pj5TK0iqZFbnX9SaQ+43JEn+Pr6CP4Ij78g=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.1-alpha.12_1571351736692_0.7505598460056908"},"_hasShrinkwrap":false},"0.5.1":{"name":"@react-ssr/express","version":"0.5.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.24.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"fdfef165a1ebd8f2b018974f1b88804c58119f71","_id":"@react-ssr/express@0.5.1","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-ZBYWRJwNtF+jg4GTNA3La/Vm+GSxELAI7EddI14raBoE0vRt2g+UahFxtskb7FincN3yoO7iD+Boif+Ur91ufQ==","shasum":"95c1d9aa540b4e1a4ff9203ff15c026e7ead4243","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.1.tgz","fileCount":11,"unpackedSize":19148,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqPFsCRA9TVsSAnZWagAAqPMP/1f/mrLgy9YXiz6w0cwH\ny9r4kaxEpSqNwmFv46nvB++7JPfvRSDbyjf0RYKztmtAbauRqCpEQEZk0IMA\n/Px8/mjWJe9k3V1YDeISfBhfmwWf1CE/ibsm1YH1pkY/wSKlGkxsg+N2wDJ5\nK60JANdsmlYXzAitBR4PWA9yy62UC8i+gmnapfGasl7N7pQitwhSeWnN7UhZ\nNbB7EqnuOrtTdbef7rhaPcKy8NIrghdoDPkf8Kv++Xn5F95VbToskZ2HqKDE\nIhQkDeEaA3ycZPiwChBM/Uu5SIeIs1RKhyfGA8t626TTYcwzLHMB/wK1OIgt\nSKsiArOSEe53HPIphfsP7/D8sx/kmIN3eVtFFtWhkQA2yaQnOGvXddJadF4K\nwJXg3/rcysz2a1i50cf9w3GBYndCPRvPoDpxFZk2xYMdahSrB+1H1Jf11QWB\nq+gcTsPY9WKPH5oowAnV9d20nGIRrMD5jQcE0C3Oo8hhcaAiciruf8+LqYuE\nJQNULrbazR4b9dMmW9iSJSznPbHuj9r08BxHKWCd/cBN7EuVHGGXBrdOsaMf\n2ZrA6JHqIuz67/6BSDunh7NqA8INAm1BEHgz08ail3zjDLmbXcBjqqAf+nU4\nnMvMHHxd+OoNB0F5VVG8C82spziGH0V55YawXdygeBEOM+BDwLze0i56iSYf\nqr1v\r\n=1/Xp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDgWuwHKuKLBd6opfjg7EVGFwsh4TEjyMeKqFOAR6QtjgIgVXzJjhhHHMdIRNULz2Or/Y5/YUPjvDC2ZTxgOVgJmuI="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.1_1571352939279_0.2771185343390723"},"_hasShrinkwrap":false},"0.5.2-alpha.6":{"name":"@react-ssr/express","version":"0.5.2-alpha.6","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"df061de1c4ee3e4a81d97ccf5710480d0c2bac97","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.2-alpha.6","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-ck1eGz5OYRxdy9i9m0gCaGhEg6NaolU3wCQtGwwlQovOXM+jI0l3KPlTxN+rgDzSDuohtT8eR2O4YXuVF3Ol1A==","shasum":"c126f11d5638982aa0c8d2d5809865877e8a6dc0","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.2-alpha.6.tgz","fileCount":11,"unpackedSize":19423,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqqRxCRA9TVsSAnZWagAAPNMP/2+sSyrdob0Oz4dT+KfQ\nChLAaGHWVx6cPIxWq3TW39o0vdkReZU7FA6xd1/LD53HzpgyXKVYpffLZZxR\nlFluWKcHvtM3ln3+XYX6xQtFAnvnMKQguvOQrXGBc5oqcWZh1zQPrYk1+ykJ\nr8QVOpKRzCPeYRqjhMefCA4UNvY1Ur5DYR4jUZusFY1Qr0qXGa3jqUS0qrLW\nvGx1n9BpdlgKPQYkxXUtywSf6B4HE+s22OJTfB1HdBb8tlNQ7ljhDrsNX9BY\neQvrQG/6dQE/hIKruWqhd0SIbuOOkthEdw//FxIyvNgKLmFs95k99uLiA37N\nHK40Y/7SXw3Mdsm3E93F+uJROPigCl8tmYTSDPYNR1NVyw5VqxI9b7xlf0jl\n+4q5P/hnbeRo1I0W9GqMk6geiwLzVtyBId2tEJvpIWdJC3TbbMs5jkd0pcJg\nU+K6FOqF6keSzHfdiz0aUOtrnamwqkwHT8WagAFwfeSHcy7OwT1uv7o/w8yX\n+dvGiChmpmIp+LUncL0vjYa5aTNdovIus54v9GoOHpnxuPY2UigEkPMxre63\n3u7/iQBIzh5sqeMkxCh5feLsw4AvYpPWamyds3kZmuY9p0SaONtn5egMWEDy\nXhCN2BcqDCECkOTSQOk0eVbhmyat7DTK70Fz9i2BfxmdV3D1NaffW087pr5K\nIQ9t\r\n=p+8x\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD+yfchUm6b2aY9tyZfDflFtlNl5Cn4UCxP0bYIOjcrIAIhAPBTuNn/NcbeVk3GPAaMP0mvl+e/wI+vL7+HPS0/NyPN"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.2-alpha.6_1571464304555_0.327140161845094"},"_hasShrinkwrap":false},"0.5.2-alpha.7":{"name":"@react-ssr/express","version":"0.5.2-alpha.7","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"2c89e9c885d10e5e972ca9ab18c5b40465e92445","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## How to use\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.2-alpha.7","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-W911FYcWV4iHyQp+lfBj3XDnK55TIG0iVG7Xp4X4vB2lP2US/YyBnN/7cnG1woTQTPZeJIdWZAGUhq8xsvAd+A==","shasum":"120aa7fcfa3eb1649aa5fc3bce8342c0491aee6b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.2-alpha.7.tgz","fileCount":11,"unpackedSize":19457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqqY5CRA9TVsSAnZWagAAdsUP/3J1jR3OK06wmBOv/gd1\n0QDAYmMhbFeb3n9IVHTLa83dgbwE1HjZkQyOoBjOI2E1GPWCHMhIVvBM0bc+\nqLiizQu3b97D0jrjMO4sp7VPUipx5txiUz6ZeVyk8SUZTPTbJV31cOikHKi7\nL4oH80rOhr3ZUiYtH9Q6amplYHH8cE9WrejLFAe9Yf9FtAYcFEbJuppDCiQL\nwL+D9D+g1pQpjndiOdgPUAdNXdnlhvBK1ss+YEtyo8hNjaj/quUzw4McQu+A\nSS6KYBOXLCijQVS+g3hZO8k3RLmNXo1tkBjQG4ShlJl1vW5r7Hb92b6ZU+rF\nwMFnHzXCyd06ZrNjqKbOR424HyamGyASu4PBiFE4m9hoK73e435rRhkmEQEw\n1h6t6jgrppxY8DiR3ZhSDCuHAgTUizxAoVTMAZ0WO1aEjSHdMtGTHjJCm4Ob\n17WBj714X3IjjxJ8aSCdulY173aJ22+XyawQfihECAAy0sOD+FlhCYBze9Pm\nZ0BlNRz7RmYMV/M1ZNy3oPxpMZz1KAhvASSGIIhECHbpaFSflQCmrBXDhXV3\nEiVTbdFLGrnG1zhMV1WszwtGy3rdriLY90WYbO54K2jiBuqDFFOAkWSYz6uQ\naQl8P2auXxHHpYEUwXNvbAyv2CRmW8JFXZDDyosp2ezF2aXL3i9p5s0YAk3R\n8epj\r\n=6uxK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCFusUX4hiapl1GhN3nuBVCiPEv5Fy+P9QuYM2AFr3mkAIhAKBCkm+bI4Ie83KdzhnXjcsPKzt0Fx8KeC9SsfIs91B6"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.2-alpha.7_1571464761237_0.39480884503050717"},"_hasShrinkwrap":false},"0.5.2":{"name":"@react-ssr/express","version":"0.5.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"0ff6d75d6cb86b986ceb5b1da47bbea64cf7b6fe","_id":"@react-ssr/express@0.5.2","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-m/dQiG/XDX6mnac6y5P2lD5xTf7WQYjJJfj/0Da+GYaMnO1CozI0wXQTYXs41yaa7bPbFdd1FdU19FSiyhT55g==","shasum":"66e5ebbe9d09874f71e71e32dfc392ff01e8897f","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.2.tgz","fileCount":11,"unpackedSize":24720,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqqy3CRA9TVsSAnZWagAA7k0P/RypWuXvP3/Ai0M/a/O2\nUpwCzz3Nvr54SG4FVvAgxru+QZRQrzSCBpFDLLR0ABf8E9sm4EvpwLPKbZNT\nFOkbEYSuYhaRtd6LPOHbNWuBGK9OUbj+MYyY12pjuHR9BOd8pgs6B37Xdk9c\nz1OqQRmrOVCehIXB3eXgNuqu2pulBKBvnGHFDQ26GzdswDVAxgau136SGmzJ\newc5jpnL5UvCkJw0dWbgp6fI+RPCg2JpxKS9dkEX2mNJwYkHzgXzVmkgi7yO\n/5UPFTWtsHcBJ++fiiHHMpwwFhFZqeHiH2YQmpm4+CPjrBHzzzIKQXWYniMb\nNyVCbL3vqD2qaVDXeHxOJViHnH8P6jinjlH9CUGVK4yIHs70cmaLvZ9eUszX\nFKaaGYdryPzrWGuHA6xUh5j4ba5sUKkygDwIXwxU/7lBElQzk1ZNMplqEFZC\nEja9U82YWJGiwHXj+Itv+qptEY28lBF66CAV2upkQ9wRQ4t1N1J6yUTLL7MH\nbuQJ2Uzx5xCevrUxCsjKe6eK0MnWZUNDGJQ0X2M9YiYGxcFnFyKJEusJAgOK\nsODAfCLZXZg+fLO5mA7dZRWAkWRQFI/djGmgRQ6K05DPs0z1U8lXgUvpo0yi\n5ViMFrTixlnMkAiJmA3ItROlFtmQ0HDOlOkNhmtuBRdiinqqGQRuy3BbljVa\n+1VN\r\n=iH3F\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICy1d+sCrwHHKLA7SgruHgCqKNxZiS7LfF9v6QYNqnDKAiBU6cLD5kzXE6V+Ll/fnvAFTAz7u5zZHi156xg1XXbBww=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.2_1571466422639_0.1790397747869823"},"_hasShrinkwrap":false},"0.5.3-alpha.0":{"name":"@react-ssr/express","version":"0.5.3-alpha.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"b35d5139744cf4bdb5fae727af06df1543746367","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## `data-ssr-id`\n\nIf we use the SSR supported UI framework, we must specify `data-ssr-id` in the body tag.\n\n(Without the layout, we don't need to specify `data-ssr-id`.)\n\n**./components/layout.jsx** ([emotion](https://emotion.sh) example)\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\nimport { css, Global } from '@emotion/core';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script,\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <Global\n        styles={css`\n          html, body {\n            margin: 0;\n            padding: 0;\n          }\n        `}\n      />\n      <body data-ssr-id='emotion'>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### WIP: Supported `data-ssr-id`\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [ ] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n#### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body data-ssr-id='emotion'>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n#### With styled-components\n\nWIP\n\n#### With Material UI\n\nWIP\n\n#### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.3-alpha.0","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-x+FL01vFUVW/1cb7/+v4dz1kcT2aDVXw2IjaFKgsnaysFHavU/N2OKzC2Q9JCJJrowVx7bbIgOSoslMrlQ0rKA==","shasum":"c1c85e585a0a4e7a609f691bbcf0ad5b8b5483b9","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.3-alpha.0.tgz","fileCount":11,"unpackedSize":24782,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqq4BCRA9TVsSAnZWagAAJO4P/0+kxPwJb4uP8q3MGeQi\ngL/beT933Ywqe/59nh927y0j/oLvLa69IKigm920IDMeBgWFIL1pJ1c5pY6C\nT7bb9EeZ7BzMtAN3y/76EJZzwWAwAIj+26k7rGxFv5B9Y4S6oCB7yPsrJpY4\ne50ZdbV+qW1/tMJnnPcq2nxeFyad+ajkwMPx3Zpu9TWkBqAoWF19l9StiByL\ngdM1O2qLcKIE0mtutB3KYpcO0E4U7Dytghy/eKMmX27M6V17Wn8cNuZ8Vs4J\nPItnChABXjIiTT8gO/wIEz7gMjcNh+4BPD8bT0Ju/P7nkGtRG0cltGAUmWea\nnhbORzHi5pC9o7XDxx8EvxKuJi+okxdH9shil3kAZfgi+5kmn+Jtm49+1LKD\no/CZ+REEPEFCY9V28mQFy7kf8ZVaVpJRFz1WroEdUN6rwk/jVDgo+SrrbebS\nPtdMLrVtIF8enYeVylxaITAfRe8oXMeMshuoKF5a88zPSVE7Bl36A1F/dt3Y\nMopcKKg9DkuGrTwzmgwXM8aK+vjkpehumD98QKqk4VCGwIRb1iSp/R8aQ6d9\n00gEMHVBo/yPEbQp8/809RILY9rn40R4CS0UmbUaSpq19xK3I6aX0c9+ssue\nkeL5YpxUYb8x1F1mb6uLwCXpwJENszrGFE1XGcSgW0ntKJF0MWDWkHnoGR7T\nfV/k\r\n=xsX0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCyXLo8LPVUHdrzTZFkoLAokEqr1mddRxPLbkwI1POufwIhAKnOeNex4Ar4Jb4WRs5TvZhEOV7DtxcwQaDU0XgEZAml"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.3-alpha.0_1571466753044_0.35861002507262585"},"_hasShrinkwrap":false},"0.5.3-alpha.6":{"name":"@react-ssr/express","version":"0.5.3-alpha.6","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"c4719cf4896a697839d5dedf34940f7fdc713905","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## `data-ssr-id`\n\nIf we use the SSR supported UI framework, we must specify `data-ssr-id` in the body tag.\n\n(Without the layout, we don't need to specify `data-ssr-id`.)\n\n**./components/layout.jsx** ([emotion](https://emotion.sh) example)\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\nimport { css, Global } from '@emotion/core';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script,\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <Global\n        styles={css`\n          html, body {\n            margin: 0;\n            padding: 0;\n          }\n        `}\n      />\n      <body data-ssr-id='emotion'>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### WIP: Supported `data-ssr-id`\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [ ] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n#### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body data-ssr-id='emotion'>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n#### With styled-components\n\nWIP\n\n#### With Material UI\n\nWIP\n\n#### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.3-alpha.6","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-bLlCbbsvE3M1T520LmnXeN+Z77N+uKulTYdxPv7Z64ZwVpvW2Cs7uLF28JpqKTIVbaab1d4jTHozJwAhP4b4pw==","shasum":"c230140da43091517dc6c0c79078a1e9e414a777","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.3-alpha.6.tgz","fileCount":11,"unpackedSize":26500,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqr9aCRA9TVsSAnZWagAAPVoP+wa7YKoIBDFx+JptTBaZ\nZ0UKK2dRSSo03C/KhDxmVi+rAEcWsqn4wspWKLP5UVGT2uCQVmHT9tlGtI6q\nXA3XSrewSjv4/4YLOJJ03fLwTLj8F7sAfSlOMuFJ50w+ALqVF7EXV7j2h0D2\nQzZotzTnqMJy572e8OXut26eFAyXx/L0enGltihIZoUWIjVyi0dwHFFCW0EB\nT85w0Q6u5Fa5yjpVcL9Reu/L/QRrfwfaqJ3xPxHfXRZ92MqoB5+Aw80rapTc\nPocAi7Ad5+uvudEz2QKQ85ccXNxZb92aIKumivcuNHsJfzLD5aMDZZ4n7fcd\nCnGhw31mdm9dST5cfWGGEyNgQVRAbYxh15QdlBeX1jIRKFrcLfyn5yEGbQV+\nfLWK2Yxymy4rbwxcqpKkx3fzUGDVqwop6h8C2ERjT6I6xfWhAIsuGSDAWr6j\nMhWpz3zpPU000H2mDTNPT+IGB9owXu7h5HKOwaSw/n2Mqodhm67MmGymIJ/D\nnGU9S8JgJb1JRzjpVTwqq8VSgFxMdhyKUhP1ELIK4Em4Q34VQMk0LoZPePgq\nk5XTz33CCFJTujpuHjoV5SIeKulJFC2cY95W5t/EgAfUbeB2+gNWrCmIKEeW\n4L+CmUlsuW4HKRv21/LTtb2LE7rXLvvC4MFnkbPZyvu0lLnQl73D+XGQmFhm\niRf4\r\n=clOf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCsUvv9iCFAzO7xizLI0KZ/QLuOieVN0ztzBKvWFe5+NgIhALzSj5XLgyVa/rVhPfNXnBCOSbSB5iBTn+ORmOia7o63"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.3-alpha.6_1571471194114_0.2030413379084075"},"_hasShrinkwrap":false},"0.5.3-alpha.7":{"name":"@react-ssr/express","version":"0.5.3-alpha.7","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"254b5724fc11c7b8c3a0738cdeb85c63615f7e3f","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## `data-ssr-id`\n\nIf we use the SSR supported UI framework, we must specify `data-ssr-id` in the body tag.\n\n(Without the layout, we don't need to specify `data-ssr-id`.)\n\n**./components/layout.jsx** ([emotion](https://emotion.sh) example)\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\nimport { css, Global } from '@emotion/core';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script,\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <Global\n        styles={css`\n          html, body {\n            margin: 0;\n            padding: 0;\n          }\n        `}\n      />\n      <body data-ssr-id='emotion'>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### WIP: Supported `data-ssr-id`\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [ ] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n#### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body data-ssr-id='emotion'>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n#### With styled-components\n\nWIP\n\n#### With Material UI\n\nWIP\n\n#### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.3-alpha.7","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-s70171bUUaZ6D/ab5aeghW0tUd6131xln0FGpMOry2Ledto2WBeTTIPuvWdpqEc1HUoHdcAPk5mr3FE7UXO7rQ==","shasum":"c02c3cdb2b7b4b05a92b9f9a9c8497f9b2050642","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.3-alpha.7.tgz","fileCount":11,"unpackedSize":26476,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqsDvCRA9TVsSAnZWagAAx+UP+wQEHBJuGJQr9PikrIj3\nooAPahBfRrFkYim07+S5GCywAWoUSUxEfmG1nJHV/MYElovSc9ql43v9ka6v\ntPoUl4WX7rHfh3Tp3GMKK5mirj0pKc2wjSxkipgqfSVpG9jI7wGqFO6785Re\nYLXDKxPZWDT9I7yBYCAtLO7y79T6ZsEg2D6U8aDy38NwHUtHgW4oL/Yk/G8g\n3lgrsq9cbXGXSCXonKzzR4PLdbnf/wh0gOnHFRNavDR4GZXkGBMsR08TQbcZ\nU1R0zGMtwn8teitRXx9EAslRG1JqQKfEFVvVYoOWL0Te9WJVnuNsX92HI+97\n+sokvTlIQAUXGCIaqnDYPyCY9nPznCHgMVvP/vY6AKKL+/tReZVW7BivpONb\n/1fSqymBRu8bQ3WW6ruWMAxm49H/7zJRAhZPy+CstJPY0Zp1HbmD8Ow53tY8\nTY47cn5Spq8ioRMbnCn5NPHzpbaYqmT6XBMiCEis25GNNRUW4DyMCMj7GlqI\nNWq29YaQUH0lKIGkIMdykIRpnGLe8tscukqO0UTuvHw92nJAkZDUy9XGjB6j\nOv6N8ULAos5IXVnczWArLeBLmvHClFKdm/q6i9VE2STgvdG89x+cKPDBUatX\npcwsgow1tndxjPsCCOsi0GmG+HcTPaZEZFpizV/QQ5sRcBXuKvSdeSCIBOED\nn/H7\r\n=zMFw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCcRksGHC/5iFkngkqYht8xL5uOlP3kclqqAvSn+XwLvQIhAOM8Lc5aqq3mLwKM9XAzswy38jDxcBhzMTJo+qOCKitf"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.3-alpha.7_1571471598345_0.03421820209552573"},"_hasShrinkwrap":false},"0.5.3-alpha.9":{"name":"@react-ssr/express","version":"0.5.3-alpha.9","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"1825121a343f5b5f6a393df9454fd5e90a0b1a1e","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## `data-ssr-id`\n\nIf we use the SSR supported UI framework, we must specify `data-ssr-id` in the body tag.\n\n(Without the layout, we don't need to specify `data-ssr-id`.)\n\n**./components/layout.jsx** ([emotion](https://emotion.sh) example)\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\nimport { css, Global } from '@emotion/core';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script,\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <Global\n        styles={css`\n          html, body {\n            margin: 0;\n            padding: 0;\n          }\n        `}\n      />\n      <body data-ssr-id='emotion'>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### WIP: Supported `data-ssr-id`\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [ ] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n#### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body data-ssr-id='emotion'>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n#### With styled-components\n\nWIP\n\n#### With Material UI\n\nWIP\n\n#### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.3-alpha.9","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-zdA87fX5FTexgblumC3mGd7rwHSAmVu5n82EF2kGdTQUIOv9ts8By9bP+QpwDnr7G1Pj53m9qFkaHrqFagQiJw==","shasum":"b536b31e8a8a31cd6186ef6ae64946f96b5cd4f3","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.3-alpha.9.tgz","fileCount":11,"unpackedSize":26543,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqsHNCRA9TVsSAnZWagAAdwcP/jj3oDdINrW43sHccpbg\n4bcj6GMw1rT0VIxK7oGMrtK9mrhhBDZ0souX/3wIvN09EImfA8ZFIglrDsnm\n8MihODU6X0pzzmDFe/+E4mlbqsgXUKJ70oU0PA8PkwJqgULjhFETMH4fAiQf\n+z3ltTONlotHLvITIf4fTbCDzTuXbCW73bz3kzdV5JngTJSq3c8SUc2R05xB\n5+Vgn0pwrE/UuKPAlHmzzHj68o4CLPU3Cya96FGm6vtQ/tILif8nqNFa3ER+\nOqwXu5iIaxtw6xSSgDItuZug90BjUMLeB1h1YvNU8/Q95xWP6zyBK9Sxi8JJ\n3S/jwOcT/HC6NST4j8g9HpZx8uM4e25a2Wcryme0lMiyy0XVmjqcIP/n/NoA\nR/DHVmlfMhiyx2ff89ngshRNLCnKsg0/rA5EryvtCCoqLgfmrPfccsZSuCDA\nO+KatWuD7CTMIGSQGX6VvrIWZClMKeyF6Dp4t/6Dr0X2JjwGYst8KlDwTTfP\nfBEaohzH8pW971x7I0PLh1eLnhJEA9Kx4dVGcbmavQko2nkjx8mz0Uzb9V37\nrLmyMD7kPyBM+rEk4hwIVlNFLEq61jGCQlMTTgC0Tb31k6HRShZ0qDCnQc/b\nmetvg8cEtG747whSDD4vOIXaj2x7AH/03hX0XlP/bwAfFM66ElkvZ/BwmqCm\nCO2z\r\n=O1L6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC1md63eI0RwsnwSMxotApp1rLJuvPEGue8vvXcs82pWAIgSgDq4GYg6laWjXOYImGCx8C/8nr1Fk1sAV4hBFZAoJs="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.3-alpha.9_1571471820960_0.264509661495427"},"_hasShrinkwrap":false},"0.5.3-alpha.10":{"name":"@react-ssr/express","version":"0.5.3-alpha.10","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"ba2cac303ec3db8f014f116105cfbdc174d0d21b","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## `data-ssr-id`\n\nIf we use the SSR supported UI framework, we must specify `data-ssr-id` in the body tag.\n\n(Without the layout, we don't need to specify `data-ssr-id`.)\n\n**./components/layout.jsx** ([emotion](https://emotion.sh) example)\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\nimport { css, Global } from '@emotion/core';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script,\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <Global\n        styles={css`\n          html, body {\n            margin: 0;\n            padding: 0;\n          }\n        `}\n      />\n      <body data-ssr-id='emotion'>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### WIP: Supported `data-ssr-id`\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [ ] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n#### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body data-ssr-id='emotion'>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n#### With styled-components\n\nWIP\n\n#### With Material UI\n\nWIP\n\n#### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.3-alpha.10","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-icOlcNmozUzX7M/s1g1PuLOBUYk9SBV1cDXH+WzBzep/5EeR236hBq0FpsLTHfpP+PGw1Uu5BuFQE7mBVfW/yg==","shasum":"88e5fd9e95067669733ecd8ef1b22bc31dc9242c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.3-alpha.10.tgz","fileCount":11,"unpackedSize":26543,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqsOhCRA9TVsSAnZWagAAL7MP/0yboBYYkyYwMubKDrkR\nb1fWzD1WCe74KslHW9e/X9WOm80295DyLZmztamlYorL4rW+2c7NnOtwAg3g\nJp9N63xD/8W7uHvWQRxxr6stOgtZ62lfer3Jo9a9Hi0NlCEeUYHJQDKzqhE2\nSXamef7AUwllJRgxYzhL91Ll9Klddx1vWDUR8N/EPvZXqyp6UjmTg0TnOpqM\nGWDSG0YjsJ7EiJJ4geRxYBVu3Jfz54qjh3evMEzQDnnx01V9PWX5gdMZ8jEk\n1/zcSBthMN3sYekbqn7ADTOzcPO0dfZFYEzdDfHqBnyaBqRy8rRMPiNX+yW2\nt/XxgnTaOGreM0ZOarZ0qbgDqFT0fR6Tjz32IPLNre2ZBnMTftWLWxgc68Y+\nyWFXvMyZFvuFndHfas5i3DQ/jl+n9Om1CKmYZPcioai/UCoxAwt7GJ2U/qt8\nAKM+szHrZXu0P+aWk7TAN43KPFdYXv7AgIO+4B8SEG2V2R9zgcvih/JlLifn\nAq3S/H5MsRiHYkaYqjEWSp4P8qk0FyALOy2EZ4kK+jypQlbP6KISEObz/AJ6\n3EyeYiZss+WkiJXN43BBuDv5Hite/kIRcW0/XKKu1jZAQd562XwaxcHDHLNp\na9Fo2tB7Yim1z3QeKFdtKZSJ4qowG0XyBlYDJd3hx93TUSq/Mb9/2B4QtuWN\nqaKP\r\n=RXCC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDyG5l4EbDJRiF2jHbHD0VUMGeYYS4bb7eyX8cQV6M86AiEA2QDJhp3qgBwBGGhTGQaqqGP2ZIM9X6Tm/T4PT/Znldo="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.3-alpha.10_1571472288853_0.2653314534327875"},"_hasShrinkwrap":false},"0.5.3-alpha.11":{"name":"@react-ssr/express","version":"0.5.3-alpha.11","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"b6be7e738ff84b4ee99907f10f572946df0cb291","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## `data-ssr-id`\n\nIf we use the SSR supported UI framework, we must specify `data-ssr-id` in the body tag.\n\n(Without the layout, we don't need to specify `data-ssr-id`.)\n\n**./components/layout.jsx** ([emotion](https://emotion.sh) example)\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\nimport { css, Global } from '@emotion/core';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script,\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <Global\n        styles={css`\n          html, body {\n            margin: 0;\n            padding: 0;\n          }\n        `}\n      />\n      <body data-ssr-id='emotion'>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### WIP: Supported `data-ssr-id`\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [ ] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n#### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body data-ssr-id='emotion'>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n#### With styled-components\n\nWIP\n\n#### With Material UI\n\nWIP\n\n#### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.3-alpha.11","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-i2+k6PBYOsflHNdZD8ZlNZX2vE6FlQRAE2FPw3mY/TBk3J559y4FpSR1Sn4w3YrO4YznGBOg3Og3zPYGg7IeEQ==","shasum":"c8f510f52232633457daf0676887d0777219acde","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.3-alpha.11.tgz","fileCount":11,"unpackedSize":27281,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqsz2CRA9TVsSAnZWagAA1OwP/3X4J8G+uCGEZlnT6J/7\nW51Tb9rDUZIk2NrYHSPwJZ1NK6gZU5KqVC5epMbqO7hCJMzdE4CpslcsTonf\nu0U3Otq1FSuDjuH7esgQra9YQmkeMfmX+OwYLvxlUbB27yN4A8xwI5ty3n9n\n2cAXA63b2mJN5pZR+0cLmmHxiGPyNR6F/ogDtFyW+1sn6dvNSwQQ7ZKihO/D\n510B8t05O2UH2o8kYFyNeozNu7wVKPE2mLjg3MWIu1KrahP0KSIChWH7+yvw\n+1W2qWwKl427o4j41uWqtvYwQX2gdN5u42IycA/YmBorFwznxY43qnh20aBr\nxTOgtXUBoOwbS/iuY37Rb/AkrELVzrUU4YcyKyjprQ1K70rPRJFe2t9zxg0S\npZd/O2vdUWEBem/WyMEGveEiaCUM2FAp8ZEfJ339wU1d3LmCArdkSd6N9Ghx\ns06dFVRhdn8YZjRCKJgNhepGUgTGVI+qSCeLh7h2gtfQsvxvOh1YQWnJkDOP\n/i4C5ojfLD9UtJjmWwX1/wPqZZVfoPkyqD/ULd7cu2SSVpEF8Do4e1xGBAik\ngxD01TkyJMAIxg9114gObltEV9+TYSVn9O9wiwH5EgCabj3LbysLdTzrl40P\nw3BNGeOMsfmlzdORQJQSvGfIxVoa7XMc7DjxdSeAVeTgDHhlCo5XzxATTw69\nBR6O\r\n=tb/Y\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDqCatDSO6MOx9skAVEY8oKEnyRVW/c1azuiqMSDaMXEAIhAMOTg5q+2qHH3LXjhdVqTRm0e5JPopa0doMZ6NfU0cR8"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.3-alpha.11_1571474677354_0.14302612186355756"},"_hasShrinkwrap":false},"0.5.3-alpha.13":{"name":"@react-ssr/express","version":"0.5.3-alpha.13","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"673c59d915d983da359e8dc0ad612b40fc21a3b9","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## `data-ssr-id`\n\nIf we use the SSR supported UI framework, we must specify `data-ssr-id` in the body tag.\n\n(Without the layout, we don't need to specify `data-ssr-id`.)\n\n**./components/layout.jsx** ([emotion](https://emotion.sh) example)\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\nimport { css, Global } from '@emotion/core';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script,\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <Global\n        styles={css`\n          html, body {\n            margin: 0;\n            padding: 0;\n          }\n        `}\n      />\n      <body data-ssr-id='emotion'>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### WIP: Supported `data-ssr-id`\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [ ] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n#### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body data-ssr-id='emotion'>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n#### With styled-components\n\nWIP\n\n#### With Material UI\n\nWIP\n\n#### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.3-alpha.13","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Ze/4mvKkB9osSpIiqxQsuskVZ5Rw/pxzRDaY0JZJSIUw2XWPiA1od95WiCyOFIfqf7c9fGCRf1S3MIe+IxxCTw==","shasum":"6b59466b459d32995a03e0c30b9e0ae04b63aec0","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.3-alpha.13.tgz","fileCount":11,"unpackedSize":27833,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqs9XCRA9TVsSAnZWagAAEuoP/0/Ybyt/n816hIqYcYDz\nnheJmYgiZzPJnmrysafnaoJPBYdjXnjGY5AAxDlxwRQ/Mpn9WWJVgWni2mpH\naanejthIddBMN7e8v4FddmC2g/WDcmx1jmP+8WIWFpJSE9LumKMY42dYbrhi\nD0RPpDwVT7/76wS5At77zRXHXcStbGJk4E1By46+CDI4cYeAs4Ge7d5Bv8AA\nYL+wdTt0+ghvX6Do263l/7B+U6BJgvMuCF3y7sDXm17m6LIrPJ2WPo1gEWUV\n2nRxtCSXu21OS7E+PPlrfPXFTySyYv6OqBhs2OrWi9AaYVr2AEwZMXJKPgKI\nmNPUNM4Cg94q7wREliI9bQEG0lF+M+5yCJgbEy9bybZkEzKIJ9BD17pJXR52\nrU0MKmpUGer2TXU1zO9OIgOekol0PI1ZY/A333ubNH6IG6ujh3I8YXvC6qNO\njqPejJGmW7l+3j13WMoIhf5MDAOjTsvccgS71OHuoGoEPVUNOjeqIkij4WeF\nPCUu4acSHHZ/gPl3SCwZrBiUU2z305ZwIODztrjKBoBGv6Z/gf0myu8TXXFw\nNItRUKKXtQpykaMJosOt8MeakeGH2jAJ4dV2lQKQuPCnrdqo9xaKK6lJJNoa\n33TR2fwP4TsedqjdXmrT12Z4etRcwA3r9oO6FOOFw8XEtHF28VCHrphMsjlV\ntEZG\r\n=IoAc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEqEo9kM8JMw+yoGgULJ53VF0OieidGb24i25KUye+YCAiBAajlKB0FDpxqPRQzl5BitJq63Th4MDk6ADrJQLpYiMg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.3-alpha.13_1571475286515_0.9184219683340251"},"_hasShrinkwrap":false},"0.5.3-alpha.15":{"name":"@react-ssr/express","version":"0.5.3-alpha.15","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"402d0f4ecc2ab2aef9377e27ed0e4f3263e6bfe3","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [ ] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### With styled-components\n\nWIP\n\n### With Material UI\n\nWIP\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.3-alpha.15","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-3wreyMD8dvDFs16+2HoN3Ejf453By2XRzAvCT/55mbbbnyd6nNuUtohrkJTz5Q/QeqtTbJUwAW+GpP0jwM6y9Q==","shasum":"615c45aac952c6903efc5faf9d7cb1f9f046e17f","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.3-alpha.15.tgz","fileCount":11,"unpackedSize":26816,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqtIfCRA9TVsSAnZWagAAZdsP/jVS6e3XCU5t4ifBCNSd\nL0ggKQgcrrbQaj3DpClu2ZDhSBySOYCEUyewsFl1ZjVfTDfmpvihoepugGbT\n0X6bIdsMC0eImTi7qVvxqtflJl/OCzBgzV5FkIv+3hG8XG5vb3FEMebPn+ja\n09torOBUi1zISQWSLKXCe1mh2Si8u19tqza+8q3ZLt/6Epdjkkx0EgcEt/pA\n2Pwg1ncxl9EyDZbBuNxrR87GbbfgSwAifR/ZDLOBwbUUkat4v4CU7ofX3o6n\nD8Xys7q9/s/s0FZDq+0Hl4urYRZW+fHk5CtcphjCavFTrUQJBaLgZ6QuR5yO\n/ufjemwH1eQIWhipr+3Mh5ixOpYrJkT9OyNe4lh+vO4AkkKhSRLlVnVZZtuo\nzAtkETjXMZ7IEBwokYYhQvef8d7bP2kgqqyX/xoDx/H5ojzb/I12xVYqsUcv\nZJTj8ur/HjWFnGJqWe7TJ7adQWeBzLDvhri7xQ3/9mjLqM6axRcpL7TqHXnG\nKwDKziu1KZk/gveJh2nAnhSwxxHwdtfv0CcE0MTtIxsofz5+hdy8yrUJGQ8t\nfEaihH8vIvdEXTdY0Jwfom6zR2T41z/tnTgNHzxRPWFn2uiSVr8o1U4RtF7J\njzGtY8E39mhiJWu74nA7OHlCoAVxsV1tgy8E82IoTO/evpkIhyBwsLwcFOiQ\n5u0g\r\n=uUFQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEwppm/m7xktLIN4dWMnErsrndAHyUhK4gsV76XzbxzUAiEAziCal1okmxk5kR0nHt/nWjRkzpVhAci/AeSORqGPmas="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.3-alpha.15_1571475999168_0.16558646720717252"},"_hasShrinkwrap":false},"0.5.3-alpha.16":{"name":"@react-ssr/express","version":"0.5.3-alpha.16","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"0d5b3d8794ba8d62f6ddcae8c77c74c88a9a8542","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [ ] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### With styled-components\n\nWIP\n\n### With Material UI\n\nWIP\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.3-alpha.16","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-e3zKnM3WV+yKxMKzv8BDf+Iab5SSb940vVKJCkxlbbWlSov8gX2Fz9ajgEVGlcVXJO5dBaXfrzu+7qKGvl/U2w==","shasum":"fdea7a994aa8119657ad94badc1a927db3143e2b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.3-alpha.16.tgz","fileCount":11,"unpackedSize":27421,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqtPHCRA9TVsSAnZWagAAgyMP/RSVaGCYyknIyv4RpC7G\nv1cpD1ry82gF82AlYKl3htl/V5HNC++DZjRCAi7hzZM5kDa03cqArTXG0+BQ\nGzaLKTUVhO/cpEM6fQXoTTWO2G3EaXLc2LspDb7UyKF+AF5RTqomPSlfjhiH\nDTJHvioiSS3BrAai5EoVH/j6VLswNrZkH5ixwW8EdbQN9tajhUcWeC9BOpRZ\nKkLk3KJ/DNlBMWbGv83T1Iwh5QypLZhvsPlxoKrE6f7/fHPW+YJMzZZiH/QU\nGJfCW3jjM13VtIZS5BXWR7ybzrYdtUmV49LH1SiUEho29/GiXTMYXOQPrFHA\np+2EBQ7qHwFs9VG8zNozuwiNmkXKpUoNdHeKw9VGmx1uHm3Dtyy1LnngKFbH\nF8tFCFAzMfafDlK68wQ137n/NbQ/DLKyBvo0zM0CViJSnbBara34rRCGJqba\nZFFHy7Those8iKxOkECB65XonI0CQa/IqupMWaHOE01d+/uhR+yJEmhMQjYJ\nIrWp6ZePwpI4quskqGgCPuYgFyOkXTxKX1DlXGu7aam4gLElbgxw5A8NnI2X\nzcC4AHZdqIys+5Jf2h3HHt3Mp4dBQHf3TFc+tNu7V85KWtcuc64ks1wwxhGF\n5yn+OIkK7sNWLxvOTNwOus04MyNs82TVmKi1mXsqS2ki3kQyoCcF0KdAuUoc\nGeFg\r\n=poqk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGWnoJhp7qGgb7m/MN9YBSPdYnsptQayhdzjyNXhR/fgAiBh2vBuuQ+dxTEvHoB6S/F0CipnusTB8x9MNqUwpokNCg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.3-alpha.16_1571476422505_0.7210649513591487"},"_hasShrinkwrap":false},"0.5.3-alpha.17":{"name":"@react-ssr/express","version":"0.5.3-alpha.17","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"07fdf5b87940f2896838dbb19c7f685a8a1e4300","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [ ] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### With styled-components\n\nWIP\n\n### With Material UI\n\nWIP\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.3-alpha.17","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Ru5ZWI3asoGT6WPZkNjQ4iLbbq+p5jQrSsF84yRwdgEeKdhfMmBWQPf7LVfEP3uyg0dn8JUyeHCrqMOmHaDtHw==","shasum":"6fa3375143ed0d18f7ca7d6858d2c0492a7348be","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.3-alpha.17.tgz","fileCount":11,"unpackedSize":27357,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqtWRCRA9TVsSAnZWagAAnuQP/A7MzMt3Mz0wFGty7vCK\nMD9v7xTKk9+OdoiejgFSSCxPrY9X0h2OdzXeuGthGouTceKvbEjZGGCYzmFB\nUP9lbiGADxkEYrx+IoF0Wrobp1+2uDsWd00VXFDjxs7YURNxHGq47HRMJ9Pe\n3UFSnS+iGpPoa/Nu4MGgFxvBu6X25WZnuxd7Zz7+IPOT2qse7oVxpqXpBcZZ\n5P3xE9gICoOJPt/a3N3yP7+lz0k224cnHgvwpXujqXhKw901uRtc69Gj9t5Z\nlKExxV2ozKXTEBwvC9DQSn+QWgeM2ci5HkeJLoYRpkIwVr7GM6rXgq4OrxPZ\nOT524pEZzOy2d0X4qm9PlEGEN71Y20OUGzDzo3feG1l5SzuUHE1S1hR+fK1g\noLE18mEXEaN120zOjVWzUTw4JVBW+N10Y5sLofoBxIb1GGvC9vk0LZRkcMzv\n6Zv9eQmQW4DPog3V31AeYB5xS1ltacZ73aKcXVeKHUcs8/KIK3BmLsS2ztnF\n6TFIzpw6nll7zYag4ATYWs/EnEslSnZR3uPAh/PGEGwr0h3HcVjvMTBpo9xb\nP2RKqnmWWGInsEqRzlWpW2zSkb0EYTIYP7QKkXz12Y5dAVk+XaE8kRWJEwTg\nSPnlLXgZTfux7FIMp6LM/oyGvicaToOV2YYJk7hI1LmMZjL07NRuppn0SFOi\nrA8q\r\n=50In\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDd75sgkfsOscZg250eod+hwrMEVt60xCwGwLRYvsboBQIhANr/8xypKwX0UuHqJNpSSAeZ0XwN/oE/XBwGeyuRP5Cz"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.3-alpha.17_1571476880391_0.8358107960587147"},"_hasShrinkwrap":false},"0.5.3-alpha.18":{"name":"@react-ssr/express","version":"0.5.3-alpha.18","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"059e455ab3aaae029ef27fb0b3d5ef20ee9c544d","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [ ] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### With styled-components\n\nWIP\n\n### With Material UI\n\nWIP\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.3-alpha.18","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-5MFPjdWN4fa3tYcP0ax3pSnh6MKpL+Zr4wmq8Mr4nV5X/AYxCBOX+3a/zkVluzd3/KDk5jR1GFqK2hJnOCqMZw==","shasum":"e5a5599a80b66db7bab93ad40ee2b7b98835d1e9","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.3-alpha.18.tgz","fileCount":11,"unpackedSize":27250,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqtZGCRA9TVsSAnZWagAATc0P/A2f/kCyTNcvUuaYr5zA\n8mMt3NmB9nyRl75DQGZ+u28MmdX/YS2Pg/1SnIj+xoHv/Sce8yb24ZtkQQWX\nuNkgmVR6oSKIkf0w7frW6MFQDzJ8CCZbp5FCNyHp7n6xEA5NvRlVcoqLrQfa\nn9lFUUU9q9y6UdZs+1M6Yq1x1gN6KYbDB/5K6/VIECCLk2LcGHus9at+eJYV\nqyDjYi/C5Q+TUZYAtsLkjiV42gQ40MuIrByMST4RkzI39yA9no13WU8klI5t\nBfOQB7NQGtxqQlSJBz14J0PdJcNaAyGCjsLF3fVREs2oQ+kSTNfIYiMo4wOv\nndkQ2YgQBh2F2Hdzzio9DBpkWJe1G8fnwBN+59iK+UV9RVVfCTI9gp3ihbGj\nCbtjCe0McQC8rWMuLfYK8VAypyaTSFcKh3pSE1LlYLxKZZpxvGHHlmMlCeU2\nLUy3aX5RvdAnuqOnX0hNhOwRZyeBlwoiWap/MX596pyq6JNHe/inQdOpaw+d\nQaO1TC+xrg9oX6UeRD9K/AOLktle6cXGfDzT+cnjgL7/s3gfmrkOvh+wdSC9\n4J5RG5+58eOU0EPsHYcyLancW9kuDNILqgkh4D3qA14LCOxCXsLVW7sgSlqx\nCbTXWR85mhClRKn5KRTRgjF34NkO6OakGyH6BtxCMPmNrKC9tWL5BziVdUu+\ny0K+\r\n=/ge7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHqqlc4AqU/bjVNHUZYYMKgD/RjKLCOxoRwfJUhr1SU5AiAGfVU9WjIttLpmMwsJrF/vGpXO1qV36LlmTrcQDg8BfA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.3-alpha.18_1571477061455_0.6621290738589392"},"_hasShrinkwrap":false},"0.5.3-alpha.19":{"name":"@react-ssr/express","version":"0.5.3-alpha.19","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"d4ccec9dfd9db85bcbb15f2f24912dfc9bc19669","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [ ] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### With styled-components\n\nWIP\n\n### With Material UI\n\nWIP\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.3-alpha.19","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-RfPLCzpPHmaL2iUgo5SXUxjij2HO5h3YKHhHDGZtTBHVIs69ceF3EA+FibQYcVFxUlj2Z97sNaRo8xQ5cwLkMQ==","shasum":"1dd124971e4c54aed1ef79a271f7debec9dddc7d","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.3-alpha.19.tgz","fileCount":11,"unpackedSize":27328,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqtcnCRA9TVsSAnZWagAAJNEP/R9PsXgrjiueJ45RkYiB\nTbDfg3JID+XypvMA3qdeSJR0SQkfnrErftQW9R2499asgUdBuNLkgcHPDwFR\nEMEOvP7ECozRL/VuOMm2SWLrDGQp9LEOS0x1FS1PNKaAKNgBXJdQo4FhAAl+\n8V+AAaDlIQVbR7UzbE7oH222bcBx0exxExPkrR7E5dboqQDrCKaGJP4e8EaV\n0v2Qw6jucyvRuooS9Xk97I/ioCev4jNczgU4zsGlRc118G3VgYXXHwgX87wj\nl8UD6fpzmgfDqEbifwON1wOhPRNQKgE+LsDZ2BuYYPazwSt4DPlHxKYysadY\nHUDW8wRCDSx0Wc7tRug8V9PO6wjAQ16In7QSv4PDfO1kWuZeX8b1xR/bqgwz\n8SMb5ERSJtHJiGflkSsAZGxsL6kmohF74CaYrZPs/qNUt77xDKy3Jigi9Iui\nMmk7SpT05vU+5tVNVCrbbW8foGiM1FtFkStAKPJj7qChsxJikMTe0LCeDT96\n34aPToi8tr3h/WhKqOr/9t2edNzuMxC+SDbPjxKKn1hlfHSub7Lov3VvLtF/\nX7abqlRWSgIb2qOUKG08pMRJQyf3v1GJgZLe6q73y8gjFSZid05Ymaobltd0\npu9ao4PnZKUarkkhb7EDEkTsNFh7yBqjYT5dO/fIK1skPEhBFeWW6BQWRfkl\nkGq7\r\n=EZ33\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICY31nL8O47PTIFtmnApuBid34Yzk2k/NwkoRkLBBD+AAiBMGHTr0SNMPbBdesdIZSBfZPWP7Q9SJcZ0HG5yaJt+2Q=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.3-alpha.19_1571477286413_0.3909593522796835"},"_hasShrinkwrap":false},"0.5.3-alpha.20":{"name":"@react-ssr/express","version":"0.5.3-alpha.20","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"fca86cfa81f84d191117e1856b9af27cd4b2ad86","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [ ] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### With styled-components\n\nWIP\n\n### With Material UI\n\nWIP\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.3-alpha.20","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-gLlHBGUwz4cGm+smoo1v7+TQbeFI4sL8LRgNvyqnXtaxb+JnfiCTwMOFx6Ut9TSmWl4gx/3x0erLLZ2wkXsNWA==","shasum":"de6ff3aab66bfae8665ac8009468a88dec27e2b0","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.3-alpha.20.tgz","fileCount":11,"unpackedSize":27367,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqthPCRA9TVsSAnZWagAAdRgP/0feS9agWuhbIE6m01SB\nYZtV2BQozT3ekeGzKsP0RO8+qIKTB0Ub0CoN3wX2ghGxlEPTMoTSqTR41WQX\n70+BXgekjP9KBBnxE0xqyNvnaf/15+MCrPo//l8ipI7PGBlbv02JWW/MImFh\nvxROmeqVveSTJTh63ZNJgrda1meCLRrGnZb3TtR9T9oH0pgF22VccEVfbN6y\nMwtF5ez35ZVvofvXWLBkbk8DsQBsSJ5Qb30kexNcyTyY7XbTTtmU7DjmEjV6\nFLZLRFXE9/XPCagfqQy1cRutvL1TQptjGgfiUwYC52E+KquYDH06ZADaeRev\nyX4kH+Zqamb5tWTAZvqZPe1t1Kdhgayg/0hlBALDMdlL6YvK6k1Yhr7cKld4\nMNutN1+zxhWEfpX6GuEDvwPjIdAxqCjoK34ppIWBAprtV+1Sblop3qGx50hR\nOgHXeuG3YZ1ranb+1RLOHCDx6k05bLw6BFLiZMQLoVQamPL6AQXzrWi5vGy3\nJCz6JuVAhBJG3dnlRhPmhym5rwWLz+WJaS/ccHRzZkPf2AMOKIbH1bC07+tr\nOHcFjL0WHCg5LP+6GURu0h6eMuDQHRbQ8+kaC7JxYQqVGzFbrNm7aPMIw3z3\nqNs5U5dGLGE59SyrRPAuLat+3OCH3DI5NuLx2RN0Dehv6p9vcYvqn7S0BETZ\nf7gB\r\n=YlXP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDqoIrLSJWDDgjZWfPBABpQkApcjO9otLq6HAHjZTVRGAiBZbmEtErl5YCWY7Vyk9kvsQMrjqAmEypVGpqjXBQ42WQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.3-alpha.20_1571477583235_0.9859402492210139"},"_hasShrinkwrap":false},"0.5.3-alpha.21":{"name":"@react-ssr/express","version":"0.5.3-alpha.21","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"9c6eb4df5a25ae565e49cce72e7084185f170eb3","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [ ] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### With styled-components\n\nWIP\n\n### With Material UI\n\nWIP\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.3-alpha.21","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Hjl0NYRv0Yb4Y1KlmFzz6qGcRxJYWeRl3USVizHb3BQsp5iBPV+r5/6m1NJbZQ+hQuRlAmJcAYxxFFVu2tmGFA==","shasum":"72cb291ce6722cd480f80569abd12d6f271a2fde","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.3-alpha.21.tgz","fileCount":11,"unpackedSize":27454,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqt0MCRA9TVsSAnZWagAAGN0P/1zcaTHJI5ZlfPLm3WcM\nkNYc+EKlAXxmzW2mgHOq2f6mMknWdVCpwi7o/c9cZ8+0SMoYI+p5lSRdrMHW\nMQESi+RxfY1usYKJ/0NvEnd1C2/o3KHmKDLdJXB9QIpzAZE0Qpvv2F1UJVhZ\nOnPQB0lZkWv6MIT6LrYawKuRicaBVTlLueX3uPW0+Q/EzjGxXdrz7q9g1iXI\nz3/bBitcV/IGxQsr5yIUCcmet+7PxxDiJR/yg0Pxnq1LXHdS490p9cugoRDB\nzekkO/6ThRwiVrm6aSJlaDf+lsRA9MZRo7WFz6GiS5QCp6WCPTKrwPCQB/IL\nlf3HHiiGcuI7BdNd6oF1EkVEdtma/vn6j2ca6+vKM5x5qzKDaJi65VMq3UPm\nlxV+kab9fSNiElvHgg+W/swgyg9yzAcMMmtrhQZnQYOH9DRbuE9u0iXvv3Lp\nonnelpEtcodZdb8yuFi8eA7wlyvHwXB8fJ6QM8v4UaZL/55fw2NsERLwycYB\nNZXdNiZ0uh+WvD6dJc0a3M1rEDSILuUbaL5tvX/rldjl/ZlVpKCeYO1YynSS\npui9gBoZYbFMGgh6sqgfQJ7/xJhNddUTbyXfB0mKpU1z5bHcWpUKEBThxXdW\n3vDFo8d+yeHdi7JW3wPC4ihdAYZa2cn4MSMenzjaZ5wJoWm2zkXqrA+4XZHX\nQXDM\r\n=L+bK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCQriiOFY+SGZRZK7ZCYqCjsq+1JBZVmPC+1v41KQ67VQIgOwenZUAjo6/snidOcBb8V4HcOD6NL2oH2yKUK7MdWW4="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.3-alpha.21_1571478795995_0.4453469835050079"},"_hasShrinkwrap":false},"0.5.3-alpha.22":{"name":"@react-ssr/express","version":"0.5.3-alpha.22","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"45ed1417e732ba578325579fb04051e0ee04a835","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [ ] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### With styled-components\n\nWIP\n\n### With Material UI\n\nWIP\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.3-alpha.22","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-wMz8ol9wzyYZf0HVmsAPd/yp0P9glXkKOUF0twIh6Z4p+rhTLU4iOWNisniuTKgAJdA4POxUm0ufzGiO6u79cA==","shasum":"5e6651be858a3a146036603530228b9575e9b96c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.3-alpha.22.tgz","fileCount":11,"unpackedSize":27554,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqt9TCRA9TVsSAnZWagAAJJMP/iORkFeZHTkFWASKmDj2\nE3XK2lZulsX5zdGtNLEy6cxzo3cfsEftKhCrkUh9JRNFb2bg4IahvwlFr63y\nL20clvPF2Rh1Jali4gVsa8ohqvk8mFd+kvLVmzkqQzqnQxWEE2siZm85oWXV\nTFIMqXoScK/h54eTDSGOHBDa8RS+6tf1jQxCFPJsVlJJnlTVUODhz0mTab5V\nyh4qfzDaM6eZCbSmBvkITDsMf9QwFsXEeQ6P/Nbb88llWcRwaKpMr6Xwux4k\nyfV2wUGflNUstTSTuxhrSLOaVpSlwkDiDdwGLfnJwOtdQSl/awEfe9MJdRFc\nzooYP3tj0A7U5ePKrnl4cpuXumghJRwytiGkfezNCjQHMHELAqXvgOZIZVOO\nnjmi76xlejV28Ll5jSIsSMDrzsMqD+5nE7moLgc3CIPm7NDbhVv1zsHITURX\nG3od3fte60Ogki1tsenDHi9bFRvbtt/iURC8yEBO1fWTUVbjFLXyHxyJxvX3\nX1c/n0+8Z6Vor0qjT8vqWBfcM4YgyYE9r0vcrCCB9N69xY2SdEXe/9ex/Y6d\n2KgL6ZTE0/OjZ9uzSTH7doDVcJvvhBBS2GDF3jEGUcR70BPchfNlnDxgTU0p\nEbNxo7tSXBzvb4eSzBEZWAcwrryB4ZvioxENIjd7dxGbz+jVyUEkZMU+SZ1z\nFutL\r\n=rMt2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHZngVl/7+9Ahzk8SG27ys4zXpoPllScxEAO1XtJ2v+3AiEAgGVMmrAh2uhTY7Lc651MQyRN9HOfWO8TOcJFX/FrdtM="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.3-alpha.22_1571479378817_0.20036174589160605"},"_hasShrinkwrap":false},"0.5.3-alpha.23":{"name":"@react-ssr/express","version":"0.5.3-alpha.23","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"179be4675105333bf555fed068504265940244dc","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [ ] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### With styled-components\n\nWIP\n\n### With Material UI\n\nWIP\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.3-alpha.23","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Z5ApAyJL7uQ1Vsfg0RkhdIuhipbrRwMbifExvcVQ0EB6fiZA4y2IlUnJ7bFYFBb1x+bPknwazfpcWFQhdSc3XA==","shasum":"ab621ccef1b04cb7781d2fec25ed83c4b55d2d16","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.3-alpha.23.tgz","fileCount":11,"unpackedSize":27310,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdquEVCRA9TVsSAnZWagAA27kP/jPLK/k35VRjP8h3XEDp\nov8L4SqJ6c5e0FM+5dPWFKlI13qGrExqVvcC9aOQwPvZOa5UWYneFnbJen6Q\noFIvmfabESEcNprMEVULTM4S5bGdfyZyJt3DJU50jE7HNM0SoslaZS1t7Lr+\nvq2EIChdiV497ZGUakMP/zCAENF3x6V05Ika+WEbC+E3mjSwu1unCANYO50r\n3nYIASz4AiUB+yETB6W+OERn3aNdljlAKduT+06nOxKEwTz2iJV+WfIojLCb\nzH497jCqb/tpuyo6aum2/qYfPPOBcNy3hvVlcKBTa0vvs+fmr9QfNU3mUiOI\nGIhm49KeAjZYJHjPcx58otyMY9H5nRwxK8IsX95IE7ddzCuYwdFr4KmQPCcf\njAhc10rPN5ghFHvvw/5Yd9C1Ac/jh4Y1G7+iS/E9aJGt2VhHdA3JXRq1Z4Yk\nyKxvO/50kUW/H73ZJ3+NBbNSzl4grS6LWt+5d9ZgLcCS2fW8BqAy1rLkbMRK\n3fhD+U4fxapNpHLeqwBvHDRo0iW8q8tLpqhNHxB/bgjtNNPhhwwj6zWHlpO0\n7Na95FAPbLRdoCCvXv1hT9FbdUUGP9Y8RT+sypp75axhTxIiCgn42Qc7yUqR\n9VEKLLoxZF/m59mVeBnwM37DSgIlCsopVxkV8a+RWqzr0BQJTE8eqvOMX/UY\nmvWa\r\n=WvKN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC7wTR+MXf55GmSW8YcxD1wbNI/WIuOh7RkgAprUnXn5wIhAMZl+uF6T8PKzSS8l+x7KkZWNJzpjzXPLJ35JJcs6HRp"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.3-alpha.23_1571479829215_0.6485828898563182"},"_hasShrinkwrap":false},"0.5.3-alpha.24":{"name":"@react-ssr/express","version":"0.5.3-alpha.24","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"17c84f8a21dd2c7480e082276d4999c707bfe24c","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [ ] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### With styled-components\n\nWIP\n\n### With Material UI\n\nWIP\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.3-alpha.24","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-fzYoi1Pv27/xr5qKNHHc0Oys4vxZdXOqb5P8Jrol7Q9Iw/v/Pd8UbLN0As+HtuBfJO2d9OdWQNxTnpPkh/BjQA==","shasum":"2c5559f9b723c71d3d2bde2e1d15071f9f35847e","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.3-alpha.24.tgz","fileCount":11,"unpackedSize":27348,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdquGJCRA9TVsSAnZWagAALnMQAIjm2Uduq/aJvkwx/VUf\np3+7Ytb5sU684aV+JRWFexUN031nBRBwrVXoI3DnJTaOMHPHLUemM5BL0Iqc\nooi34tbXH1DlOX8bXDQXLzkJYKLDep2Uy5urIpeB54V+8dbU0ESAdgazih0h\nmV25SK4qmZDi9VNTmAhz+CfRkyxt6UtBO1UXHOGMJrqC7HdCZb2U774pPnrL\nlA4RNd98csKt31C+06/2H1txZfjtPjgaixnawBChc0+JYhpqZLzS+89XF4jp\nOcOy/wp0UgfJ1m/UTTA37IHAh4hXdhwZPgoEURFvfnpbqOqYNfYu61oD2rqX\n8DhU2ltQT/10hGAnY82j8rwsjn6vHCR/kt/OnZ9ahPKMOjw+VWyG3DbHKnDK\nAZHtbHvi921zlfMkmdTG/ySDcxnq2xKBvHtfT18niQJsT2FbimIxS+NzUfsX\n08gMs3lFkcPBx2vYrsj4hf4zvh7dBJJcmYht6xxFjfQ9P0bUKuWqG8JoJU/x\n5M/mrM7rjjsHFYGCkqovAHcEPcXiv5AVWLb1WjWMTbssYv9tPTnfclJkQP+b\nDv9OZNP252+juahikRLurG6uZlheyHVyXaNnrUlOlTMyMFEBufULWxiRSOoG\nmd/I53gZpZIwMesu49EGrMs0x8LyvduUbP6NPBEcecnUfmhqrthtIQox7ukh\n7mob\r\n=MQDW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCDnVqCaWjnyUvw2j9eqZlg+XMciiJ1k2LZJ9oqwBaC2AIgDcWbvCPQilKDSKhGRl11xu2OIjt6idHFltMm/r3Xy0I="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.3-alpha.24_1571479944922_0.9340957625474575"},"_hasShrinkwrap":false},"0.5.3-alpha.25":{"name":"@react-ssr/express","version":"0.5.3-alpha.25","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"800385eff1f9c588c4520fd090b657cea34b29e3","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [ ] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### With styled-components\n\nWIP\n\n### With Material UI\n\nWIP\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.3-alpha.25","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-jcAN3LjufHaiKk6rxF8TggF0bcTnZEu9FTr+JlVO1VwkS8poZG/ODKM7SuE5mMuxE0U5ez7kUgU+y9ZJlkBDEA==","shasum":"1e9c68ad2f5f487152f260f9da6d97a96948b0ff","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.3-alpha.25.tgz","fileCount":11,"unpackedSize":27297,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdquIfCRA9TVsSAnZWagAAIUEP/3U8v7KSt8zpQ+oNKzRA\nX+rElSXRRsL8DgTIR7T5Clez9D2nHJNI9od9JsrR/nSWrWSXQ8xvzyiyLeya\nexVHDgOIxiYZkcoFOgrbxGU845kz8pjw1qcjNnFMZPXCi1Radmm6YMSUVbFh\ni6mGRucUaeU3sJBzYCUeKrTiLARSjpdKj/B1WPAS7bzX14bS4P1zZULosNYh\n7EMF0gfMYUl5AjUiIrEoAIMIYA7SAc1NBjjae+JmkPopvahCCyiQSma31LNu\nAVmaAfVNuLLLRLwiSOEejs9JfmNPvcPcMllKkqnWJ7IsXZhagYshx7a5uRmP\nLkoS6MuRmTlIg8tzqujhhJ7E2Op0c2dWcdSitZLIWEMPmF/c71EPwcWidUzS\ngqX+sSCREELtjZddyJKNCMVWjwo424iADJTzDkZS7TiOAZklezZLxb3JOkkm\ncAPB3x8EO8HgB3aRbYfB0Ya5E/nC1G7I8h1M93VQFNj1zvHMogOPpfYfFzt8\nkyTsoRI2g7jb0w5fQ2E/BnkutOeSWw0wix0Zlm7w9QbNYzKEsRK3spud0Oqi\n4cR94dzFK5AW5c3nGosXNsQKQfNYU0g6wc3IbU1QHVPQtOB5U+YJjf88+XxJ\nIckmgCPDcycv4cuVUxoHbKH42bUeAUITpSXac2tyTUPDKPufEED/ZN3vaTF+\n94Et\r\n=5TNa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD2QlKPnV/Kq8VVrTgIry/Q85nCdUx9TX7gEidYcrGOrAIgJ1jkwCTuV3NL9C3j8zs25Uj/7e/D14HSON2r7VcPFZo="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.3-alpha.25_1571480095304_0.7347795147631679"},"_hasShrinkwrap":false},"0.5.3-alpha.26":{"name":"@react-ssr/express","version":"0.5.3-alpha.26","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"8a7fd9fc0006de15036a59a04a86d5c5cfe0bfc2","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [ ] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### With styled-components\n\nWIP\n\n### With Material UI\n\nWIP\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.3-alpha.26","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-ee+Pjd3DMZTZmIwDNTyZ/yDBDxFzoS+3U469hBiSw4BouxHfk5K1wHpdBtuFTZGheaedXeLi3ACxi7QGhc2yWQ==","shasum":"1fa1800f86f966b8793332382f329e1a4a9d06a2","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.3-alpha.26.tgz","fileCount":11,"unpackedSize":27303,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdquKjCRA9TVsSAnZWagAABQsP/3uHTaG4F2BjuGtFBq39\n0x6aXwGiDQZlixdPRox/a0GXKwakQbnisvdTYbdXaHw1qpXn7Q4QO0t3TPmu\nqnTE5ah/iqnj3LpCm6g1jheq42+qiBFFlwi3NVD2x5g4vnDt/k8rNOCjADit\nt6I7u/AcDKCcA9jOtlDt8DcHIE7GW1fbyP2q65dEe6dmCMwdCV9Pzt6w0MRJ\nw60PwB+f0oF1nM7JLefNdHPyGwK4T+YLtPSkiPaJ7e0EiiFDil38M66yM1CN\nyoEQLKerxNWp0fLkQCJTf4Th5hgyf7P5E53E/UtJEiIXL2nidr6Km/Hhidti\nTufgrXZUYVv3kK4nqNgVycR7RPd3v499b2x9kTUMknn20dsCBmrggSyOH5fv\nznEZ5/nHjR0nFcqjeb2fJAbeOQsEFovo8dakgzmDCbCYQB9DG007Z6/Colsc\nh+oRE/qzpAice1HAZbZbS/k+JYxu6jWqyq4K09HOfpnwq2pTmaxH2O4xGqUl\nGFbYHZOCoPIZW3RshjiHzCFbG84hdeFK6CWJ7l8F4TUCIijZp+vzXsQQ00D0\nHaA3RChn/y5O+pqDw4Dq4LMvsbDLav1virFUaJtM0Bp6GDqdD0LgDUOrnQxU\n0y6hS9h6LQrGymX8q5gYplP+M+sizxp54UMK2unlP3Wvp68SzlIYd8FHIKzy\nBNPw\r\n=bMIq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGVDYB9xJZNP8gDY3CM6S1zbEBtlnGNQ4fk/9vhPJLJhAiA11jWtjgiCycZNSiZ/aSoM3d6mrxL1RCchBW0OrWOl0g=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.3-alpha.26_1571480226998_0.2658716695015335"},"_hasShrinkwrap":false},"0.5.3-alpha.27":{"name":"@react-ssr/express","version":"0.5.3-alpha.27","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"ebc5466f9a257f8667f74c0d7088538224a63370","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [ ] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### With styled-components\n\nWIP\n\n### With Material UI\n\nWIP\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.3-alpha.27","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-97MW8GOi0Osu1y/MzhcvFKmKrscfnnexevb+bQA78dPr/buAlTNjFu9Q4B6x2SgI0AipYZyzWdLkVY7fkNJvSA==","shasum":"12bd8b77056ec6b698e81604cb42998c9956c46d","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.3-alpha.27.tgz","fileCount":11,"unpackedSize":27345,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdquNNCRA9TVsSAnZWagAA0JMP/AzUDE7BmkKflzsN36Zn\nLeA0z3rJIH3FYJIe88Epx6HWpUeBBX849y8dD2EobkHhkE/LX/ru0yMUFlTt\nRGCugbtOLe2nB1isZFF9t67OSQyCTYYH03qSuDS9mtI+Xj6TAOy4X21rrMC+\nChNDFJDnEGXmdZRXugvttIXfVlRoKQOxOS/TEQ8Pf2OO3YvKxooLWqvkVCss\nYb88C9B2NkF1UtMt1u8gkG3hNg7LLtQCT2OwFH1r32iG8EAi28R4bxwZRSGi\nlC5mYNQI51qKui4PbfBsngUoY+8I3kqovqq0VdDgg2fSAYbxh8EOyBc1+S0A\n6RReZOqazrB4fHhHSSlotbX/JNbELm3A2HNYyLE/eBYO5ZsHbC2ih8zJwCiw\nUwp49V6W03xuIpPwS6juWXKD/kXWI7KOXPIGdgalrviukWfjjliVEnXMKbU7\ntIWp0eGmIivCj+Ts4uNjcZCPE9lwOHu5r7Bven4x7vw+2f+AniH6AdSyZE48\nrhvaczElwz+WfjA/igzeIKbVfrGTjaO6hyFN8CQtaZHj3RyV/81uqtJ7yOj7\nXL0enGw+j9cA81FiITITMqEuS1uN3R19LZPPZMOpcQor1yLOZgnxKQpbxrGt\nNAWPpFf84l8phvhQOqXbOjSs1hZiWbW/Fvv4N3IPEbo7Ks+gC0ciDj/kiYF9\nklfZ\r\n=weqr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAgTcCLzEy22jZUdq26uZq/pzv9nO2l5bzx4MekL4nOeAiAyFSVsebV66c6Au8gSUniWZvXwclo1Psa26VoZTzQGiQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.3-alpha.27_1571480396262_0.2241565018105811"},"_hasShrinkwrap":false},"0.5.3-alpha.28":{"name":"@react-ssr/express","version":"0.5.3-alpha.28","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"e512f662b78abf3bdd70f206982a2531f0f95c8f","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [ ] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### With styled-components\n\nWIP\n\n### With Material UI\n\nWIP\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.3-alpha.28","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-PnMPkRBaVg1XCXrXGIdDDydmeWhSFwrUXv7yV9CfqxIFhGIAUol3Wd6B3ntXvQVOASnecIWP77VCLtQE3A1cVQ==","shasum":"18845060c31c65a00402eddc47747fd8c28a4773","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.3-alpha.28.tgz","fileCount":11,"unpackedSize":27411,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdquRfCRA9TVsSAnZWagAAYmUQAI03b8FjTtz6ZnS5ToMm\n5Wlro1LaS9w3VeWWEPCDITd8xUeeqrvY2xkV6AtAvvBgRQvPkGpxTSq6LO80\n3Son8SLIHRh49PzXVitAffHMFMgDCCZGZta1b2l1bRV5yLbscxvJeMZS5/h+\ny4RfVRdNCY+OGQfvPODFHqXp2NsMJqynMulLF8/1sWKsisBvdWuDCSOcsmFi\nQ+NkBxoIa4z76DfJ+gr+7EElrFFbhg78xRJnQAOzW3k53QT2jWbbyiaxvXGQ\nbghYreelJ+PbXmAeXfJgboC9AQgTjd54dBKBARRGwQhyl1zLzVHhbNNiak/l\nZVYYhvnDlRHNvRI1p8HdgKQdGEXosft274ZYi9ciQZBiwOJ9Th6NXOF1jJbO\nAtKSYFRZpMQ6f1GyBDf9+U7umqkin3kgn1IePCY+bnubsL1xYSF3PMHueHHv\nIQKmr1CDBFI94jl10IqqPTRMVHhMj28tcJBkWlwnHAwj3Zi67k+JSB5YB+xx\njB9xwBo9W+Ztx6aQRQXjt+M6Kq7fBjgQrRh4z1V73wNtFAfHH7xAbD4dkKRE\nrQKFNVl03WsAXeuu4c6gYQtSyoA+9o0eUrT5pN4O1Po33NM8DZjoadXAeOzg\n+O9t2q3HNcz3alOqzidJ04pl3X0tqPxwNdADsWpUWr5ApqUWyOEmris3FJKL\nU41U\r\n=/6Cb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCgUtyjkGHUryxMbtcQ3xQmee/jG50f2fN8CjqSp6S1ngIhANQvW/H9taR3Hvd+4lBBKN86b+b5Ni47QypDRHGmy+AP"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.3-alpha.28_1571480670815_0.4077802110384865"},"_hasShrinkwrap":false},"0.5.3-alpha.29":{"name":"@react-ssr/express","version":"0.5.3-alpha.29","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"4a2b4a64296d3b8de567a8ad70ad7c2cd7cdb71d","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [ ] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### With styled-components\n\nWIP\n\n### With Material UI\n\nWIP\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.3-alpha.29","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-UKpTs6oc2kg0U1ydkerux72uXpz0pfkccdy02cesGfF5RpVbJ7OnFjLXDSj355vMV7d9NQ/KYdKAaKA25hvw3g==","shasum":"eee081cee1d003078e88f3992ea24af0aa99de33","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.3-alpha.29.tgz","fileCount":11,"unpackedSize":27424,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdquUgCRA9TVsSAnZWagAABXYQAKS07zncUfYNpkCMTE2+\n4euAVE0YfyWQloipzR3rtFNz2vqwjDmGWFXt+ZPNMIHB+HyF2JvAb/LViZ04\nMyB5E7/jZF3bg/GTNTvOD8+11VsskUdG8L7xf4GF6qInou0J+DXq+TRsYCl/\nh05jDqcnvDvLE/ZxTfmWlLh0dYh2POrDGS8cce3JhPzQKwGR1R8m6Q8ErtTh\n3PStgc02JIJEfmCZAq5HzDLDjELKLO9GDRPz5QJmCW0RttD49whv3/bZCjFq\nVQIug5+d2gfiNqmYOCcm8xXjCq5NK47QVjeSa0s3f3NieWX/ljsqNG7CmQ3Y\n23CYzm0xPO3+V4vqoLFbZdDVZ66uieMa7a3cGgiKV5l01M0Zn4a6jKUuzTO7\nZoQAVuLh1HPKvixVKEG0QKqdOXHGXhHY3lBBWMHLTp43B61j7UcCgUnvllu3\nqvvbUmsS7e6kHxFaaeh6F4SZ4eM9IjJiL0pokVAijDioW+f0YxAxAfI4kx6O\nXrtn2WSN3ZXkb36W7/J8QpvMz4YD+czhDhjA2vElO0Hecb0Do8tIaQloaFc+\n36mdEMfmMRmHlHZG0G0OWn3WtiZcQ9wySJKyj+9DNm9N9jtRQPnkJj1VGYO8\nm6huwkkQF8IeLwx+BkrtE8wRJ4rregYWU2e+R9RPE5a41Bvb2CH24u4JcTkQ\nRwrI\r\n=8Aol\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHT3oMIjcAeI4AepItAY3RPj3+k7ywz3jAOTAeelFn+pAiEAva8HeqF3KVB27H5NZYFaYktvxUUb/mAuo/f2mCM3VBU="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.3-alpha.29_1571480863457_0.2718948413757145"},"_hasShrinkwrap":false},"0.5.3-alpha.30":{"name":"@react-ssr/express","version":"0.5.3-alpha.30","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"079a6a16f75428b143631730e93497935685b41c","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [ ] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### With styled-components\n\nWIP\n\n### With Material UI\n\nWIP\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.3-alpha.30","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-3GgFTc2iwBaqZx4HBqoswIRofWMzY1ib0sBivLWekZ/rEFTP+LxI7hRgTWefgfWSkGCwE5x3rDzJIwA7tzZ/9w==","shasum":"a543b02e88bdddd13cb8525b41f93cb966834ac3","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.3-alpha.30.tgz","fileCount":11,"unpackedSize":27607,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdquYrCRA9TVsSAnZWagAAUloP/2Bc1NEA/81ULQH3L/zP\nxakJgqCAHm/L5MbHGFn9iem4/G94PpvL6zAk0SbqH93ahKRY/d/PqQP31HZN\nKmjzVxjXqiKpROMYSORWJ87HJm5NL3D76eAI2vtrncGl8MY+Jfz3Mu8MDet/\nR/1gmH9D1oAHSfc6UYXWceN2ksW4dAKSN398NFYYEevRmHefNtXQPsxvODki\naEbliJIRoHURemb2jZRQdyYInPrUpW0ahcVGiXU7MsPdWLx8xU366SZgmj1K\nwWeQexmTMY4Eb7FPStHSaGnmttF05+olkQdvNqIujR7a5QG5KwTOyVRpv3+h\nj0UMYpxtkRMHM/caEFn8dPneKuIngOdXkH2n70pZdo0aUHpoBDrM9bYzLHYv\nCS2ANLMPXNPV/oxvgCh8y55w/U15P/3G2dLVioLtUA/ZRnQhyMiDY7Tzl7+i\nm4tMiAOMd7t2GUY/9chNgE30JeCAzUIybW8U+Fw6ONXlodCOzBuJI98ui70s\nu+MEbD+sUZBh6JWD/wfwzdp5g+sCCrZssz1oG25W63ZAkFkxFDBQIr0pecqP\n/DmrncV0XE3Av+jV49v/aoQQ9spDz5Igddxgar3aGn37UZv/uyr/9jxBRAuG\n/h+6XN3Y5Blyj2Dkwm6o4ZisDL9ZZEdquPLDZdVeyo+rAzW19UxoE/hplPIy\nv8Es\r\n=abdP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFv53qkKsUPcAxPuvltEilM7q8VSOLlOzf6sLdrRdARXAiEA/Jyw4FiBDfJJxBOdGONFC2wWQ8tA/rv3hmtpo8RGcu4="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.3-alpha.30_1571481131048_0.7207027514152355"},"_hasShrinkwrap":false},"0.5.3-alpha.31":{"name":"@react-ssr/express","version":"0.5.3-alpha.31","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"9862ce502f0f8f54f34274de75474b7f284cb8dc","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [ ] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### With styled-components\n\nWIP\n\n### With Material UI\n\nWIP\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.3-alpha.31","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-EdeawxUUBnmdCOAGSm/cJbyBAXSM2uUzVvKoqAiTypFAM1Dkt+yFA03/eCr/UZzwI6Qx5ksgX0qLGsUFpJO03g==","shasum":"84255238ad5d4e39350790718c41724699a92397","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.3-alpha.31.tgz","fileCount":11,"unpackedSize":27434,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqusnCRA9TVsSAnZWagAAS6QP/iJAZY2SXGM+/fmyntBz\nS328xpohHTFYJn9Ww/6dyXbOp5weYCCsBzA/qCIUxUKFGxtXwJWpU0/6OMC4\nmXGHW/VuQ+DvngAMTKwvQSVmQ0rYUTqCvtix287hNhPevBxyra80hNi+FFZh\nNkXHgNkz15rHZMDZfm112KGsExjVziKA57trRK4Y8D+xv+veWJW26jK5xqv0\nOXQLeku5yMmcYTdrQSu+//vE4Z1pYZ4wefWrx4/7BlJ3efHNGfugxXSb9qmn\nxP7phOdrn9LwZp0qDBLg0ffmh9M5wN33r2cB465a8Z887H879aTnceWCEfUL\nsEOXVguhCPrEh2GwOrxqJI8LP/UFgASrp1wgUj91g2gxTLZrbQCcaK1sgM6U\nzEJE7kILcUTaIS9ZPmxD55gs8r8BIBGfawH9mORDMG63fEFqgm/Y6WeGeVmf\n2ZDxB36bLxWb3dvBsKiG4Lpt4+Witvpx2IC6YzSuMJ+1Qml/s1der4LRxX7b\nq2fV3N7GWQeRdRIH/XOqdyFQxOX5Z9k41Ar/DfHz3O1oOMN6IDiWSpEXaQHR\nY3xQqxCRK0cXZIbmfZbI6fDT1Ryat/H+PMR2mLWE8bfEt8kD31mqp6ibnII4\n1UdpwYzqsfCxCfG1R1uc4iQOhOQnQdp8Axk9obNAmUwsRnEA+tCRQF9cxHqj\nCKdu\r\n=zAuI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBY+7ITG9Twt8syzgXVRzcuof6UB8Nf6d87LD6fJgHNbAiBpit69Kbur1snjgN4+t1f63Yx+7QzRaZpDXNC6PMKnMg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.3-alpha.31_1571482407160_0.011624542867277654"},"_hasShrinkwrap":false},"0.5.3-alpha.32":{"name":"@react-ssr/express","version":"0.5.3-alpha.32","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"c086598c5cb9cc500ef741b8adae230f42ebbe18","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [ ] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### With styled-components\n\nWIP\n\n### With Material UI\n\nWIP\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.3-alpha.32","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-zxU1/lpywN7NZMEyEtosxJD3DGii10z5HHB7V6iti1goyCJT0/QxP4FTbx+wjFGRDi4YMx74P1e7PMYHzfIftw==","shasum":"5ec4ed599e80cab48fe7211399b0eacce8840368","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.3-alpha.32.tgz","fileCount":11,"unpackedSize":27394,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqux5CRA9TVsSAnZWagAA5H4QAIrr5GYDmvOXNoPieskJ\nIWSqw3F79YAg4xGtSv087AJbZRAUToix27lynCVUkB0kwgWQst7B3bQOPkqj\nWwon8XLP5G3z9U1EyX7Wn1++Fg/QCrbHcSKrH9u5NYW5/t18YPEU1ivTNB/E\npqH4flN0+KEcED+g0An8WO1Wm7eNAEHTIzokpFzPTf6IHQAO+o5m9dk5bKlq\nzybZR5zWKZ1JrT8xiDk4lmRoGIqiwyS6AeMhwY6HrNHugeNeaL00WfdP5iwD\nxK9k9mFPGuSU6W6h1gRBon7Eu39oWmhpiqa0jEDBjHrO9zX8FBFfiw6FPi3F\nNsMh4cHQcDVVMoHjB+32kafBE+ZRce8PET7adlLIkoPjAUBKztalUtEckEe4\ngK5rbqeDdhfxWtntCh1SK01qA8bQSzvJ80I8H6QwLrQLsCdE8j5FLh1VB5hm\n9UEsH4tS8kEMc/HPhQzlSETPBUifCrw6/iSWgK1CQ8gJyWI9vF//ZPF+uVw+\nO9nAc9SxOvrcbr4CMNK6W5QM/9a34IPEjHuGCpvOqhH5FCWTLCDFQauhpTnC\nrC0vxy4ngAjVIArkbN+hRJNAzz0ZSfhhj/SrSCgtz3CmMoC4k3Bz1ki0XC+v\nXKqZPms/Bdbrb4DZpQNrMgD16g52CMfsxtEycKDiCnBM/+QW6dk2QwPzcnAZ\nKKm1\r\n=55nx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBRCTAACIVVxlCmOkq0lPsCtvKGIQfk0gEJfmudClCGoAiEA4UX8CxL2Yl/MRu9paGGaKSppH1t4/6V3zOLloqzS1Cw="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.3-alpha.32_1571482744950_0.01834205632227115"},"_hasShrinkwrap":false},"0.5.3-alpha.33":{"name":"@react-ssr/express","version":"0.5.3-alpha.33","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"76b01bef49818156d138220f1dd88664982ecd42","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [ ] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### With styled-components\n\nWIP\n\n### With Material UI\n\nWIP\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.3-alpha.33","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Imja00rq0/D1NxbCIsdFOfMX0u2U1qEkVFUymVbPlE6v6f68cqYAw96nmx98mGB+3/KN75ktZWUOoi3ilxxTYw==","shasum":"787ba384d6f23d94ce443dcb6b664212768f952e","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.3-alpha.33.tgz","fileCount":11,"unpackedSize":27566,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqu05CRA9TVsSAnZWagAAgKsP/RYUootKi50OfesEmF7j\niYrNkGWzmkylTP35MB3wBVvm6HysU6H4euz4hnzHa7I8rlPIGhNYO3rN1f2W\nDE20vgzeUID3yN+kZoQucfSM01CXzRNaEpzvBox4LIpFKvhE/nna7TW005Ar\nTFyDTdRCqKqmcX38DDVBztNE96QJ9rtsBdRD8DTACf/vy65dXMJsY4r9RBzW\n5k+y01HA2dMi5H2wBNntWV97n2X8gnEIbkoMjagEEfQ3UHQt8rD5zFpZOuZz\nxzl3f9q0cWJxKdqegNevjCgtWkIcME6eewvaODDSazqCEA62c/Zt9UgeVHOp\nOg2ilDbjdViyxk5WSmsXRS++1B0NG+RQ4CSTiZKjz/mmKgBwcQYc1MJ+XCxQ\nbppFF1TPsXEf4h+qyZJ0bIFcHx0n2JuWWNjiGSm/0xnNQnfNJd09WGnUy8vE\nnyv3WSvKkPyU0Bz6YYFVi1otvtiELci+U7OLFFakBJIp4tKF19PNlu7bYi+P\n0/544xIzUBL7keuS6HnAymaJvT4bE1Q4xz713GDfgf6XaViKw9S6YMQIYJkm\nQqdQL/5499ym2oa4BRoMYii8HdsnXyFq9KfX5w2MuhWWZ0kJYLlXcu8PmUjb\ncXwROhah8TGDXwb81pFbHsTCP9aa/dS5/30b470aFV6hV0/IAJ8XtEnPLfS2\nY2EC\r\n=Fq8n\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGuklsGD9+Vy6P+8LlWo6dTrsHDb/BqEi1//AA2++AdfAiEA62Qu94ZvqAO1kWkXLXODcM07Hs7ZX4B/Y/VBTwwqtZ0="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.3-alpha.33_1571482937188_0.9843682633079314"},"_hasShrinkwrap":false},"0.5.3-alpha.34":{"name":"@react-ssr/express","version":"0.5.3-alpha.34","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"7ffa64664bcabf3586cc5d396a05af06876cea43","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [ ] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### With styled-components\n\nWIP\n\n### With Material UI\n\nWIP\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.3-alpha.34","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-n/lo1IG/I0IC2xWqyfB0LlJ/QAXkqKAfnWyEfoudTYuXXBO2aloY+mZrVdKkEXCilA8y/O3tnCim0pAotQnh5w==","shasum":"d0ca481fbfb0f1ca03924bdd790db2b072831906","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.3-alpha.34.tgz","fileCount":11,"unpackedSize":27417,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqu+LCRA9TVsSAnZWagAAL+oQAJOkj3GTQ4F6nitOuxoV\nzbYmIgWukBdX2LoP+Q3sOKRkplp/VSVCQy74IJpVmG5xV++rOaNzBv5tMphI\nLPnP9CgxxDcUTcR0Ae8XVdUUvXdXaTrZJDxhAti0wEQSYaaCPa/LAXBjeVZF\n6HD4WSOEnoEPJhQ2qJDZ/GxxcqWb86pjaUX7qu63tw8r+4MgEUsCEyweDdOs\n2C6zJ8qkhJGNaq/EfWKzyQuewUvBcDud2rJe33N4czL0fQJuTi1Nv4RLAKdg\nR22SuYzdTDpdX+el3xOMfJteoFBd+YKVwN0hN4RFAwwG1JE2s6gFhoZ9Th2s\nTZSqdViPRuVGLHiCseEQJ61lWGdpSNda4wLvjBkbvuMiz2YcZdfuSfrxzJlk\n5jDfpJN2wT9eH7AKhBbzbQNNlZ2TL4US3jpEhWHLn0HcJzFK0onO17fdS7oY\n3KtvV56LkWaD8kxwvqG+O83u8eRYYPEfXNsMbstCbkl0/xh2DzVQeYSJ6jb2\nKIQp3LQTULBGl8C2282qsC5Mn2Q/Vczo2k6Xw/l5R5PmdDa9BgnCQv+wLJm5\n6pISFHqH1mOuAcUrIEg0IMYpp+e+Y8VZOhlVQ897UJ3REVC2fwdfCZZmjmFV\nX+TFTWqC+zRVLaNFnONosEhwGJfoIDlNoswhkw1qtoMHmek33Vl0MvXIOl/T\n+7QQ\r\n=2LkG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCkneNsQDUYDDfQELrJFSGdD4vmP84mBUY36ViGO5pZigIgC6BVXcqZZgKfkufdknrd12UzOPrb2BLea2FqOxr2Tng="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.3-alpha.34_1571483530562_0.80404666893423"},"_hasShrinkwrap":false},"0.5.3-alpha.35":{"name":"@react-ssr/express","version":"0.5.3-alpha.35","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"6a785c8f76dada16ec0966f480cc4b3d739956c8","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [ ] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### With styled-components\n\nWIP\n\n### With Material UI\n\nWIP\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.3-alpha.35","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-64PST9L6LDQUhkMmq6CcJi/7Y5fhkx82oP1IR3caqLj1ceT8sfAxBGMK5U5JE8ofiaxUUEh2m0pwNNvRYyWvsQ==","shasum":"f405f799aa5fb638fea61682e0f3555dd5403e4b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.3-alpha.35.tgz","fileCount":11,"unpackedSize":27737,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqvpGCRA9TVsSAnZWagAATOwQAII7v2GdOZ3yRpVoDtQP\nZEbIRwJH/2kUcNxdU0GyaXsPEkPyHJ74FulS3V3no0IceMvyHcYHLCqtIcbC\nReGQ2cvLNaYlvLCYBVfMHrd4uqGzGC1nRmk98Y4WBZlKNTd0l30VliZMjQUp\nyubiCqQY4ZigVPU3rp4AVKWhe9cPN0zihN0/ygyis3OJhAwCM2T2cPq2nOVH\nJ03VgaATx+RJ/9Mf+w1/+oQpk3oGx+qG7JScUh8c/OO8Jv9/80n+WhEoOxTx\ncb4Do3iBzMy6wdRAOx3KKl1RGkce8R3jJ7NCQcbuamWUdZqtZQA+iZQPSrdq\nOfRIqa2oOh9rW984JaMsNazEI4guyb3H0Q4CAI7CtdCeELuwgRCbzpXeWzk3\nvCq9latu8AdEa+e78ncTtfgYAFJPA+S6v3svytGvrhjtVZTC1sppeDq+vFRU\nFIqDNmU63FT/XKaZjPEcoWZuWEgqL/x25PB+gfJiX70wPeA/IZnAu0rAbfdn\noPVmrq3W4awsMmTSx5tTOfZoolf3pxjblUZu4ovmEAlcoFFcHp13q0x+85UL\nJFpjnCay54NJWzM+AknPBsVPTY2AheIctQXFlQw4HLyL2Ua7s+eAOR1xupv9\nworBkw/QpqqHPl/3r4GWpv9YEOvvDXqH0KN1MTG6SOudD5hiP1TpnQFCkIxC\nD3/5\r\n=OE4Q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID6nEY6AhL+601q2jZ9siEp9g/3wH/VlKZpL2IpL3czLAiAfOtO3+SCpQwaueQJ8vCyhuWFQY2dfoxSyr1n/Gupo+Q=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.3-alpha.35_1571486277805_0.2133501939018545"},"_hasShrinkwrap":false},"0.5.3":{"name":"@react-ssr/express","version":"0.5.3","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"d787071e36029071a79d24144d9910ad1fc0b917","_id":"@react-ssr/express@0.5.3","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-1LImEJ9gK5qrpCiNX1wnk25/o9MncmAcpnazb8XnoTiuUBJLIsMRP1H2kY+b22NPbBjzCJHbwWLEPgXqfPqrTw==","shasum":"301bacf9ae36a5a9ce864cf6b76c5df6964fb8d8","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.3.tgz","fileCount":11,"unpackedSize":27768,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqv46CRA9TVsSAnZWagAAO40P/3X/W5N/mmIGzE3aTErn\ng8eE7ZCZwJQlmmYbR2vkSFgAlzfl72n66OgQHjWr+Pzc6fX0Ok/GEu/Qa+lS\nvv2+IFtmL4s5IgvvfUrrFNcFs00DAPaxXxR6M80C2NYrDQpGgY6m3jKYAN2p\ntFnF0C1K+0ctSAQJML5ABpP2k5L0ngP8ZXYN2qFsUT4vydP9b0J2B+KniWuH\ndGDTde0gvcjWnw2eGKaFg2JF5OKpO/kpJJeZpQZiBW2O5amW0hUxnbgVFwZu\nkQCCgAQG9J/7S4GL/XHQhPbcBA3qbp7QVVwNrr8ZwJrsNIWdulxNlN3E862B\nS9+CaY/gXiJ4bZvWIUF6hCfOUM40r70mbEYFlBmkYmtuJarbQzjRwyjSxHHo\n4TRb/3C8YWoibxFCbfQTG60LCD2snrzewit/jQDb6PSDNqP0aa0CjxY0dADe\nu49NqmJIm7gVqEdlwAHYRVX+Y40hiLc/G/rWUEBPgQkKz1H3pgDimjTxGyuQ\nYvrAx0Q3eJLNmbv4lOODj1HEuweXXu9p/KO1clsXuSyPzD2v3UDGFyYJrNFW\nV9Qz9N5i2ygBXrzT13/eK4iJM983wTzbzparWskVaXVPn/i26y8Q/4GON4Vb\njI/S23MZcav3U/oZDR4SzO39p0HWRaYT0WwFHtLmwkC+QhRB5KWLlskIcZSF\nyFnv\r\n=qPes\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCkBrW6utLsQLbKlqKhJRlswErMYEjpW3HHCWzUw239rwIhAK3KT+yATRBzoO0o+talV1uu6sl1On1gb/s7zxsI/UWc"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.3_1571487289380_0.3755696468265177"},"_hasShrinkwrap":false},"0.5.4-alpha.0":{"name":"@react-ssr/express","version":"0.5.4-alpha.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"c6c8593539afb4a5fb3c9d2530e818df5c8a4be4","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [ ] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### With styled-components\n\nWIP\n\n### With Material UI\n\nWIP\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.4-alpha.0","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-VpYD8Cp/AzuqOUerylAKAtR8shnVNm2uM3QgGtn83X2/VH2G0/PorNpEqJWSUtATrjQRZd1WdvuV4GOs0LV9lA==","shasum":"08487b8596ac961d3e29d2f6a49b5e92c1a12ac4","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.4-alpha.0.tgz","fileCount":11,"unpackedSize":27348,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqv54CRA9TVsSAnZWagAAW6cP/jMQDo/MrTIl1HfVxMt3\nFqoLFK2f2G0jaDKCsDVfmoFcheG1M86HYcRymQUBwc2H0ebhikm3ByZQTaYD\neYD29CzZ5p5VY9+j+l+GSfVrj9AMTfHkgMjDrPXGd1h7U7x8ppw+BzGNCoRD\nCI5WZ0+/krRFbbSLrKX8mVyF3UR27Z/RMUkvFmWe5H8GcNtZUnTDmQ5FyLuX\nBmE6Gpd2NsCg8EhbyxrFjG/Np09SuFk39RAJuD7Ytq/nP/3OpYwLoXs8yb6b\nZIePEgBwvxKWIcjyverwyRmixpr0+SJC7oPw6sxwEbvyJDVyJa1zmvty/wZb\nI3MGSfOL+a0Jc4XFdEwLEm47l7wiH5QRDP7BUb/NVQxQlD3DgPU++nBc0Kzp\nCQ2nOoSqdI80ofmxgsgYFTOD12QpUBmUkWl2tG1rQHE8nEls8KUiYiiBKDhN\nabgLK/XVjGSIk6Gz+WHk7I9xNzEYuAhmRpHVs+LU+rbQVFmkhMWaR6RGEnbd\nppga7gw3EtyM0Kojm4DgrLT1hHef4lPyquggP5cXLuxWTgoe7Ve8DYCSuyAd\nnwN5Hb+dofxHZp0G506SXtK2m6+0cw0o5hNtUZaWVdDc+VSVAk+uyeavzpy8\npUq+xv+2ANbx9DE8CJzskIZ7QSTNp/tyZCWGnZoNMO07stT4GJtCoO8lve4D\nWHLv\r\n=FVEK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDCyeXTjom49fOmmJhjVK4yw0Mwzk1iSRnTk7xHAwOUBAIhAN5M1shW9XlxxUX3UsHVsqUJvDnCgb3GpCVMks1kLCIv"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.4-alpha.0_1571487351662_0.10305488632234217"},"_hasShrinkwrap":false},"0.5.4-alpha.1":{"name":"@react-ssr/express","version":"0.5.4-alpha.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"4d9f5cd304f62defe78c9ea6a3effc8d304e9bff","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [ ] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### With styled-components\n\nWIP\n\n### With Material UI\n\nWIP\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.4-alpha.1","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-mYKkkfQxI4TlcwfkZNR2uNoLDON3NLyCcSiywlBdvLhjmHuGH8KUnmVUpsbrg3KIZXOl1lom93hS6e9kw82Nkg==","shasum":"c754ed89963cc57dcd9031ca4df9c36714b4e98f","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.4-alpha.1.tgz","fileCount":11,"unpackedSize":27359,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqwHfCRA9TVsSAnZWagAAxE8P/2Xq+emlTYtf0sQX57lj\nLDK9E6RBytKUm7UcDNmuTQ2C6Qgy4dj297ZZFZKRTJmqay4/V7KPGBgO8Lj7\nWKH+TRSFPykAGOajHJAN5n7ah6ZwC68o302md7J4Fl0iuuDjiPSBVjtG9dNk\nRmICvYQnFTnDaSN1gNc2ht7vLZtL54D1Nnwz79sbObacA7ak9fysD0EcB7UF\nZqRVruNLedwxyT5zvOmwlUdZ7MGZfdJ+IW9G98I8lYTBppkiZkB3HySWIDFY\nyxI+7DbW69JSSYtlrOiXoJQXap5BZP3eCjNedhsHxXLFI+/BbfLq+eoHBA1x\nZEnc4KZugMTJtjkKfibp1Y7YbqpvtbpwUZGno/gi/oUYgxSJoyNozuwwriO8\nlGc1zYmXkwjtQt6SbELeizG+G7KYFv3JRWXaswKtNFrAsPQX5KArd5ITjpYL\nvF9JTR/b5MFZcq9S0BO0VVw03QM6TviOKvZHDp2dsHkI2x4fgpHXL4D/qGKt\nWo5Kf1G8mTpPKiCy65zk+DBftSbOgNFRrf2wO089atstfBJzqGWgxHE4rHlw\nrSGrAOlb9DcCfBG1Wcd5s2gQsU+BMLoN0l5MAfzDBXFCxTxmIOdBb9g/1DCY\nX/BA+fUmMhdVDbANDjWX7KWPVZTAQ1c5V1nef92HPLfyTq155nz5CZx84vfV\n/MQJ\r\n=qpKW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCYb4qUQarrcwbKgGXDsvckmBJenWALF8ah6k4ukHfgrwIhAMDwEm2Pa9mXpV1WFg/ipQ91bgH9+OLoa6lg3jWZiof/"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.4-alpha.1_1571488222653_0.08107794888966868"},"_hasShrinkwrap":false},"0.5.4-alpha.2":{"name":"@react-ssr/express","version":"0.5.4-alpha.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"b56fc4e6bef2be30dc1e9bb7391ca9c53cf18b2c","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [ ] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### With styled-components\n\nWIP\n\n### With Material UI\n\nWIP\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.4-alpha.2","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-HT2jykkkKidbyvxnaXUT1NMWwVft8OlIkVvvB+w3syQOg9+okb2aTsx85LKn2ti9JSt2HUFRBHQQGFCCWD7Gpw==","shasum":"22c492569a5a3cf633e1914ebdf8b4581aee8ac4","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.4-alpha.2.tgz","fileCount":11,"unpackedSize":27477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqwMSCRA9TVsSAnZWagAAa94QAIxtSmKhJMfRsY3yb0CH\n0rGIKRR7gpMLgpdTxEzd+8FDY0EROfJnjO92GRdbw8WbmuVpsUgYmaSDDCoV\nQKLQ5thpSvfkIcGGzPzjIYupm1F9c5hvuXxcd45mnBkFyd66H3Zc+o5ePjqd\ngwnHzQVNiQctU0zfW33GGjxa5t6zyXHSoaHrNAOdYptth1GTFA3kN4bSEt+x\np3c1kqgCKKMoWr5cmHvaoNTKNn6KVAIyv2En64WLy1+qsxwPhp/i14rycQcM\nSXW3KObU3EYgn+pozQrdAOnv4RTu3WDm/DAFGQ016y3aAJC1LKbpcI3TGJR+\n+xOz2fdC6Ot9qHu52Ir7Bqu9VWf/8+x4ojpDcmPiZhHL8iwB2Oq67Cc2hXuQ\nWMeuwj/oFQy4lxNoZ/H9GNlZ7gzUWFnUIdzQ80NA/O1DysjVRNKYiq+wgiYm\nWlv269WGkgYL9bfeLkTzX6kp9A1eJZtQ4yqknhr8SjbnFTOZ918eFRFkBujv\nwEw/RfGcgQcGoLUWe20xV1/HFTAbz023CpPHJRPEtFL4Rb+4IUfZFASQCKuP\nJEGvRCqbg4yIKw1ZaQMUUhWHrxT3k03Z8JZ6hOuHrs3gWceUNiSFqwtmA4eK\nLQEiuRH0vuyelvqBS4uUKuinoBZp9VaHePL3FcoFSznceZaHvHt7OyAKLfSS\nBVA0\r\n=y8vb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDcuxfvVtnc/tqHOwF8N04ecQL5aArI+AcQrW1HJ+rQnAIgA/IX9oylRWQDRJKAvl/LrUmrY0PXD5IW7ZYynH9LJQo="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.4-alpha.2_1571488530022_0.3106933164842858"},"_hasShrinkwrap":false},"0.5.4-alpha.5":{"name":"@react-ssr/express","version":"0.5.4-alpha.5","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"98eb5c23f71c6ef032b6a5630355645960443d60","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [ ] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### With styled-components\n\nWIP\n\n### With Material UI\n\nWIP\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.4-alpha.5","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-CuV7IytofXjQkm62fO8eEcbYZOT694ASenLEFDvuEgQjZPPTfq1EhLW6FFr7LS6dKY68nQxrRCTFgEpIj3MymA==","shasum":"7d70020544a6f6e40f57eba6e681d28a26d8365a","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.4-alpha.5.tgz","fileCount":11,"unpackedSize":27494,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqwgQCRA9TVsSAnZWagAAVoYQAJjIUCS8FOgIh+kqkfYu\nsRjWjFKELK9uHzqSE9cAaVIkMDAhG56/z5VCBda69RUQD4JFpivNZwweEid5\nx/8+tku6U+S49NWRor1vDnUl38o2f6z2jzETbSwA185IE3bDoo/kVKHPQi5E\npaF7kNhSsEO/62d36f46EccUrvNLPD2CwpziTAmaiJc6BOY9rzfZmGKt7cRq\n77WjZw7brFtnTiYFjvbrB6P59VXm8OcewaHAvW5MwSH/hB1bFU/2/mj334Cu\nH9eMr3jcGL+5U6DbbWkhB6xUt80NH06sRfz7bdDfYDC/LdvCiCpLPQAyfGuB\nXGEIierr8kNcvuZMcGbtidiQNIhQ+RRsc1eTp8KpykHt8ziGU13AwQ2HT5Pd\nhDuKJHccpsnwxCGLhYw02jHby74jz6c06MT5O5EagC5az3eAoVJ7WniFZDNu\nm27x4nR9lBeGisEVq9nZm4OIMIRnv7roIYxjXjioPDv+fYzEc6YqfsVrFXR4\nvXBa/Q4jI8mzHoKxsLpbgN1BNWWctCo+3eErtO6HEPePlmjSelGd5x0FuSvL\njXMe6VS381CrSM4utd7RA9tab55u6eWBZQknDbHdm7PvAgsMkCmqlm1K4ZZq\ns5IVry/AIf86xAVIsOqdioaJ67QQrLCCa+Cf/L4gH6vGNHIzq5ZiEAwwpv0a\ncsIV\r\n=crkC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGggZk3iOmnZvmFIM4+zYeZgrkQKgtbpIiZxFuVF0bZpAiEAjSrHR/UIkz+EIK6MpVEgOfKLNKzpphNCI5/1TB4xfCM="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.4-alpha.5_1571489808347_0.3341714349181464"},"_hasShrinkwrap":false},"0.5.4-alpha.6":{"name":"@react-ssr/express","version":"0.5.4-alpha.6","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"e4b460d8c81e70766de8439a8911bd95323b0a0c","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [ ] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### With styled-components\n\nWIP\n\n### With Material UI\n\nWIP\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.4-alpha.6","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-XV2XuO+4wOh4Njhw6Z7j7jxdGzkU+5psgjG0Z511Yv+eQWcByoRk+BiL1R/ULlBEUJ4/NzU4FbPWcXd8FdEQSg==","shasum":"7c5ac4ec69e0c934e310089d22ab459f60feb362","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.4-alpha.6.tgz","fileCount":11,"unpackedSize":27500,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqwkBCRA9TVsSAnZWagAAsbYP/RVGzzypetcqpHZjblyr\nUHDY+N1o0NtP4FCqy9rxeQK6yFKI0/AZIpB+g6F+Z5Cv4YOJ5LDbKzhROEvm\nZDsqPMfVeWOUCZoDmop5JE8E9DSXA90jSdC/54/qQtOsZbwhu8Dy/K++TIj3\n53l5Qb5hk9nVPbDZ5smmLEujKoPiHEhW3xxY2HnpqEOQThux41mu4LLc2l2k\nnyhouHt3KqLPLpSpWVbGQ+qzwjDFmtiUReO9lqkNqDBEBh3yBjwLPLk03Pfx\nix8ZbI3kXzHIlkudfqo99uQldN7E3bYTTCZPptzzobRi1CEU6JHjl3oNrEdw\ngl/3iUgKFZB+QXEFgRqRTpT4x7DTX5AKf1bHxhErKmttf6mPQbkSIkYUgAfN\nokNHbg2Zg2CFevgMtmNGz1PBvanBv8UaD1pGGzFT/RH0Yd0Ze6gYo4iwIWl2\ndYyHU7MlIgV1u+eSZk8t16TVOimJkGwq1S8AQVWvsp0GUzSRt7msgdhobvcF\nVSaV44feNFNW8hmLWoMuvUMKvE2rz8ZWPz/IY67/IPlIPyQ8jUqT9OBbq3iu\nXcy/nDX7q2gZUgZcZXmLUt/YXZyIBBenZSFAn9kg2O9AihpYEGAx1z1ytgm6\ntwi6Fwh26/Mr0RLxAce0hV636D2rDWRTFVtZRgxCAg4ZWS9vdF1PqU9gbo6Q\n5Kob\r\n=3tZA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCntnZsVkXzRLIgJWh9v/3oQgOOm8tzRaJ5AjP1GR2ZdgIgIEUhF7TxMTBWHY9IHwpaOpJiUk23HqcjUSPp0T0Xk6U="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.4-alpha.6_1571490048937_0.8521439333658583"},"_hasShrinkwrap":false},"0.5.4-alpha.7":{"name":"@react-ssr/express","version":"0.5.4-alpha.7","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"79028fe3638e52f9266103c6bf713cecfcd1bc90","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [ ] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### With styled-components\n\nWIP\n\n### With Material UI\n\nWIP\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.4-alpha.7","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-oRf1LaPELMuWN1V9zrcVyQ2MH+meTibHvLgzXqQ1Fj+51VAB/ehIBxVhbZnjJilsckmCZHkyJifeZk772JoajQ==","shasum":"18269fe814869c49c04fd917a0a2358edaf2945a","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.4-alpha.7.tgz","fileCount":11,"unpackedSize":27862,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqwvhCRA9TVsSAnZWagAA4tgP/A2HfCsm/D4+O3dYBJoW\ne+Z1NvpnbZoYYyMVRcOJ7vQl9c/GYJq2NQCPaTT4EtCz+ScuYxvxBLPweqOV\n6WZxYifioGwI4OjqEmDS3ItlJ01doRHtn1HuqPVZApPgPIPWyQXb08s3afiS\nAr0W3OQSp4N/Ap64TLs0uA+O9ZpPI2VTy/Mxi+rHX+BnWNuhSQNQhKV64Amx\nfeqdJjdoGKxzZQwCoyNwUZRRQb/ARPgCn1uSTMTCTzLJlddDB7W1vdKILHvf\nrlzxri8aFGFos6Lleg5VQfSrGyWZGZpTP0EhTEWrPFpglcxNf78am9HvQOC9\nAznIZCM0tX6wY03vHFvTrd7fRca6txPYogM8ZuOEfaa6J2taWcWpC2I2I1aD\nJiZ793Isssu6/6+TesEtLBdOwi8PDeaKNsNR7Y5S4WzbebOUx/V2iSeqt/rn\nLGnr94zOvcR11kR6mdH0vtKG3Hwgby2m5qmw1g0F9sBTmMbLZ13TM+MPV5Av\nHOUCcn4dRCk+5OHswAR8BgKDwnPwhzBGcbBI3ZC//8PeapcuV2ey9+uI8zgr\nUZLHFCAZmVTmrYgflQpQvMR4+YfVlsxexYtBT4S32Ap29n739bFw4GjVW0tx\noRpTyFYxlOlkKCz4DHTALqFj3ntV15W/t0CUy1qtSYmlu/5k5A1dspmI7mpL\nR8uh\r\n=hDdI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGn2nQb1yf/OzBDxC2uFbt25uKchZJPIb9m2BPQx6bvGAiEAgm2IfC31B318GwIEwHq99loKUCgjb8mk2iOzVPCurxU="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.4-alpha.7_1571490784360_0.20994457196264515"},"_hasShrinkwrap":false},"0.5.4-alpha.8":{"name":"@react-ssr/express","version":"0.5.4-alpha.8","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2","yellowbox-react":"^0.10.0"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"562e92382a82d7b1e10d2673b1c782d7ba47a141","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [ ] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### With styled-components\n\nWIP\n\n### With Material UI\n\nWIP\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.4-alpha.8","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-p0oV3WEH5ZOOqy9+sONWDX7ysOPEkbWYm9tR3Le+YM7V2E/pWJGYYLJQ2KuS6wJVjIVTDbnDZ4r1fRiCmGcbLQ==","shasum":"fc8aa36839c785522905bdd9910b197d9c87934c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.4-alpha.8.tgz","fileCount":11,"unpackedSize":28020,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqw/uCRA9TVsSAnZWagAA3NAQAI7ct3ZFBulm3+L2sO1R\nmC7iTOykcXnen30swjqAN4lpBNYXxgsV9WrEhHrrb3SCRNzJDJEc649Ny6b8\ns86lcOmfPNf0lcq8ltJY+Pe8XYX3tktbFbSpEuFgaP0BPb7Ysh9NGKLYIco7\nO80ydIDZTbWvTI/0nW+r0zTD+gNnkgqosvdvbuNNzKxlHUtbY1fQeDs57Ktj\n/mEhdIQ9wO+if34h/6M27zzRneQHSd86N0yqLSdCEvaGdZ1km2spgjOA1F/2\nACH5Rw5arRxT5kBVAfxLaPoVQPvVGr8YhefaMB+OyFHsq7IVH/HBNpZSddlv\nrOBrnwtDzSqhPCt2DkE5xHWfb1YpdUClhTcUr0kgQtNEX5zpTttdHTM5v5MJ\n15a6TjOaiT+qFYzTOUprN5OnfUiMn+CuQvz4V12QYS2Y3C46xh6OhI9yE5m8\n6+YEdmTMEiXAM9KdgyXWgxz1Q4T7XRccSg+Q4liOIKVrrQOD7ftW9iG/c95c\nkr5ns2LM2u4ZA1G8vOYk4gY2Ir9gsoPn/TOS5dmD8ukrDPYN5QGPhAzjeX5Z\n8cKsrOkHGEcveTP2cnNxGDfmMB9Ckj6Vqt5W6GXe+p2tEt4m8mSMLBv0QLMq\nk1rKP1jkik6zfY1VcS1fMuQH+x1U5T1I2kCTqmX/zIqL3YYJ49qPO61oAaFA\nY+v3\r\n=iV6N\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDsGQJl91kBW1ChbMbahxlrMNxqYZJ8fIuoawjqUsjbJAIhAPEcKnCt1F9wRkZ5sHzKpYCsvkqPiMQUGLUEQ/FkcTW2"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.4-alpha.8_1571491821743_0.012726164617830493"},"_hasShrinkwrap":false},"0.5.4-alpha.9":{"name":"@react-ssr/express","version":"0.5.4-alpha.9","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2","yellowbox-react":"^0.10.0"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"53a66f6bc7c83c197b128d2facc3ba474c685b9b","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [ ] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### With styled-components\n\nWIP\n\n### With Material UI\n\nWIP\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.4-alpha.9","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-x+vrg2oDKvpdH1FjhQ6ioCfEmOI0p6Mum0Jg8hiN4Hhxyj1T2lWzrF0JiIh4xgnjLjcTiQmMKuI9Hl0Jweu3WA==","shasum":"70c2d49c1538530d68e3377f22d625cf8bc9be5f","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.4-alpha.9.tgz","fileCount":11,"unpackedSize":27686,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqxCiCRA9TVsSAnZWagAAIXUQAKGG+bQ+rDhXZdjyOOwg\nGhqOrN3u6DESVeQ5asIXlJ1g2WMGscqZZ9w+C7DxoJ+TBlTaP80UWvAOo3g9\nqOUmK3OiFR+Wc1xVOaEy0NxQz51RRj9JANEOup57tS8OHE/2n5pbOw4LZULg\nuYXLs0QqCWlDxEX4Wf/fA898iGHQqZNNd9GC9UOUfmoKLpELKlO0SiO6v5S+\nH1z5aJOd9Ujx8JoX8H0ugZiz6cUEo0YN7MCWPaTclTaluhc2dnAVTbF59DgS\nhiJ5mmqyKmTbqdv137m8ewYio3OHzR/1zYPAzY4yszVmkzzh7B41fk6QyRGB\nOad61s4NwQXjSwYTANEi6gKSFO+6icyYnJdPUZt2X0rwzjq+iQ2duCDk5HSi\n+zGtrI8HAUmcN5KQnqlnQXC/EXRxS5hP+9pLW6pghkt/vDg2FZhzP4pTNJ4N\njkMmSagK6hrf5elyIK7rHdG8d2h8t91lMBSR/2alevPOM/+rndESB/QCw0S/\nqBPXEFrWW2vpcWI8PYVibmqnzxpwQDaGmsUj6niYkY+0ttQpeq7Ppx4gBVwy\nrH8qWabWCxOxs615vy+DD7uR8BjtVYEZdZ7iOoH/PX4qGW4zG6lwru9/HKek\nxCLt7c/FaXkkFTdl1m7pPRYeTMA8y1mQY77t37XLYZ/WwVLyUQhu2m3OqDSs\ncnbo\r\n=Gh50\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFFcP2GGjFSF++IzY9n/owsmsrFZSg+FHMlyVDaIlmCaAiEAulj4H0JfWW0kV+o/vZPBMS1bFvpdjqpOrfrVdOxlWG8="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.4-alpha.9_1571492001941_0.7425228200918885"},"_hasShrinkwrap":false},"0.5.4-alpha.10":{"name":"@react-ssr/express","version":"0.5.4-alpha.10","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"e41140982484b43c6fe1e7fdf93c2e98260961f4","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [ ] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### With styled-components\n\nWIP\n\n### With Material UI\n\nWIP\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.4-alpha.10","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-SNWc+KKalPSgJ3GthxoWRB+Ds/hOqjTql/Y9eyrMeSJrGWkA5QtzTLFJs/ddSejgWGXM+48uX4ieLg6JeVcmJw==","shasum":"37ee4c91be95407a5ab809ccd5af526ce4488c4e","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.4-alpha.10.tgz","fileCount":11,"unpackedSize":27478,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqxGdCRA9TVsSAnZWagAA8K4P/1mcGfz19IkjJZpeWYYE\nkcT7FkAp+GRAr9UzfJjvUA4FPhpJGbOLQ/E8gwwlT8uL9KFsroNe6xeSLQl+\nWYgPzkDJ31ZAD2dSCmBpm4oV0hHuX7fsKZMvnu11/Vc4oeGrvxA80jvMIyJB\nEsi2Fhg+Yb4nwPlqJxx2JMabtraO9bZ7DL+B7ZxVdRnO0aKG0jEazpM/1R7V\n97AgILzO0Fh0jv94qH4hp8y1cvleh3HAKQbgnRi29VVbAISLxKHESS22GBK/\n62FEBbYeWqBKyDTn059cG+4QGtAS58K4BQp6MbCO4MZsn6PpxXZWuIQ49lm/\neqFM+6ZwQjlWKWLbKRHxYbHHzP92VpZ053qNhxAIoXbxRd+Yehv2QI2rD7Ao\nLMQ/UIT0399rBnDMTyEmxSCjFjpjJbfyVwE8Q4/IpOrvsrhPBqEBSWCw+O42\n/AhaB0YSaLAtRqOYcTJVc6ECKV6wcHo+Ux4qmhlaCR4GgQDqILx4Fb0q9klZ\n5PB4k0V08UYIgNU7pxCk/hkUSdzkYxVVeYzVdQRwg35qbZhMVXCEinEQmv/U\nNYzdNpfdrkiCEcAmRJs1VKH+HnIeK4Hwgyf/sTdQjApf0BnphpNn0RNBu0Az\nC7xU00RqYZ6XyLAKEdvEOyz2IG7aVCrZmzFaGtohd+W7l88ZxeBYPyDPdpNy\npU6/\r\n=IhmB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAMGV416AruWudaLTzmaXXdA8KuC48qKuiZikz2Uap6OAiAuQDtSfVB+IP/xlEeGinWJqtr2lAYN9PLaq+Lj+HmojA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.4-alpha.10_1571492252638_0.45013869288555686"},"_hasShrinkwrap":false},"0.5.4-alpha.13":{"name":"@react-ssr/express","version":"0.5.4-alpha.13","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"121fa83c4a1a3cdbe8faa37e88a30d013e5d8b39","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [ ] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### With styled-components\n\nWIP\n\n### With Material UI\n\nWIP\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.4-alpha.13","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-36CuJIpWl1fpnI2d9QBh1mUD+rMuQ4c65zfE5FX0O2DM9LB5qUhz9qxsCE+UnR6S5NWwQvjShpsO7n15iK6Lqw==","shasum":"5abb95b2ff9341f175bf9c1f42ca6c20551c239b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.4-alpha.13.tgz","fileCount":11,"unpackedSize":27154,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqxONCRA9TVsSAnZWagAAVBQQAJ2L6H3sVBshhigBxIXp\nkNUjdhzDTmto7Pz2XF0o9vRV7y1RyTIkddXkQXs07fZEijNRRA3NSvMQAUf7\nmURmi1bF/IE8h0Im9qVE4qqrPeNmKpGrZ875tRlEEWhn4NVsbDhF+4AOL5Be\n/spwqWGLv8yHLLqBMUIuDiov5jfH5DF1gJxC22jRVEikFHmC3OomnWdMKUGr\nV2y9a/PD9JuVdg3Kduw9AVA4QL1qqqpXl8nicQcuBsWKA0jIC9eUPB4qohJ0\nj+/qugXBTScJmFzsZ/+WhpnTWtbv0a7TnSWzukI/EJFCzGBvsSZyu/CL1/Zw\n3uPftKVtaeQo81ur1hIZctjYTx7xO0+eliT89ksEh8m/WXfF11OK0apBcYtr\nzCpVGG1/0WEhxpt8a1YMSf6qSDmzu0PjxMCet5OHzs5CrFEnWOhHbqsIUaQm\n6uJ73tPJA4XYLAns6aqI3TZrM1RM4gbnLZV39gNn1ERAyWawzh4kqNn1Ksq5\nKEmO92hkVTsbyA0e88brTo5mtq2vlgu/ZbzXWtRDEwGo/fQf3AJVkKXPTvlu\nZstejZ1pUKk7W7GutxWMytCAYB5SWWHtKzPDa20ObVNnbAhe+2A+8d42NtzA\nsmxZmXkDAuVzzQzl/GUyO+rbE0DBbjGitu8chKtqay2+ePUkuDazmxSCIsiN\n6iA1\r\n=pH83\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDnAijJby01VHTW0VtsKPkhAxus/CnzNdIc5qLbNKosSAiEAqVAvVbe+7Zw3u4feZP9806v0Z+9SuEDnG9kY9LxUnn0="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.4-alpha.13_1571492748580_0.7420375170252604"},"_hasShrinkwrap":false},"0.5.4-alpha.14":{"name":"@react-ssr/express","version":"0.5.4-alpha.14","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"85f42b64ee865f8343794d8da050ea8817228a2c","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [ ] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### With styled-components\n\nWIP\n\n### With Material UI\n\nWIP\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.4-alpha.14","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-r8fcCr0vY92rjr3aF4N9FbhnrrnIhApJXT6nglr7UF2PZXWctn3aNH+ZTAal2HmGRsqqSQQu30cRGljmggBFFw==","shasum":"53c62772777744b6d7d5c87044974d5aa05cd526","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.4-alpha.14.tgz","fileCount":11,"unpackedSize":27148,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqxRnCRA9TVsSAnZWagAAubEP/3Ip8hQysi07XyYvi5PX\n0CpQzgv2iBsFw3krcc0M3e2FDghEUCxzABJAGFR+Cuah+HJovv3fhQ4qBNZs\nUJfeQruMWG7ZipJ0+LkMg7VYhac0hs4mW6fXw3tsGcTSSUzcfMiewr64MpyG\n/OzE0RZ3+UlSpRgnHo51K4uxZ9gX50qWlPpwhHP6x0OBftn6D4CvFOh/+7ZE\nx/xK8OdZE/wKrVziOwNwaQJjmA8/l7mGAOxzvfmkSTYTyGDVf85fHE4pwuwn\ne+MYcry20DjnjLFrcCzh7WdwAZZGdx09LcTxPioDnwVtIB3HZ3FJcPIdZrdC\n3XItg9rVJv2oGQoDxPxJ/RmK6WDa//TiDKfp6SueG4zHB1mF3aP0EUX2aynx\nsxLr0uUdpbYBdCbhj+vsfBuDyj3vLkxaPksRx/lz0D5f9bwE06ROGyjo3+C5\nSlYj/RFOP0mPNW3rquJLd43sPpVLXUE4RsSGXb8to+bWtjPx6o/rXLlVYpzY\n+x+5PVPL2j1F46CgdWOvD0jC6t3+Ihy4YK3dm2WVF+DV3LWAT7HZiUaUTJFl\nn8PV6iL0yJ8LCZpvDCo2tScHc9A9OuFTP03C+NKgSNjxcShofPR/ELf25FQT\n1JfayBOCUNCfsaRIv1UdXAqQCFRxApYJc0xjdPh1RKK+JuuD6a3OOxMx4Wf3\n0wpS\r\n=wogH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFJ/5Z1uwAE6H5sZNcF15e5JK5n33Tv/U9/1FhGGgpgBAiB2RP7Us+qsJ+PESyGTyRlosW9L0roN7WivXjBxQpOIqg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.4-alpha.14_1571492966402_0.7858457673993395"},"_hasShrinkwrap":false},"0.5.4-alpha.17":{"name":"@react-ssr/express","version":"0.5.4-alpha.17","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"5ca3435bd04bc5f64fdaef15e6591e3e5f7e88fc","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [ ] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### With styled-components\n\nWIP\n\n### With Material UI\n\nWIP\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.4-alpha.17","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-ZGr9nmfTBChXrrUC98jvim+w7XP/IKnvomZknk4wdChmXl7HQyTHWPQYw3E/zTgmC7emp2xDrzg7wXdEzbP4Mw==","shasum":"ddfadf60b5519980663b433dbcb6e93438c41a52","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.4-alpha.17.tgz","fileCount":11,"unpackedSize":26843,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqxXaCRA9TVsSAnZWagAADuMP/iQYcDkcNTQ3z8iYhKQi\nKVw6MNy0vm6dwAW4+xNSva9pyt1PItgR6k990/755nrcPi4GeuFxJ8dWipzv\nEJJ/InyQh4V+s3NLyAe2X0+qnrqNNuooFHuDnIirRXD5+d8cbAE6EBzJtZ12\nBHmn5v7ALrqA1W2VtgnI/TVlnvJ+t14evvo9938ALtw+cgnF11uGqB+LP8mK\n2XKjARoTlgoD5mSMDMp62HYB2tjmsI0X9+tiVv5oVWHDETrMiku9IMoNdUoC\nD6Y637k0NQNb4qBFO8G5hluiJDeI71fuioWikaTP8L4B2A/v7vDzPgPTcgBo\n79QISUnRIBKEaXDtZLg0vV0y7othGYIhIr7Dc8pfhD174AzwsgaPW4xpNWpG\nmOVHnirdcWsh26lTeWK4Q2LZkBGGPZLRHSgL8LXgKVIIABrDNN5huD9G1xZ1\ndA7nyNBAjdbFPzwfa+Dx9eqAn4CHAVrSFdoMZvoaFWnwNYw8J5Eie+T3jMiA\nlbuE8Fgi7jqmUb3NieFXi0x8R7dRXZIH1ylaV30VjKa3gA1rct8PHIcbMj5g\n9+qGoDy3vUZD1T8JYURXM1SJBtAn9xHQiRD5LxHRz6ez2gKeBh78pYUWlxw/\njIrKF6If4TtapyVPV72jDa1iCxN26fmsYqqYlGANSnfoJdtw9SmrlsWRFqJU\nX/nd\r\n=rRVd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG3FYQQDVNxLK8nK30M5rtV3XIt/VOcHjsi45in7UZsZAiEAqqxvqv4sYPnNZ6Gwobxmixime3kB64rWQ6PMi6QGCMw="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.4-alpha.17_1571493337854_0.9944535685387987"},"_hasShrinkwrap":false},"0.5.4-alpha.21":{"name":"@react-ssr/express","version":"0.5.4-alpha.21","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"14a69614cd08e4c86d2dd2abc380b088043518d3","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [ ] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### With styled-components\n\nWIP\n\n### With Material UI\n\nWIP\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.4-alpha.21","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-SB8wYM0hnkAwKMBtiKfBzDC3bbdnOcY7xatRyqMmDagjeKdy7Pffs43SC9pdaB//OVX5kaMb7zHxpQk+MXCCdw==","shasum":"32f12a12551bad71a97439c421fffc0cb4e65a50","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.4-alpha.21.tgz","fileCount":11,"unpackedSize":26690,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqxqACRA9TVsSAnZWagAAuE4P/2o5i2RyBDQL4cc7Ptbt\nbfq69clSxntMRrUVuYEdxFCJNM7pWFURMudH5bCHVXpGGRQ7l0YPgZUgn07i\n9d+QGWSMkbcHj9GRSg8GQJG9509GvSmHnbSDcDBFW/32aKA213rojvRRmnP/\n5+zTi3TAO8m4FKA/WdrL6IjU9wY13KQkv4pNlrJ1/DHrnvRWJ+S6U5ztXLsK\nVBdLHn26VwNVhNOZZz+DNxgnlc9Ah9XsfxSJ4pbZl1vUKfxNSu2peJ1x4gyD\nMJPx0Q1jLV+6qgmUp77K17OCAbcpOQQmzBFrNDOTCZ9HeZoDFxRjLgq8Dide\nhN2ZWtq4i8r1ItyFID/jIU9aODU+Irf8E8viDOMCwC9mLX1i4xHku37d1LO/\n0gHT/zFxzca75G4aDNdrAI5lr+IWEtwhjD11uQMuJSAI1Uhz0EH8qymyo//l\ngvmVy5TKmlI9jsYx2jo09mqrVLLrh+Qjdua2Cz3S5aiu4Cz5Rimt/7+4BWrB\nhswA6SQTopv0nrr4FuNJ4fcr5cDKhMide/oCkrz8Iab4bnz+WJQrkNjs4afX\naRLeeUJqzanZXb1rLocS5cP2wQr6fbAmSxuPFjGrm6yrdnoEJE86z8lgt0H3\nx1dcSAXDemLGecpfbB4mP4RXoDRUPkoHf45uz6u9N5kNEL30qCIfZhybkfAn\nkyjS\r\n=gWzv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHlvHnyLMrJ7w83lkFJuBGsU3TCdEwRBa4cgHQHu+JodAiEAowwyqBx/cTtc3PQFhvxYqByKIKpazqqBXD7VRaM1WRo="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.4-alpha.21_1571494527338_0.6106758847798048"},"_hasShrinkwrap":false},"0.5.4-alpha.25":{"name":"@react-ssr/express","version":"0.5.4-alpha.25","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"c092c4b3b1a308173710b5ca6d61da5a3d3c68cf","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [ ] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### With styled-components\n\nWIP\n\n### With Material UI\n\nWIP\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.4-alpha.25","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-vuU7wjt0BvbsLsBRW/C+P45Ef2MwQNgsHEPBesCvK1KFQUzWUAibji47VIGFBA33pE2BkKKrdmm1gn4bqIgTaA==","shasum":"539b54c8bbfef76374d8016355376282dbcbf047","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.4-alpha.25.tgz","fileCount":11,"unpackedSize":26690,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqyDlCRA9TVsSAnZWagAAIh8QAI8FxUqs0lI+piwEtZmJ\nK+j4atwvfGJiW+t1JBR/txX8v97qzbX+ianTDr9tyJ9DbGdMGfeoRwpxrr8c\n+mTUrqSZLzQlNJIyXRr6wuuDpC/OsaSubMozq+Fbtfuvt1diZHCd8+tV8E4A\noQ7JczEuIfipH4/g0eNJXiUBcsP/po7nW39j5pFteRGf6cmbhYQ+Zi0sITWT\ncORySCpx+BQvkDTycYNtgX1+JYe0sKz7HnAT8IycOBDw8e9vtD97lxE3bcEy\n1V6XGv5fQKNPMOhF84SM0yECk6fiZlGLGFMAW2koVEA1QVTE3X5x9nBoe17g\n2CGWBoeDwxjJd1+xMyMyYxWN7VI/paNZXywFV+N6Gicu4U+7PhctvnuEWp6C\njETwJ0FYR7gZI1wk4pCVu3Np2V9lCGn4FUbmkokMiLUINx4P3yjmdvxquj7f\nDsJxhePgNUWCxony9s9xvVHahdHOXnYW72MY1G4172yKo/pWB7wadkCFlbyM\noCkWRz2fvEi565dzk0RZI7RtCYIBC0FkXxPdJoxb/Z4EbB5w6/UU4dMWGj7h\nQX2T8XWHnOTF/uMsdI/4K0KVXIrwQx5AuIY6Pw4PFxkjzpgpfw4CWoQosySQ\nFlZ9lNeFXm+YiDt8Fv+f6ygbLCsuBEE8uyNA57lxVEw1WBbPwxvIw6b7s1e9\numVz\r\n=W63s\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCCkM4NCNlXNSf37weWBTgawI7QEChGImu2cNkAS1GKlAIhAIpYPO5va8fif02IEnAKqr6MujLcYlte4vqjxECx+cDc"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.4-alpha.25_1571496164589_0.49461318140619226"},"_hasShrinkwrap":false},"0.5.4-alpha.26":{"name":"@react-ssr/express","version":"0.5.4-alpha.26","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"4e6c3a2f1aa1d1bf38a1d806c99bf2380e95fba8","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [ ] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### With styled-components\n\nWIP\n\n### With Material UI\n\nWIP\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.4-alpha.26","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-hLHP+Q9WsVxENu7GkLH4I3ihK4Dyuayw6MfyZwQ9EFg2bQ++3WGgN5rBVsIB6TCj161GQwEe6ufs4lZ7kW0Jvw==","shasum":"917672126364bbbb24e431747b3af1b492610a89","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.4-alpha.26.tgz","fileCount":11,"unpackedSize":26695,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqyNfCRA9TVsSAnZWagAAfswQAJvGsKzUM378bnureHM/\n+gTL1QuOUk7JwyPvuDY5J7l1CGpFwOfNWdy8Exbb7elRCyMf9xnxkj+vk+qY\n5OXhywx9Fir9fI6eoSa4OMVhybVam3dlbXpoaEyhxprSj0YY2LFkFbHg6ELV\nEMUVJyIUDJl/gWEN05QrIjjRT7GQVtydvbUiMM9snkdIeHtIAmbQ9DHjRwXf\nJdhzzaeE4Unn1XeRoHHNbjO6iFG4+S2e4LjKSEPDKGom4jewSPWRGWK6Isy9\nJHMH+gTu3gswFIVotzJSXoJlSP9Sj4GMOn0nueg7wySN4VanYykejLO2gz8Y\nnOHrJ64CKwy+LRivGq3oxbhhuuQ+rdC/pQBCuhZKwOE+iAhYISwHSoNIUL+s\nJTlQgKkQ7f5Dmp39jaMQ5Z3mQL/iFBZE4gNeSKIiwKn/JftmBemcWSaDdoo8\np/odrY3wKA+0gDqaWCGo/4u+4zdzpynH5JW2oIKhIQRj6ioBNoE1nLn4tITC\nkSwi6A/yeqLaDUVcptS3/k4F0sTdYZbeWl+pH2RI95PQxvUrKFIzcGjMnAsa\nNNLmWOy525E/Ts3ukUpU9c1CPlbg5BRDpvpSy/s+rjVbTsec+2mSgJezCo/a\nCfInyydzW6A7qtd2WNVneM8ZAd3XuipjI9SlMpBsCEqz+g7KZBbbu9lVZ7dX\nu4p2\r\n=q3Wp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDy5X+zndF4Y7Dtjqq5gKmr34zydarbQS11cjckaZsaVAIgBbNpheFDY1C06jaXmW04/rEw+6tfdBD2KHIt0AB+iPM="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.4-alpha.26_1571496799083_0.3091018812873687"},"_hasShrinkwrap":false},"0.5.4-alpha.28":{"name":"@react-ssr/express","version":"0.5.4-alpha.28","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"7942cd0c2525b4dc3d696c4cc926bd9f2fa0754a","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [ ] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### With styled-components\n\nWIP\n\n### With Material UI\n\nWIP\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.4-alpha.28","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-QeSX6rDdZDmAuyD+NcxqxzMPwDJh+Zdh8i0pQSKpslTqvuH/8QZQkqAvHj+ONBrBlGJcuRQ9NyCDlgMdkdLfmA==","shasum":"e3c932e02e82a2fc474ccb97e792d5ff312983d7","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.4-alpha.28.tgz","fileCount":11,"unpackedSize":26729,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqyStCRA9TVsSAnZWagAAd24P/3KEpmyN5Tc9Jv34QC5J\nXnOrrYm+YnWxwZZSNnoxWFOGD6u6U/I6d54RsOCYCARQ3TC2OJbf0fNFI6Lq\nn6bHykJRkAvpeK9aZFRAiq9GiV9q76cGrUUCIQyHA8DG0Fe7TQB9h7Co5KQs\nkqqaL427tLzhadOis0kyvpu/dNCYEjjNgOowi6oVkco3n7pL+z5Pg80Ql2Tg\ni3zqXk7U5pZv6fkfGi6DTJpQAl4qhUSdJXHQ/ou4PUxITdLSk1vH4cKSbwX3\nXN3tshCIcAV0rFlyW5Wdh2NqKqUagMVXDokJTxF6vMaMfkgDKpS/F8P1x1xq\nMUxzZVC18JmM1B8dL2bqWf41cEIO1WjclnQ3wtco/3r1KTKCfGCgYBwQZcmF\n2TsKXdtdR5Wqlsb0pF/OU4xKoW68U4aznX/AHtkCgITBwxR0b8AJaiU6pU0e\nY4k1Awig3jel6j33QNkW8NlTd5MXmf4WkHJ3zotM+1VAUVUlMtQmkjwWpQoa\nBZWoOqweRgENwvEuXbx8NhnxeVTMAZzI77GgYflQD9Uqm2w1OsARzC9OuMsF\nU40kZzrEv4LDWf1PbYyTo0GX1yhCQA7JeoVB0ToPw/XmzPSZr8EiVhM3Piod\nomLSUi3kgl0+sTId4N7Qq/RQhq/je4RyCv9A3cCAtjAFy+d9vXwBa227qWV+\nSGUI\r\n=pdik\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH94PwLJD4u3x0PciYxUvXtdE1eky73XNXYr/QlcwIYtAiBckxt9UgtGsuwtolHsq1cUqaVkaNRvIO7l4a2Tl4/MDw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.4-alpha.28_1571497133052_0.2515205295371721"},"_hasShrinkwrap":false},"0.5.4-alpha.29":{"name":"@react-ssr/express","version":"0.5.4-alpha.29","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"29bc107478d0b5c9e059d74a318686f256c8bd15","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [ ] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### With styled-components\n\nWIP\n\n### With Material UI\n\nWIP\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.4-alpha.29","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-/xEeQe77jp0RcJ1xdcRS/cX94erZl2vEW0mFL/peMhZZvtsUDHaH6Jp9w8DCnEeeb/0hB9UkvGYf3tkGeAfcGQ==","shasum":"366e6da44499ff114b3e917791126adbd5808580","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.4-alpha.29.tgz","fileCount":11,"unpackedSize":26804,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqynpCRA9TVsSAnZWagAAKkkQAKCAmpmIpWDP64KrSNdj\ndo74ROEInZh6QwuznabO7GGykjpFfavorXCykk6BVl39gAjUPM4GVVXnIFAI\ngfy2/X40YlXsV3n8UCWplyfTEUdoAWwvaBWkR1zHXEvDadUQxENCZG8rciLP\nehwL9hj1fSySMhMGPsubQ2APYm3HqHnwubKYd0nrq1ydTTXzumSkckDRg5j+\n8hpqEQZ+DvPgT3GvbBWG/7kbumeqEc+3rR21kuilPdGzzAXb+T6m8rr6lLbf\n27fs6W2EpDEqTVDEVCQCB+Zj4c2qBCAFPRYVeSLezeECU4qKobOmaccJm1Ss\n/vXS+bM7SK3fuyrClR/LUObSYpCDwd62B46D6hp8U+28dsrgf/2Ug6pkCUj0\np5u8sikLAQySxGtcp/8+SciX1mFA5HCYhX9uew8f3U2uW6vd+zk0djHquJNX\nkxp6xkO0BaK3x3fOBUcl9eM4MYIgczZLs/zghsbrQF2/W/RZ4npXgfbd9PP+\n2J3AXNupgsnClqG2g28nrXBvCor7Mgmk4YymuSjKePXF7gLe9xfXvkL/wIwC\n3yqoteTHh7zFWocjVMZwn7mbkI2HR+ux8fVYXbXmkKjoV9OaD4OG8voNj5HB\npQ70StRF9aEof2POJ9HXjzlk02Z5XcHg+Vj9dGOXXP0vZV13L7A8jcIf9aD4\ngR7M\r\n=jrwW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC8zoFMWR9WVEGROYMu844QuOSVusqHFRcF/7CVH2lvNgIgbR5f0NNdRaKaeSj1YCEMJXzMV7lEUOzOHpfgaVokSX8="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.4-alpha.29_1571498472837_0.10706059665277912"},"_hasShrinkwrap":false},"0.5.4-alpha.32":{"name":"@react-ssr/express","version":"0.5.4-alpha.32","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"ff1eb4c70a1e7183376025377e2fe44d1573d6e9","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [ ] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### With styled-components\n\nWIP\n\n### With Material UI\n\nWIP\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.4-alpha.32","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Z9K02402l/Ut4cGybRiBvoe4L/7ojw+9Y0JKdRUyWMngjM88LyIxyxsufyRu0ea4DO3adoM132y4X1+jH21H5g==","shasum":"f60d7d39b9c6408cdd83858892f82af7eb7e5493","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.4-alpha.32.tgz","fileCount":11,"unpackedSize":26957,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqyv5CRA9TVsSAnZWagAAF7IQAI/UCrf2Dkn7AlrfPE2U\nF7zKHH5Q6UJEVrsk03NlAD+VjEZkr2agIotGvqHJcLI4hpJjmJPIefBFwEBh\nV0JKXowJG3ycYYxsnNk1w8gWXkwSY+nPzhGv/jbS68Kq6n12zNFzICyHDPFX\nwGhWauGsEb8rTUW9iV7vJTI5q2o4HdhK5ugc2ebrP4FK7jKAcmZAmX8WJP04\ngF5t9VCaelKJl4zbbrpXGHEtXSWs428PSCRcqTcy4TAyuNbqu2F3xzP6P3Y7\nb4mnTAoWkD3VHQ+6mTf1JKDw3EE+19F7Vu9Dws0Qk21jRnlSPw6422E7FzYx\nJyyFIjlISXr4XQKSlGpSpxV92me1OGgU63Pe6DWbjk7Y5ZjOoK1dLXPxjLt6\nsxv8iTfxoeW8Xo3gxxCtAMN/v0wI6bYfkTMzPZmbuv/ktlW2QW+3cEpoG5A+\nEhX9q/+WZGY1PsD6wjrmQLlN7l8CsOk88t4NcPnLAasvSMZ6AZS+/k6QrNl7\nPA66U6dBSHyOkPudjdrz5LM9z1K/UihIf1PpPibQR2tQho98QO4/bsc8x3hB\nHyFmlnGERuLyxxTGvXY0nQ7mnD4Vt/tqB5CBudAAr7wwQxl89dL2Rjh/D8nS\nv3bHgWrcyiMC8e0bUv3JXmvq+OBKNOpse+YLHtzWi3i2Fb8IeXY0L0jllzVm\nR88W\r\n=qgI/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC/u5QvhGIhn/YvE1S73gaCs7ZXt19dwH37fJGwezhSSwIgT8Uzp/vHiu9TeQAqqGZ3/c4dEoQkPxoE3T/Fi/JA7IA="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.4-alpha.32_1571499001195_0.7288652218878477"},"_hasShrinkwrap":false},"0.5.4-alpha.35":{"name":"@react-ssr/express","version":"0.5.4-alpha.35","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"0b02ac03b72696b4195eede5ec22effc7a9e165e","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [ ] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### With styled-components\n\nWIP\n\n### With Material UI\n\nWIP\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.4-alpha.35","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-AMa9tsThtmPBGw9FiZede3vW8+XbOukvfJhGQp55GB1dENNrQXCcIkSdEUebomtTL3+tEXeLQKtoyvPFzUyoEg==","shasum":"b9a1d1771f9968ba4b3fcd22ce4d63f08eadfc0a","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.4-alpha.35.tgz","fileCount":11,"unpackedSize":26957,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqy4WCRA9TVsSAnZWagAA+o4P/1QqYHPV3w9up7PKuQTn\nPrTFKIlaYeNnMRvxkpkhfA34t074zA34P2sLBI5Ix0kD3muVzbosOsdGKZyz\nkh2kZZwq6kjLbvoRh4RH4szfsuP986jWRjRw9sL9pfsszcPZg2gnKCLuit28\nYNif/emQv3S0+PetOlq/LRLyOacXwxDdmQ3ls+E2HOmFWmyWZ4uDtlV+P/+B\nOHFsEdobJrKLJl6KVYeAZavjkF3fz79nJICKuYqwE1VEWcM7ydTty8hg+6Qf\ncEOZgolnODTjTnTh+BlHujDZ+/8Rydwr4oy9QLjhYmRvONozw/tRTortZuhh\nwJ/W4xUZQZs5MSu2oAwZg0HaMPNlzA3jEAiuOVAuZ4NDG3Cx5JYfbPpi7D9g\nq0lau9SbbELUu65XRH0Nb8Ros2XiMC6Zj9RwN45leKJagMO/C0rDT0wrAWzY\nyqjOLvD3tDqwlGfrH53c1YtAHyElT5JsDiqEkj/lAjl3wuZh8nHwDTrEl6Ak\nr8tPBZJK3y8nP4RgVg51yATv+KXfZOjRxPWatCccx22MpL7nEOeEge+orZk5\nFYhmvKxtmCxM8XEdcY2Z8guBzRN/alXUqMzriiyR2iUf40wTWwuwxDy6QtU0\nc0hPc6YZnkF3hcAW58bw74hoh4r8tNJSbSJBgasW7EOFVjCZw02c/sTPkdif\nd4H1\r\n=v20e\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDXN4e47SDckwqMcnyCYl+SwW0MwcbTFO7B57m602LhUAiEAtu2EtkRxFMpdJCzlAX1gYXFPkecM3SWtgRVzyPihzSU="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.4-alpha.35_1571499541685_0.7971114419194874"},"_hasShrinkwrap":false},"0.5.4-alpha.36":{"name":"@react-ssr/express","version":"0.5.4-alpha.36","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"64f2017feeb557a0bff3897503453ba7b7ac7d6c","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [ ] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### With styled-components\n\nWIP\n\n### With Material UI\n\nWIP\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.4-alpha.36","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-2fLejfTlCD8BENr1LQoTwcwLWbH2W5zgufC3FLr+PQ1voLRNGkXafHYIRAP4ZXYFSd655VP+pMDsg49mpfJicg==","shasum":"bc64b8f38fe4767a72d8c7ebbb559397e316bc93","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.4-alpha.36.tgz","fileCount":11,"unpackedSize":26975,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqzBiCRA9TVsSAnZWagAAy4oQAKUoznVSEZvWoA6XBpyU\n/SLyC+7l98PEDUkuBc5yRA/wdyrhdbTik58AQOY30zMI3fBf/v8rINrMtGZ5\nwGmbZ3FBfzF+ayM545y1ldtNLAt+Mw6sqteSiPBOS2gXf0q3oNRGQT/OciYh\nM5/aPUeqGY6ebpTTUvrSwa2EPw9LgDOl+y2wL59xfY2dHQKlvo54U0nWEYzq\nmj8M3OPu4Wqy/j0Dhh7R/QtpTMCAETKSVwHOPi75meUq2SukJ63BJOWs5ktj\nIcr2N5OcUWlUbSYIO947mX+WBi1iXEUsx7tw0DLBUZGzrhgFG9Nr1SpUKQHI\ntrRXaa2ZgaWvw1hD6hr781J2CV9ujmO4Qv7fpxPJafjlIqkxEsw5i0GixHWd\nSSS0vlYx//kLgs2bxeOqVoSX9TG0UMS5MM6B/Mth4FU2lK1sHDjoSogYTWQq\nKBJ0xsjRr2Ls3+mH5tFLBPKGLQZTjuTR1wMFmxLYb40qogprd4Aa7TFHzplL\nXhpSnPpTwQisUwW8WV3FN5g18yx4FqqjkpvWyO3nVSV2LDZ4EImo58oXc9gL\ntHH06+q/4Twss9HOLkjcsknreEVi6Ct6xryk9Vs2LR9GnHYT/XMSt95iL8MT\nriKx9ew1rLD4qKapku0w8rI0VyjlwAXfxO2/G53EQ0RwXuGyV4edcCYfob2R\n+UMN\r\n=ltk0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCZAdRIyTZHAhuoTumfjwF+jWYpz3XWRo8sjhU7WTCVZAIhALSXfMlUZhg6IgF9nBVxITLXR94S6rtXZDj47UPYC2Yq"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.4-alpha.36_1571500129537_0.8137408881928492"},"_hasShrinkwrap":false},"0.5.4":{"name":"@react-ssr/express","version":"0.5.4","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"312704a1b3353cbee92c82e9cf6484ccffbcc33b","_id":"@react-ssr/express@0.5.4","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-tWWYhLJBEqucrte2TNzioJa3m2xSodKurXrbf6wOAzv099bIs2/iYRdfIUcG6/wIB7hp6jPC1VR6NiKLRJEEBA==","shasum":"6ab04ac1f3008f9aff058d83c40428549c6324ba","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.4.tgz","fileCount":11,"unpackedSize":26958,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqzK6CRA9TVsSAnZWagAA4O0P/2BAF8RrHrdCmCKHxY6J\nJbxCxbd+qwRH3JEu5B3W1g8LQ1kjTmYM5xQF6UmAOm3NhOLSoNDV7wJ9wviX\n1q2/5hNdffryLC3mJktkHzfTe3qJSAtoesMMjMvwC0JC3p/GijkkBcnu81zk\noUG9ngmcHzG02uv2a/JUqJ82doJK7IBo3PpvpugX/tfy14ws51cR9fg+h3PX\n/cCdUEyV/zTUSfUO01+Dx7mZvRc15WigzUewvWzFt798CKQImeu1QCjOdp5r\nO0Wgw9DwBrMn5rWpA+DZPbQqkFHwVD6JOrSRZ8tNwomMcZb4tPZdRdY1uuy7\npiKKfjwTpkN4Gi0E4MOJxLVqqGgKqDzFVsXE2cSJYVuxZYsLUTLuxun1ey54\nWFFTA3hwgmJB1xNdi91H2Ub4y2a1ow8t8o0w/A443JhpUot7xLgfRNVK/7gM\nzP4ym4t6SBfVXiAER2g94sdXZdxyfGCswozOJTp4WUE+qeGXh9I9wvu+uKIK\nDF4MdBNAkSRF8D+qqQk8p6BMlDGFqPYfkMpPUgZdZnRQDqjCkfZGhd//BEY/\nMEcCcnakTzGt/5d6IcBOVLLwDfZ/GEHFLN7z02Xv4oe3ALbYFEXxW3YBdqhj\nVh1xUlJDmP/7Ej2DUXlXyTw/rSvjZ3jqFBle9RLVYg2qfxzcUXzUqu63JlJv\nLmxq\r\n=9E7N\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEOe3+hKQb7CfhIG0Aq4UjWV1dzbroC76HI2zj9RevvyAiEA/BaulB9ximTDnRuQf273MPuTntnqfK1l014hx4pzDSE="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.4_1571500729820_0.30055928240450247"},"_hasShrinkwrap":false},"0.5.5-alpha.0":{"name":"@react-ssr/express","version":"0.5.5-alpha.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"5863da1e6e3c29313544595bdedbb32708f1486a","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [ ] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### With styled-components\n\nWIP\n\n### With Material UI\n\nWIP\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.5-alpha.0","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-FGuhRD6szXbtgNFb0ODWNGm7egcrbAL2S8TdSyRwyG1v1cQsFu6LsHRz4n0+CSgHJzQleCKi6RAGgqtEgK9pkg==","shasum":"023bd0c7750b3f5396d129d718769ceda56f4545","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.5-alpha.0.tgz","fileCount":11,"unpackedSize":26601,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqzemCRA9TVsSAnZWagAAuiMQAIEsl8uU96/GwqdzjJZg\nnz14mOGjL9CtjCKsxUqKMQ/o7RU2YK0npsB10MaQYke1QWg1EVlLP3SEi1mX\nxrZqEUY1HfNGwwWydun8F0TDr3/stxJhfFYqwJIMPMnWZM7d9k8YSGUTxcQY\n0X0p7JQXJwPHOX1z39eXId1Fjra99BzS3VmNrMKCd0E960jpFVeddoXnBzL1\nxU9aKW0CxwVqX66/y1gwu342L3sE9r6jHvfTptIH27rnlDPW8Yf6PVuQeHSA\ngYwJ8u4IOKSEgl2Z45OrC0FEtETiJ0reVlbbbr5TJBxbUHj6g/TzrozFZ+Sl\ntY/5CnAGQOdqHyGUp9ckx1tsk6UMc9PgzjZuzdRc81GK4EzQuEgfZOBJYbwC\ntt+/LgCVU6FWopUlNGY2UohIQrLzwvgLiLHmM0jTE12u9YDiYCWaLMrQAZM+\nK9lhon0ANZvPVnbSnbD3ESrINYn0tDtOdboex1js5NjIZ1lBZCYpmgN9e7iY\nleA47TlC3P6XwEWa5Mv1LnckZnQlN/8YG6+YrQNrzoPfwVw7gdLyTQ1tWGlM\n856YbJW85dW48MPik7gTNQ0NpXhHg0jHzYAvJ6v3b37yagYpSmjpnefoHYZt\nArqckgm+LdWcUon7qrmqj5ytFJK0KpgU/nk3p8j4LBkasdfsWKzpUOrbYVRq\nH4v/\r\n=H8tk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFGCav3jgZotQ7yRkKk1Mybzewe9ri1Sej7M6JdihkLPAiAdlMDwfChS18OK5/ecqYD5iEjDVhE3Pw1ZBj0wY3TBrQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.5-alpha.0_1571501989459_0.16438310339346618"},"_hasShrinkwrap":false},"0.5.5":{"name":"@react-ssr/express","version":"0.5.5","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"d270758de3c43e84a431861a3e2e531026ea57da","_id":"@react-ssr/express@0.5.5","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-pUdQIeUqUdAZrIOtMDswLolohl8rVxw4jr1BfcetEcQEWzSkJErbBJzAbXEP9aqRA7RiM7WXnZS87VLh29sI0Q==","shasum":"192878a243fbe163496fa7a7f70f9baf0a49f286","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.5.tgz","fileCount":11,"unpackedSize":26924,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqzjUCRA9TVsSAnZWagAAqGQP/Azip6OQ04ADUcFkwux7\nIVEfkZa7U8VErwZaCbp/zu9JFqw7cNErpWi0GrfrBh4LNsgzSmCKFsnt+lh9\nngKoa7Fx24dtzpx0zmWkbjvtrUzm3o7Jrey1uirYXSt/SO7RSGA60ue/zQnY\nG/ZiRgM9xLr8iOeod/tb0GDK3ZoK23Ot4cTgvyM3SA5yJEejgzaVVHwkLQTu\nwlAkFs9v5x4cal6UuYL/LbA8vvHM47Q1coZAoQUhXX0QtSfcbZ+Nj4vZ2scs\nD92Q/8TJP4vFlsSuQVBPEFZJNZKJOEaNF8+MHZmbvpQdA3EKerM6rpx/aGG0\n/Oblm9oXutEPCK9TzF5OQuSnVwOojD0FSruGNoF4tD7oOUNleaen5vO3CkRJ\nzZp/00BB7/T04CqJrhC9z4ZX1cHk/XfcjFPpaDNCZlrVHTPQ+k1VAmvUJrXc\n4DI/t7VmlGXX5pXfUCXSKRY2Mz4Ah2iNHZjaoFbNCtA9vPGGseSuRWL8ERnD\nJ7im4SmvJ9fPfT9NwwnsQovZZPQ4TjRFqF4/0cKWOWmNAyB419Mr0x6cFXv1\nbiLpbMg3jFcHptvwty97qiXd5N5c2B/BNezVTVSdlwviKlj8phzh0Tmj61vM\ng7NQ6lfDUxeuUZH91KsRYsUqTctrCbywB76tY4NKm70jnm1A00uVBfVJn038\nP2hs\r\n=K8Ly\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCW6kRaCXSo6HPtLgE1tWHXJ3sblq7XWNPvdLsIEU1tBAIhAO3pJzsYCHxEsxf3tGwq3BaGZqcY4t29haxS3QIwe8vk"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.5_1571502291712_0.46326104683317126"},"_hasShrinkwrap":false},"0.5.6-alpha.2":{"name":"@react-ssr/express","version":"0.5.6-alpha.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"9a1fe020f96017d710483f53688bff7c33cda529","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### With styled-components\n\nWIP\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.6-alpha.2","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-LJ9Yjc1BWvMNdhMh0F/86W+zz6ZbCFwvMs1tnU4ueB32MsgcGmpk1oyxZVw0+EN/XIkp0Oi3yBv8ivgf8CQi9g==","shasum":"816233b3d808f16d77d47b03fd77e06ae4faba6f","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.6-alpha.2.tgz","fileCount":11,"unpackedSize":26955,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrJDGCRA9TVsSAnZWagAAfw0P/1w7h4rbrxqmxr4g5HQj\nqyQo48uIbdYXPg9ZDCQ8alXih1o4HhJqm4WX08T6SYNfjez0ZTYLJFeffQ41\nnwM49ZgVi4TVaAuYbWPdE0vGNm6lRw+1z/5c94LgkZvnJA/dK6/OshnN+2xf\nrKgWPXk5SYRnDS5P2aqBBCOOcV/0eRp6XelIWex+o9r1hkSUiUFXwgntKGee\nlmNT/sqZoF1mijyXK+pAD9o9nS9e4JxuQk1cqseFl3J11kBvX9qJaCqkHLV5\ncz9VOSMFxgP8+B2WCtrFOz3qtvuSjAm8aaCsNVzIMeX/DQj4/GieV0/cHZu3\nPf3HqF64nZRk4pPmzMYBAkE9J8INua2ztA4BsOCYDsawAcWr4gRk954OwrpL\nHUgPpXfXsm90Jq2D8ojmpCT8ZrwulGKoxAXRVv7X74Ri5CSLTWviy73Bt46D\nvBWnKS2LfctRR84CMmP89546K2OXilCsRWsjM68Pu8l0en0+V/tbACWKet2m\nYM7k6QN79XOs/sDLkTaTWK9n9JFK518N0c7UNjSTte6NCNyoSNVv2S/qAgKb\nzqnEiJx3xCZv3nEU2eoj1/TIndxjr3A8HOxEySEVV0z6TBoM2FZlwd0GXdcE\nM9TQz6gVrjqyLNSGtqJ16JY6GnppDaQRWdyQ48lolaIYmGeQJmqpT2LZQhUx\nd0w8\r\n=Oa2Z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFnAFUR4KKhgZ2m36RRu/L9tvIY7YLbdWFZNro9y+2inAiACeBDGSS7F/DDoOFeuecVAU4JS0+kiv8GSrVS8XpHFsw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.6-alpha.2_1571590341434_0.32557121614189377"},"_hasShrinkwrap":false},"0.5.6-alpha.4":{"name":"@react-ssr/express","version":"0.5.6-alpha.4","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"018ae14a81d376fc97b46a32d9ead08e82f943e6","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### With styled-components\n\nWIP\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.6-alpha.4","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-4LQ1SaECT+PG7Pg2QOFQOb75oPvg25Hc8ul9VGv61XJaJJEHqBK4Jkaz1m1djrTq2iFO/P0wImNsKLqXUtxu6w==","shasum":"d00f693e8b693a0a7e24f464fe809c7ced6c3b6b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.6-alpha.4.tgz","fileCount":11,"unpackedSize":27594,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrJN7CRA9TVsSAnZWagAAp+kP/i/7YvKm6wIGGrVfZHdD\nDZBfZyHOKX0Gi/XL89dc+YR++45s9YX+ugNsExt60CgKaxDhJirykmxIzywZ\ni3zG1ghjInk1quDTXvtWrYgQPdAjjKuEFl/FDXR4dSGu2U47jkw0n4kdQRSe\n1ggBbRQ8eZ/QCP0s0r4GHyyH61yBzZvNoHJme7ngM87m7ZUG1JtcsWZT4q+e\nTYUDq2sA/maKK8OT3u2uFRj4tH45O73HnhFudGVTPwCV7r5vLIkPmOHgeLZF\nP8KnNOdu2fuq+j9o/AwRQCQQQF85kIKUNc6UCVzoApfr73JigABZC2VyNkYx\n3p4lzP5P+4g525WTwOP9EujNIjrWFEurHSina8IS8FED8uxJ6lTE4hLeyRMy\n6u2BxOxIylUqlsvIO3KPQgor2JHqBbIsjBnwl4iGS4xiI37gRqA9ZpqNDMI+\njPtFAfeM1RZICq4dQq7e+1JKwImqVWB3YSLIg/589ywN63hHaikHn3Hupqmq\nNzS7sTtd91OdZiKZMGPG+tA57fJB0xa6hb951s8gxVQjYg5qj2S7fWn2FCty\nNLp165pjjA6vjxf85v54FkqapfhrxEQL912GDlbBekFLMYNxLRUubpecN3uv\n39RXTFzi76yOkcg992XNwjkuVbylBhA4OEgpSLqx+rTwNXc8d6k8jty6uIln\nG6BT\r\n=Wsbg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEl2uv7+Rt6j/10vVon/H5IvggCQ60wpZ4VxIZBZ4ro7AiBEM2Exn1tiiBzatA8P3TAG3Ig+kLzHqsAklRP1vTnfbw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.6-alpha.4_1571591034438_0.7424779569217033"},"_hasShrinkwrap":false},"0.5.6-alpha.5":{"name":"@react-ssr/express","version":"0.5.6-alpha.5","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"7d3b0cdceae92ab842f442368e28df9ee500b706","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### With styled-components\n\nWIP\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.6-alpha.5","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-BwQnesVeaj/NFejuSV+m2+kuE3FOWVnwETtikgcQxSyYeZWwG9Y6hA1WfpB4iN/3/2hoIcfKPlcIAC0KLB99kg==","shasum":"7638c3d5d0719517305d01a916c3d8a27847096f","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.6-alpha.5.tgz","fileCount":11,"unpackedSize":27639,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrJRsCRA9TVsSAnZWagAAqg0P/2hsYHVy3lBAFvbmceaC\nmu775Kv4F/nwSMluR6rpkx5zbE4r6KgvP3v/5X42674efoQpC+oQkJ+7wK6x\nFbX7fMI3RfTjSHgFG7qr4fRbUkUE6VfYj2wYSL7DO+AgtbowDhY7bxhiRne2\n+PZ2hw2gigi2rqOGrqUHPuwRP6kxCixfQ4+p/p73YPLnNGxWSXrcNC7Wwx3g\ncdp21El4YJnwAj9yBY9Mb3qbv0r7yI/6xYQuLBgB+spx3jpNfNwJpCeWeXRg\nfl/FvjDdeUTbIUdqalc5EmnJvHtCjdK7xFkXTyiyitiUByhDA5xF6ctzpc3n\n4cVsrRH1gU1YMqQ9xbsS7aUiZnshypBsTqBuhNHEdSiuCqNIOF+Sl1hjvhqa\nhYfSP6UbAaStTz/DX7SS/QbcmbU01Z1y0OGcXrEFw2+iuESL3wplOA3KwdlG\n2JVZN1rkK8IgRLtzLmpu0eYpsVqfu39lzSnaUQUbRQd1V0awIZlqVJYUYOP5\nz3WOPjK03IfzGtE5/SYYd2/jrdaslzzxjIjETG2z5FMZ9/DZPhXVsShtwcOW\nIA2dQslt39SH6ZVZsTVBePcgf62gwnNo8kF7ts/qqAslW5Ml05qaXEYZa7ZK\nGjXNY+3xOrV/bQt5dKe2GGIi/f1uYuYRcGy+swozBo05c3+9hESvhLuFJobw\nRL6o\r\n=Hy/N\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCoh0BRX3ycftHJBlwetnZNsB3+R91xmM1iBaIWVMYtNwIgRszssog1wZQMvCezSIDytaYAO87gpHZgOLnKvHnQw6o="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.6-alpha.5_1571591275744_0.4719908555572858"},"_hasShrinkwrap":false},"0.5.6-alpha.6":{"name":"@react-ssr/express","version":"0.5.6-alpha.6","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"b2f9df37ae25a71b0debfff9a3156f5b7b329021","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### With styled-components\n\nWIP\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.6-alpha.6","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-cuDPCs/D+iVJGQKpjuakwG2UrnYeRXzIP7BcaWwSvWKkeoOiNSiL+2sjn/b7xw744M1MnL5bsHkeMpOZ5wmkjQ==","shasum":"6796e88f67b23690c7a74145529eb8be472e8bf9","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.6-alpha.6.tgz","fileCount":11,"unpackedSize":27673,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrJT5CRA9TVsSAnZWagAAB54QAIQBD3h0V+tkoD60Z6RF\no6Nce3994+p2i7TT0FJsioRydZupYka3CGePH1jNrYdy9p+in/d6NCrBqkej\nZyLO6MZMasw0tu/cu6zbA5JJtExmFN/7kALG/HaUar4plEh/nz/jegXGRUda\nZCMyUiDRSJtyG7OVlfy1VPzC+/0x8EmoUcAkcaI3aSK3IBHlylnGa3qB92TN\n+6tY26+sTH+UI8zrgNIoKM2dxbpZA0OhmxWPSzhCZIRFo64JNxFFP+TzDoez\nGStNAOzHVTlX//yhxmFNhUGjxjDbRpRcNLpzi9KFk7XWdgS3yl+RuYdkXBL3\nZQXW7B4wD7ZY3lJFjoBDUEv9z3gCg4C3MFja1zWC1CeBNaKDUtIMS/CHIPbV\nBBnjlF5U28kN5y6DJv9rNgDwvApCNdiCPZbPdGeAuh29wwvnTh/rgkCI/3nU\nwKWQwSZLYbEmmZdWTJkupZhDfH4clKNvr5E0IokdurqYc3loIfFZw2XhV8Ui\nq+8gHdfEn4Nc9cMBNIDZ/uu9fVep2Y+MyJ7EXAx/yfzQ8tQrEwpsomBVvUh/\nxL5jNeUPvxDn3AavRvJfJseQlxa71xxBoysFO6oxrIqXx13/rdmFTu7kTs9R\nCO+yHAge/duwj8jdsb1hGWOUAuweEr5sm6NBwYP3w/uyWWhZyPMdoPdPhnPz\n2MbD\r\n=1Vdc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDmgQHfL65WrD3vOgzoLhed4oTuV7H41lvJXB0UqqvO9wIgVO4Ep4PkB4k7BEmudCzEaQd2TMJAowgmazSvzF8nd9k="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.6-alpha.6_1571591416606_0.5211202768995171"},"_hasShrinkwrap":false},"0.5.6-alpha.7":{"name":"@react-ssr/express","version":"0.5.6-alpha.7","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"bd75a997adcb90da376e8be42976f3a27f943b52","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### With styled-components\n\nWIP\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.6-alpha.7","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-E2nQVIqgDIH52WtNRHQ4mJtApcwHIzrhVEUpWxKJRnUyiFCS0mDwhaVe1KSqgDbrthIQS3dxZwRqKy3FIZ84BQ==","shasum":"54aab12cb3404541112ee9ef63f8f68bb31cdfc7","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.6-alpha.7.tgz","fileCount":11,"unpackedSize":27658,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrJYnCRA9TVsSAnZWagAA9OsP/RZve9gw688056jstEz8\n7PLOsQAmFyRoF5NoQYtgOUttgo2hmFAE/IvF2bBICDO9VHxEH3DBGJlwHSJS\nHXv2sm1VMQp3O1MWSDR11Q89hSeGBx93B/VJEkqV+vXh8HvNDyKKbtrnxpqZ\ndQc9UlDIqYRc6s8LDjIZOL0Twicj/7pPHIXZNNs3MO/MuhPDEMp3MBGmj6Be\nkTvIWwH4hxEqlYrANXV9cwzIwHI+5rGrANCvJBFfqE6wOuSz8syAeEIgrbaa\n4Fyhnk5qIbaGpWNCsYxgV1FfIVTXfE3WMQA/7FQljUOxVSZQ7U5fshuRF0Kt\nmABwVKviAQ61mZTyPj+6b21lOamzPE88iZrwy37YYXLsDhRha26fKYxjZVTF\n48BgXf2z8PeWBZFndhV9ZJYWaO2LPH2hlhG76SE9jHrNLStB+imhOLzODe6U\nCYfl6ffHKQrOG8McLxvTna1HWBC2tT+2+kybTbhoPXyWxvgNUp5YmiCD/miH\naxmUx2moLww63YKZ+WcoN6eoVn+f4w7D8doS9x/WDMT2mevFEn11KgZ/MDNd\nQbNQf6RPnb90AqF0K/uq0V+WUgmjhSNjUR05COYRwGNX6Tllju+J9Fh9yJSr\nVMWSG3Aef02SVZ5LZh9zNhVDF0BrofWpjP4z5wdJXuMIVgX9N8qhulPOC5yv\nVxlw\r\n=DEBf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCGQhahF6T3j1gqeB2nTTbcHav24ttVmvcqS8vagVBuZwIgMKzh5mR5FqLTp17VeSuGI6cFDeRAR91v7BnnQdrNDzM="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.6-alpha.7_1571591719344_0.5525627720838113"},"_hasShrinkwrap":false},"0.5.6-alpha.8":{"name":"@react-ssr/express","version":"0.5.6-alpha.8","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"577241f100b5ad2c4e2d2a13ed94aeba1ab89a7b","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### With styled-components\n\nWIP\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.6-alpha.8","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-DF0nzi7HbnE6U9fRnf4Tbf6RjjacaEEYfy6LFEUqzngxQhoYpbsvoedZ5L3avQT6lwPfzlWSQbO+9t8YL9qU2Q==","shasum":"5d08671f2df882f597dac15221cb46cff0a57ba2","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.6-alpha.8.tgz","fileCount":11,"unpackedSize":27638,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrJbUCRA9TVsSAnZWagAA2OEP/i4yq/hYcVxNww6SlwUv\nC064H7AJ4B3Q+Vf/TVPa8OwefYoLboKrAxibr3Trb+llTdA5JAJuyEWwgX08\nFIJPAW3tA/xWmbmijV3XUITV59v/t3AC47m06BtyAdNJHx5iEX8HVgf+eVAD\nYLFPMh/PVPgE9BwcrU68Vgr/Da1hwRl8rVwqXY8w9UgRJJtBQGkVC5rUZGXW\nQnlBpBnammXLdqFqw8VpBVNlKzUV+eYkygB60U1vpGIu9efvdA59rD9xf4z0\naNTcpYJkcj9vX+S2dD7ZbqTmesD1SlKXpnSEG8Xb80gVaC0n986PnqV96fmY\ny5FC39LXFlrAC/x/mAo9Sr/1T7AOQ8EHMw3g7QYlbXE9TO18UVqXwEHfBBWA\nWpu9BlsieWhZBHMVYjS0yliWMVhGuGhLdv6Bm8o0Ria3weniv5n5ImTrDAAq\nK+AwcHqqdWaNTaOBfiqexrN4B07Bsg1jJ/DfnlgL55KkNp3/7s32IXFyFEbb\nVhMfDUlg87f8FK289vlPp1KFhzQydNV5w5Dsvqe0GePhuYS/dumgROPXMbSU\nFHIjAP6EdL9P5XYudAuZxIVX6V+ZmJfyWGQiNeU9GiHMDxs/TRgHBOqQ75TM\nvJ8/c8pmMFy020G/VDNgZ6cf54ksvLAl/VLEIccQYbtjRtE/Bb9k8uHE09kb\nsQCz\r\n=yCW1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDxb1xfpnW4ZEMldUHeqh//8MAtzfEeoSRzO50X8kMU7AIhANj0r+QePno01ABpVcrR8vlztl1ZvxAnrtQ9O7PLttFw"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.6-alpha.8_1571591891731_0.28341668057647085"},"_hasShrinkwrap":false},"0.5.6-alpha.9":{"name":"@react-ssr/express","version":"0.5.6-alpha.9","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"66bea2e2de77dc87a00a82b0b75dc662fddd660e","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### With styled-components\n\nWIP\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.6-alpha.9","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-qOopboEWNmvjInzZdmJy051OqiIjlQOlOASi44rcsLEpJOmL+4qFDV+em7QAGGM8C5yrE03uYrh2q7wEefrbZg==","shasum":"47b7b9e797d9f4660624573940ad789d69cf9fb0","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.6-alpha.9.tgz","fileCount":11,"unpackedSize":27719,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrJjKCRA9TVsSAnZWagAA258P/3CEsj7G6gwvaNG108En\nM+h/CVJqrsbhTtSaixKragFw5z+1Sx8NbaOcg4d0LMUqoVLWEy7Es6QLxpAE\nJSnlEgucopQlxriJyCIc+nCfLDmneIPPujHRIDkwCNT7W91Qy5fVghUq+ITh\nj0DmiSQ7Kt+qmGDrVEWI6upkxiYr2Xhhnzy1KmegbcCJjuP36yvpYmQA6CTe\nTqBhirTRLJlD9DRpXjtFBC24A2keliXgwkiwT+9XimwT4V6Tv6feUlyT5gQW\npzQe0DRkY+2DFn+vn7dSltrfGUxgDtO0hHM38HS4x0it/3oMmWIRrxogJ02i\noaM6wmKV6RETOq+jtD60Oz4bGvMjATrdezuAarFUJZ4NgNY5QCgp2bdxVlKe\nu3LfsX1wc0uBNwjPUA9hcncGhEkKaw9hHzV6cIclGXchw0VTgSPfgi3yUwkt\nayeOFluumiVN8UBwqqavvxRwbzdJl0+gnLWKmtlTWuo1sSXxuo0mgLdmmmpf\nT4v2RSCncQtZXfCM0DeY/GZq1ADP5VoRG6If+YL93MRId4qLzzwP0rq0qTNs\nHZH5yY2fx2clfTwuk7P7fna5an9U2kAMCfkL/fh6XeB/94d2zX789XrKOekt\n+kj5Cy1upxutQwb7yzCCeDTy10iCkvh1K9D6eJavvtq8X3wHcof81MUchWK3\nr70k\r\n=7F2s\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAVN+MUOHfi7NLIMGz4KqHOQNzXtDwpemrQONrXourj3AiEA0CHLjJWOsG3/iKd9q7XE/MopJ6GRtVkdUtV4lws0GUA="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.6-alpha.9_1571592394311_0.10157600562988978"},"_hasShrinkwrap":false},"0.5.6-alpha.10":{"name":"@react-ssr/express","version":"0.5.6-alpha.10","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"83967de5d1babcf3f01560acd293190cf1b19c13","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### With styled-components\n\nWIP\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.6-alpha.10","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Pbh0nSZVX7wqRrCWVtkk8gy1tWT+XMBjQ/muGgh3EAp+9+I2QMCLIHxcpgZUmCX/3ROGK69AqyYXTDoWjzakPQ==","shasum":"dc959557145f1cc4cb0791322b5eda9f4c91645f","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.6-alpha.10.tgz","fileCount":11,"unpackedSize":27723,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrJldCRA9TVsSAnZWagAAAioQAIat6TRHaJ37z6xliTAc\nBHgHOOwP3F7WLZvkBOJeyYrbueiU0Gaj1deLWHnTauRehKz3mNWsBzGiwVZm\nVS8uM8A6AZUH900zYppEO99Q7dIKaNCc+fRR2YYs0CFst1FGB1WqXzLOYncX\nzA3aOcc3I1kck1mxZihv7VViA7AAiNlCUYZrFU13uYh9LcBmFevwPN9o12bV\nh0gcEA4HClBDG+xuMRu5nEes0EhNWbDUB7FnIwK0LJK/mhi1XiNUrJSXpkjg\nZbsNnX3mdKVeWMRYla+YzVFQDzJXTwSj+35p+11OOvu9yRreSYT6TGr/FUcd\nlHVNMIpOS6SnmxzEH4Fq31RV/5lET5TyYhavmKTPs0/1Cy759YAW++wfcDI2\nhp+dWiUMNAl4jCPHn18Tbc+kkzHZFEnArv/P4L+DL0QnYG8Vjka8HTvlp/6q\nA1ECk768JNnca7QBslsdC6BeUVAy9uPemlblsfKkq3JTuTVa0tYWQawdhWmQ\nKuRt2t3+UP9FCWaaoM7vsKDXb1gWtci8XqUmpKa7BVRILxEXX95N2r/ECu86\nLb7/jEvCkmQYjlP4DSwqk37sqTLsLwW0xWCElix/j5TdELrk6b1Rb0v+A5KN\nmKUm5S1FegOFFfGBaZiCtYqFV+kr4BVdtKiJ9PfwTfpmNgQa17w5Mafhvwl7\nzn3b\r\n=IKQq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDtUPRC9tHmx6bHni51TRufOGjHo5vvx+/bTd+KrEO/wwIgdW+hopcX2GP16iTAI+LzT3DUm6KibbZhEqSU9beZFKI="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.6-alpha.10_1571592540722_0.19328946954961235"},"_hasShrinkwrap":false},"0.5.6-alpha.15":{"name":"@react-ssr/express","version":"0.5.6-alpha.15","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"b3e3bc4d0816498bd21c1ef8824cd6bbde9ed956","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### With styled-components\n\nWIP\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.6-alpha.15","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-VGFeQncpYQ95ySDLhRVO0ErQCvVp0zefwQqKwXim9XwMk7Zhgom7fgLOoEQzt+cdBL8LJDT+5du88iAd3kzu0g==","shasum":"67fa553ed3e53517cbe2a627e37bdb3ee8d58170","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.6-alpha.15.tgz","fileCount":11,"unpackedSize":27780,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrJ8HCRA9TVsSAnZWagAAxb8P+wYulrE+vYVBXdnpD8ri\nEUaHwmSwiWbjsmtzC4YG1cyhpuujqwfrM/hiX59B4gVHgIftwwuYLVN8ohDO\nZFS+OqJjEMB3r2XC+JJM85K9Jw6n7rYpvRNiwRq0ngZkSnZ46tXtP6adNG0M\nJr1bLbFKqs/FMR2fTfVedeMcEKpweC6BnuiQbgTOS0m+92Yk9e5Zo6IoDbz0\nYUf/6AuALj8rVYy2FhSfImCijvOAU1Q70kgtyTEJL5u/irzHctpYebgqZHBJ\npHUMDTSJG5MV+5Cpu94f830hPubB2vMwAzYeGj8RXccek591Cd0yOmg8Rulk\nWnNc+5eGsJYht9suZ1BSItJhWOgH/5D/evpxkqLVLfVzhGcEvOWdPInHcsiY\n1GX4WuJIvm/TTYtyuXpNz7WkT8AjF0xGMWzAY7DPIK/pl3oqGgCaVfetuBgn\ngSJBugqRDwELanRUmKrPY6xDwYeZf2rVolog/9PyrC0DkpwKSjwGDaSxz4EE\nkka/7588r7vXwMOBMLH+ULmD3xxkR/f6eXuSjC7wxfAQA1gsFP5H+lokVSyV\nz4+8+i6zZiFXMQ6PY7/TbC3X0SNMCg/gpgkdeoWZp0S49i3xYnZw0EsDdD0O\nIJ6zQY+D+9+KgNePLSai9SXc4W19E6/wqmiTsQgAurnFh1cZcRRuWcXhh61I\noIxX\r\n=jU7D\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICG5v3UOSZJgX+AnYc9x6EdNKcvPxTBARnBiMUZiYTJmAiEAjwllFYefIeR0ULP+axQbchEcZ0IT27MRCZRXVV9k1u8="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.6-alpha.15_1571593990696_0.989016946436807"},"_hasShrinkwrap":false},"0.5.6-alpha.16":{"name":"@react-ssr/express","version":"0.5.6-alpha.16","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"31b231b823c39758cc78058700e34ab0609cd614","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### With styled-components\n\nWIP\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.6-alpha.16","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-H9iZnGMdVDR66e5fqCwl20DVAj/Cdisaa0CQx3oYDHoygbxgawnm8fZhbz1B8gfoVGT+Vpm4MWhAjPattfy0UA==","shasum":"eba233c35e778fe74445ffb2dec12225c33eafee","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.6-alpha.16.tgz","fileCount":11,"unpackedSize":27607,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrJ+OCRA9TVsSAnZWagAAhm4P/1Gs8O0cNU0kNyRfV4MK\nsd5Ls0VVooS4prKlmQeWW54eBCFY9sddp67LR6JFq/uaAbnCj/v32u+9W1jD\noR2HYYo/U/jwGGCmhC0fhMzLvtjhCOtwxy0NSWa6VfiXA9O3eEDDc1UWezBR\n0Ez2HpTOsQpM+WorK8IWzEdn60N8onLUiP0B6Wc6cohzaCmG+lwyJNDO8SmP\nfPQkWi26PxT8XkMjJEgFMYa0NmsiMBfufvPPl6fZ1eqiCFQUnLyG4YNx7llr\nlO8JgA6dMPTXaXz8zuhHj7T6FveDZRJbqeoglrU4pBMuferFrM+SOwM/g/jf\nf+NwJutFQJNmCgSlfy3M6+8JKGUToT7T0zNrU5i8b0oqE0+bIkqvTeIFbzpf\nukvHX8FxhnqVk9qZ/0Vft4/vcCEy5gSuv68lrEBnvzBpxkntRVFM+wexZQOV\n4kNrhHrQkanvz0N6idmQZuNXKadvvkE55EWWVzhlPZj3xWyqfGSrhXp0J776\npQ/pbj579YQVwoGCQnYeBS7wErME/DI7etCSzzhDmbnhoiz8e85gNuAswZn8\n2lLPjpP4T/IFyQHfmVC8FlzV2JUuYvD/a/PI8P5pGuO1+PuHGhYRwKllH6tp\nAd8PQLZCNn0HOwg7kOtUxiCMB8jVfbhFIuX6Eok9zxvgkKQLD5EM4b8yXhbI\n95cC\r\n=eDQm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCeU8egRv+wzjAyv/yWszlw79WHVRuEBdbdVQ8GjJLNVgIhAKNyLHCq0WkWBUBOwTcCidjrg+Wk1LKOjpWmcas1Rwt6"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.6-alpha.16_1571594125832_0.07768761067757501"},"_hasShrinkwrap":false},"0.5.6-alpha.17":{"name":"@react-ssr/express","version":"0.5.6-alpha.17","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"69025f18cdad3e95ddc939e3980c216f755208e1","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### With styled-components\n\nWIP\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.6-alpha.17","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-cb88hHYSJVJtOYhZ7pKQSSs3CQ/nGy9k1dROM1lsyhrR75pE5byGUMeaHxE9tz0ZGk1mRKVxMaLYMPUV4duJiw==","shasum":"e379a3297ad536ef343942e28d7c1983ed3432de","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.6-alpha.17.tgz","fileCount":11,"unpackedSize":27622,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrKBRCRA9TVsSAnZWagAA+0EP/0jMEj1iwltgwmPMm+cS\nDhg5IHf32A6P9VinLhMr0ltnFicJr7bQb82ArWFaUWwxdh5zfy2KVHYBwe4l\nZZu5S1c44BKQ6RIJcCec5RVdRHqwhGGC5jNXDa1tb4C3lRoMtvAfocvrjvmY\n4zEizPjrFNgeTvM3NscRER+tuIxr0Wqibzf7eu6CH+G5aUr9gOHQrnQj5Xxd\n5TdEBigs6egyXri+UM6nG9JYrg3ZY9fzV39CLIK8QsGdngvCmlRYgCUT45Lb\nCbKPciZMWzsZBRuT/63w4TJevaq/8CTxOoILIdWFfCZASK6O/9Tawpsqk8ni\nBmUYRbxPd6O7cr4Tg3NCC16ZZKhcyrRgU6MxOLmpcFR+xQJmTKYsO5X10iwR\nmaU+744XoXiccAzUB9vdJyRnRyDWH/6fZLHpXCxUURUslhEHi4Epqxkdpx1V\nE24z+QOgaGSjy+qd/+RCjnqrjVkWrJCReEfyjZB0DNOKkwLLWcviWUe1xlG2\nYvFRjhZ9Xzeeg9P2IvcH1XsFHiFlBJfWe7Dn2X/zd0fEXVP4M2pFB5ljwV/S\nKQyaRQL2T8xSM4SnCfO0kXDzB5eG+jS2yYDzw4Zvq1XU0eNIhSjqJUrwgZGS\nPjRPBvfcJAw8I5L2ovfyqpar8t6enSUCcu5cA12h3DXnss6EmgU5dwgmWPcJ\n+/g1\r\n=JMpS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCmJda+icL/T5ODtjoRJ0BDgnpJdesU1kPgp1Q6P91wuQIhANC/hIZiec1JnFzdkwvz6Sg14vT3lZLg22HXXUbboZLJ"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.6-alpha.17_1571594320974_0.3545834964111314"},"_hasShrinkwrap":false},"0.5.6-alpha.18":{"name":"@react-ssr/express","version":"0.5.6-alpha.18","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"2c1d66cae6ee540c5e8ef510d92850f9c3e8de3a","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### With styled-components\n\nWIP\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.6-alpha.18","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-CbETB3lXs4VmnYTa78kBcSX08Fnw5jv3xdoL+SZpkKhoPPLF74R5yIAJ6nMQG8dHveu27rJbcuOPofpnL4oxDA==","shasum":"c4ddfc698faff006cf40a550ecc15562f5634fab","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.6-alpha.18.tgz","fileCount":11,"unpackedSize":27795,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrKO7CRA9TVsSAnZWagAAmgIP/RD99ZoHmb4pCy0q2gc3\nTq0gkfJmX3touLb6HyX94oNC9+iO3RiMZFNt+Fw8AONgOAxCOY7jHEJz0+2Y\nQeHUrRhVriP0RWAqAn2ZMahDgKn7zT/W7NP/ogvRbPRNRhajSRIU63XtJSpr\nYpDlBjkTXBcp4bRqS7/tJXO2Z9ABuwraTEVKGw/DhNMQhzHmM9nPmtxea+l1\nRrCEAEWvPUtGQ+6sf08FJYOGoKKFetW42dpUbTiW/kOPhTU0+I75Y/TnR/3q\nu8C9MQUg9Bh6w/tBYOLJbp4QZRGdNtIMHTgNyqIJzhruf2XPJD67ojQOI577\n3VURjr0GAhzpZNB8ol7/D0kpaTw0hABAOrGAWqif6wZtJCf3r6SCWuf5vcNM\ncs7Ge9JBwqguLnNW55zEBr8sdtYYBnWyb6V0UOq61ptMgLRXD+43j4b8odrJ\nfiLF2PmRe7H4y9UZGa5b8aPGK4GmhLfTSCu6Bv72CIE1rizec9BR6/WzLMFd\nCrP9+Iu1uuP9RKx3HTV5RCWxJ3+Bf/Evo5xAGjlR0TXlXJachsLyjGImeXH0\n3mSfTLeJLLThGBgmAjc7HNJ13UUAP5usuBJboLzujj9KU8W9HZxpVG97wSrt\nuiFDT1s9jxb07ygYg/RBGOkQulPdNATK1ITIBGUpJ1loqk7W+6VBgvq6Jc2Q\nftg/\r\n=DdBt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCcbl54XI7spaVZrkE8Kj50JFpTH0XUhbdjPe0KjZoz1gIgKVVQrKA8atrDrcBqATiCvVTxkxqNiu+Edk/UNLSRtLQ="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.6-alpha.18_1571595194550_0.7265787929555139"},"_hasShrinkwrap":false},"0.5.6-alpha.20":{"name":"@react-ssr/express","version":"0.5.6-alpha.20","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"725b8f8305aa7b055ffb63fab8acc42aaf9fccce","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### With styled-components\n\nWIP\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.6-alpha.20","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-y7CUMq/HYtaXj8eFG0Fu1Mg+r/isc/84yx1gbfwEZ3dkZQWhrzqJ7tqE2GEDNis73WwGZ0kIOuHoJ2EHEeWs1g==","shasum":"dde73f5a760723cf13b05960fefbf2943e11dc44","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.6-alpha.20.tgz","fileCount":11,"unpackedSize":28460,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrKh8CRA9TVsSAnZWagAA5z8P/iTOn0j2cfda8C5D0kq3\nI9obRGIEWFp1mUiNiEvUpEBFdHff29pb2LpPmcgAfyKA0WazWB34s7nisIdX\nxcMquiT85fMYSPBS7K/gjnBLQXsfLEPbSRLr1itanF2hnkWwFNfpikEZT2RJ\n2aHe0aqfHUul+wA9bIghBMfohLG2d4fEM6KnAL7d0VAigg2dfDom4hkz+Rtq\nAY7Q7aez0cKcHwIADRqNNGsjLzQ+lpUAOA/593/LWkCYoIGI6Q1ZePbG5Jpt\nlSG9nZ5EtLBjruI86dV3gkLg+TgyxGsw2UVlNTNGY8ajAEjUJU3IHn/vJW4O\ni7c33od55D2L8ODvp3czZYtws0CtVOzzUwItenMpbIOwhXz6vTkQKGB9OZMw\nK99Dmxfp5hZr/TNAMBkgjLQS9qLAO1j9Tn/EqohOCDB0kMxzQNqcQpbNdWJv\nukTNbAJAcGY5IaqWFG4n9A68E35ypSc308QsGGXTYFfUmgaeHZkUfziVVk1L\n4eWo6zbB7FWapBExI2pv4Vnzf97tF9PutpVJuPi4saG1MrMeM+8srEAeBW5Q\n6Z9FbgEIEJrPWizBHQWjUzryZ83N6Bp1BOdJgsO3r7bqzQtDKztjq8C4fHMK\noWEecSbjJd2Y6jwvrriMleT+cs0hPcLBQTFPXjVF5FnRf2JLu4xSDz2MVAoK\nSuWe\r\n=ZRrP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCKevEhwl9E/g/jdP1txVHZpXJ3jZhsy8kQewDXuaVJpwIgOkvgqJWf0udztd3rOtlx8lHJyRfm9jNq5wRLv5FACyg="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.6-alpha.20_1571596411524_0.9967598208979058"},"_hasShrinkwrap":false},"0.5.6-alpha.22":{"name":"@react-ssr/express","version":"0.5.6-alpha.22","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"88d045f033c00a8f73ed2bb9eac9989ccb5ecd14","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // script source: passed from the server\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const {\n    script, // injected by @react-ssr/express\n  } = props;\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [ ] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"babel-plugin-emotion\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, if we use custom layout, specify `data-ssr-id` in the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\n### With styled-components\n\nWIP\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[saltyshiomix/react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.6-alpha.22","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-LOE5xdcJ9ZPpueaQKkodpWNl5cIaPxr0X6go2ttoBLre+VTQcaF/O0o8S8mThnRVwF3frXoLImqynHfsv9IJmQ==","shasum":"edd53779e9ad46cca232281020b81aa135b6f121","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.6-alpha.22.tgz","fileCount":11,"unpackedSize":28790,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrK8FCRA9TVsSAnZWagAAg8MP/0ONzw7G9Mu55W7YwL4T\nBSpY5OZ9SUWd4ODiWSF4HxGf1rXRxrzqqw3CqQef2GVhHtUAUVOQ9YO0swqc\nsGJWQzBg6cBR8/1MwhZa3bmRzDvkmOENkWf6n6t2YcfceAk9MFnAGh1A8/Oi\nFVHYHfJSqjyzq+ZHdCuZL/aS+C90PX3LMHM0mLkn44LiKi8JVQu0zl/6P6kY\n5w0XQtIIrpOoWjvxell1sBTLa6XyVU08R6WX8L6wHiGHk43fzR2QREPdAMKS\nMvpzejlbduLdppstZHolCMU9jSXzypSGAJPAC1A8+aVMaUpzGEbtFIocySuM\nxQWfPXmjb9LaotcqXWv03OLwHibuYV1KyMizIGExVduI6dLpSJuArNnGU6OQ\nraZFYCppKvac2deeim1IKurbiqH6ypXZ34lkhPigrLRuom2eiVkFTjJ70DZg\njg7T6fVrx8dtY//+GsAk+4oWgQ6jUHTXnfHbXarFPOaxA08spydPKiBpbycW\nhvYqAaGyqMPtPuMNMOobbnx76a2W9Ey5ichH+KSrLQ4ysYWqoUtpQDyymXOc\ndnJXaCp0JCR+MkaxS5N/nIqFRYN5oWd/0JHHMumzx2Xp6FJ7UMwyK2b1TBzi\nyq1rwk4AXLPciww6wImE0ibv0c1zA3w5OYOe2F1K8OW5iVw6t61n4Om9F8y5\nHOi+\r\n=6Ftv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGVrqcze+AWisulwF7Ip0e4RH994QV4XIdO2eedb1ghFAiEAxb/NaNDGy7OUf7YOCKmYYxt7SRN/1P3Rgyp3Xyn5JNk="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.6-alpha.22_1571598084444_0.7671644080270081"},"_hasShrinkwrap":false},"0.5.6":{"name":"@react-ssr/express","version":"0.5.6","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"2bb4543a6b250df4de4f1160c1ecf19fa1a9d06a","_id":"@react-ssr/express@0.5.6","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-x3AJeY2RI7/ZjyokaHB3Sh6syixSQCRC8ourqIXku8P0NSLNNjERTSXyrW4OIrvUEw+lTIpbkqbbeH5EL65koA==","shasum":"bee2d6b27918f677909edffa438e8bf27bacbf11","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.6.tgz","fileCount":11,"unpackedSize":30297,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrLUKCRA9TVsSAnZWagAAJ1oP/jAMSSUsoLGaTKSGp2NF\nO+mhQ8AvU4EE+ZSPcvADKiZCuuyVIQ5Kn4R5WcmvE1SjS1nb91sx9X0jjY5Q\nPEEIPkAwEtzpSJndZkXW1QoA/Bs6hlZNmyCzkvYz8zk236WvpaKPURpSTg+x\nhb1AIhBhI2l7/o+znWjOxut1Gdh0s++tVAgHau8MLR8TsKdsUQuMsQ/6jfgo\nOIh8SXFLA/qI/zgaWed+uT5bSoAW5+lO0NrSsRERxrYx1t4qjZeXzXmr7ZqA\nFu8i77gt2cxeNWLGXdSvDAsBOPYYY7piSupAyh+tP8p14jHN6edZ5RZlm68x\ndR6NxjewBupRwCFyknEEhNoaSJRZO7Z4vt3DEhtfmufDGobEP/KIFoAVmr60\nXejiP+2xCTWNb00EmQi2Q6PFNPx0ToR5cbLyzIJlhZYkFjPNWnkEFZWaKnkp\nQ9jqTYAX2f5PobrtoeUTfLEsiSHgV19VeJUTNeMzagiOTIHluyaBR5FpDN+E\nK/t4rn8E/KAp4rBlRTEzIIitgLL5lSXXXOLDgGy/FRl5Wb322WDTCmwsvOeD\nOt57tfv7NqfP6jRyDv3gyoLC1HYiXLYGsIQhL3rSOMdTo+ZyAKU1GSwn/EdC\nf26qNpCT2eiCtChtqp6QuODRE4hVbVio4UtqfFrJUGh7RekwFSXebnqJBGoq\n+0Ah\r\n=82iG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBWC+MvDiGKABttmNw05suhD6IQpAa/7hcGxr9Ln/nleAiEA1Q7fKiAvjtk1gTiEkqes0ntiBNZSxuExsoPvBUN4j4s="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.6_1571599626265_0.0757409184762945"},"_hasShrinkwrap":false},"0.5.7-alpha.1":{"name":"@react-ssr/express","version":"0.5.7-alpha.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"d9294ac8e3a0dc0f9f31be9565567f6153bafd4d","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.7-alpha.1","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-oGvrh7tdYMcuNjfbodggO+5y1YvKErL5MuhjzqaBIKvunJo4Gf9vyGVMYbUL5EbH3/qYoBmRmtAvo7QGDzCutg==","shasum":"7b200287da10e9a11f9fcf23cecd79cc67b20428","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.7-alpha.1.tgz","fileCount":14,"unpackedSize":42332,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrMwyCRA9TVsSAnZWagAAV0MP/j0o3xMhutYqC71Xe9kt\n3C9GP9sencHqPRfI+79/cHtAqfAgKjZSrqvpajiPRHChWzGZQOQTUE2Oix33\nEryBvenhSZ08MD/t9Oi5hyozRXm71seFl1ReiPS9LR3cxN4K7BpXIiTMRzxZ\nF2ttsZECkI42iAGH53hwHqB/mX2GVmr2/zSxib/jAssdCG8WnQyhm9BM0bC0\nvoz1jC+d9G6ndavZAeaBnTr1h0jFgQZAovDyBc41c27Sr45r+ni1GqE/1eiC\nj6sv17qLqQOWdEh9FmK3Jj4BKI4Vw4l0bAtexpQHZh51aTzwdErO6YkbL1Xo\ne2O0QLNB4WVNFqiUSww1xhsc7oMFcvfgAOdf/8lz/Sc9LdeBWF0RQNboBG8U\n+9DSfB0Yhqs7vRT8YTBnz0WYYrGfATsWi3exjaChKGJNYbivTfiW02V8Aydb\nOWHeiW8R1iw8vapH6WeL4J8Y60BXzQiuGdMEs4vKHe4TzAWC2mkfsZL1hpVA\nDEf1tX8N5+Jr80AOkIjvm831Pl358Ix5n0IltBAJoRDtS6193XnITbvxsatH\nalcxzSQeid8yp/YjIkxdd6IyjFuZixmyEWN70dNlU/M8RQFulFb8bCX9Ac6W\nstqyDGG0oANAOwwBA+MM3jJT4pIsaU1QLrIh7dqnzbGtMDXXOkfKtmxfoZaq\neLMi\r\n=5KZw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDU2UqhEPRQBITeP/OHw7Wph7hBgJ4gxOlAcIxNgQVeygIgBlULIFs9tRhz/67L1sv5C37cyNAh2OKpj9LUDUrcRao="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.7-alpha.1_1571605553460_0.7631481015718624"},"_hasShrinkwrap":false},"0.5.7-alpha.2":{"name":"@react-ssr/express","version":"0.5.7-alpha.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"4ff4101034e05c4b98f42ca3429072d60199ecf6","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n- With a Layout component (explain it later), we must specify `data-ssr-id`\n  - e.g. `<body data-ssr-id='emotion'>`\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.7-alpha.2","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-EELzHLjoAqKt8IodiOMW5DX22RKNQMDB834JZhuBOT8z506kVtD6XeehVv/s2lsFza8TuX2TMfuX4oQSxJ+3sA==","shasum":"2d0555b59d6773cf9eb50aa19bab4b7aaecbcd8a","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.7-alpha.2.tgz","fileCount":14,"unpackedSize":42352,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrMzfCRA9TVsSAnZWagAAwFcP/iDqt7kQhBDXInD9TFWb\nujxp3HvuafvceZIMpRBmjTavZ/j8XAjg4cor3YFwU1zpfHDaTyo407LLC4zE\nLB+QvZ0OFKXFxfvKsWLhQutxAkcDX01zRgXy3QtzQTgRfxoWeP4RDDplIVbd\nW56OuAmVsVgVkwKV1OoQVrEzlOoGPf0Giz1zeDYaSA7ufDu9PkqZ83xZ9HVe\nK/CPtDOEpLYnA8DG+b8J2iF0yCuJEug9D9Q3aEkRoVc/4fIj/tcKLVpBbSzk\nKFQXW5hGYlpEKka0uJ08SoeAg04Z3ttJbkbktMHA9L4vPdE/NTF9WfsJN2zi\nZE36aJU7oU95s8nL6J7Jz9o/expgg9TKcf/POd2UPp/Jt1r9r7WgkiWSKcIM\nVckVt9S4GjCfKAu/LbG+hvpSGuwlvnXc5KNc/t3VL8HNAM/dKYZjJxss4IxQ\npQCVtjXimqwNPAFYacpJqO4BAP01GlyEDwE0cWW2xmZJcWcpxFvo8qO2q9pD\ncExrSdCCAEcnfVFOz7Fsw1fl3uBtpwtrNX22pHzXK3B0vMv8MyC2PFskmzp9\n87Hmz/AjLWRORFelBhW6wIlpmPgLb41rfA81Soepbs7eZG9gvaCSJ4DOF/rr\nn6hKTmgiev5qUDnn4h9BZ/oD8uRJprN+kpWY1NmZimkz6T2Pbh6XLR6yz2y0\ntdqk\r\n=d2Wj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCXWBmulEzhDzaQyyNctnERK1mc2jRAygntB/oO4maJ6QIhAPzcM05ViAS/uFVKrgu2iMWtWXPbYjlTGLBc/mdy/hEg"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.7-alpha.2_1571605726920_0.6834368365018668"},"_hasShrinkwrap":false},"0.5.7-alpha.4":{"name":"@react-ssr/express","version":"0.5.7-alpha.4","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.5.7-alpha.4+9d0fcda","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.11.1","@types/react":"^16.9.9","@types/react-dom":"^16.9.2","@types/webpack":"^4.39.4","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"9d0fcda2b9e799d761b88629b0140ce9e8260577","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.7-alpha.4","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-KzVYxxw0QcpzTxjLHqh/cBnh/5WpylddPmiVpxMYzkAnQ1GQPL477wB5XEDCf9YpFMrcJE1MBWmXJxtHPbGA/Q==","shasum":"0868a9eb9925173164f8740a071fdd9925644b9b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.7-alpha.4.tgz","fileCount":8,"unpackedSize":20078,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrPdLCRA9TVsSAnZWagAAcFoP/RrO/uWE1hKYkb/WGdXS\nK6DwSuWtAMlDjgOfgtai2JEfeA9jfbjThgGl+JYED4iFUoJx6TRxfUtYQXTs\n5G07JQCbJBgkzRLwzGQE/oo+qMh6IpYsh3RvdwN+97E06Ify70pUJgvNEaqu\nUgiU8LEHYZrhtuYaMcMqm/t7RIh/EvIpooEcBd6kvI4xsdI9UJKgRzoKUh7q\n5fje3Lo/qZd1rusyIGoB+OWGx3umPrNbtTPJUYCj1qraDhl/DesWWupJ0Lop\ne5ps8psfHf19TVYDedf1HHAQUAWn91nMC8oUHWAgBAl16ooQd7ruTgf44J0T\nZmWqlTTVAO6GDJRLSvK5yU4ljQdskKZs2l+sNOLhPh2Y5RKNL29a9qVktnN7\nGHxSX4/Un0Br9F2PRpllVb2upcH0mSMUh1lCIPSktIgFlWeWmylIrtepUq3E\niRghX8Gk9Sdaft5jKfBtY6LyA0CWCAFKbueILaP4FG8XdfawaDsjJeQMIDHb\nOSU0kglxk3Rz6MWO6XbXVtM+tPZOoqeQP38INXUfsrgeyp4YoJqqKJ9OzTjV\nDG0No8SJ8/XxCYKno6GImJUMDolzMxCmgdqWMppFuJvTu8+yEHKiLySF+GFe\nzFgaQXq4XLdR/8gBSOBHFoEzzKzBAocW0kYnPjUa4mCG+Fj8osN+sEzuFNZq\nYclg\r\n=v1rE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG3zhi/zhceiYje4KhJAfTcdXkYaH+GwdBep18ZSY8JMAiBy67XnQClxY06grNBdDjrz6/tf1HXT7O0yu6ZXAZmswA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.7-alpha.4_1571616586558_0.38620214853041324"},"_hasShrinkwrap":false},"0.5.7-alpha.5":{"name":"@react-ssr/express","version":"0.5.7-alpha.5","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.5.6","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.11.1","@types/react":"^16.9.9","@types/react-dom":"^16.9.2","@types/webpack":"^4.39.4","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"5631ce432a6d1064440b1e1caf631e47e3b208c0","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.7-alpha.5","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-6Pqyb+XTYC6qngLptD/6fpC446qEls5JMuZE2z7HgYci/myAN6aaHSJiY1FE4ysBnDQW26XjaC65cyPzwgcKTw==","shasum":"c231d69efce0d9543280aaae16aed0560e0221d6","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.7-alpha.5.tgz","fileCount":9,"unpackedSize":20137,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrPgfCRA9TVsSAnZWagAAaPUP+wWHME2PE6QhvR9Sn93E\nWp6PTj19djLXlVqz3UKoXEtGOg/XMF0r9oo4nKr8OEMUwHKxE1EhsKBtHHaP\nb4UpjL/EYXOf2UWxkRJFVBIbPa/HC9HPB3dWfPr1f60++zRjlYPQjRHK3gaV\ncLWbXAVcuvDMd21w4yge9JXMtf2nLagBufVGEaPHm6u2CyMdPm+Tv1sUGUaQ\nHQrkhlBa+io+Ir4wlN8z9nb22iTqia3Ji1wMdce66tGBiJcOFA4voIKkaHQF\nTT2guBI0haEHgv1xFJnIibhi7/0zPcMCWlT4YHPzMdm/XwXg5nXORgvv7CmN\ndkmFieEw8au3+svH77Si8NiL3JhsZmnr5lCMCRkEltPTovjsXcBnjXWmRace\nSgu38c+c8Sb7HI94kMI/6209NO/Guym1g/LY9+aW2P6M5GYEYh+J1cXLd67s\niANLqrRDW5U/ktiZyaWRar5GH9dt/ZU4ln+6d9QQ6jJZUL23+pSiIMY3+16C\nrnEbt/RkDq3+8WcW3sMrEKM9VBbCzJiwRSUmZa2HGwQJGG1LeiH0KmMUCi8w\nmowSeFwVceV0waelVJL2k007RB2RxEAlbR1y+fnbcVYjh1QYNht5Z6BoYxDS\ntreWykpJ0DrvaTLwdk2IMgJNPkmNBiC+c004353/H+qQi1Dv+pFVvJMYfZ44\nAD01\r\n=y5YC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDx/LQtD6O4dLHT8+blPQvCoWDL2hgYeLcp3RhHjouMeAIhAOq6SUZKGqbVNbc5avETOcsmzY7mzS+NhXWhsJZeI1N4"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.7-alpha.5_1571616799001_0.009261565108745762"},"_hasShrinkwrap":false},"0.5.7":{"name":"@react-ssr/express","version":"0.5.7","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.5.7","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.11.1","@types/react":"^16.9.9","@types/react-dom":"^16.9.2","@types/webpack":"^4.39.4","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"29dba97c2a2c389e00ca467fa8e1f23e9de2b143","_id":"@react-ssr/express@0.5.7","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-fy0jj2sMYgOTVacnfLYOE/RiF9eC2+sVOQAFGF83iGdeYNotlR0NgqdBQHQgIq0Wv2CyZuoftaZD/cT6ZYemew==","shasum":"03ece243c8a4ee624eed6ddb3de7591568be653c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.7.tgz","fileCount":9,"unpackedSize":19501,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrPkkCRA9TVsSAnZWagAAryEQAIR5oe6NVOOQWOR3MtoD\n76CQSpDf/EBDO2NBULA66W/U2E10FKSP/G7g1/8Z6JcO6H2jYeduloqy5XL7\nV9oFnxG4ERI0R78IH/K329bOmQXGqCeHMB6sf630lGDi6gsjmILCo9kkkdVA\n7BKmc777OOdY4v3vKNaZNvhRg6HPmkcV9Z44JU5Vw6pRErQ+TIPNY1u6ZDA7\nXEPaK5UjAmOGCHQEGBtfS4fB5skaG7IVV80qmP+XKtOy9+/9yAZRRpW+XOl8\na92NdDr8XLbZryyz+DWUWTVw9YG3Vlv150KpKeHssSGQuTCt7QSGqsD07BQZ\nX0J7zZdWTrFh1lRjSCSkonqOlWGXhlArZcS5O+dZH/ivfJ60VkAhbreZsS12\nRkBRj/n1qRED7VC97cTKGENJUZIwFYQMLUbQ/cslGdFVtOWBzvab8ceg0CFS\nVyl0FOhXor3mRxxyIF0MFOVypfG4ys9E7CPOgEStyJfLHNP8Laxyg9n/Zspz\nMKyMbdvR8EroAUE+R1NGI5NKVPito+qVoknkPNNuW13TTsmgcr1yDQ7eDGge\n0PDgX9xbWKtNm3JC8RZUcPE2DPzNws4Hc9BfSRMBjgVq00N0yU8DXK1Fde30\nwTb55o8WzFn2D9qXGCNh03UbDZs+x1jq68HvbohWS1Xw/a3pvoUMyexbp9zt\nYUIC\r\n=nRQB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAnkHH7CxaBTRSn0vFDRiboEgjwhlFVDvTXCCdSznFPxAiBSDdEVYP3AdoPVpwUtfrRDHqKkzmNjCsxK7Ggo7OU04Q=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.7_1571617059518_0.4939182034232461"},"_hasShrinkwrap":false},"0.5.8-alpha.0":{"name":"@react-ssr/express","version":"0.5.8-alpha.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.5.8-alpha.0+ec27d07","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.11.1","@types/react":"^16.9.9","@types/react-dom":"^16.9.2","@types/webpack":"^4.39.4","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"ec27d0726b2f01242774aacc644ea5347ad29d0f","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.8-alpha.0","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-kbQn3P/vxZ8OD8S1lV/X1G6ZeZa/bAuNQ5rDYBGEIwB84Y9/mOmboaPY1yEtJseV3KdlXgIsArRnt66L3Rdh9A==","shasum":"01df2b83d849b43e76640fceb0fb1fafe1d35ef5","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.8-alpha.0.tgz","fileCount":9,"unpackedSize":19595,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrPp5CRA9TVsSAnZWagAAeZYP+wWxLpMguu0P/YrwrUWv\nPHJAK71qsMVMH47HNdvjfmneYbFWAcqvqPr307cwT/kQE3du6J2FIysUuT0a\npS1Tc8hfW0mzQqmq1kh2cKcpGRffj4YkZazZ6ZTc8WyKQcJciiutboDdlq1N\n+ZMvVG+DvxPGoYuehYZVStci2O+8HSI4b0xxipji+x1x2n32Y40ktHWCvzsm\ntVJQl8Q+IEIs5HFkehlkyCvF7mj4pHXO7fiQvwGII1hCgpvSZTdHIEg5GZAy\nQSyTPI4m4yJaHk7qhU2LmKbtXK8tLLuj+QoCPx4mT0wJOe7XmEkXxLV4fN4p\ngyG583N6CxJybtM6hdU6m+TpyYmt0v7cbwZ7H/EJcNW00+nR72M3mf0NH/x9\nYI1OwW5C+2nTNNldD8aOCCZnIZvakY1Ph5CDmDcK9yApvq2fYfBx4lTUPOK6\n4/56JiaxLIqJnmUwjUNNT9J+tabs8sh8OHfOQlScyPucHpIcg2cHeDUNXCAz\nbCHtbYdfXiGx7dUFJU1+Uw2fpqVdUEldCdMrOpOGcF18j+EJ+lPDixjgXSm3\nEVOceDshg4MhzH2Am85WI0H5vgjqAA52iBSYnRTSZTP6ENWLw1i7dqqow9IK\nYVDGX52uiz49DV08NBESjid0D5pjSLCvMKJ1X4cHS9RQbVaPq5k6BOhEIuI9\n4ztk\r\n=+Gq4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDFzZyYnME/Sy6bAhhBMSR8MFKK5YFk8QUl/iBeDQVVsgIhAIUapPdnH7z/clLYm7RHU/2YNSDXtuuSIKpUbW+XoBvR"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.8-alpha.0_1571617401184_0.17476601756668386"},"_hasShrinkwrap":false},"0.5.8":{"name":"@react-ssr/express","version":"0.5.8","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/register":"7.6.2","@react-ssr/core":"^0.5.8","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.11.1","@types/react":"^16.9.9","@types/react-dom":"^16.9.2","@types/webpack":"^4.39.4","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"285436ddc2b134ee8561d3a9716fc90de68ce885","_id":"@react-ssr/express@0.5.8","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-iD+fsiimQ/1YOmKA8K021OSTzIe/ENVsJJAVKJ8zJiG9V1cmLulEcLZEWzlLA15unMq2YVmJDrWweknqQQkhlw==","shasum":"db5286da9ce39cd13d89d14f0b71d8029a9b9e8d","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.8.tgz","fileCount":9,"unpackedSize":19595,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrQGACRA9TVsSAnZWagAAHtUP/2s2J4NyyHZXltJogDcD\nRL1aPk2vX9NOqciPbZuk0WxcO/FEKlds/btRKidqyIDVvVBuRK4cMz/PIeSS\nw5ysSyVhZMIWLsTq6GwsIxhuOHoyyE5aKTzDbnOx34+/pHwn5tMPLontLvTP\neUFY+VvPn6g0Qw34XRj2bVlMkOt8Iv4Zv9pd1rhXKhutVEiyFHH1jb/fjx18\nNRNCNMjN8nu21Cjjo56C4p0u4Uk0jn1OxCtQ/MSRAGbmP0gMVl6I+bdfGZx9\nqTYVlrzKZ6nPcF+DP+aEYxMXKFJWfo5Q/WjWlhLKxL+SBkSANcfNHhs3uJ4M\nxf3R6HlCNQNgNHmloYZKCCq4eQqj1hefm4yr7edh/ubM3Sd7X+FKse/CxmgL\nELHLE+YdAEHaJ25KFg3EtIUEk8G4aHClBmfmhcSpkxdpe59WCsfXMlexL6Bz\nWWiIy9trlBZLWiaEOBlSkPvxOuSBYo8jaSTeALxZi84QmmAQJz2b1UidwG2G\ni8DuaxUSSzowW3Ne8RUuV0tsmPMt/QTZw9QJH/r8enkKFSTGwhzjmA8YF+yR\n5wBheC1HSP856/yxL70lmqaDsF6MkktMZf8sKrSv1a+OE6jST6mb6sFF0DJ+\nq4Y15h9a/Zvb2txuQ8WCoTOWmMHv3C75vArEpKW0wkfJHUbuosXATtCyELyx\nHtEm\r\n=JUpD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAERqtWKkKc10/J+N95S0C0refK/+nNCpPHQO9VzzpGxAiBi+6erYcpEriD25hNPao99IhZ17HJChAWfu4p2sxrkcQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.8_1571619199652_0.06893485941847666"},"_hasShrinkwrap":false},"0.5.9":{"name":"@react-ssr/express","version":"0.5.9","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/register":"7.6.2","@react-ssr/core":"^0.5.9","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.11.1","@types/react":"^16.9.9","@types/react-dom":"^16.9.2","@types/webpack":"^4.39.4","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"c5dd8762944c9afb34e9c0883353fd54b7db2ffa","_id":"@react-ssr/express@0.5.9","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-y6uBngVfYPP4igykbZCzA8HlXi2OxhqS2XyIXuMg/kC8mq0gVlUEu4o4YRMFCNZeOkxpCfc72OWFT2hj+FZoeA==","shasum":"a85bd06dd1fbdf88ec3389e8320199d67fcfcb22","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.9.tgz","fileCount":9,"unpackedSize":19595,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrQJtCRA9TVsSAnZWagAAPEAP/1/7Evyk2vNoG+OXcU+M\nPEJkNUq/PrBHQ+KaKOQ28i18II8ReGcXz3mNQ++oWdyT6MQrmIyyw0tdNEvj\nNt5YPmmYlWH57vlGS2NRZF+/IDeQ62InMZXhXMAM3DbnjDWvpZDAFj31h0XM\nnM/KpRLGMxTo86T0OI/FpgLCc2DTVvde9Bq8vF59rABvERXtxDSEkZSdQovT\nicGL0wdkRoOw8N6zE8PkILgT71d6FEIlUncmr9TlFlRHLREQR3C0t/udo03S\n9gB1PGZEP+1UMZNRUR2SHAX1lXGx+YBkihmuGz3xR/ufDFa505dyiR8zBQv8\nV+nX6TzNeyF3eN5/H/t/4lxt/mQwtOcHLng/e3xwRK7Lyrf1LoD0JYuSf6uy\nsk+PAiyqJW16Nyjv/FfAWpuGSLi7+oDw4my3OqRqT/jdeR1egVwo3RzEqI8H\n6wyOnowOU0NvrjCNdViQASODOefeWlVCl1fxsEzPmJP2vfU35BWE78xweOrw\nWFrNovwbKNRkTKVST3Oagvq7M2Hl6yY1MxzJma9vE0z5QNYm0xAgrlnUV5XM\n3qaJgcxjV7HYCEAmB/4lUkR0ED1JK96EAKpEs9n/a4hnf+Jxdm27CgK1zM6O\nwaNni6V/zhuIVQc+MJmEamQZIwYmepSw+G33rIEv9kiMYMDnvFN07NHi7uqy\nbZ6e\r\n=lw4C\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE+/yKDKWlryvDF+/4n+aoQn8rkXSSEWY3usEXB+BB4tAiBPXSuQK5hiprihP0zaRVWS6ImiV0LOcjrSrFULo13WAw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.9_1571619437299_0.11908206220644146"},"_hasShrinkwrap":false},"0.5.10-alpha.0":{"name":"@react-ssr/express","version":"0.5.10-alpha.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/register":"7.6.2","@react-ssr/core":"^0.5.9","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.11.1","@types/react":"^16.9.9","@types/react-dom":"^16.9.2","@types/webpack":"^4.39.4","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"8d29444b017876750dac28590a07d1f7c91ad61e","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.10-alpha.0","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-F7BzIEPeIMpyJ2UwnIslbr/E/pAHbRpw9sictcp5tOobIKeAIyZ9u+yxr4+wL4eigIMVX5T51bWlZ5ppqlOQFA==","shasum":"5a6e4caacca385eee0180cd62805a918450c75fc","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.10-alpha.0.tgz","fileCount":9,"unpackedSize":19597,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrQVsCRA9TVsSAnZWagAAg5QP/222delnCzcEjCgrS/FN\nLk1zK7+NWLdYKcPQvNkP48gn9ZuzjyBM69jKD3pTo8w8t+tGWSaxjNqdw5k5\nhUQvEufE+pcpvWhT2CyEJhA3FswB+mokDmo29WAfLqt+JfHCNSY7AH2pZCyr\n3sWYGUZKPqt1H2BWKACzpyfB/4QtJg8DoO6PRQVDzVMuLsM4ye7n7M1psgs/\nB5KtlHwhMWny81617cKSoS6pu3lCBlDDdUOa95iXLmdWHtW7SqPfztmRTk7L\nAWgsGy1C9hooLTkNJndiXJLf/vVEQnT5lwrG4DphDhm7ayTjWIRec1qPR+Wm\ngHxZMH2hHXXmuNYpzgjk76JNXMZ/qbrzMexrOvLwbTg1chFUzmhR5R+cRiXB\n8KUaM4hgjmG0QOTstcA5DX/qEDWQpDuf6g3dfMmMZdOw4z6AK+Jz7c+wVP0Z\nrqviVKdHEOrYfPfHCos0cEI1Qi+SqNjNFhjGvE8JXPXkjiJqjVICxQwNKkKd\n+n0+hMxErA6v4s+xNZ9oyasDcM8q75stt0d6AUn8XOCyCpA9/ZgvJ/OIxTqQ\noZoK5lXUkJX1YnIRpKVN2nldCGrO5NloVCbdVdcdruL7T4ZGGDrfGkA/bBMc\nTk5E/0jPss89cfjgAgqzrFP62pgSDeJUQkG7TWMAlWcgcroMY9MMds7J2jfU\nnpWY\r\n=vsv1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFf03Lv1yqzmmJJvQfn2qmkVfqr0WqMlxPSY7q7m0VpWAiEAg875MrclkrimM2Y6MemdVZGWxQsMg+7gTUkQhuenjls="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.10-alpha.0_1571620203392_0.46208421651280607"},"_hasShrinkwrap":false},"0.5.10-alpha.1":{"name":"@react-ssr/express","version":"0.5.10-alpha.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/register":"7.6.2","@react-ssr/core":"^0.5.9","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.11.1","@types/react":"^16.9.9","@types/react-dom":"^16.9.2","@types/webpack":"^4.39.4","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"af45e47e342997502ae13adcb0781afe5c303b78","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.10-alpha.1","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-KhlR+bRcZn4Znu4DtBs+yaaeEHTfZKNHZA1K+t/rLrlo8PsJdcjBxJOIwQt90qPIzLfo5XJwQhK/TYqCP+chUw==","shasum":"23b618ea379f96f9000c6835c92a5a00e5084dd3","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.10-alpha.1.tgz","fileCount":9,"unpackedSize":19598,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrQYoCRA9TVsSAnZWagAANrkP/3ILMUBVsYedrYzRafa/\nIXNi9Rt5I94IghWp1OOur2mGGDVpuIhUu+U0hMZU9bnzyvB6Ie+EZC5qszTP\nhye1EbQmee1HGhLWm9KmED9j+Mybb5E0eHpKC/cDxWF6a79nmAv0pMeHSL4q\n30zZjLn+WG+v7rL3svDQuHGsdteVD/FQFKV2kKuIHT8td/3fmIjH3LfxVYLm\nvajGPduloifbT1iCyq1gyCNE511DAkVWd4m2ztJreFTIGKxuPd6J35kkv0NI\nwRyIGKi3CkX66SKq12p58Yht7oEGrBTiyywpF0NGjUdfOVrf1gPjsh9ynfMA\nA55RYvv6zDLzF3/hvjy08MKemWES6T8+rA40xSKBhpckbQALgrowCETJKcGj\nt6lLLYrsGQoFF9a1c5YFxK1mRhxtfy7fWUe7aAAK/AOD5kv01TlyB+WY2v3U\nVLx//mSz8zpzp1c0FgpvDt+pOokOScCR2q332QYYRm5NqFL7m8k04IJqg0Ph\npPZeZti1g1EN+aIqDYJlsIOeJwUurfKhNfdaQdn1f3eGyl/8Qm/pfe4s3nwo\nXWyLsA3N9S3vYsFxQC3ifTvcLEDhUtmevmX8V1G+z0ubA+3e6PKelEqgA7QF\nQxRqeh3lCIcj0DWAMxDn6CJx2Y28ErJBsoSFH9kv/ycSqrJbJHgpE4AaBPAh\noVBW\r\n=6vZi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEJ4EZl+n11sxHJypNBE7xV+BNKsH6rcnVkXN5jHBjhcAiBHsgc4QPxGGRMlOqQpc5rh/jgC3NDla7QlU9h7VqAssw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.10-alpha.1_1571620392248_0.4912741876043263"},"_hasShrinkwrap":false},"0.5.10-alpha.2":{"name":"@react-ssr/express","version":"0.5.10-alpha.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/register":"7.6.2","@react-ssr/core":"^0.5.9","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.11.1","@types/react":"^16.9.9","@types/react-dom":"^16.9.2","@types/webpack":"^4.39.4","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"535d42b83e0c6947af086cf54e6896b64eee2e81","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.10-alpha.2","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-X0a579GGXnn2SV2t5MlvIi4SWOrn6OoM19mpkAc2o3ZMIPNn3mt2kpGaKWK+D//ggGi8qpWKz1ba7hye0gnhCw==","shasum":"f00e6957a7e87dbafbf1324208437acec0189da5","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.10-alpha.2.tgz","fileCount":9,"unpackedSize":19602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrQaECRA9TVsSAnZWagAACI0P/REdOnjXshCL8+RMKuLe\nilNceNe4ph08dCrdakpq0j9567RR2TY/RVXMyeVREGOAhxHwjsfSWYSdbErd\nfXrCBHzhBB0pd5zHEM8VyQGkzvR5PxNIl0bnTx4xSsMjcSfsIwfSYIvsU5Ha\nLdI5PBWZn3lxDnsHOh/vFYAt2jcUTOLLSiYgXlKC+eYK8CVvRjOnPH781++z\n+twPB6knBGT4ZPnsI28RrUy0beAmRHo6aRJUjck3UlzNvUNQEWitJioER+Q3\nOrNN8jWiR7NwQDTVMr0uT+qxOLwquek61hA/D9ZTYpY3uDpq++IjGV2ZxtTq\nis4MY+nO0J3zSmhbKoc5nWbT9nzaZGGmsYW6u6tRS0F2ia0Dzv7snmDJd9UO\nUkMEu3EgvVsjNeAu6S5G/0hW4bXOO7Y5VFxGbJnDbefH45TM5TFbsqUhoW6+\nxSveG6Yall2GdM0pewfooRLCoNK4uzoPfchV6xvETrI9g5h2m1alWiDbFDqR\njSTt4vgaMUjrW7gLp202LKY71im6jmFAJIECiQvu5zQ806Dqlv+3TLx+aH4X\ng/T0vnVWx80Nx1hRBNou/zA9nTK4QIMIfNS8Y1DN4Wt8pQsnppYq3H1q5sru\nN8+CsC/53/0iLi1J5qCPoh13rsSNGJcbJxfwmpucrHW5+eCgAaxg1dyFqmJ3\nhWtv\r\n=0uRI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDSVK6HA8oIOdU3pFj0ftzClJnLRsPHlsgBaYD+q6lTrAIgTVP6xgj5BKyVHwx9pAxiU5TELvi+b1zc5NneXDevZYI="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.10-alpha.2_1571620483653_0.5456747750898576"},"_hasShrinkwrap":false},"0.5.10-alpha.3":{"name":"@react-ssr/express","version":"0.5.10-alpha.3","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/register":"7.6.2","@react-ssr/core":"^0.5.10-alpha.3+b0996e5","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.11.1","@types/react":"^16.9.9","@types/react-dom":"^16.9.2","@types/webpack":"^4.39.4","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"b0996e57979fb5335e09f6f33821c51e8217d0c5","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.10-alpha.3","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-vMbcBoRH8IN+igu2RqYv9DnaEGsHx80qzlsAULsJsbgwYXuVHoaoU2LKovECPINSd/1TP4VavGjL9/9iUHbF+A==","shasum":"2a55e0bd174cb389b2e092d277c26afd9a30e00a","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.10-alpha.3.tgz","fileCount":9,"unpackedSize":19619,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrQjZCRA9TVsSAnZWagAAiy8QAJ0OjkbVJigppTjnV5ZR\nYrnh40b7SKI5pId4viFiTGjqx0AuDpjGOPU3rnmiIBnSzHL3joZQTxd7jifw\nM/sFRxwMZBgiefUNzp65IDZmxvTGknBrl8KENKwDCqolAdViZhDrl5qeoZzN\ngR9gv3mYN3KA5MdOqNoJIpiHI2W/HDLwW9oFmd/1rTu+7VVpSBfF2CEW5LqM\nEF7eTpyEhkwiMeLfon019AhDE5JUEVvqfZ8vyM1zS2NFK6ddSi+GI1/G4jqZ\nWZyo8rmDDy7w/DvKMhBZkzt92fpc2kqa7uHehVJ8lVekmXfruzYp7KNdox/s\nwa3+/xVCI1ezYGUvvsUW25VKsG94XE6PWwCAAgKdZse7s2H2CKCe1e4h0PhO\n+QLnJQyYkchImj3b4f02NhwRhIzFdCUlxlxj7L1USHY8nbPUSwubmX9Kkd+b\nLuaGGHkJJJHPcC2slgELjCY9x672Fmd2DQNcnJHFB6JP0absPUtwq8/YRZLb\nztvcxj7+gJMlsFTScWIAcwjT47dbsY98bhTFqaZ1X6gUEDj2QNnzb2nriv/0\nLDxUbA2ySllBumPNtPb239xup/U2I56PylOyn8wbRYH+Lanjp2bhlYPYXaK9\n/ryougN6rpU5lod7y1j/ZAd7bttixQnZJwmFzehf+UHQgFaVBGNJVt2/BbSX\nJK58\r\n=VFoJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAoHdFOd1i3MhORoKVdrTm1We4wBUVNOoLMyfgnT28ueAiEAjsV8voD9zySjiSYj03CJq5gi0HNUeY3yWPnd/dNBTGY="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.10-alpha.3_1571621081040_0.7795714139581429"},"_hasShrinkwrap":false},"0.5.10":{"name":"@react-ssr/express","version":"0.5.10","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/register":"7.6.2","@react-ssr/core":"^0.5.10","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.11.1","@types/react":"^16.9.9","@types/react-dom":"^16.9.2","@types/webpack":"^4.39.4","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"386318d42206db3ca66894e3d3fb70cefcd88ba3","_id":"@react-ssr/express@0.5.10","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-1zZUM5At/VcTZ6nM2QsD+uweCc5rJaCd5YDpmIoyIJv4t3/r4CfhHl11AXtWTLVFoMoKIREysxfo5SYubMmRXw==","shasum":"7600f19910a0b9a1ed68ecfc5ff455fcfd4fe75c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.10.tgz","fileCount":9,"unpackedSize":19587,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrQj5CRA9TVsSAnZWagAAbcgP/i9JUN4ARCxkJOF6ke18\nMTbwGVQIny0euZIoVdgjy9jjnzxznMkrKR+k+ML4T9ZakcQZAYdOvXXA55aB\ntSO4dn6VLLY/SS8GVFQPnDFsERno9ivBpqctN0w1fGWC5lbCiPcic3goGfwa\n9vLicl4DUNCTEs3BZKQr68mRxqe/3f/eFH9im8RPBIHZ8mxJWrAuEH0kYio4\nCpfjnTZ1zMl7rk34R41T07m1IY2AguFaHkqjZadp4wwLfAjWg6t3oiknKyyY\nvn8CI48LJ7LylU2Cy9YSfQ5R7huDWhwgWD8iePaHp+C6UT5U22q4ntvv6kiC\n8lW+YNuTfHD0qSXX+Mkziav23LcMtHgxYcVKgKpsZ5+MIl4K3pKTWDQuMO/d\nBEeA6Bke9/D3Dt5yInG986kcdAeZK8WYMKiNVhTe5+ej3+JlDTmUuEPPyGPU\nSekWAUnQFAnNKnEgL9GNo3V91RamZMnE1Whhu9jnC0rfoDR7vSl9pqpJ2/0/\n/Fuszo/bkCCWf9FgFTXDmSULmYvXhDme/nynaIKAKvTGK1OEgOTkVte9lOQ7\nI2iAlf7t/Bqg7hY3QPHiEGUFjIDPY9+uUCzkI/FqPCJoW9ekpw+THNENyeTL\n0JHEgg9SqDNnXb1AmV7itmAyBVtGzmqNPuGRHkAOKXRYd70i3LwNBagfJ1zt\n+0wT\r\n=mA0r\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGWUl8CbiAtk8hI2VrlAHztzzjMr4Wp6QJ4nySzsjPO0AiAwazKCVTaSf6pQwL0nl4/fk9XuZ2PNaToXR6HOcFrfyg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.10_1571621113387_0.19794631416954456"},"_hasShrinkwrap":false},"0.5.11-alpha.1":{"name":"@react-ssr/express","version":"0.5.11-alpha.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/register":"7.6.2","@react-ssr/core":"^0.5.10","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.11.1","@types/react":"^16.9.9","@types/react-dom":"^16.9.2","@types/webpack":"^4.39.4","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"39b5feefa4b9afcf76a3d8487470890f41e3fca5","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.11-alpha.1","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-j84kiQNm4ApLTvyLkLBLP5vSXFydxnnJ1TmQMPElNoeVyU2aTq24alDNhQZlLgD3akKjb+XXBLiQxycHl/EhHg==","shasum":"29c303a089c0c447dbe92e80851fb565923f0ac3","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.11-alpha.1.tgz","fileCount":9,"unpackedSize":19424,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrQpwCRA9TVsSAnZWagAA1/UQAIfdmXAxbNvGb7nJPt9A\ng6xEobp/Mk8SW7l14NXCjqjQkeblBmVL1GbdtiCEfedEAq4uds+zO71EXk4h\nFXN1oyxjPqzPbjcOZtnG+/Mo+D5cnHcobIGBx/1lr/TSqI+GLmx4tCmYExWu\n/eRZTf5JoQ0WEd0hw9+F3MXWTrPqyRdwlcn3h4kzBrPSbUj6bYn5pdcI0O0g\nPRjTbgMf81le0DwRzqg69RYuQCOOgsYqMGoFqPZgfec2qMYsRB10lcjVyqyw\nW0s5OnIynmzMXqx7xbhYRfj4S8roeAa2hTeEiukGKNeKlMYc7MN13ABY0SCT\nH/KSC4WnLTBh6SYqvwJwCvidYhf4tkpoadEJ1AV323klf+Mwb7jJtVyqD0lB\n2AlWZVp7CUWYqmXx2kBpRkLaJKnHJBhQ+WaevpCsfisKg+rXLLUdw9XZdyXv\nZNUvxZONTZIEb5q04KAgvww0aKQMOZc7s4DFlaLQv+IzHRX/+GJmfCxrxaMu\nad0nFyyD8WdmmbyzdqNNPZLmdjal7JC4UKyYhjEmFKlM97eD9GXpqPoIuIkE\n+7z8S0FMffaWlzTARpMwTG4azzt+BWZTEWplt5O530Lv+Z9tMpk6Xserwl8X\nbIFQJOOsJDmq+U6ax+VUYD4ug1Xs4O/idTOvHCbZjP7d4GpszVwRl6SFmpN9\nP2qu\r\n=RaK0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD/ia1qC8jxqiC0JRhkz+C+4RVrKiFwpSmBZCsheVf/FwIgFAQO2woIpHheOkAjPxDKvAOu4qZS1j6VbHGFlBzoIx4="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.11-alpha.1_1571621488370_0.21051832392951964"},"_hasShrinkwrap":false},"0.5.11":{"name":"@react-ssr/express","version":"0.5.11","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/register":"7.6.2","@react-ssr/core":"^0.5.11","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.11.1","@types/react":"^16.9.9","@types/react-dom":"^16.9.2","@types/webpack":"^4.39.4","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"1ea4ee9a66457213c8757a6bb3451c69cc593546","_id":"@react-ssr/express@0.5.11","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-nGDKkcx7+K0xr7UpwnzO2lD9qqoyKdPnnA8GMjIVVinTvxgJ16sMtUsxqYAQc9a3RaH95UAUsTHPYqSILb89Bg==","shasum":"7d961cc194cc7bc0f094a68598a6c5c071831a83","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.11.tgz","fileCount":9,"unpackedSize":19408,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrVuKCRA9TVsSAnZWagAAUsYP/2do9ns5hUF9TPnCu4O5\nUGmMfSqmDWnofPnGyHyofQzuKIgzs1rVUHu+ZhpqD5NV8CZmO3a4Ox2rOe4d\ntgSqGH4emhMDCo7R6vFy4PLndlwhgItua1hG7MkQ5pYtOHUlL16oltBsAhgP\nk3Y4fDt0SRXgNMKomGchV9qSpaOVD81b7eaxTWQuRniWn7G/T0IewhqlQpeN\nKAQ+6Nxp4+YjDG0nQf21WFDKKcmEbKIhC9tO2KaqS5I4omT7aS9A3CNygzA+\n6TfzuCiPeojgtukgh3sXmB4YLCMep1kdTZkatfhq/YBJ4EJmBwmsFDNH8W7+\nDeizOuDJ3/ncsQrkMczFMAxL8bIj+Cm4qpQZnbpdcst3ZiGEwS8COR6Zp3wr\nUBREIW6d3Va8hXpurS++8K9d953xP1wqbumYyUHufz3AikI+rtX4qmB1V4X6\nVPrbuCiEMEHZuvduhZ/bzEqSK7gqDZoPZK3LMC8ypfaZI8tJRemX8g5NitIl\nQxgWpIUe8BauXuXVljdQBPfC72dN3MiiqWmHCGvct4QPCLvO7tyUv+8d+qhx\n1BbYR0x74ej1J5aIvZkrax4HXB3cAFNeSwxQIdVULArdK8eT8u5orSJVPVGD\nCmS7vf/6tsc/hr5PkyWeuE0riNZjWFXydhox6HRWHvT/HO/AcdlgOCUMwZeq\n2DCQ\r\n=Ej4i\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCBUPDjGcAh3igXhd3oGi6nGm2NWKLwxNIXk76/B7O2ZwIgSaRQawt+z9BWpx2HLtYJgHXkncXRenPAcVAIkz2T+F4="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.11_1571642249509_0.9261821742741219"},"_hasShrinkwrap":false},"0.5.12":{"name":"@react-ssr/express","version":"0.5.12","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.5.12","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.11.1","@types/react":"^16.9.9","@types/react-dom":"^16.9.2","@types/webpack":"^4.39.4","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"a786ef1c7e5dbd3386f83e1967eee51d8535d1c8","_id":"@react-ssr/express@0.5.12","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-IqAZbDMyEQXG4S4ysGjZEV86JyzTtiwB9weALhPrMvc4pfhLgQtp2OYQnqEReTCJw/E1XRLY3G3rLGhj9IR7BQ==","shasum":"7d0e1bf420b3e386bf7a1479e4a2e7710aa4ffc3","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.12.tgz","fileCount":9,"unpackedSize":19317,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrV9ACRA9TVsSAnZWagAAyLMP/2ocK9Ee4j+m7e6KLpNd\nryMtqktDYlvu04QH0eDL7MTN0A4atNpH1KG+ikPB7OOFFf9VzyF36G9OFcn/\nrsZ+Aa6BjpRIRT6UqbGt2KpLdH7o6jDhGtA+OIaZD/TBh6mIKLH8MCUFwlh6\nrLSFwyHlVcNKEDMB10N9MO75AvB55icRHt+EY7zh6QJ7BYq8iVKuhjWJ1a4r\nAVRKE32yRQHwVvVycyZsq0x87NTcpFj0HEbOFGOX6ZLaTm10Xg2SCggDP98T\nnR/Ew60Nt5o8ogupDwgPy5aFEbDIGxNcO8NqhISEuZq1Gerztldw/iT8oIbb\nZswkuK159bCqSVprNRYWhidtbc8ainqNR7Y1JUwsTluFi3iV5hgZy53aJbPC\nlOJ7wSy+PVHpjybMusf+LYcDJZORNHpRxMyomSpCtNCRcrvAN0EMMq6HX2zS\nZMplibE4uwrMBHergm4ECVFNyjAiLQC1woyzePLrEfuzgyC0k6mFuqIHoZJ2\nYufQUV5ENfCfXSIG1ClmTwGPLpF42VOnYtAYBwkEd4U848leCiglrh5AqMUs\nBNnV7e5MQphwADUcIKXkWPYR0ht+ubUZCfK2Uilop1JAAh0RxqIoOe3vvq1m\nbH6LE2FCD2OT0L7vWmwLkpJV5XWDgCEPyaG0Wu3GrD/WjXCx/wkIjHnU710O\nS/M5\r\n=5T/u\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDRa2iqT+743TkI6PNuQIYy8Tyn0qFmKHyIymhowqcqeAiABs1bmsRLFOQqxo3JKc14Q0DsQ9XPweqbHW7Gq2FRIoA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.12_1571643200121_0.053770770756247144"},"_hasShrinkwrap":false},"0.5.13-alpha.0":{"name":"@react-ssr/express","version":"0.5.13-alpha.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.5.13-alpha.0+7167d79","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.11.1","@types/react":"^16.9.9","@types/react-dom":"^16.9.2","@types/webpack":"^4.39.4","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"7167d798a495726e7fc1f2a720cfff6e9a61752b","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.13-alpha.0","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-VVtD+Mk4z3SCoOTT8Kor426tTSGP+XjNLUXWI0YyddnFYJrcC63V+hjDrN7KpF+7qSnxtA9DUJemVJbhbIos2Q==","shasum":"08db758960bce340490660f4d9d4c81e0794f10c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.13-alpha.0.tgz","fileCount":9,"unpackedSize":19349,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrV+XCRA9TVsSAnZWagAAiXoP/2WUKX9YG76+CE1Nujyb\nA8nor5oVIJMjlIVYfwrGwSRv7RJZNlS1zZ1STnoNf9l3e0kuu9z+d/VvXm2i\nIS39umg46CKH7Q0uAE/zjDG0hV3AGRloMif5c+29Nw5hudV+/KUG50nBTx0g\nABf24fkQm6B7OCLT7gVro2fwVanIoVt1VVmrNNWfCEoPJT6hCDIY9/hn5FUO\nfxoaAZK1qikEsgdqyJTeoC0osklU+RQbAFJi8EB7AZ5bl09JVQ8P07UXT08D\n98BgIuaM9WgjtEMwr8OFLnERBwYn+HvQ6XSh7H0H3HfTRHSK/4bjSo3G2dzs\naxAPLEYZ/dTq9krcL7LYXGyQz0thvDET5cLpbrShx0Twyb7DqVOplXKlmOvH\nt7iOMJ+zxlDzIt6Iph5fjX9fD6bFgrqUEHxHKC0EB08aa2iXejbpDcz9oihK\nzin/AfDE+o+kEsbIgF0ef1TNZmZU9mSFVGcw8zkAV1lRX81f7p8qv2m+nELV\nR+umqRmlzirXT5VKFmFEgr63Y7wN0tSL0HvP8C5TCrspW2yi4eRAUR4BZ/c2\n9luZs1H03PtOVifnFoWM7/j8Q5qcQuBy/VWKU9hLM1JNRIwhraywrme7SONv\n+JMkX7i65gYJ5eK+K6lQViEvs6NmaqyXNHmHCx1TlijIu+nQNwWyG2mf2s41\nP98/\r\n=A4q6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHANabM/1eYEngkjb64HgwgkuveeYB+X0dhQswSYQPn3AiEAwAHZg7/mHHtftRDM2VWD0iPRAN1LLIwuME/RaWoaV/s="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.13-alpha.0_1571643287267_0.4229167112326535"},"_hasShrinkwrap":false},"0.5.13-alpha.2":{"name":"@react-ssr/express","version":"0.5.13-alpha.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.5.12","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.11.1","@types/react":"^16.9.9","@types/react-dom":"^16.9.2","@types/webpack":"^4.39.4","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"65badd9ab48f6790779c9dc7f6441dcb32a55e66","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.13-alpha.2","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-tvE59Er2q4kK2K5V8zcDqikpyd0CHAgKi4eTSy/qIcRWIDgZOxTPrqwXaQNBTVvaBuYxU01qfyC9nJTpiNcC4Q==","shasum":"3bd1c41483450bf842ad6b04e4fa85e747f4f6da","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.13-alpha.2.tgz","fileCount":9,"unpackedSize":19326,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrWlYCRA9TVsSAnZWagAA8V8P/05iQ4tWkYSVZrvYb2na\nMcBLjmmPlX+x8N0jMPzlZwjDQwyXmfVYso9rKDqeabmh5shnt5PZgSJVQAGm\nNCLf2wyOkyR55fAJgpLVyRYC4wnp9p5Bte79hBipXY67Hcx7xcyNpPsu0yVO\nSh1MFRIDLsIpYQ7d0YJAuu0Z4eJBkLplksmDKPzmukR3eaDnCogh7XKW349d\n16iioUNE92gnqy51T1buNJlYjMhUeOKjdebHixBVXzb2Mwq2uCuezlZMC62t\nDoWJsyS47d/xAvEO5eA/l9cfrB+Zt398AlD6qUAvolWJzJS8703PYSknaSXC\nCEf68EgdEQER6qwkKpnBg7EG2IhVuCdHwyOqcv3z1uZpwV04HwRdu3iVwQnk\n70+/ZX3puwu7/PT+rE/e07XF5gMzOJz14igjUz/I9SuT0HZA2WU3SntLFP9h\nZFHJiMLJa9bOmJPr24gl0uMwijNYVhG5ak6h5NEQtyBDPUe+S+LQDOo+MQs5\nGBDrW1+nGoVCjc9C4ENU00qLXF/yt+bVoAn5FAQ7NQHbczYGiUzFaxgHm+DE\nJsgcBKEBuvSU+jmfcb+hlmOyY0BS08Mrrlt1VMi6gY7IA9T/pa2qAXmAflog\ngx7eqKKm93GrHlD8mkzmx5SjUQmEPtqw537ujqAADX07E3NOX2y/FdmZEfzZ\nJb+y\r\n=/oSp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDtYYWMaY1zOjRqODi/HzHszO5ODFmtKVhLfi1YtmdElQIhAMxfXZl+ysXFn4bfGURktwYM1pqbaHLtnT1gctI0UaGg"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.13-alpha.2_1571645783290_0.40761787763778967"},"_hasShrinkwrap":false},"0.5.13-alpha.4":{"name":"@react-ssr/express","version":"0.5.13-alpha.4","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/register":"^7.6.2","@react-ssr/core":"^0.5.12","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.11.1","@types/react":"^16.9.9","@types/react-dom":"^16.9.2","@types/webpack":"^4.39.4","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.1","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"8e9397a934c82d7f46d62f5f8957dd3184ddb590","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.13-alpha.4","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-5wht9En/e4IsPyzoSgt1AN4rjVsfO0puJhndZ0b803sYfocVZWZ71VeK4DzRp+5mX97aUF/MD756HefIVLrzzQ==","shasum":"2954d7440a2fb7e5c9451767e2959cf921969e52","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.13-alpha.4.tgz","fileCount":9,"unpackedSize":122996,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrW0mCRA9TVsSAnZWagAAgzQP/A6vY2WQi6XEPXcrTH81\nUfldjJAOh6GZ8mC1jHPKoHoYFPnxY9bHSKrKSQPmw2pC3dXbKsm3fgRuRDRJ\naT0XLG0j/7/C+2vVDp6ANsHy9HZibdvxit7XFWiphPcqbJJKOljruBP2MBAS\n61PO2kD9J0yD0ma/5YuDX0P7OabVBXseLLMmiYybyZ1+vnzuaTvwdhKCiAqH\nXBbuf8TN8a6lnpaFdVDYPYVy2dhuw7kbxUjuFzyjy/+Gn8ce6TiIrV57apwJ\nhzNnJ6f0uJ0OA0IhZRAkssIwQMVBJn2Pd75/FDG2V1JmPvJj46F3ZSIixCD5\nIP70Z7ORsyijvCcDOoTtvP4QPGILxeOBISddn7VE5+oAjGVP+d5XyCIUhcek\nYu6Y2ooJjCTyxjFweBaQuTP1WsKagIy+PwSzjIDKQYFrNHaEOqYH1Mj8gBmi\n31jBvYdpdJY2kdq+PMhv2WVoBQ+xWhSr/jw0I6DD9Fiyw8ehWsop9zU0Ylmu\nTI9ZAeGQiJB4Bt3CJCEsypH8I7Q0wvefNkJMi9d5lQedsGAq/FANvtcSan8+\nAwMNKhUgooOUhSCTg3fpvaCtnAZk7V5PiKTEltg/cjtmbiZExoEol6CelLnC\niTPfZLPVYPDO4HMyEBxsp7PZy/iZCYUx0SemjvMZ8EY7JwEchoh/+/+C0pm5\nCVDO\r\n=RMfO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA3gQgYGHq9D4XXiGv/8Jus/0UJ2sJXH6E3ox+S+Uz/eAiBiy+bV0A+0rNGh7eBVLTHiPEtqISa0/teXLfH87hHY0Q=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.13-alpha.4_1571646758234_0.8977487847320287"},"_hasShrinkwrap":false},"0.5.13":{"name":"@react-ssr/express","version":"0.5.13","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"6e2cc5de1dda1168f8c71321f7eff4018d04f492","_id":"@react-ssr/express@0.5.13","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-vCPCt3zscTdgaU+i7NaakLV9ltzdUe92TauAtd88y00PIzv17nAbS6BMz9WOwZ4KgElSuTkHqhr0IywqpKU2+Q==","shasum":"c36ed5f5c25f55b7af8164e546dae98489ca7f44","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.13.tgz","fileCount":14,"unpackedSize":42221,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrXCECRA9TVsSAnZWagAAQhMP/2tNUOOaUggmzppen7z6\nLRB+Y9TMqpVUA9tcll8dBVLfr6rJiTbJFy5plzOtlSmrtxcjEpo0mxUP6pLl\nRCPCLLrABdHcOXkqF+8kL+1DHEySwTm01Di0UJEaG5+HRnvm2wS72RIDPFk9\nRm4Q+5gF05ntD0onp8zsLNdOLVmLI8ElvAIMzV+Xm/DJ23B6Y9Iw61/to0Qn\nJi4g2N/MaYEQPaD+mu150vvSnWNApB8F+65hTxsvcFcNAQ+b1rxqDDRG1sc2\nbIDdgCUfB8c5aW1WxkK/vTHU5W8SKPSpVYRdIPRuu3+Mz21ndrHWv+XO+Yxr\nIoO7mWW73ZefjjPnlr+FSyaJf5bixC+HrfJ+dA2rkaHHSNtVTjLlPgowL3y2\n0bdf+oa0bxKnDnMfydUh+TtOp2rrHaHAiYQ38Z1flMTCspSPI2ZgEiysK7SC\nZpFFRT22uDAPxpo8VuUoTkS7CC7u/TFrjuz+xn/3nvkv18iZxkDtNSNCL38m\nWrnex4gJgte0olNcTQEc5S7w45/h3HwHmjtQ58fTiwSvFXsudGPLhTeqRxcc\n8rb74Y9S4GxsKvtAl94PiMZbAIV9iU51kU/3slre8JO48dBN9ReTCkfW509e\nlLAEZ4yESk1WtGuF9tNVQTcGkdtsMuMfs1WBWjxXZDVNKYG49geXC7B7wYJU\nyLFS\r\n=ir7l\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDQVK1zHqR85H8z6fGA0qcDjgZt7PWcShYmfrvGeLxvwQIhAN6CZP6TpZds1X+jQ6U33ERLpWM1NMS84iOYv4tuhrx7"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.13_1571647619438_0.6106045952633596"},"_hasShrinkwrap":false},"0.5.14-alpha.0":{"name":"@react-ssr/express","version":"0.5.14-alpha.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"c539e94b6a4169cc9c52c88531a0ce5f67453487","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.14-alpha.0","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-V7T02sSkzL7Yq4MwJ9MlRzbCZkXmWDCMXJEE0y8LTjchZ+rfM8dzIeZiR2cdIGwl47TkacDZtWhxbhoBctIE3A==","shasum":"a5263c31bf855b6eb1ee62b3e811c5fd17f84454","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.14-alpha.0.tgz","fileCount":14,"unpackedSize":42262,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrXEsCRA9TVsSAnZWagAAwNcP/iw5ZQ0tT68k1iQUm5O4\nf4OPAJCrNt2hMLrFpfY8/iKAMMeR48ZkjNO6PJB2QMNsU2PUBfi+FMpAjYD+\nH8ufef+qLcOK4N0p/uTJEzue3r8ZJ85q/XRSYezIxm74VcWiGrUARcb2Dqhc\n0/oUibyz5DY8/kV9SBzkCawyYs5H3WSbRHOvWdH/cR4YOURUnpjAYwE907YW\nETDMGdgc8I4ZTIjD+FqR/uiJ+6hrUIehbRVaMJtBBUS3tFK02fhg9+UHg+Sb\nVdRbVmTqStbdmiLQ/KpCrCeAFhnesLz5Jo/XPEoHTOG9Ntw5qU/AoICPIBzc\nly7Hvx3mLWxTZ2wgZDBIslJdZ1tkQfpSEfCwYRnM3dnCaooP7yNt0u0h9Doo\n4tvQNUFsef5Xeyv0AyvtEgy/3mwx0YyfcGiYf/7r4bqdk7HY3a80QX7T5gbo\nMOiUHdQmc86oUPRxyeGjWjtLYVimVjUlfYzqIfGxqVV1lQSZvBcfZkIQHt36\nMgY3+IjgtqfKHY+nj2icpyGcIMMzhjxYAynUyzYLB+cixX+hSo4KZaCjjxli\ndKrXpdG3EFKj+gUpsrf3IZ3CV7u505tcAzqIyQO0ygU8le+EElDVwUfzjIKX\n7XfxldCAZ+JJYHGOmxQUANPTmYldeihUGfA6ubbXFDak9mHivnPxZlp9QBbH\nLcuB\r\n=7qZ1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAS5dpHGPBc4bvMVwI05htIGC7WDSyskVFt78nXBD7ooAiAHlPVgIGoG8tP6UOhIo2o+PJN7rYJXXWv9LOoOyg2qbg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.14-alpha.0_1571647788323_0.9171581052435287"},"_hasShrinkwrap":false},"0.5.14":{"name":"@react-ssr/express","version":"0.5.14","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"84eeba81493739dcc8e8d766a6dd80e13b146e29","_id":"@react-ssr/express@0.5.14","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Ic+wagOD8eWKB7jbR4w73dXItOmvahR6SCCofUHWiTr8tUA3lTVj/Z7HPd19Wy48rZqUSK/6VJnJ7xaQPpcvhg==","shasum":"ca612f824cee96eedfad5b185fd795d8e180153b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.14.tgz","fileCount":14,"unpackedSize":42216,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrcMtCRA9TVsSAnZWagAAlQQP/15fzjn2lfeE8UMAziZb\nKehW4EgTLdBray8bXS5fDr6mhJMGXPIVJXSh7wNrqaRpSfm8zx/TMJSqYyf8\nUIamyweDbrL04iNYYcgh5mn68d9Z1c5SpEt9gMSZ2kyRl46ZLontf3U3aP2X\nOQM5dqhm+B0SRSm9Fhvlw2CJjH/YUF78I4lsj095qX5+vOcOnpVLpas0n/e9\nAwZ4XBLYAA6t3dfiqF/9YH/jCydqgoJ/JE90omIlL86PpOdTFDGkqrx93ece\nJghvp6JwCUJZWY3g0O0bVB2aQOOMhhwuwbOTYzmQYXstxmS83oCdsklKN8Vr\nro8EYOJEXERt4u3ybTIvFQr3LwuUcHu+CgUnGsXR7RTQKsRPRF68sZ985krs\nF1n6Aoowe2PvBoCdzaGCz8XOmKzkgHUkhw5Cr0v18+8EzH9fTHQFQdq9V9lC\nGND1RvOg9HiGb0hka09Em/PRVza4/sn9sY7EvsK1BCOd7EmlhKWZjJvFrgF5\nzwyr0klNpUGLls58wi85SZUC4TbuW8v7EUl1Iqu63RFjgGKD4a33lDZtdxjT\nTrAHhxsiSFkmDMS7OOHirmvnJnx18Dj3PSG0sdD6JWvgCPMC/VVy2pSXeaUV\n87lXSZ5cY+3LAV40NCfbJPQeC9STKDifxAvpcO7VCLFm3XKUDugH85YFKjTb\nP+IA\r\n=n81c\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDEUMsKczyozh8GLpx00DduVDdWWJP96S3lKvI+l6KumAIgabrZY40+BMl5DJV2vcqiMh+w5CnMHgjkonwvZZAggxI="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.14_1571668781198_0.3493090557369336"},"_hasShrinkwrap":false},"0.5.15-alpha.22":{"name":"@react-ssr/express","version":"0.5.15-alpha.22","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"0d7d9784bb6596b0db7312d7dc53cbf092d43ad3","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.22","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-N/dnbN4MFPfMNDGsjXniuq7BzN9va8LTiKbOmz1EGu424jHNRGlRGiwQ/T+7rJeVMpHTIgpKT378rKNnZXky7Q==","shasum":"7a1e724c5e619d7e6954ef7a67a6579b47bbbbca","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.22.tgz","fileCount":14,"unpackedSize":42384,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrsHdCRA9TVsSAnZWagAAhTkP/1WXJFN1osJJhzfNrFAM\n/hn9r/DhqpKvMRRLi/cu+XkBr11if8ts4J3KO4WkVOA31n5YGulPVgGpnhBJ\njFGcjwFWSPSBZ34s4rWjBUW3sQMVAqEyy+cWh4Z75p5LhEAwD7QKjfPll+yZ\n9eOMzc9XVr8L11pKMuLLKxb+jLiL5bkFU6R0Av7QodPVywyW1R82FDqiqnDD\ndHAeU2nZirK5OnBofJtiEzPsSrbG1ItWz7iXl0OtnneqO//09Nzwr7MJxWix\n42ciDH79PnfVbhEGhV0sxd7wRgBGzEzXuwX3UzFrJ/sHO4pVhAm8IkUxdqqn\nJnuXHs3J1jNnH2YutbeP8GeKxoUnr3q3+ZHltK0ZjEXZMBCXJHGQeGNRTbgR\nJWXM42egWnO9oB1lwncvFvLTHutPvHCEq4VAtk++Y16oiahqL6eHKxovZSsx\nMrbpwRnmh6q/a8RZDpV8ZvVhEKfgxWzdvv7oRtsZY9pvoFVql6Qw8+Ai1DZH\nMpGR/QNjNENOoGE13sSA4uUxKUhiEn2Uek8qY623KtU7jCZLCm4VjYL/NHl7\nR1CU0dQBArXpD9k7AFVqW9jFTBLRYP2rwsovY/vz5wKhN7lRScz7ZsMBx4YK\neX72hb5aleAZfm6EnxNQ9z/LuvyRutisFN2Wo78pHOuVLYPVHDViYA7Na/fB\npewK\r\n=RPAF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGWRo7xg0GKWZ13jEpKw27Y6zazBKcDKsX4S6QxdbCEJAiEAlYbuFheGDIUHljzXk8DlmhTs4rmeMTtvYNo/Hjx01OU="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.22_1571733980547_0.5704205788890557"},"_hasShrinkwrap":false},"0.5.15-alpha.23":{"name":"@react-ssr/express","version":"0.5.15-alpha.23","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"e2cfe68aa8c68da34031dc1522f046520915542e","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.23","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-NL0rsK32FoG+9EfW2W/H5kGs7YyO8oijb+afh9JQkcDzFcI238PQ7IZlBzbXxZdyVXfL2pfkQ95JdBHcor5DSA==","shasum":"da6940137b0cccd8926ab7ff9dc973c3dcfc895e","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.23.tgz","fileCount":14,"unpackedSize":44986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrs0OCRA9TVsSAnZWagAAneUP/iA5O6IKVlpYT5a5cWJR\n29/rMZ3e9zi/YHmpGOB5u1orthImOJuWcNwqBa5hLK1e3WARapnGTXuMFirn\nfGmeMl56SgfGABMDLYZLdLR6LOqImBqkE5EwoPYh8+hX8Mq2dnMdX/E3lBG0\nQya9v7HCTipKEbbjrL/+Exs+uefJuzLvGyB32hjGcfjjd5XXxgGsZ8/Xx2C3\naJnrT/NlB0RiNGbEPgipxy5DaeKECAIGR5LsBV+sDOWDunUirDHO5lyjCLMN\nciHVxz5jh4uiwmcYMP/mERp9J7V47Up0H8ldQvVdSs4zlhf9z+QshLqKofap\nV5o5TJP2aRFs9Sg3URaFfbvBB5wyYZDkSQXNMvpuWVSNsS0PlSK3ZAQViWdV\nVT2cCyw5aY9rjgYRzNdeiI7bbEGaMbsSDSRfh6lN8a4tR+VoMdkAkFj4Sc+i\n1xX25NqjGv8Uph4qghe+iJcUQeZI8/oJRs2qdnmPSIS1uIk9FwwxMOcoFFuM\nSiAKj4BeYQzS71c71WiBk+yvV6FFfqFt+upv2kcftby2YbCeQ/PczrO65la/\nEZhL57VGx8E2F+UAL9xmbqmA8778ojlA2JymLazrZYVjb7trxzzkxzgeH+UG\nn7PFQVdEExTdpUaXotf8Hi+E5uHUJz1Nf7dcHzgLcQf2fFIHhgSpMO32qbnc\nbFML\r\n=jESC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDYAJX7bnUMOXu2cu1XbGU3O9MNtnMzGhdYdJRbMEupDAIhAL+iXAYCXgDdg1rAHP0Zn8bXvSLABwo9cLMaIYo20o07"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.23_1571736845365_0.32487487095086687"},"_hasShrinkwrap":false},"0.5.15-alpha.24":{"name":"@react-ssr/express","version":"0.5.15-alpha.24","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"b080b1c8be4ab9dacc04c2c18a80c34436af2529","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.24","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-PvhD060h5t874Cx3orZv5G8gMylVqX18XpYXOEifi5eF4kT8MWt7QniEE/XFrENRqDrvaaUArqcMHtmrfLOUZg==","shasum":"215c5a9405b81126b109a9c27d32173799ca0a10","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.24.tgz","fileCount":14,"unpackedSize":46252,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrs2lCRA9TVsSAnZWagAAoJIP/j7m4JhycOux9aqHHm+d\n+D19gVBoQ7RlKmgSYXUMHb3XnheK7nPJzS7VVnzE0tTGHTUmtcgv3PMFTtrc\nOLtLxQBGtfv2Vl9RG+neTeW/fIpvJoh7SM5DMXaKwGP6BIZsK3oaZgFGuJqb\niaxcVayzT+jC1uJ5QB91c9/gz8c9DwLydw3fekqcjpF2JX0IKJjse5+1Rtth\nNxzmXkF/GMPZ1GMNlc7ajBgJDuXpc07DLfFpLyIhms/LeVHkaJbnyIZ+9rV7\ngpJNbyfFvnKN5S/DCeMXttV3woP9Tp8W7Sg2qDKQMzERGC4OpJ/0BYyVtPgM\nLi3e5vusFm/QiPkFwT+yYfDP6WTCOtnYUYO3NvhFDaCnjdlGz+PAlZ5vyhh5\nWKGq2rfsJOqRtRgB9umH8sZzNR/xO8PK4bJcOxQuV9p0mbqhl+Rm8+0sIV/Y\neV9IoXhLdXjHa31B9uFV13wU9cPxCdWNvtWmtoQz8mXBxSnHDTVN1n66F7q4\ncNDu0weGyiS+qZt3r8sp1iDXrJhGbXS0C7c/n8s9jZM/GGluRhi4Z92wmPSc\nVD423aY//SMRRXMDDYtjyojw6oLaXrLh2bD2XwFQiQUNEO5+nkRB00vfvRZf\nTsYXeD0ye8DrgPMbc5wZ8oWG2ofTHA3ikRjxFNGrvdIdbznco7JggZwBz/Ln\n5bd8\r\n=FdRx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBqS02icEG4FovVgryTUn5ZJibrH+sv1oI7UWmP+gfd5AiEA3jsBdgpXClRO3r4dOuwUTeoalGcdGXtSgjU5I+BTSxQ="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.24_1571736996545_0.1296907668047831"},"_hasShrinkwrap":false},"0.5.15-alpha.25":{"name":"@react-ssr/express","version":"0.5.15-alpha.25","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"7b69abbf16e8070c5d0d393ec193e430214f19db","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.25","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-FEJQsw4Ke9b8bsjXXC165hCKCvtbpbfwTqmEQ+p0Q4LXlaYKo5lWWdJyrUp3E9OheTZosON5P80wnRH7JWXUUA==","shasum":"0cc2fb5d35ed1cd3bfbace6014f0603cb178c2ba","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.25.tgz","fileCount":14,"unpackedSize":46260,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrs4sCRA9TVsSAnZWagAAEKUQAIsnCyRh7mvE960pTY3m\nMSUgFsqChioPE2s/RMka8zh0Tx0b9szoX6kw5WBXuix+d7DFwtVSlm55roLz\nZ50quxO+CaADEtNZHNojgGSyKL8H+IyzBUPBiMu7eW3VK1Tk2tYnlxEWZsFc\nA7W2UILBK2OCLfPbWed0WjzapryMur5e7rI/0AgCw/8f1Qge19KJDwiSOpJi\nImw3XQ9m9SKiE7d8/5msLPjenoqSQfhNPwbB8XkSVdWbpCCRp0DKsYgXHvFQ\n987pH30GHQmYohOpM9KLK1rkIVXBeEEj6elbjfTEVE5aggVhsMQMMgsn+q6V\n7N+cVyVCwAhsYMKU5SLi0ZUhau2jEb36KkZtDr9O2q9dPi++Xk2cXaVE4aF7\niCGm9u912JcbvDbC8c/WEwxymPz3LytU51Vz786xL1+ceZJT4L0PWCFoE3Cb\nEVHqyrkr8rd+34zFl0gbzXn4+/Pjjmz7oAZ3BaQ7rwziPXaIsIZdJuE1tFB5\nUCSif7ss0RAFC+/WN2I8EPi1Ci61pSNbK7UoGrvBZD0GZGui73TROZfFwflA\n/YFpiP04G4lk/+sbjSzbeiqG7yN19VgZWo5W1KsBoRO8vQG5IeQre9mVNfIg\nqXo42R2T24E1rHPBPBBllIwLOBtwTOlAWiPVakMFIT+BJITHslDk6ykUqAgJ\nBWWd\r\n=mHa1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHR6dT8O86wRuJ9hPbY8x9us23HU/Q3IEnPK5FqWsvZlAiEA6spFHVYt6TAzfJhm3lfmEJp/2bdWKARPWRxE/mznoYI="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.25_1571737131556_0.9722354494789351"},"_hasShrinkwrap":false},"0.5.15-alpha.26":{"name":"@react-ssr/express","version":"0.5.15-alpha.26","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"fb3ab71132a401cca363afab27dbe5cf974529b6","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.26","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-e0sp/DM33oWYz2r2pB93FtWwmpZFQvZcCmfnmYDAVDwSMw3gAQKeVtV/D9/r2IaZW25aGz5aXrq45uobYKsWig==","shasum":"65cd8c387c7ccec3341517fa678ed578354f073a","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.26.tgz","fileCount":14,"unpackedSize":46256,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrs/4CRA9TVsSAnZWagAAplIP/3KY8kxjktPVcRxzj1Nl\nL/3e5fSY15aQyK46RYxAzdbFELLaS0cW9C+82pyE3n0aNZS7C98XlM7lt7f7\nQ8F6CAgjhiAhNmw7K5bW0DccHmx8X83eAjqT9mVVoCYDDeCIKcNpSbMULtNK\ngxvkiRk6oAGMKQWOL60ZU+eyFIe0uGWmCEN188YxggdrX/Y8ujHEsYhfEJpf\nW3/dQTw1Fr1ivu5XcaDl940udoAVpBD0W9nflR6KvBmsH/aq4iLEKGVwZbqi\nF8esJYqwiQigfsK5OaaCvBdBT70DIeCoOGodfhLlXmOkHRgZkduX9NZRPOE3\nI4PJQD7nzLvw9BzR2U7OgqU7jn9IUi4M61DbMsfwTfEDJfbpyMIVZyUnQJNX\n4hSXOOSLTtPpjhd44GrtEG3Kkqh8UPPLK6XozyzWJRPt0NRZ+FLjnTL/vKwg\nXBMDcWQeVL0MazYOwA8znSm2/Kjr6GIj73RrMkiHJYhh9INxUBtrJcGQ2rmn\n5u9NFCxQ8ijkW3diC/k0Y7brvha1JCe88vMUrL4SHeoLkLpMx29sbUfeZoNH\nyufsfsWHU3HmxBCbsDDXO4+JNtpFQk8s1Yhp5zCU9KNT4nOhBYJ517NvVLVK\nTLrDVqPojYKZRn7vHwVkEPwB/Q/eHY8acWYsmPy5oZ6uJvFnGU6Ytb6voijD\nj1Q7\r\n=sjOG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCoV15Zi1UpdPywWOoX0lP8xXVXeT16H+cxGsbRo2ewegIgaeaoGMQFyDv8tMleSvSZvdn5huzGILt9srWxilHqGkc="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.26_1571737592075_0.4074716267229981"},"_hasShrinkwrap":false},"0.5.15-alpha.27":{"name":"@react-ssr/express","version":"0.5.15-alpha.27","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"fd2cbbc7eed4b15a950ae419d515bdf6d0e0c72d","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.27","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-xVIFjhV2sKgQ8wC2qNJ7h0FmP6ZiJiKtuBfl3RT3gou5+bAjEUvgQeHpM3Lo7VF1/oWQuJT2Wt5bGD+wIlZyWA==","shasum":"916b0f1078c6861a1103dcb979acdfdfa2e61bd3","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.27.tgz","fileCount":14,"unpackedSize":46260,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrtCLCRA9TVsSAnZWagAAZaUP/3M2dVTmu8vD0n115NRt\n38Xk6pSzIT1CwkmysbSkkyTk7CAGNNd3pe/1hwpCDdSW88DKdNV0Tp+Jfv9c\naNbTPVUikaa/7w0zivELi4rqQ1HQvMwPtwCPE8f64ZeQmJZWG6EmH/6xEyNd\nZ8LOmBt6TIYSdIvAsQ7aOUbhyaHsR9f+P0RLXpKFqosGFYiglVfQPwziWakO\nFnLnsSS2CUnaDqkLT7yCCn9EccOo0TJYhu/051xPDKn95LuLFd5vPbvXNuqG\nOqp6sd9xP3BjhsbLUqrAdhNT86DRfCqEFO+S1WIJ/a/VC7fXE4ua1E63w/xu\nfaQo30Fst7mIC5aXqD46pAUK77bet3KlX/ZOB5WI3AZOfriL3MBJi4DM05NI\nMAEMz764TX2sZCm2lGVjxJ6yNSskCNjhVbXnLtFx7w+zjOwEkO2TkU1Oz/HS\nMVJv3+Z6ytdqiAgTI7G3z5boKKgKD3jQYQUVBcGtiyesvw/w6yLQx5MNK61M\nTJNh2TgHBYHMFYg4ZvOdZRbH+SqWZ5b7lolIeYSuFU5c4AjnGs6296B+T9/z\nDf49EpLl3EtK0rSn9TB6qLC9RtUMj4QqWr4IiSSoYIJyafVD5yxRYKu2FZUy\n8bu0foJp7Fca/zKBWxnC+RHWQkT+dRBBfDEyan2xcqjlMJTY8vQnxo3JkHwb\noYpy\r\n=VDEU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD6O6eW3zSbmhXtD8aIYYbDK4tQL7y/f7Gwt9NUlu0JcAIhAOiY8tqYLkzfRzGHsU2KFcR27YCHsfZbDjI3le36i3Z+"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.27_1571737738700_0.167802795509699"},"_hasShrinkwrap":false},"0.5.15-alpha.28":{"name":"@react-ssr/express","version":"0.5.15-alpha.28","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"f68246476117b07d51b35ff07df9c40e2b140e80","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.28","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-12GwW85RS0VTmCEdfCB8INkPP0qdEwpkdh5x8kALqJ7YpBaBdavGZdkfLmsyQeAwpIlM18Kxc1siA8OfVRM4iw==","shasum":"035697c413f47a53b7422424f602bb7c415bc5af","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.28.tgz","fileCount":14,"unpackedSize":46288,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrtEqCRA9TVsSAnZWagAAC+wQAIr2DHSWFCCGnVhssFHA\nQB8seKGlfbL3GNik4OvcwPsNPLNnyCCt4G/NOgpjUDtDaXCSsv2CJbZ72OHX\nJ6+JPYKfn3Vkljz+hI734Q7toKDMWLn+3hLoXGR+ZRG3kooOJsTbIQ7tjYtd\n8D1+5oeirT9EStA5f2d5rdhXfHhltRza0OY2kTr1mdfc5HHrWWE0Bw8ba3ds\nZT1p0zVC28Uu2X4Jwj1qFwFJ5+/TcLcs703ZpNnt5IWI36b4mW/bxXjGCF10\nvaWDooWRzQAIRTGV7zDloBWy5CTONmYXUBNKjLJyc1cYSvbVSeGjf/rJ0fLh\n77wwTWKbuYB85LTdTMCzsKOE4I/QpMxxV37kTjlmz28F5FH4ZqMfT0reoY+i\nHqD/042rxbQjrvIS/nCZ6E/yPAJrdhr5ze/ocyQHY7WVnuKrSx/SwTweGbRh\nj+AU+h3y/Mp0fX8f/rC9LkPjxcHVy3MIauW6SvgkRXeaKSuuvt6wrdJ8zkYO\nP3qiDWcO7EidL+POTzpEr1OCbfHx1CaRurqGuvA9i0MsALbepaJoz6XcYL3T\njyLQ2o6rr4x84yNEbiabboNaMZe0hHIqNHLSNG+m/kBR3hnNveciDV/irdgs\n2+UtRUnxqsJwjghD3kpzEbpYoSXJzZMFrrVX4G2589KdO7D1k5TKI+qnNZY1\nKGx0\r\n=7UHj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG4zI8TEdUFtXsJtcW5wktiuULQNAzT/4E2Cg9yiec24AiEA6i9dRqJvxuJz1XnSDOXzVppaBEknk9GfxDF2kTwqZyA="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.28_1571737897758_0.9797490748791899"},"_hasShrinkwrap":false},"0.5.15-alpha.29":{"name":"@react-ssr/express","version":"0.5.15-alpha.29","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"6e69fa86a42138905a579d466e4a684cbcf3f4be","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.29","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-CCzkL8LLS8SYsmsqQ86ZemxMtHiBD7gv/f2K4UKSnMX/RUNJLix3iy6gxIA2Gs8CLOVcwu9f/j3xNja7hqUogQ==","shasum":"8171da924e034671aecd0899242eedccb7c14ed7","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.29.tgz","fileCount":14,"unpackedSize":46326,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrtF9CRA9TVsSAnZWagAAR48QAJZ4L2tE5/4B6+vEB/Z1\ndF6PCyDo7oqGer7eQf4p+auS15d8KqDEvDjMN2/ftRBCftP8Wo0zwRTZoLQo\nhNIc7sCwovLzEbVM2+EI9zJx1bAT8V6nolUCiUkW6g43mZheTd5kDP+UUzDp\nV5ks8ndenQ8no+p8LzAmLZRkpxwB79gNCK8/WTq/o1SDP3+rj0mAWTLZjkfi\nNx7SUbBjvgHoW9/+WChsPXQflzuXfrIJdKTBewbYljsFLnziDn6NA0E9d0Np\n19/RT1Rs6NjGzziXP86JHHrLNJ8BZE8F+PgvOP0z0OiPCnf74W5CBdkAmoV9\nFxkIq5dLhtFdz15oWKoZANL30Jc9ZJJs9yBQiCkYw4gPc+1DNMRACFc2DKyv\nl6YVDDFwn+wAeqzSRc4uwsDGBFpMnsjsVnaCtPYWHakNt1GSAFYg48oHAgKR\nykej9MnmHWtnmyQBO5OOQNlAL9j8cnlpPXee56Vv7WYafmxC2qmvkleiwYAX\nCwXUdlAZEWmk+Zcf49BCNZk8hGVQJ0gDLR0ZINyySL9aVL8VSQPcqyrIhesm\n/ENDcjl4J+HtS9euiNTl9wSBEVgqDtu5JrOPcb5LxMB24xMDHPb+DY5IrVd/\nAEK6BSbRWYIHvIhBmMsK52kg+DyBdu7YgK5pXnzAHE1nBc9XJYurGI8yelGm\ne607\r\n=Y1gt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFB6BDi4U9aW8geGVzjP/Z/lyZdthnzCKznzQ8Cb94k6AiEAzvK6Eq4RZirlxFRQDo5mnkqTy8oepJKZcIn+6MUvqoI="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.29_1571737981219_0.5999173658356298"},"_hasShrinkwrap":false},"0.5.15-alpha.30":{"name":"@react-ssr/express","version":"0.5.15-alpha.30","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"8ff7572e47bfb8aa764dd77d2aef633628854aa5","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.30","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-grfFfqN+/kqDnnaN2CGArm2UG4GUQ4yvADH3oeLCteQIbm3937sGsWUp7o0U+L1ax0hr96RyHZQvrPgsbq3DzA==","shasum":"fd6103b52f5c6d4f1fc9b5a7f8a64ecd1c923508","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.30.tgz","fileCount":14,"unpackedSize":46298,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrtHDCRA9TVsSAnZWagAAO78P/03bE1dEUlo3GLwaCD53\nP+Vxzl0yuB8MS1ImLL/qGTTcbylwVShvO0DRWovW8KWtc67L1Rdqv8Geyj72\nWpMQ6nwy/UNz0Kwp58El356VxN2FJmIh7hJZvP0LO517eA04ESp1QeRdK0kG\nzGkK3x/pQxhZwF/WOo5kz1sdGnXGoTpFjO9m10Abe79P4tPphrYLWbpOeZ2/\nBRgBSTocX3BNqw8Xk5PFefiqSVhBji1b1hCCTZdic0M73rROEqunxmsr32Ot\n4Yf0efrRu5Rjl9Hf1W0LaRLaQhFwsU1GcjXEo1dpPJQpDuk6+g4QFqlX8ZXc\nfoE3V8GdOPfHwbweMKx0VVCGJxlXPEdbU+/y/APX5aagNooWYEfsOfmX5IhE\nkhjZWY1YQVNBFO3eXGG+Rzw4O6C/SJUgAFaAiay1ae+K9EZ2i6Ig29o/JPga\nltTLq1KZ4UA7OP+9V420eihqd2039SYtHCrfCrkv6wqMNswF5XPJ8vTLnRyB\nt3ciGezSNI3GOvNa2cp4MNIC33talINRRjmpyUr4kufkQrO3/QRDhQ9YN9Da\nYzIrgWnkL1a5Dy9vfdFuFFVEpcEusmwV4WhDcP1A+nVnF5Lgy7xKIRcfxmOI\nLscW1hCE91EiTDyZvqhIZcIIl1oDJ35dTPLmNbfA6xMuuOMRcIUO8KIINBaf\nRF2L\r\n=dDls\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCxBq89hMiDYmP7fRSlA9x9GIKkWw/hUH68/HQTltzgiQIgeCs//k5iITJbhiwfIeXpNogkjj9om3mHjw5K2gQXUy0="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.30_1571738050971_0.9956518392890128"},"_hasShrinkwrap":false},"0.5.15-alpha.31":{"name":"@react-ssr/express","version":"0.5.15-alpha.31","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"b5908264cdbe21679111389a9471fec313ea0ea9","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.31","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-U3h5vsX5VzObyKwJJlOi2wsridAFFdb6IJxd7S2XqN9rvwwBQnsPGSesXex21TKyGb0eXQbUB0iAnuH5a36oiA==","shasum":"9102dd25d214fd6e87c1da65583025505f39e31c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.31.tgz","fileCount":14,"unpackedSize":46570,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrtO+CRA9TVsSAnZWagAAphQP+wV0qBFYkJCm4Rwav3CY\nZzmA7+MDnPxCFr+tcFYAy+qcX1kdfAYEdNYfP0hDt/44lL2kK4WFWKmMVbxb\nfIWToVulVG32C9Yh08TanWnPGSusr55RVrxvgxbCD236HJ4mf+6gooSzLZNq\nO+kD3wgiWstbVT0tEGI+wCkNSjc+yyZt7+U7DHXsZmB+JD6TJV/AiGOhV6BZ\nbi4e2X/ES93U9IJKwUhtyupHndm0tOnI4UPucrGNo2/Zax3yTyxhTa3bn6s0\nIY50zzlp13kHcNtUeFKj3jdECBboATNpcQXsfyZvyi60h5xEK6NIUXeep/rj\nOHiOp2uJbT2k3ldpY3Nl4su89nYgmElCmNWz85exZ14qsVXNUCQf0gmGwZOk\nYr+QtjKUF71KG5odue33d9P3L+KQv8yQEdi3SNU4QRo33IG9YKLt2l14l67Y\nhtyGMundm5wo1MQVYt57x2V8FKZ5uKIUvAXJV7DKpxOWPucUCDmYg2bulsNP\nuhV39Ghf35+f8scNVOK4DIepUx1zsJNeNuOyRCGUY6IaUvEG/zjdd4HwxLGb\nSY9ayHAGKQhnja+nAADDrqHI2eA8Diu7iNy3tg8amRAPEvrB8ipLU8bX/Fsf\nXY5zOvyWS4YEvU7US6KkPNd3hdZHs4Puwz/oEphk2/O2GYu8TYf57cvlHSrj\ngGrk\r\n=7v42\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCQX1YZupJK2qcdQTSQfURdl/C1swN2WJLQbx1XDl79TAIhAJIxqVf3FxXfUWoQG3DccvA7cMTRrAytRFiOX2l7D5HD"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.31_1571738558223_0.1126889678112406"},"_hasShrinkwrap":false},"0.5.15-alpha.32":{"name":"@react-ssr/express","version":"0.5.15-alpha.32","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"3aea7c41c73fe5e859d511e3b6bf3ef644837a81","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.32","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Sbt+IzA31fIjcXwkMwn8nOg3+BlcyWviRWnRGaUiuccTxxjJvmRsyTVqhpZYutmVCzqMYDVyZcsWEUPBQE+Xiw==","shasum":"bc7930a15f0a2b464c491aafa2b4e06f3dda02f7","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.32.tgz","fileCount":14,"unpackedSize":46600,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrtQbCRA9TVsSAnZWagAAbBcP/3vhpFzY7QtcyNL2j6/B\nT+n1LE6fwPDxgZesI5goZlG+hcGCkiApxbQeWD6PL01Q242GmMfHRQA1QZXI\nryj1PvsiIb++TuOKTLLKq6SAcIXSb94M9SEmnbJ3MPHpr2zAeRDHrZCjw4lI\n8/+m01/7h7JLWSxipqagbIzW1QRlU8dhN6GPYVozWcJlwDOfzj+wRa2JQW+W\niD58MROUlok1QwzDitd2gKsWr++QXjzSggmfz/rMY2qZbpvuce61dmTb7d0D\nnlU4d4xkCHy1beTBneQrzr6OUJvvpRdvXOabfxCnJXsdGCIFqrG3sJapsaUJ\nT++aqYq2AeZ5fzs2YGuToUWLUJckA7XqnG+CzJkrQK/maVbCbpjXlMuLZERx\nRjLy2mVuvTkvNm86yI4BsTvk5BkInqqcbV/Y72irVtxZT/WlD8P2NzfTl5zh\ntIRyBQ0TA7diMrYaj/wcwb+M/P4Z4bizRmJ7n7KBQvMrMoq9BPNrnJEEguh8\nD/1uMa+l93Gym4KE0I9Z3yxJEVvvHmOlHLiYXk1sHlByyaZ1DeromLOkUZPk\n4fli7FUT6AG3QpckEEA/3E57GvyKCrobrvK2gE+Mx7m8Nmz8hxctOwzuWtpP\n5PiqZuuiIE5OYvEANU509AEUWGTkOsDz/vjxJAgVVVX5HPV0M386T2iVGuDP\nd9p0\r\n=E4oF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFTqJ5JcPs769DXshXHTe6Bgkamtop1mY9YdIK8CUwaLAiEAnNP+L5GrHS7E7frAQgW7wn17XfUIosbihT6FD7BLgTs="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.32_1571738650542_0.6067338491898668"},"_hasShrinkwrap":false},"0.5.15-alpha.33":{"name":"@react-ssr/express","version":"0.5.15-alpha.33","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"036c18e1f4d3a5731a61267bd48f4793c5186c59","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.33","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-dVJF32dR7+AKFs567vmKH5ta09C2OaDD7iRYicQJyXwblX763vvqHSMZlXSDQwOPGwUXbyYnLPmtHsvgQAhBTA==","shasum":"8488fda63bcfc9258c3a7473d86b861a162a05bf","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.33.tgz","fileCount":14,"unpackedSize":46668,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrtUCCRA9TVsSAnZWagAALXAP+QC//bAlOS0vM8WjHN9z\nvla9sbfL4Cz6dOkIfpp5b0w9no1Ur/LotZkNVgmwCCbuUffxHRWXGzH0CmL/\nGYJkmYMQcjjKWzxc50zwDvaMbZ6s8nqhhAtzHMoGxy0RJKAV73HbqVzoL5BJ\nPW+SaQO/xBD7LkJuD4hrgGw3fyHlAa3zzBjMfm1sa+w/P4Jde6dgQa5UV+lx\ndWtQduHDeYPafLN5Ouy66P0FOBTD85AYbOtGhNt95m+xlMBHl8jkcdWyUQlW\n7sAaLA8jZokHCD4LEwre+b+JfajGWC8FVnvRB3DlHxiE3I/HGMiiwm9Xkw16\nNifMNRnFvcuxz8XQpIBHu/ke0PpMh9yJPUFuEQxXIx79FcOymPOMNSYXCsT6\nUFxkoOL7TrYBRiF4EkQ9fPTPXlSSlEMnCweGp43IasQdwwhO6QiV0+fx9xdS\nDM4jx9GYJMFRwAA+/vT571XjQ4DDtE4jS4XJc5jZq7IaQIg0wgTAXjh1zV1f\nQVJF8MsFDICn9cW1q/LmX01MZhuzseFjnR97VJOtqzkM79+Ak4zNLcvJik2Y\nh0n0sux4IOatpFyZxauBhFNYCZtjQP1J99yKjeYmaE3zUyxs3Qfvl8vq4UVU\nuVlPxDLa23f2x+0gSielCkdog6TuCsFqlWTHPQ+tlZ20TGL2XeErmowkQKYj\nM4Kd\r\n=CvG4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCuQQGvSoUfa6F9DyrYWnL/nDsFqMvTX7WGRAMqxmmExgIgBTXfOCqHYKYZwXSqaY+AmJYIKX+Fqs70l3Ehvx1yI74="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.33_1571738881680_0.3463714689575159"},"_hasShrinkwrap":false},"0.5.15-alpha.34":{"name":"@react-ssr/express","version":"0.5.15-alpha.34","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"23e1aaecf1437d4867d4fccfad8e6d8b4037812f","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.34","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-qj9OEJ9QZVk+ihwY2SRjBwfPzvGZneF3aeDtV5GwJUhQNprTPYDdu7rFDcsaANxAGdeweYoiE/ADOBfqk9Lk2Q==","shasum":"de971513934117397599eae62c18c7bf3437f6ce","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.34.tgz","fileCount":14,"unpackedSize":46654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrtWoCRA9TVsSAnZWagAA8RAP/jtclPcKb0oaxM/8q0mu\nqRKE7l8DryuWomezjMeVFu2PbsGQXJ85PZB2eK+JHz3cH7b0zDTiljW1k2ph\nru5UHZIur6MR8POE8Arte8AHKjoB46PebeKyQ2eZXZ7yN/pNZQkIl5NG7gqR\njiQ84lqBSNxg1wOR8FO2bcvw1rVw3/JoeAuppNXj4jjYSyrml1/XjIZKBdDj\n/V7aVQxHI77GX/uXVR7On4SX9gL6r/Dc/Vgvn8wKG4Jcau0qtMh/q58vlshH\n6gBwRo5ETaus/G624C0ZEibSZNYjDyq048WImDa4k5zPECLbV9YPY7mTVstk\n+2eqSxXHsYIUxleiqnBQTL/Gfm8fI8PmDFWnSXrhY41UR9yJMYpwvbgTT+PJ\nq64ADC1WQgueOJBLS68AArqlfeACeBK6pDudLgqK/hdHUMbuIPwiXiYggsX1\nxlQF58cuiSsaLgWwP/jh61/8JbobfrPvTQawNFN7jWB3rLl8mQ1dJWzrGo9T\nsRzO2zvbpDhvC8FHur57jIWQswtF+cgy3En/G8ZdhnHZ4uFCyxfHIltTEnW8\nEhWV6Mm/A3X81DDp5lnsEExV03kW7rjTEQXNcY/HR8GwzYomuggV/NOeUhO6\nU0ABb1oYI7u3v80DVXnYLBbCoU0p2DUKURxPf6rhKONNDmQDsrP1p+Tyg0Aa\nUhM0\r\n=tGFd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDQ8xgY8qLoErb2RSKB+jihTtvQul2YNOxfAS2OxN5BTAIgR5Lv/DgVmdRdm7qavtlPYRvaX+38SFK3vTMyR/plU1g="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.34_1571739048235_0.6447738423634335"},"_hasShrinkwrap":false},"0.5.15-alpha.35":{"name":"@react-ssr/express","version":"0.5.15-alpha.35","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"5a62bdcb9701869db940a20744b62fd7b8609640","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.35","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-0JiTbbiX+wG7ih2zYX61Q9VT90WVGNOJ0EYF6L7iVDH1uSoHflCxn4uwlPfSRTbNm5aChIF1RZRoS8ZXf9vWiA==","shasum":"2648f6b0cba3e347238904f43feaacdeda8698cb","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.35.tgz","fileCount":14,"unpackedSize":48050,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrtZaCRA9TVsSAnZWagAAGF8P/R8C7cSd6rCf94K7E3/n\nF8+CDY0iDJ+2TuQ740DMFXZ3Mj1OdozGoRXFhj8BeAnOXNtoidWRCpz8s3WL\nQZxX5sQ4w6NoNcBjRV2Zu3zLYEMWV7q8mumINn24Ypw4OzfMRs9RYtybAzND\nR05dugwVIWF8n+JdHta9PeEaZYicVj9aKsDl3cvYoguvayKWDIR2AgekuN8u\nqNGiHbYF9mMXBy23MO/FmckpNA67UfiQvTc4DoTLhIBF8XFcW4bPo1lRM7mB\nN4nnw/N6uhlx9LpBfo+J+7eRUzWueSeSPjx25JbFVdwUj7Rw9ztrrYsU/X61\nrJJCguEB7I1ScNbiS6OLxrbpJ7DwsneM5o28gLTctOpTmeJzanr3DysYUM8a\nh8iRco0N2tRdouYq9SCKhanPnlmxh0/D2qfz+HeKre5qlUIN4GkfVv8e1xx3\n5s1i+nQpTM0iI/GOWPGqqQ7kjOS/TOl72TsI952mBJG+380Ma1hs2NL7yqC4\nDl9jJPAjGxF6CNcOi1U6hx2tDhYmjEQW14U+3R9ahb6AmEcj2WYorCZ0fTg6\nokU4MT0b+Dlg92UEGGP3jUl1CSV55B1xuqxNLWfC6sZKXAxKr85FvCJgxNtL\na0KxAf3/1Kbxbgvrmju4J4tDqiBUNL0N+SmzCvPiQdMK7o85a+RmE9w2W8Hs\ncVsd\r\n=860v\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBZjUQPgp3FESX8Og3iKgMS0XYKPA+/QVYeOjsg17QlDAiBkfhgaUEtsoGgVQPvlo8hrnrMm15PoHSE1XzAYRXjY1Q=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.35_1571739226062_0.0574127054404765"},"_hasShrinkwrap":false},"0.5.15-alpha.36":{"name":"@react-ssr/express","version":"0.5.15-alpha.36","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"9323b78b2134f59d7aa82a34c388994e5aa54dc6","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.36","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-P4RR9uqRO4frcBCpvokYbgiM3kJ8UixGP12p58H8TpD8yKYDkSMAQ4dpsPqDD/KuYaIl2oteG98mECknP3iIKg==","shasum":"5d4396ab4330b0b9fae1acc1eb5469586178891c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.36.tgz","fileCount":14,"unpackedSize":48050,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrtb3CRA9TVsSAnZWagAAjwUP/iKsu1HHLhFzxZnErrBa\n8p3gl6jXdIaEFM6huVktggq1DAksbM30LGDaBnfaEP0/QU++QeyfOH01YzTx\nq+i6w9zUDNjpb7SbRjHob6BwWJlNPcDSj8r9+JT5EndE8yZ2mxBXEFB5lOFO\noeWxTgjS9IVIE/ApEfSGgZFlRe9Jz8VNwCKrAUlPFnyZIoOY6GNEba776p4m\nOy23SPKNBFPGc6ZDYDjFW7KKUNTOd4Ab043ysimr9hDXdAG+SbWzH3ef299d\nNO+3krTpJgHo1S7hr9rKuFNrpAnk3LdUQqMJDLrmoYLlxp0EhiEV9ev7+X8w\nYUIcZKuMu0dzyPkR2G1X/hwl3NTCOC6FnjnbE1ibOawDek5zytbFT+cSPF6N\nWR8mluSFRbE0tH0M/gem+B8QJutO98iRSeGiaHkNZfIfalQJOxPjHGaFTpSt\nYZAA8wKpCszMpclRD+5tGbqXnHevv8hzGw0nxC+SjuVb5gxIR5IvGBCGMLVn\nhYNBLriWq/2SRbqmCU29mxTk4I+zA2oRbnJipCWox2vXhw4oejzUbCQzWzXJ\nvTkKSDAmrTAdQpxfQSfvOOFaW8OyDfRdarzxkKlIAgXAKpuBeRVBqOot68o8\n03qNqm0vhmadHlNDN1kMjXmczMfy4g0mXb8MrQWiPy7Kt8oJpyfqMJmqhxMm\nr7Xe\r\n=cQl4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIClhutG6f2XeSL5Hc7EprxA8ehU4JE/9E8p79osk+8IKAiEAoeo84ZVIQT4U632VfUsH4RvtEizTn+3uRAi+5gDea/4="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.36_1571739382966_0.9005227943280567"},"_hasShrinkwrap":false},"0.5.15-alpha.37":{"name":"@react-ssr/express","version":"0.5.15-alpha.37","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"88d5fd15fa117cefb4bda3e43d739ee18bff55a2","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.37","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-uwjyLo6AwvfIgXNLl2SN1N/VDfH2NTwZhCAA1cgr4cTzUwbK3Se5Cc0+pbGyTgFeqaaW3fcGUM9Ve/l9B1r1rw==","shasum":"932003e2f4f2d94d55fe7991d70f1c4921ebbb00","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.37.tgz","fileCount":14,"unpackedSize":46088,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrtrdCRA9TVsSAnZWagAA8AgP/Rl/HgCotwVq3PxKn+Ak\nDrOdr9KVlKXCb8V7bRPQX/88WAYIB+b79T3Ah41HN79m0RN/8gld0xKHtCIk\nUl0tenueAitNpggHSXAZrtucYm1PI9DTQDHsCSoDxTHw0TXdbXDPNVr1ywHv\nAJeZjXUP2WdlVy0OHwrpcT10oeOE+cz/dQJqyLlaUwRNhjrv5ALkHI01WV2m\notJW/W+OfxVXyytWXIaCdTPhPFt+yQQy75fleePvxMxiI5I35l79AT2Ib6y0\nTpIeevytwB5dZoiyKTpoe8CYlbCmb+3cqp+nQ9CBvqOErcLSqS4K1LkL8rAm\nFhX2lL+tKtGqOVjNkR9OIH05kO+qlpDFkD23LPInk9C+yaQeYHObarx58uGe\ndAutpfJaSFwa4NPWZr4p6k0fdL7HWVvNs3XMGbvoMlpSQNOsU0j2ETlZOZWh\nFEt18SMDOZgHDENe3pW5B2GSyYny4mc9z5xAMIipl9ALKSqZm2XAooznwMKi\nxcASSXGnbo3nS1MalJ7vsxZfpd5fyfVCpemNSSATpBZCfkKJd7KDzDdqwyGR\ndCpvq7b9wJjGkn29QGeng078Sv1ovxv1x2NYVpCqaFzaIJIyorivL6+1FFzs\nH4by6cFPNFUqAoSW0RZ8XPUbnUi3TWi3tcTqW9ecAAccqHcTOd4PpDajPWrM\nSaFy\r\n=B9OZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDVus+DK94GEjm5LA+SpMCk1Jpzvmp2u5Z0t0pN2LM4bAIhAIxxh7AD7uTpgWmW7yv9jBQI/0kMMFY8A92ytvMfMFut"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.37_1571740381278_0.07779149863212709"},"_hasShrinkwrap":false},"0.5.15-alpha.38":{"name":"@react-ssr/express","version":"0.5.15-alpha.38","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"2ec8899bcf9d50e9429b6c52be62ce2189450ca7","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.38","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-CtEqS/ThFddjBJk1Ne7SVmHxCLHJuiy2+0yKGPQ5eIhuDDmrYv1nOXm6gnh4b1XW9QHPmgTPNHnlsVK5/o7AIw==","shasum":"4c24a8fed57c223d8fef3a0f36526577ac810012","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.38.tgz","fileCount":14,"unpackedSize":45950,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrtw6CRA9TVsSAnZWagAAYt4QAJUOi1PL90/6Iau8N4fS\nvyJ6HlGqhrUaIjhIXGUT2nVbo1NSwA8TBTD/8xQ8ZxLoExBXQLdhU6MBLpMP\nqvADstuzbJBtyL8oLWfXVhAvYeTGmWz+l6v/HqAkCxqEdflEqVPK5ysbfOYb\nPl8+2JUczlOwlUcbOQrMmal9c3nyr/iibMDsUDLek55pMAXlaKBJkVl9BffF\nIbOScXivOa2zFUiOMNx1p4C7FOzzutX9fim/ZsSVOpeOPPaEx+9iHZEXV8oi\na6n5Oo5oVATfasp3nYD7ogSAxM7V7gQhNlj6gg//r3rk3MdLeEOnw4CMkTCK\n59hPVESY/XfuLQYRbUWNyooMX+063ppCCp7rhz7s8m//zIUWw+89H84gLuoM\ng1Xi/mjPw5LfHL+ea0nP3NUnYaqdRkVlWUHeA7izlrsb28xQluka7gEjBo2K\nRONsRbglTPiogPJ1snAWxDAhnP0LM3shXaUN6C7zQ6k6VdYPLOS0JQXbAM6B\nnRv2gWW4IqJxUrwyJM9hAYpBfy7Ar5gU94lN2MazjL2rnGEmQYThBT85cYGb\nLym4W1Yf2prKpYJLRSOGtkdKIawIdNaTBy3OgL680n4ImwO+cViv8BmWCBOD\nkTrsyIb6hDzuRBtmIlC+d3wqtHEUTfrvl6UL5DMnSYZHSNYtPTUE1cxB/wDR\nFPiw\r\n=9i0t\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGhcsTLBH7Q8CL1wYno/k3RI8C7tXX0UiIcCqQhlfmKbAiAg3mlGZGbA4gf0uvpQWu0mEFGPUjEJdjLqSBZL7y9AqA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.38_1571740729546_0.9696611402849915"},"_hasShrinkwrap":false},"0.5.15-alpha.39":{"name":"@react-ssr/express","version":"0.5.15-alpha.39","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","get-caller-file":"^2.0.5","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","normalize-path":"^3.0.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"68165de4f30b07b8e601225147b38d72d1172c15","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.39","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-ckyUrNWWiRebgOMh9hfocTihW+tRMx1w11p0oPq5njjhDeSQ1bXRcDuBEP1hHVhZ7OWUR/MJI9x9/hJvOQU15A==","shasum":"e325a3cf00165267f9dbd09a34c67ddc830dcabd","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.39.tgz","fileCount":14,"unpackedSize":47497,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdruVVCRA9TVsSAnZWagAAI64P/A+XHQ+kS+BasdtP5cHb\nHROqVjMSFsA5IE6uA/IEpPi5nVAQsm6prA8ZqIQrnB6ogEm4DDC2OHReACcC\nS2d36ZKz11FU8lHryi9qbmHZOuuY+Vv+TpriOyuwYAlyDtIOfSodZ3c++dgn\niZsl7P9TFWEltO8NjCqB7335imn3bOO9l3/cwpYZVace1CaiOTO3Y7UHOH1O\nk5XJ+r4VRQM8BHNhCkdsmpXJFptnppVIb3ECq2Yyn4iVaUL8voctCmrs+W7G\nluvMmgOh6nrpKEmqLhOPj+4hVkkjJwiNkkYBvHSmrl+AdmXNSKhhTNyoREtC\noBlaGJfIX+RuA8yYdYYKaXOY1+brwZwlI+VtajoFntVSH5fj5Iz9F73P1oYw\nrcwt8C0KsxukbJ1utfwkwdtM77ZGV8qURNtb+BEdOBe8rsfZF2DaFTsOax31\n3fKovLQIA8NfLcTU6YGDpaxw1Gd3T5v21dEx1x3QUhWZV4159EHj9/UUP+2k\nnexwF0TVjxzQ2A8lDMKBFLHR7MgfuWCUq72czOuTywkxmC+IKowLVil82OwN\noVGex/fAcB1naEOTFOl8pPdc91beA8xyJeWv660kljErdsgpAkIOxE1DS1sa\nvGmvXELGP4IVPBhVoQxtmbVPCL5tEd8gMal/krHiTTE4DZXwVPXkme50p/mr\nIpxH\r\n=S5uk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCpQk3YzOF9JJwai5HwESxzQpISMg7UvKST9iDquAnSPwIhAJDfGMA0qCjOpTbKbTK/YzDFgxH1BmQnq1Ty5wWEGfAg"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.39_1571743060858_0.2548364328359587"},"_hasShrinkwrap":false},"0.5.15-alpha.40":{"name":"@react-ssr/express","version":"0.5.15-alpha.40","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","get-caller-file":"^2.0.5","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","normalize-path":"^3.0.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"1485908fb482d8e9df5548b281bccedac9ca1d75","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.40","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-lnUf/Wr96edercx9WI2Ud7svBNhfCwVTQHpeLN5EI8cxvHu2vlQL37MLd5nOT+KiG1avhd5Hgg8aSOqwPJVeiw==","shasum":"faa234eda4c9b87fbb539871b9bf8f411fe617b4","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.40.tgz","fileCount":14,"unpackedSize":47557,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdruYfCRA9TVsSAnZWagAA/5QQAII/qR/w1dkiP67LKoja\nK08tO0pz1tXt1VtFkd6pKdoW/NyJdHcMrw8suspaU4oIVS5epmGE9RVLZmV3\nkHdUOUJyaFbEoy+xcsTl/Q8ohCKsqGo5E6jZu+bJwdSzAVko5zh587bjX0+h\nUWLRlUYG/2G+gAxR/xWJvuhJr0ikih+Y7+b9XLbeLO+U9qZ2U6PBh/itY3S3\nWPUQxpAXqCIHBqjOiTuLCQqrt2ZKz6fkYTxpwN0dB0PTtCjnuBGRcEtdInUk\nbmgJ1PAJtWkwuBmyVmNfWwkxLXzdEyArDm3zTLHCExFHgM5Ca9Hbvvz4aq6S\nrS93IRIP26Z1jCrWBRXHdHlFYDQkLU2dtfnQ25MELC7xBZIluZHEtzsnMe3N\nGAScah9DS2tpQsU5dXQmQWALp+7n6n2WJJgJSAcMrKX8EUDqY94c4WATHQGT\nd+FQsq3V7H9RRQ3PGawb23pgls2v6owQN7ginIwWL7RjeV1JCAlP5M11zLGJ\nWIrPpKunsZGhlVDjMCPUvm/QCNOIbAUfdQi+65IzAKAeediNoudRL5l/Es6p\nUR/jGHQFQNZ0I0GffwfwI9g6aA7tN8ZC4A8NloSsRs3b/E8qwOyxqOL50c6o\nIlzlk1+UdcU8gTmF6Nk6VvjbP+qzC0n8dnAovVBxaR3nnVHpnbC+FDOrlNlQ\n7SIS\r\n=1Yti\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDbzlEwyESjautMziDW9X85kZWB2TVdTGnAvjQ393rVTAIgFx0wzzVw+IJ5VyoYGqE7qO4thKW1995N5Yd3jXVQgJU="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.40_1571743262598_0.12324853705957772"},"_hasShrinkwrap":false},"0.5.15-alpha.41":{"name":"@react-ssr/express","version":"0.5.15-alpha.41","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","get-caller-file":"^2.0.5","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","normalize-path":"^3.0.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"eeb47f0ba1d9eb7d60b6e6bdaf606f8c1b01a2f1","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.41","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-2tPCRnrFfKc8W2hjil65DdQ5wKUoWh8m1Zfw21RdrT0dbRlYkA1ylV/toJNflZbrUYiLBJxLscseVrjAhpu2DA==","shasum":"9cb822e3c9509a1be147d7bc7b54ca5343708675","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.41.tgz","fileCount":14,"unpackedSize":47543,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrucYCRA9TVsSAnZWagAAztsP/3ytEGJj8S7VEwPCVGd2\nd3rvBl/C0JELwECzLfuWlsFiB+xH1iicYtch5AP9IWKPgAZG4bswdoQojH2p\nVF2TdWaBEzhKN1mu9rhbcvs4hqVutL/ipAsDs+3mGCwyLzJV8InpWQ5aduNR\nAIPDA+evNd2NYoYPa6t1H1LD6KguGxhaDYoRWr6y9KLkunkvyzzag4dwKwlp\nEMlDcap4l6mOpgBWIzQYhDSupshftDCovY7DYYYAeiRXKXQkq2zy6hIHpsiG\nI5Y7WJ7/7vFswiXgRjCi56sHhnATs/xX9fnId+WIOko0fdYzKLexf975JquY\nChGssZ/t7LBD6ZreiPtn/CIXvNS1KZ3ydY8dF7jyQur7FBDHilapBvmkGfNh\nVpG2wnCWQz/udEWu4u8v7POdDOvB8oDmWLNM+94Lb1YzCYQsu5+ymOk8BOpa\nYp/HYRo/Jj6VCJzXNX0glCp66zTHc20qTz4CpB6kP6pDB2UshzMFqhIh8tri\naq3k5ELDCiqndT3svPKTsADFx7bpIs0csNfRMWOGxs7ucW2rbKDkypCBA/sE\nGkr6mb04mCiDEm/qQ4xr2Ul85si5YVp49ZwiRMWxy9ZLsHnre64KBckOZJIx\nXZH2ovgB/m9+I0ijnKIJxAvaHmbJv6h4YIhaxXU2jmfo4HvtXg9apCodqf0O\n++YM\r\n=Dukz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCTihAfm+Nd/OYj+LrH0pnQ3EVDTIkKpZvSHSAbjGddtQIhAKxn1m3o8eP1iyB9Pnv7zEFhNj8/F0wsH5W4FmXsO1fK"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.41_1571743511605_0.5430034285580696"},"_hasShrinkwrap":false},"0.5.15-alpha.42":{"name":"@react-ssr/express","version":"0.5.15-alpha.42","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","get-caller-file":"^2.0.5","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","normalize-path":"^3.0.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"c60d7f37e56351ae717a44998169235f4cca7b3d","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.42","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-t0YtHSflsKVMe/3rTG53shpcEQAhyIzbRlDtiNlhxQ8nrKJSLef94DkG4jU2QNglC6aFceJPQHomsb8f/ZbbiQ==","shasum":"8c31f03e88606c735d3b1a181994ce434b8f9bbd","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.42.tgz","fileCount":14,"unpackedSize":47381,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrufNCRA9TVsSAnZWagAAhYkQAJEhWZw7WP69R5qrmtwA\nwyTBn6OJHsueJlBKYJAg6NU4TC8d0+opvoqcaERyDCaQGi+hPA99PhIPPZFo\nefKwXTqie3MMX1AJwQ5LjixvLhx7pMVPQIGt57e4OBabldDsPq6UKbna1hLb\nqERKuvRwFzQy6ovs6nL3y7sFSeyJjBuggQuGTHgAVeXEd2GSApF2W4qjbq8X\nz8qb2JRTpcn9XUmRgYlIHTGp0Ch3EgKnXPdKcvNFupzfkkQuMFh7iBbz/C2M\nVOZ6JSvrPoLGaSrusJfC4LFIjQrDF0zfXeVwKK906z/Qopx+T0ebYTuNspv4\nvv5oJdDghJTn0/u5yXPjaUK04o8cklgNBUEwF7188O3SI40GDVGHZu8Euacv\nHkv5mekyI634z5kbqQQ01ygGUHDCn+hFxHGphV+kWAQOLvu08FAmpTgznvzh\nBj/SqI4PP4vt5ErCi3WuOL+58tpX1L/XPm2mNcXZeHHuFRdwnDqUjNJclqkk\nJ6TPaFomAzzBuJ9PVv5AeEOS2d+/o7nWamdyE5Zm6LJS8r//5jJ+WK28KzQx\nUZ2Uu4WGgoVDBCQzbNiewX738iglCCBs0y30ezk9XCK7QFQ6IU0bfTfE5UGw\nsunPMh98CpUcZx2KIGb5bn+/tbUDrbU1YN8ENLHu3ldinOo6hta/0xN4cy2I\nQfcI\r\n=g5me\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEmuxcyUNNBTKjGUJY7qSAi0B8/iCQQXEIKEwMrFns+xAiAbKRns/O2jeZ/Q10ET1q4vjw/xVxTZreGmDLvgtSpTYQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.42_1571743693153_0.8256861902525634"},"_hasShrinkwrap":false},"0.5.15-alpha.43":{"name":"@react-ssr/express","version":"0.5.15-alpha.43","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","get-caller-file":"^2.0.5","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","normalize-path":"^3.0.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"2950ea33fb256dce64b19cb92bc29f62db9ad1e8","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.43","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-AB2QTF8PIouQ9PoiKun5ztT1kiId35lUgRwCNqT0O8XsRssvANxGUbP9sZry8lMhgsZ5KN8gb1cFbhkbSIsfNA==","shasum":"c4af53fbb41c074f843b6517b8f908a3453d8376","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.43.tgz","fileCount":14,"unpackedSize":46267,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdruhQCRA9TVsSAnZWagAARnYP/RC9IC5B8iRilf9YZ10s\no1f4dYIPe/nOLaqDS5akagevmsUBiHlyqXmml2j+fD4oKkQ4EnzFQxScUMpT\nEnPTFz6kVIEoVaJ6GczSFua1mc3OLU1ZLhcvYV2Nf476ffktzEc7Uekj9fXj\njc9YHiKECJLxVuO2QurUjISeCnLt/VW8apGyTXPEUnYPK4cDQoR434RvU/ro\nz+QI1bKYRJoBu+GgF1fzaWuyID0dpVo2mR18JwntEtTFEPXp9akedNVRou+A\nvxKcq1nFeikgT1XONliO6mCX5tgr+6M6sVH2avcOV6GnWf4yd1MFnoLym0ex\nKXIovyNBptNCGS+EoI2ka7/aoJM6ukPFUGJd+sjGhpEfcYGhpM/mA0fGle0m\nXYEKWQABiqhpggrVTVNFJXOsgLCfNSepc+jFaAG2DvltScHdkqEfoxIJFJTf\n4RliIBFISEu+SMP4gicx07LSde8ALzuzHjJPQRG//nq9EetVkgtK/uslmDCV\n9Gha/oZNNvtJPJa2sdqAYPfdsvduQ1o6fd1q4Kpx3VCvGjAPmlF5C02KpyUG\noja25UxFnwg1HZz144Hc8vfEC5lx7B3M+sheJ92l2j809pZT9+uljG0oiLCs\nCLyZPyVLVnTZKXPzPnwq6R0npJY0qEDYMpLStuclrrYyaz8OWWgvmk+kus1q\nJd00\r\n=PT6A\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDKwlep/iTUAERY5vWRIQeJ1c7aK1QR1+CWEDKqTFJ0WwIhAO7UG1WZ0E80kamelzH8dnsLbYfBGhkxqhAyDyhgHVIk"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.43_1571743823552_0.25839348400073603"},"_hasShrinkwrap":false},"0.5.15-alpha.44":{"name":"@react-ssr/express","version":"0.5.15-alpha.44","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","get-caller-file":"^2.0.5","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","normalize-path":"^3.0.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"4a6bf71e59160f4dc48b22505e939ddf621aa5d3","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.44","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-XjDP6EfUMizUqtfO/6kzHkaAaujH48UXUlDrLKWVL9/rWAlC0ffD9UAj+38mmAaEiWVUqPx9na4WnacEejL4xA==","shasum":"0d3b61066370b032e4aca2ca32ec80c903753163","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.44.tgz","fileCount":14,"unpackedSize":47821,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrulhCRA9TVsSAnZWagAAYocP/1LlueGd8zq+QvdpItRJ\n7s7F6v3nytE4i3fGwl+bVnsM/9w3RF9Bj98w8qbXGZ/EpFJr6D610bF58c3H\nl/kmb9DJHHQRrstioH060zS1ClmecqqalV4nC9uUSdPtvm04TN3x6Zoa/kXA\nh26m1KHBQv30V7zqBT97+wBhLUqJldnvps4BIqSLK8TUsnZMUlCyxm5gc54j\nzgnD2C1bQWt4hJj9pIx2SHnmf3m6w4U1eyhqmmzhy3j6W/chbQNnuFbZBq1d\nvyonOUffgFqHhuRhzKqxIyV6wRzbsNbd0ad6KXAc+jC99oKru2gOeDpORv13\nVRu28Yk2TldjrlVjHpZBBl/kthziTOe01VLpPlMHSZP5xUhzLwnE4GW8n2Fs\naRy2SlaNPbCD8+2oMDTt9O4aQ23jsb7+7b1nPmn5Q7XMPrDjB1OVQmd1UmDb\nHs4zQjtEsNi9B/5dCNZ6nWY77K6x/kvHM4xcWHFUb08Z8LDrY0QTdQDt/soq\nFLoZ05bxtmZ1IfE5CFIhv/3EUs+vSqM6RT5wtE6snKqMDXrWmwYjHFzMabuK\npbjytpxg8Ev9Xd0YShMgAfjwlwVB3f83xAJvA4yI3EnJ4MWkj4P5m4eer+W5\nl57ha3V20sAIx3aqNN9bWwpuWnoZe9mgEHeUNWAXsDt+mkXSp3oXaiRFUQ+6\ndkG4\r\n=tlAV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCYZsy7ls2DZ0U4g2qo44RVnLLW2FRJr2me1tp3uvhaLQIgQeN/HElzrceESqfpfkgzdBUAE6DfBntFQz/kYobgbSU="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.44_1571744096678_0.7502211788928101"},"_hasShrinkwrap":false},"0.5.15-alpha.45":{"name":"@react-ssr/express","version":"0.5.15-alpha.45","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","get-caller-file":"^2.0.5","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","normalize-path":"^3.0.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"7ebc0cbcaa3c8716b2f0c7547220661062a739c1","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.45","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-hLqjjhYR6dfc0mjEB0kt0cnSQMWcjxTCW2Iq4b4dTp6jGIjErwbg/9757NwDMo+6ONRMgt4Jvse9XKduPcTuTg==","shasum":"7d7c99be3e8d8458c7701344899d9f4fc98ae6b3","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.45.tgz","fileCount":14,"unpackedSize":47777,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrupECRA9TVsSAnZWagAApbYP/2FJdr68KTyFG5hk7t5H\nsrO4uvvoK4f81ldrDuvCextm3XBH5JlsyTdhzdjvmKqQO1myozlFR4OeBsBp\nZ2oNQ5lxFdIj/N+h88Rkga6lsR5tyI/SKTG0nTAohgrwImRca1v25P+m7z4g\n4/mOU5qh6IAfuqxkJG65XGSquPPbiN43tkP1LvkyMgLm14UIASJ6iMFE374F\n9Rw2CzrlY7Rr9Ae65q4fVSnVRYq7JAOX+a0TZYIRg9ulUpv2rGi0puep2dWB\nTwlfCdJpz44KdWX5ZA3FvtB0cHF/GR0fZ2HmJrFnA9btKplXZprQ3m3x6u4p\n3zrIPvdEv+0clLpnr7JFUyVIQZWC5A7cR6iAywQPyhHFAwL1LL8pbBUbFQt8\njhWYGEb4cAHkzZbjFp3bH+/MAAdNOj5G0DG1z/uRFPXqTCxGpaVq9irvOGjS\nnQjzQXID8lLBoqNP83/xJvpjIQ625mdMUxjyXjcXkayqehhw5WC9ytpSw/J2\n0rL3cHZ0G6EwUrb+TUQribySW/L8jC3pLFi4MbV4MjlZcnT5t4oSbE+4F84t\njcqsFttVctJ6a9zECq2gDDnuWg2LqpghG88Km96T3ToZugE0dJUyqAoOI3Xo\nhQZMwBpEKM+GT6b9g5mGnYx63gmtUOnR9RmSE+FbK++Byo9dE0C/ALQWgmsG\n3rd2\r\n=4h4P\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEMCIH6cvD+zkpm3miC2c6DspZvPvZAk8TZIskFJbgKzz9juAh9gNUL6RK5OufB3zvOlfEGsPZfyw/8YbJaiRjkrVPIB"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.45_1571744324187_0.4580852665742241"},"_hasShrinkwrap":false},"0.5.15-alpha.46":{"name":"@react-ssr/express","version":"0.5.15-alpha.46","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","get-caller-file":"^2.0.5","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","normalize-path":"^3.0.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"dc103f46b0aea46d7063e5a3a9ed0076d22985c9","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.46","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-t8TH0+8AZ9bjhPKQjSaZ4fTrpYbFJdesUFG0SGH5tq+zsKQWqtR5nkCloEQSRAHNuvvwSOqeRAc0TfonvbcalQ==","shasum":"10dad6e29c50871f0ffb63d1655063c4aff16e6f","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.46.tgz","fileCount":14,"unpackedSize":47677,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrusWCRA9TVsSAnZWagAAqFIP+QBsKlHUARqmY5fCFkD/\nxUdyqNFz5eCz81/iHwyHstKL95L8ThvL8OE3YypBOiPoX/xj6//Y9mlihjk/\nZwPuY76uUeAOSbxw9BMFvUDZTCu7YL+Dk/+XUzC9HzA5Qe+RQp1SEtDO42S7\ndXbUI6yDP3NwC4YEgJ0pOnFhtuQ9kjtkehLxA0uqGGb62CH3dPMnAh8gwzyn\nOc+z0Sa46Sg2lKC3up9riq7JPgRESQZCP8GVOPuFLNcPGgqsL7c5WkJ/F8E+\nEisfn8szslJgb/mXocvRlZ8NTVWfFr+Hb8YaOTT9pufvxaU/QQMnT7/ODwEv\n9B0iSDM7AeaHwWWbcsRjBKy0b+q+WxqNP49s4pjXxzF01EptvxZXEJPwwZcQ\nT7V9QTVlpCTWnLXxEzzJ7ZphmYTC3EBcNP7O60VE/etbqFaLptDLSvACMgZq\ndIe5Aj5FyjgZhVKobr7GVWFsuUd9eC9xCqjAFup+aIzIBk5vePMpVsRPXjv4\nlEBDlDb9sBizwptMYh3GoJVdtk6P7HJ2jKerME+VInT+u/Q41VsgDFqdxcCK\ntC9bMHxtqd+xTVG4hjuqfX37MRIQhGUajymupCnmAfGKZ3yTDo/VIHX8it/2\nkwOZGz+imc5dzXT+0uNT1LUMjWCPzylJo3zx0CGc1DJd4AkNFXqcwGWBXKvH\nlmp2\r\n=SnZr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDefg9HWrZTsE5fz4zsXEkctkjMPb9AcgtcY8agSwOh0QIhANelbgP6BSCp0CBrRUBLfwQgtI+P+Ic6KsNIJQj0SG4Q"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.46_1571744533569_0.6014859995489064"},"_hasShrinkwrap":false},"0.5.15-alpha.47":{"name":"@react-ssr/express","version":"0.5.15-alpha.47","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","get-caller-file":"^2.0.5","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","normalize-path":"^3.0.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"e83741d05523ac415073c4e69d2a391084911ef5","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.47","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-xDMIbzbQtwQRWCzDGVsNnYDPGBRD0yaCz4Ts0lWBpW+vdKNAIJk5SU5CFz9gNMKaGorCHecQD0/7EZg6PmZBIg==","shasum":"a4c68819eac9fdaf4e2026b33f42957e9196cb78","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.47.tgz","fileCount":14,"unpackedSize":47705,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdruwrCRA9TVsSAnZWagAAq/gP/0rQDPV06xWDpj3FbvjK\nOThf+LFd2jluVSd4dtywLd/KnBfc9xQKC66hk0jQRg6xp1wcJ9BjMNVK9l3H\nQJCFmYTUi7dJVm1p9riEw8+Gc0Y5VHD0GgoDARbyrsOGkKnhoKTVRsDa9gZA\nQmwceVCR2hS/DuHdR9Vf5jq4WhEzrZyqVfVaz1mAPhWh+2l7pnzSQBm0OdOq\nLcP4oA274ljr7RFJ85TY2pN7KFrdrdR85RB/bcdy2MhDDvYP2m22b8tY/Ub4\nWibjZgbjD0rf5S5ivEvb7vrNymBeyPsFrLnGveIO5z/0xII6mFtNZrSpbT8l\nDF99WvGPK6e9Df08CLD54u1nmeq2OZUvwHeR1vG8DPR/+LMpQH0rpochxO4t\ns5EcEYIMLjXRD90DsGwyhB4WOx8sJxo6mg/EUdkaYq9YXbx1/62qwmDleXgG\nRbzrJf7ZopsWjzm+xiQcOq8uCSI4XGZ3A8u4ve66Zvt+5oHrp81YbPETMy5d\nZpFMCh7skW+eZsIkDXjy+3e+LMA/bonFB+XprrrFnbKEzbZPMvjC7xFiWS0Y\ne0dRyF/unczUJw1FFB/OD6x3HJXrMKh2X+E8ojJKSsJWAxXcGgnfuQPjyTBD\nd86jGd5MLZTO4xdbVKgg8BfdKh7U38Juy2FTWGG5HKD3dJUSIIWozuAhQ7uM\n1vSy\r\n=DmtV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCooKil4cxwgcepuLWCE13TERS+PYE5QR0Ifk5M7VAb7QIhALbAaFGPdvkI/+idYIQB0KXZzQeQua0C1DzC1+8KRxAK"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.47_1571744810944_0.029246109790087127"},"_hasShrinkwrap":false},"0.5.15-alpha.48":{"name":"@react-ssr/express","version":"0.5.15-alpha.48","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","get-caller-file":"^2.0.5","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","normalize-path":"^3.0.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"b29b4cb308cd8c57b21b56d9a50b6f379b88121c","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.48","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Scac8r7NJmoxliLKRIszyeY8kq1orzff66vsLPVQy7+y0TeuU4xjiTKEHgYPwiGVQLn5zqJll6QdBM8o1N7Akg==","shasum":"11ce8692f0bab8e4a5fa861da6005ea9f5bf813d","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.48.tgz","fileCount":14,"unpackedSize":47743,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdruz3CRA9TVsSAnZWagAAsvUQAIvLSIgrZ8OfrEv65eSf\nz5WtKLWl2iuqdaMylZ78tTGV7BfdWZnGL021oQhNt9cj6ga3x8xLe1viOmPh\neGj2xyLQhg+yc2AP/SUJnNMZ2Jwxnx3fVAfgu60rQ3GY5/iJEWHnDz+TFd+b\nNFF+5nuYHooQKOEJxgPqpKpCejFkCBtebE3TVfZj43UdVXsOfHv93BuBy7vu\nIR0C/wCdw9x0cWllcYONc3p8maGm4sN1OvupuN1ghOVXFs7WND1AkWgTTfci\nMYW/HNmUxsrwVGghkJnxri0NVJvUHhmPbDJidOLDcdtpSlGWascSjalGTTuc\nlkmm6sFe0rG+WW4+DJxpJuUsqUuwJno9cYYWFA3Y5e2YZWzjhZcynNRkV6Ik\nR5pt+N4fFz19v0kdPYtF5CnxrUx56dXGHro7RRfy9mespzIijrLwYg799ndj\n/u7zBoVHYuUqQctAnU9Mx7tSHXOIcdeLqyhyvwy1FSm0BjCNFD0jKSsSjNZS\nLUr/AgsU+9Zs04GPtQ38+ta3wnqpZDbLwJKbjKO7z42dXhjRj9BideiHSgQ2\nzRZV9HlbgQPiY3rn/wKbwfIvF0AX6yZByBnlKUl9rvtmKbj/HOyCtTr7+csr\nqxJzupvDZjCGvK0vI4vHk20Or5GbmM9efSmNuiTtl5FZQmgMKNl1SVQ83tft\nnJQb\r\n=QM0L\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD94F2C+DZUvIfIqfgHsRvOvurjkKYLHnPLDhCtoa+COwIhAKBmbal5cqcp0MLtyot+VGKKftVIzo8QxnT22NRG3pP8"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.48_1571745015057_0.40047074171610597"},"_hasShrinkwrap":false},"0.5.15-alpha.49":{"name":"@react-ssr/express","version":"0.5.15-alpha.49","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","get-caller-file":"^2.0.5","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","normalize-path":"^3.0.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"205439dc6b40f09db185d93415fda47862eda653","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.49","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-CKldB+jgULXx54xNBZ01UMiEMSMHS0nRoBl4QiabveQ0CGro2fvYD0/sWUHKenGtSwMK3d0zF4/ZcTqHVg6IIA==","shasum":"fcaac4c3e929f531ee0cbd139acd2c854a343838","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.49.tgz","fileCount":14,"unpackedSize":47443,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdru3ECRA9TVsSAnZWagAARWAP+QFAE2rzDj9+eSkLEeqz\nHC+Uskizt8M46gf+9bcVcB0vkhYc4jKFRq3rOEv4+7u/fOucO4masWWt+ij1\n8MvyQdrLYenQYc2NfNSu/BbjI8aLjtpojpd1NEyuq6y3UjIv5Ddd7kLk5c2x\n/yJ6PM9KsYoud3TXAS0zmyB/Zv0BgGERDMwImHJsxTtyQtxBxSQGKFDXwB2J\nRfwgnOkDxzagL+Bx7y9j17H3QW5kIU4Az7dGXsv/7yE/PI2urazGw+PgLwYS\n0MaJ37erjNvHh8Z55q0uxK8pKn0VhPG4DpGpQ87Nl7u100qSbZwR5HCfXEko\nyk0qf/2pHXuEbMWSVE84OhDbRfjwH6j0woGhu/t5/FF1CYBoLKXQkVWlni9E\n1GH2QIBdNmGmp1XbGmqIS+hXhP4fJ4tFcoAgyxv7SsXd3GnZxHsH8fLVEWU2\nT1PuwaNt86KRFfngZemFnNX9E8qk+gmJct9ys+CTg+tGhX8ch37depltzyu+\n16BRmYb28btSGojdlfdFx1zi2XEl4Ptt5tnz7k0Gkx6IA6qlo7xqueLjFIH9\n6m4MJsE0FhYWV4Bn7xJlTlYjaL5jfBb0ROC2AFJkisan7Gwg2rPLDL0VgFBv\ncJrJpzH4gDGQ5lXCKUcsG18kcKbDI6ZhTsA7jMs2PWOt/xvgh8ZfvQtK0KBj\ndinV\r\n=4mgM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH+doWta3ZjFANZbqddM1u7oUZtkBLa4odlyqRRdu8p7AiAWeEvDRN9n2xj+ztfc4e5xHGAnyvM2FmSA/wzkJ86T8g=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.49_1571745219501_0.521301836319042"},"_hasShrinkwrap":false},"0.5.15-alpha.50":{"name":"@react-ssr/express","version":"0.5.15-alpha.50","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","get-caller-file":"^2.0.5","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","normalize-path":"^3.0.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"a6e9314fa1d8741db52bb7d5340e05aba68cb0b6","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.50","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-nHzClNvvkTuOyQgYJa1LOwutrgLXn8b1nn1AgM2zDS+Uu/G5UN/yrDEU/xmgunWPiUSgktCe4F/88OUwC48GHA==","shasum":"7b98f8f68fd873352bc3f81b78a0c7d682f86921","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.50.tgz","fileCount":14,"unpackedSize":46225,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdru49CRA9TVsSAnZWagAA394P/3JBUihwH3hT7KpdR0MS\nS0pY6QxP1aJflBstUe6/NhbGxv8fgtaPM+v9yQJ/bJMa8JcC1PBXpSp4Jk+9\nB3ewTc4q266LY6zSn41BqlLrBoO1/fXY+6GadDhT8+86Rv2mpbBmyQmV4BZY\nB4V79/u/18O9D+GX9C9wwRUST6n0eLh5aJmo4TP1dBQamva/xR76NkbqMaYo\n1EvYWFOeUI/7HlpqKtABXsAlwExn6I+sYtVTWr3jygddY0me5NmvvsWUqW4l\nZvHNsqtS0hW9bQ7o0q2xlrxZ8+TnPdKkhkRnShi3ZwkzSJnxXtNNLMK5gNXt\ndUMgqC39+5oC2GK4f+kK7vlNCXr64AwScnvmq2zhoVexpLaPqQ1SaWVLPw6P\nSzblyhayYv/l8woe+Sh3i2yW+2UugeTfOA0ZxYwB3BEGr91MRv23dEIwgOaZ\nNvwwaNJtQsG/d2wEDDhNGMU3jFZ3VVXrrn90tKU84kGMtEty3oJSmZX4COAf\n6ubpJpXUnDzTBl85uz+d0QvWvDpLAxj7JdUh9fpY8sc6ipew+CKRB+GryKp3\ndl7dJpNFozunAdaz8Sj16iLslkkKOnyv0E50E4trA5SZlnulKDYJ2VBG4nwI\nePnj8fZG+BIIPtBFRjWNDxnITSEp6ct0uAXm02QL93oRGYODn1p818e950Z6\npuXX\r\n=J48e\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHYYQxEZe6XGguuUPiJvPWlXj5LU+LHBemjcHh7VmKU0AiEApg9LrbHo/kl6e546B522yDWf/jHx8TXajLdYvXr1iT0="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.50_1571745341060_0.6877620334574739"},"_hasShrinkwrap":false},"0.5.15-alpha.51":{"name":"@react-ssr/express","version":"0.5.15-alpha.51","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","get-caller-file":"^2.0.5","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","normalize-path":"^3.0.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"4af0c6318dfca56b1a578a3af97a6f1ea578fc51","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.51","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-OHS3gnhrQHaQWFiFwEqHz5Z6RqaB7SuhKpdCnZ/l8tSgYNYQOcsxrQiW42yuzJISwRPTOc1tMHnh8DoKasIW2Q==","shasum":"144a81805ca0ae69e40b4dc045556d503ad72cf9","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.51.tgz","fileCount":14,"unpackedSize":46253,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdru6rCRA9TVsSAnZWagAAfSEP/jR267N7LHiFH9WjsiRz\n/1WKkhMEoZWppHG/V0cq5gqX2Q3Bzf158cfSQbG/ilPOFY/wPbn+RYqssDI/\nKfmlCL9OoFGCsSK5aEhNHMYdY8nRlaG5jMJRrmStlmirpRnhpXLnt0TGyKSQ\nABz+80NT7zz2I51tGroDKa2ku6Ch4ZzQOcEWlCOi9lKSgAYCi5N5aJpPnZLj\nTVKRinkSDCob0/rd4yJ8vZnP4CBZBH6CYZUy5k1A50e6/+UrESJdQWJI0x2R\nTvIUVd31qfsEF25GsKkOTASeamAOh8gQzod1ZaAgq7lKxoVUKkTdpNxkb0bP\n6AOOwV1rlMPCTydte5abpLUPvI/5nsaXfdwpVrtU1LsN07YDspAebKGNShHR\nnF5Zf7m6tEjxov6eliB9oAd5qrvq9bQJTo6gtdhPIgUlyjoo0V8i3A8mb/X8\nfNSmlOhXCmvVo36rBh5iJPQM0a1rVP81iWz2I+RgjwYpiREC+ZhgQfyKEmaa\nM4Byi3q2pl1xuNwz8OSGFDEZN1HvOpY8uNHxmYjfVpWmiEEaHpOGdKw0mCo7\nDvP7VZAk8Z3+tF/tvHjh2DmESohrDNmDIwvHU4HSrVgDmUrADitMo4j1knEi\nIMtO8HNYLenC75Y522BVrqwiWTZoIyS3MHh4Epm3fWkVkLeSkKz3+RoP7u+/\ngulK\r\n=uFrP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCf/98yrSoD07oMMIjxYS75xQ6oN6pTNdWXV2KnxrDe+AIgYb68d0XpixDF+J4gKOH47QRFjPPzB/EhetdwmC8xUjU="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.51_1571745450524_0.7534957669640616"},"_hasShrinkwrap":false},"0.5.15-alpha.52":{"name":"@react-ssr/express","version":"0.5.15-alpha.52","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","get-caller-file":"^2.0.5","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","normalize-path":"^3.0.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"bfa375fafd6e11bb60e47023c1849724d715d2fa","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.52","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-rgV2yZ2kNM9x8NUI/EwoLKwLtdqp3lOuOVktBwMPP9Batn0Wfrfrzk+yz90m3KZ6RUM9+P61hWxh+RwRw3kmbg==","shasum":"7d9a1231e3a34ada004b490993b14986e91e02aa","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.52.tgz","fileCount":14,"unpackedSize":46237,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdru72CRA9TVsSAnZWagAAwgwQAKEfS6Pd3qhIr43OTlpM\nPiS/QYtr4A/UotEyhdu3+85GTeMWg9C/dv3flAizDlb6aDuc/oaAVyydOAbd\njwpX8Pmv/CVP4IeJnmqnjPzeAbBuH2UMCCmyWeNQpJ4YZ5w4gxt1gI9mIyHc\nG1bUnA8O0NmRB58Nl971FK71//3dh+th+6O2YsfOLuOqt/dEMNHqgNFZP4i2\nnjzxsx/ROXL9q3T6eXt7SzFz0K7kEGg0DHJKABuMQd0Qwt0+Iuje6EAOAR/1\n0NkPBAiNYhpiF95Gq7qBZxLx3W2ZaHtVKhbjZC2SxHwZFlgtbvkysOfp2EBt\nbI7Qnn9B4ZRybzSY6KLCgaVB2pFPtNadavac7ewpakgBCFUURYdap84KaXMA\nipHUZc88UPFDpaRSXxzN3Qd+W634shFuS17usNEsldSKNGhlu7Y5W/+VVzS+\nZEPtK9ImQGyoPcvMgOxu5lCpAlgMJC87F/wh/Jj2OIYsuQhUcE+gmDv1beUl\nOf96tt01Jd0VfBquhlbm2qHnecUc+JIYB0RW16ZyXEx53yuPVRMiokLH8jzK\n4qgFnPMan3HQWSsNeUsyJ4oAMOyYE9a0to2TUF1A7IZ0kM39R9qgoVUc6G8k\nRVI597cqngcdLQjgeeoJ48yQhTlEEGhncqMcAVY1GvfsvrwzLIcNuJqR0KUK\nJuB3\r\n=3wfv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCX7VWAuY9iJzXjSXcBPqEO56ImmaoXMi7xA8UHdgzDyQIhAL7ZHExgVBsW6Wq7pr3usgl2VeA9QunW742m8nECM+03"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.52_1571745525897_0.12862438799818232"},"_hasShrinkwrap":false},"0.5.15-alpha.53":{"name":"@react-ssr/express","version":"0.5.15-alpha.53","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","get-caller-file":"^2.0.5","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","normalize-path":"^3.0.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"5408ee0d7526a556de93ab3cbf70c21cf1c5fdc4","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.53","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-gezWIl/nfot+lnZxIdEfevF+ll5U9DStb+pj4VrZeEzZ+116DgNnbQ5dQugqgg+A7/noG0bxThRf1zcA3jmG+w==","shasum":"a285cd47c5014de263abc2802921cd1754fb7976","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.53.tgz","fileCount":14,"unpackedSize":46875,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrvB5CRA9TVsSAnZWagAAz6cQAIJbE1/pESh03q+/swWg\n8kZo3vfuoGBoqkXjdOn12b8fjVNxLzKuy2Ws9Xwmsb6Xw22mOiICDZrcwWIk\nJJjK35JQdis5RMzt8GCt1wV1LgjkW3ZAXopn392j1DrSaKUGl1EMICp9abdV\nMVpIwU9Ml+PGcMHdPfYcb6hHaNNZtKSX88cO06njfB2+Xhfyc9BVDZ2+XpA1\njfoc2i2SnxMO2IchtcNeG6kHYzAMGC003alJJQrr2mvS4MQZk+cP2GNkEHXw\nDGMpVoXL2ct1Kw55gIsbiBTQzT4hHXthLl65NmjrnV8DMcbOEtMqYsJlnHz9\nzcMQ5XDwlfucVz61K+LdKZ/HgG5PmuKE7z7jKBLDcqvTfpPXxRkBSYhGbFqr\nSG93a/SkN3cm9L1tOFIjFJq7+C7vKDqGpIq4DgLfA3PsVydXkhVfNfV4+y0f\nhwZXdN+xdEadC2JLCUHl04Q8Byzzc91w32kmVqchhcFFF2ZNMal8PH2XokjS\na/5Jel1reUvZeeHXl4TWMaxdWtZfsEtVNei2FF/hbsR4iYA8hvJbgDK5Dmnl\nNgRfR131QSR9IQWNBxdSxsrkXHQL6jbpssbyAe5hvzKSj66OLQQ2c33DsdxA\nKsnyH7E/zbaXI/tkh/wsYWvZhfeER8ej8agkamocXyzqwtG/Kek9Tb9bnyz3\nrsvH\r\n=2+3u\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDCUb976D7Sp+d/tUAXyzhhCuB1iV62Z38U14lDlaMMZgIgIBtfwKjI78VdxDaecRDbHfYn7b14J5MaHDGqzvTKxmQ="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.53_1571745913014_0.3098307094126047"},"_hasShrinkwrap":false},"0.5.15-alpha.54":{"name":"@react-ssr/express","version":"0.5.15-alpha.54","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","get-caller-file":"^2.0.5","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","normalize-path":"^3.0.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"cb19cfc23e7938944f46231edf3d553a72ff5b7a","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.54","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Zs9WhQ6hty0lnpMBTk7FEjGixCtMix6GxR0GleL8jKqPntlN8yyvnUsAJrEXF6eKjkIe81ETOsfxeHLQxgHa2g==","shasum":"6205ec9fcf75335d6de0b5cf4a5c74970b732fcd","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.54.tgz","fileCount":14,"unpackedSize":46761,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrvCLCRA9TVsSAnZWagAARYEQAKD9coBucL9c6WdZsqJf\nVeEIwSLDyWQ/JTmH2rFIVan+lqYRXg7fAFa9gej11TLMIJaxq2EtDNksMwT/\n5pcEtnLNW5W/dcztfXiULDIguBesfeNClKve7LGDYDzhRsx/LnEBL00whQHC\n/rhPJOpmoCkeeRX/f6CSuo6vbyWfOaxffvA6uLj+E15VMc1qLhfzUCCNenOb\nX/SIsOSw0HRZm34EfHMu9CEpi62ScoR/hD0dbWKq/Z9OojJyMCT6yamrOptn\nRtOed9McevXSoBBUg9miHx+/Kf5AEdkk7Y03M3GJDTcYbM8Ncaz2K4nrmi2D\nRbSGIF2E3RGqf4OfM+Z3N+3KWGUYe1iEu6IIJmSfR9vHCf5JhZkYv5s4YSIb\n6/t+jZ0aYrbB57Nx0pKxeZ/BajM9fJPuiT5eQIzK9Nk9vuPJJMzHzLcb8Q5U\n1buqbjbbc8FuMxVy7twCgEeHRXiHvHamTO3CkztyS5ZiFozglh2zAZF2RWCZ\nlDsRrygDM+LYYWmQt0jeUKtJnDkX2YTbRFSonN+IYZayTWfBTwMXQSo0SAqh\n0yff9vJ477CKHoso3iU8+xqFypwMKbbNBb5WcAe/srM4agTAeKRQr+xaYj6c\nMl3+7/8bFq0P0D4GEhZ7E05oYvq0CQqukONaJ/DCaDM4yxckebYLm7lGmE6A\nsyzm\r\n=MUjt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDtkt4MFP2zQC4clmz9Ss+pxHr9/TnW/pZWurJWHPK8qgIhAI++dORlLxAl5uZRHwdiKOwdw4/rCJpibQrOwD72WqDq"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.54_1571745931111_0.9881617862593757"},"_hasShrinkwrap":false},"0.5.15-alpha.55":{"name":"@react-ssr/express","version":"0.5.15-alpha.55","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","get-caller-file":"^2.0.5","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","normalize-path":"^3.0.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"81c431151806ea12c19d5aac49e5b488726b7b4f","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.55","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-zrOLqjyOkiAbJMBjqzoPBQIo5HatPIKeQJ92YTvN94Dnk21tmpcnLBtFt8rjESz/zd+s/d5AP/Oej+jj47J8fA==","shasum":"ad09c6ac0a4378ef65555a41c1fa17373cde3f0b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.55.tgz","fileCount":14,"unpackedSize":46193,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrvG+CRA9TVsSAnZWagAAsBkP/0Nb22GLqzowFTw8MICh\ndslsTpXET/Zt/umXmDjwG9g+x25QwA3Zjti70Fr6Gf6C3Lph6iw7mOMtDLM7\nRZyJJaVnHmQO21mDSrVW0AOX9VZDfZ4dQtEPseDsXmsvtio5jhONYMNifw+L\nSbOC1OaGXdJ6fDphh9TGZj7Z4c8z0AbN/yZLk3G+bKp7pEqHDsbHBVj5TfGg\ng6LtWY9WAH16ysXyq2U7AEsYkW4AXWDIn5QOznoVx2kqDWkKJTiD4pO7Mdh0\n4iNH5A5RVBktXGzCLBcQvur6PhzpyNPOJSv1AINIrjk2zvzzIdA62ClSABZs\ngvDHwYDnpQ9Ksw9NUHVrwgSGBWjTb2JGlfaufFMxKVHmNeDFlc1U7zYK4N56\n+m6FId5nS5oKXBF46trxhTq3rclCUvap5sOyp40iJ8fWQqWkcCqbRugeQf2A\nciKVOfd65H8F1doj8Bppl09KAOOV2rOBMsr64jGhNZK8lXNJw/3zm324bFBr\ndIJFsepkCyZZzbAhORAmwMVX43uqsbKifSfM40JKzHUpGr+TOeD81yWL/v46\noXjdvEmtpJK1+itUk8c+mmKTGlaOrGzoid5eUv9fh9rlTiByOfjuypf4jlJs\ni9FcfB8Yc1P/IVGJZHC5OczAmni1BYu7z6w2iIGPS7qFb9uTGjyCEu11qg7P\nnupp\r\n=S8mp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC8Cfb0SZDpQWL250ogaSJC6DjmmtxHPwF9kDgA0myxvAIgBINS7L7kYrH/YeUdK/BxXLwNHtWNFhxRFE341LVpmm4="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.55_1571746237325_0.8875098509703669"},"_hasShrinkwrap":false},"0.5.15-alpha.56":{"name":"@react-ssr/express","version":"0.5.15-alpha.56","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","get-caller-file":"^2.0.5","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","normalize-path":"^3.0.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"7134f2d668ff9e061a92ad4072b4ab6e67c63bd0","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.56","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-cELtOZyE6gih6v2I2++dVQaMwaL/NBcLV//pTIyletF6LMaXG+jGESjlAYOotpN5fhGF3wQLRu6CpcYBfMpRVA==","shasum":"9b49505dd5af2ac2e5795f9ef0e255989d77dec5","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.56.tgz","fileCount":14,"unpackedSize":47619,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrvxcCRA9TVsSAnZWagAAqGQP/j2qFjvW9aCEmF14ovXP\nspXRE36orkmSm037x9BuUA9fpsS3b3zSRrBAV1WWYQXqW584ydC3X8rOQfk3\nk2vsa+gWLYQjAIVkk/PfBziM1r3nI5WliV25zfOXgaxEwCGfSbIj3UR0mFom\nHJNoQHwcnW/Mitn8wEG5ZqfOlXEw4VwwMaylCIJfgco6gsiKQP3l/zNUJghw\nvTjJQ9Bis2+XRB1gC8XNNG+ZumJ1vNdMz/QzYz1d4x6+R3r9UAqvDgAN81VZ\n98swYikZ6FTA3UNldYOa3kDYEG/j3+6DfjwwcdFqV+yKT1MTEVnWgHKnmIRW\njsHWawMdfIA+oOU3AA1GTA+gjWMwjGlwzJh37iEvKgDwbcS5IDBumzef0Uk/\nXOMDuK2lbBSjSYHxdQHr7D3tVyxLrfpnoh1fjiDBlrmfNtn55lOVmTKSbsM8\n9DKbwPo7HuCchcq5x0G7XzhMHD6fEZwIsyTTcizO7LR+U+BFRR/3VlDvW/Hl\nqswPfTlGX7YxnRYEQSqDHRFV+PJSa2bYTH3NoFfqGYFEDSuNubYPzfOeXyI0\nrv6MEe7iy5qAjBVqB2FJ7bCISvCftbJ/ZBumA7h8l9tSM2IstKv4XsVHm3B+\nkzZ+VRzWznQbwuDdYB92ZeFGayp8c47YGfw9pS0kih9jsEstL/LSTqSaMHjJ\nov/w\r\n=hnyc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEccrwQoiwtXwWcZjdmfcd7hlHBfktJU9vNykDY8p375AiEA/xzOK9dCcp9YlP3a0QrLPryWQyIhmIoDu/IylF3gHCQ="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.56_1571748955401_0.1399759892367618"},"_hasShrinkwrap":false},"0.5.15-alpha.57":{"name":"@react-ssr/express","version":"0.5.15-alpha.57","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","get-caller-file":"^2.0.5","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","normalize-path":"^3.0.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"51e5f66f0a757b163b95af0111a79e4a760a30bf","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.57","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-4gx6fM0Rnza4kI4Kk08/JQ+IKs3aqbeLgj8Z/8V8YR2hs95RCdQPuWblfsOIG4UOXx53H+a6K78roNvgFjFNIw==","shasum":"aa988f8d82193c5688a3b489784c374b493c474d","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.57.tgz","fileCount":14,"unpackedSize":47607,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrvzfCRA9TVsSAnZWagAAZa8P/0cMWBh/Cm5CWlegdL8P\nReBDMXLQBImnK5a50ipuksEeXXew1mLqC+0OPN48U4oRnVbaD2LMSuZ7wZFZ\nMWJft0o4Y26RPKv4cXVaZDtvpGieImiZenq9lE6Klh4fh1MUMPuu1XXV+UIj\nWRIp/6mDmVs3VcUcTdSnrESQRZI0S9sXsoIInBvvaG3htS9WksZnq/Vzp4v1\nt8cEu1hQR7kYX4F0CQltwurlV2B76+h8EblQm0d/VKlUWrTw+PzxlYVkbclU\nir0CduKqljQA1nWsmrMe07LDUuJd7BE+fSaiNjhsuTGOcwzG7rxaJd8WGqxH\nStFSTclsQjyfotepLcnokG4q6Sn7tVW8X8CG4/Goi4EQ3ZR2gfe01ajCyyPZ\nkL0GBO7O04Tc7q+fDSbTnMeyac5lGWHtIxuUW/CC9m9pYJsoFI16ErhpDNjm\nbl/PQo22AuLd/mCCIZm1PfQgqKjROqIxJJXWVHgqnDDsQU8A70UytaXO+7+j\nt2Mt4EKe38R2Hrfq+CmxDPJuvC5T0v3Z9Dzc6I8rTNOUMrkaDaghwHDuT/Ty\npc/Mvjsmk0zYDlK1DNtPnIdCZ/gszyvjuE8/qBhR8Qa5u+lFC3GmO+ELSOwR\n9NI1Vm7qX6Y9UhicIYwUyTePHzTd9bapzXdPWvf1fTP02QtHnI6QkHW82E9O\nkdYS\r\n=VKP9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBuvYGryCzF4hqPQFuBb5OfDzxlf5B77zpl20+Cg8HdLAiEAvkWck5OBQ4NaRGyIknkrsSG+ZxU50j9JrkoQqcbkOxk="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.57_1571749086476_0.17418159124569033"},"_hasShrinkwrap":false},"0.5.15-alpha.58":{"name":"@react-ssr/express","version":"0.5.15-alpha.58","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","get-caller-file":"^2.0.5","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","normalize-path":"^3.0.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"272fbf184eb146163e3122915e748fc24c3e2d11","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.58","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-FtDUN8Q61LUppSNwDhCMGAuIeiAMPqDi7QNDj/QKMun/TNohwWx7yYlnqdj4CTO/Zfy9f6ln7YD6YyGDye60lQ==","shasum":"e5d318307fb648e754117ffc3c2eaf77d7d73120","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.58.tgz","fileCount":14,"unpackedSize":47195,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrwAvCRA9TVsSAnZWagAABygP/Aqf6pBg+kU5j7MuxNVf\nr4fct/BzdFLMHyN2uWOQyxkGmGDdXP/COhRwJSiZUXYG+zVpicmXNZ686C01\nhS8dxSrZZ6BmLCoef+AINRBd6Rs8twdtyRTMDEpRBOkgR99l+j1uzE8z5feZ\nWKmlEg6yvrftbc7/r4BXdcRhjycXhC4dANbj/kenhzHtSfy6nOcuwQ8jHEQ7\nsYGYFG1q/+c9pidABuOVB+ARzQZtecXSmdr51CS7NXulzwNgXAD55zYO41GQ\nmkjXbdXWkIG9gRmRwb7NWY1PnrI7RVKkyz/Q1DkgtGdL5stjoEgKzehAdXl5\nek/nMqPwuHc7ZIndDLvuZsP5ViBV202BtJk+mfqt+Ujg/kZlRTSqOcIqcDRb\npzRzujYasF8qNKyQOZbv4GuJyk/QmEiVsT3Nn1QFOhOCD2/WAAGgaZRndF6a\nA4s2c9XuoZjVLpiYhH6/mFmX0fOAuB/a/V6R0MbH43mAdgyGaO0UnRYfvDfQ\nZCROKju7KbxMMLC/vavsz9FyD/eMMJFYstfq4FFMfj3cvFr0EDEXJfZH0ypx\nhBshSNW+VQnM8UZ2NGrXsOAOxuj0BwZXXx1QQNRn0ApEsc2rtYNjN5uI5aE3\n/lVbCETsi18rAqAfmo75PHkFR/O9lLaHC5NshsSo9OUQlq5ar9xgLwstZbH4\npVdm\r\n=Uumx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC+gzy+a3abFdn5VzMahfyrIZrfGxnia4i9wB4+JN/3wwIgNFiokLO78VyLqWqkAk7ObGlgVgd0HMAG5e41M4A8Wy4="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.58_1571749934498_0.024431855756096743"},"_hasShrinkwrap":false},"0.5.15-alpha.59":{"name":"@react-ssr/express","version":"0.5.15-alpha.59","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","get-caller-file":"^2.0.5","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","normalize-path":"^3.0.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"3c826deaf5d4b3ec6b669af47488a26d6488d4e9","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.59","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-EJ2pPXQ3P/hzsr1zg9/6m8VMeJ94Cs9vSmj0bRKy1yTjKHZ/xFR8EH8hBMBr2kWKna4DGPF2mGFyfGwOzZ229w==","shasum":"08fe46f77b428314087f26e98948d3b0b5ee070b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.59.tgz","fileCount":14,"unpackedSize":47195,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrwDnCRA9TVsSAnZWagAAHukP/RAxkbnxrXtgyj4zHNBX\nYxLIsMD3BG5Ni5tghcFmaK+ivLAq7JVAYUwO+OaoUi5DKklFO7QmegvVGnfa\nxuLwm0CfGfRKoufaIdcvwP8WL4XcN1NfdxmgDvU8vjeFn/uv57rarJOzMGY0\nKpKgjhjnQB+5sH5HReAxudVYJN+5pX+iPKo7Kk0W4ZvH/ekzI2zGe9L0Q3wS\ny22XMS5cDV9lhlk8tuG1ZZTXX79uhAwkTbhA7PcnsdqfVisIXlR7tFMJGyH8\nUTxSsu4VIuFNzQAIsz1ZZCuncKq5Cn4TgdMl14/IDBl8bv8NY1jpIfa3Mmaq\nMNqLfb1if/GDReV7WGh3qDJlweSCmL0066CeB2ij9H8ePCoXPio7etUjk8SB\nBy9oQzYm4HDCVd72zuwz4RaLffiyGEwiFQmHj6r3YiBgFDWf7YCXd+yMlcX+\nGMtiVfGzwWf/q0r8bV+UpJJknKZI9Y4xnu7iIAS/CLyaWxRcZpcEWkR9Nk3e\naQ+o8BT/UP6hT73PllIy5q9iNQ4mIbHBCbrL10eRA5GmBDg9tgVPv/oi7LNv\nesdIbY5eKvOj4cGHgsPoglPgqUgT2enYULHghgmRVQ5CbXfEm596NSka7aBR\n8M1WCy5PsVkhDht0/1fkTWhjUIntVLz7C+XtJIHyLRWmHCKt6j0Qph6+Shkj\n6Gok\r\n=sEsy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEaS2EBXZ+ZadSc4/a2ldqAAiyihzg7ulYKKCkrb7sSQAiAyDxksQRcFpJeLTSv8UD8Ea+HexA8Oqqb+hYcTy0HTUw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.59_1571750118745_0.40019341801193864"},"_hasShrinkwrap":false},"0.5.15-alpha.60":{"name":"@react-ssr/express","version":"0.5.15-alpha.60","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","get-caller-file":"^2.0.5","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","normalize-path":"^3.0.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"3f1ffef35a3b14964d9f458742a5348fd99b0ddf","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.60","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-sTf3YH7C5nGXS+rfYTejzk+6gxe3tymB3NCjddyWJss1CDIEP1hlJk920Xb+0KFqVr4O0FOkzkHuV7E4PVgkBg==","shasum":"4f9b4d4663f600ea2ddf32a5ab7735eaee353906","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.60.tgz","fileCount":14,"unpackedSize":47301,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrwGyCRA9TVsSAnZWagAAoUQQAJiCLXP14fbkpi5NAWgj\n08Z5nbGStPUtWwfJJ7EEKozYelmXgzwwhshCDF1a7XUtx2i14pwFBGDoEdS9\nyBGd9qRFNAFcfxQEL4eoN+bIUZtKery8MwHz7rLY48+vUYIfbppYhN65xUMi\n3IZKEkDiMpsVtioA0scUUdI34THBO2/1DpxuNsRZ7WIHlQ5xkjo3amGPEUfO\n+DL0LUMXynpi1OjDlxRii0X6te1mHBhLWe+nve7qTLHIb1yRsPQzOTNy26U0\n1V47Gp076jhpx1dYH3YjrR5BdOJLG5P9GqPzDoLXePWfp+rlDLS5M0o2ITcZ\nAXosCL2KkGZAu3U438LUNh9vHHkGUqpS7YmLD4SJD1bUHsEXt0i8H5nsaaNq\n95QlJb49gUpHiNmLR8vibrknlJgUT/PyJzGtuUmk3cMcUH2WFIKHpDqYmbtq\nMVK1srbl+dKVXCzfJFRT3SlYLsIongYkPxEj0+pvwFT1WovtwwJhDknpPaji\niFSamF0vyV6nu3NAfzBaR59feqzlxGj+uTJ/PAB08bYAhq2ziEcF4y1oZAiC\nEZXie6Zf184YP1UeUrzIl3dL2rtsHc6QDAT8cj0D52QadvwxP/zrT5t00p+E\nhtZT7oeHPpyZClrNjZT2ZFNaFnpdh0xCqcCFymjKY7jg6wkVISm7WBYWTfMj\no//W\r\n=QwLC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGjtsMOn4ELJbSBzxhXBP9eIiTr5jTxHy7xoVD8SYwFmAiEAyNE0P7fAk7nlLfSfXmkjwe6RAtjewXd0EOX8wMCzf6Q="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.60_1571750321376_0.9233830310914544"},"_hasShrinkwrap":false},"0.5.15-alpha.61":{"name":"@react-ssr/express","version":"0.5.15-alpha.61","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","get-caller-file":"^2.0.5","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","normalize-path":"^3.0.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"76c7961a7e7d5fc4e38d88b7f01852cdf55bd54c","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.61","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-ISlvTUwyp/Vj2O6cDDqNiHvgmcsaR2eplL2XRonSPFTFeT3Uag4IEZT/HBmO3Cxi8s2uDYwbmGKa5DMsu6IXCA==","shasum":"be07cadb302332a3ee2fe24a82a4cf9bf7d4592b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.61.tgz","fileCount":14,"unpackedSize":47337,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrwNACRA9TVsSAnZWagAARMAP/2co/uPaMU48WeDD8qt4\n/F66jRnV5w/GmzOdEYmdAGQW6E6tIKi+b7mSpA+oDXD7BAU1NbD7wtZ2r+Xy\nQRfbqMsrvi3YXushpSB1JggLaGjo0EV1CAnWwNGXqaTVhabrFEXmMueCO2pG\n13p1vtfyCDmxvPuLtSAygwC84tQGrClbyYpowoGsZlxhJU4QxyzVvGy61uMX\nHUd6JCuNGc0plXkhFaZic97CF+DTQetiEcIerPPb2FAV7vjFb8dXVOmVzXki\nNEFr9v/ToWhq3+jqGqU9ovboZrKN4C2MaeFc2PpmXS04UohsKvDNlZ1QErX3\nDZdub6sJw5wi5c1a9dKcE5/qgM+/6eAlxU5HmkhJ55TIpL98RsAJmbk+HuEw\nM5bObbQSUyaVBzoZJvDbT0GBBpfyGnpyeqJhvYBuHJ4o25WRdDJ0Fj0lWzBy\nFpAVFVdMmW5oeY/n18jNQ16oVH6ro0fFtxogOYOPgOQp/C+A37JF+idx35E1\nFnTc58f001Jt8Ua+X24Sse/g2xLTn5x+9I+jv+tgRSb7LHil8XVveweZrOZB\n6AGuvwiW57QBB4HXHZUojhAIwWgvta/IDW12ZbIGJzIGKxWVam5eLQm9Ufcb\nIjRzybO1FrsRKETn0p3ncE+cupROT88Ai2fZ17kJEWILJi+9X0AzHNck+1G8\ng+mY\r\n=Poe1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGLM0TpuY8Z3BMhhXnHrYJStpFFExWO85ZAitC2tKtHkAiBRqOBMikVaSiwjt9DaHKSv/MQ7oYu92DHROOWGNYh77w=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.61_1571750719551_0.047063095458228066"},"_hasShrinkwrap":false},"0.5.15-alpha.62":{"name":"@react-ssr/express","version":"0.5.15-alpha.62","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","get-caller-file":"^2.0.5","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","normalize-path":"^3.0.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"929629a131b8f5b83e1e3bd46384f8327f6d06f1","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.62","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-I0fDO9UTjbdAoG3GB/6ZJAkM2/3LNsICuYfeu8Ke09N5mnOD/8Pff8SEHA5glVyyiC0MJWeLUAJVvwiNosmGBQ==","shasum":"1b87ecb8e4df2f24058f09f1443028831be440af","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.62.tgz","fileCount":14,"unpackedSize":47377,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrwQTCRA9TVsSAnZWagAAjnIP/0NKGn+FKDIXfVLPHWbe\nWsyHJ6YBX9mBPDPTA6o3dsgmMEU9UUo0iCKngnWp4PVIl8Jyh+mriUdOjc+w\n22FelQ0pCpDyaZrBM7GVyf6ZddTrsCCK1bje43+uuElvixOmpF4n59YzwSen\nFvUKXz6z3MVKeB32gffpOFQxvj7duiGlAwzq3Q8ikw+gPv2lsquzSeOvLM50\n9B6QuI8FgpenHBoRkHoROoRO+ZANx+meBqqd3Zh188Z6vzRpennEv1veOPK+\noefCNO4lZ1qY59J8NWav6oewtKVLopwYUM9FnkTalk7LSl01biiUQge3cbPr\n8XSLNz0MPfCjiwaikeaCfD9yQqym9idbyiz6ibv+WRO/M5zdFE7UTqNsJJ9R\ntOOhIn6B534s2ioHgMztsZffZrAP04GhK2t1gJV7dMP1wHYvJuCRzTOTm1+l\n/pOONPs/BnQI/ktqf8NeIe9hZvREKDHat6BrJZRTe7iHSoWItp5vvuPNH3/Q\nH9YPWfb+ycMkXyB46N0tO+kAFV7G5/JWDIoNw7Ybb7dKQ2gMBOOaO0qB90KS\nBAAHn0GtSLmwgd5ozGIQpAQPbzPN/NtPFt8guSWot/aahyyLADdQN4vaTRlA\nQ/l0xvwNz3hxq1NPtEvU55jJUIRR5uePp+Yoouv2qWPo0MiP24QagAZtkQTD\neFm7\r\n=9cPz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGYKwvR0cVmSA9G55C5BZgh+9c+gKCtBCpBs+r6vfxiLAiAkcsusbgJzZjvikAqp8eJHWD8IZ2Vafe+fNkyRFYH2lg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.62_1571750930459_0.6221006646307041"},"_hasShrinkwrap":false},"0.5.15-alpha.63":{"name":"@react-ssr/express","version":"0.5.15-alpha.63","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","get-caller-file":"^2.0.5","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","normalize-path":"^3.0.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"afd4a1ef1b752270ef5206aa2655c3d93931470d","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.63","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-GNvpAiCrN35Tc33V4ZRg1iRmutFFwdR78N45ThgdaQq80oxKI3a0bAvazvskjHETb33sytCpOVnUJTk0756xxw==","shasum":"9a390e40febbb30000f0da86c8dc4d06af74e17f","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.63.tgz","fileCount":14,"unpackedSize":48019,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrwYVCRA9TVsSAnZWagAAwoMP/1XnlPkU86BJRYoI3YVJ\nlHyvP3+oq0mfBxJ/LWuuTyRY5uuTkBROohFVYHsOfOWfWdw35zntkqPwLf5Y\no2/pQrjwWHjmENQfCRHqsJUxTIVUQ55pd2CwQAkbtSmiScXCvnhNNUyNDNi1\nG0oNqoRsypsxjRhHE5tSgp2bBmIL48JmYo9P9eBxJvakZJovr+zZgc04CK+W\nv5CuALZW9fyeLaSJlRNQW7UNE1gpEYzTAqwh7loMNFFxR7bErqPy1Ou7hdkl\njJijqdBQ+Tu34+NRYsnUsn+nKHbLa+N4xya4gghI3NwR8cUDD3B8Ab8EYwoV\n5jf1RcKoC9xMLRHZoWbdSKrVX+39wVcL6wb9jMaM2MC2zZKjFHpp+++vZU2X\nMHQYLkotRVezpwgzTXdNz+QIQ7F/D9QLUbMvaA9rEU4DIDK6x94IwPKFkKzB\nEIXRZfRsekitqwAqx9E2vZXH6zl57r3gnogtJzbVhXNqF2Eutt7t1dn76gz5\nRVMRmfFaRhECl0cMzxYRTCrHOjaeVm3DK/TCvO3JQsAJYQ3/QBLSmr3rnSUa\nZcRbu54rCgtZRFzcLbzJU34rUWXSvTJbu3lFKbYQKUDTWr8MKvhmelgwfJKJ\nnoiSeStQ0Xp2844BtmjSEnxpCy0YidM5BI4engG1rWWbklExTdZsL+aVLvWm\n2PKZ\r\n=fBlQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDBRAYP8dZ5gLSITGyUPPu6Yp4iMB0NXWl/ae50gPXeYgIgOkVNfC7p/rUNCmV0DHGY94LZcXBNHbaCpiJegeZlqXk="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.63_1571751444801_0.6309256548434992"},"_hasShrinkwrap":false},"0.5.15-alpha.64":{"name":"@react-ssr/express","version":"0.5.15-alpha.64","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","get-caller-file":"^2.0.5","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","normalize-path":"^3.0.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"ad83b1b7103f3892c8d1759683f2fcace040308a","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.64","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-qIcB/2n/zjc71pzzvCSxX2/YKzjDQnmvCxvRiJZ8jzpVmujUqPIBw0syVT6qCoyJPB5FDc1YkN/BZuBYZhOYtg==","shasum":"59582e31f692e6c090a95c01b3e7cbb38867b132","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.64.tgz","fileCount":14,"unpackedSize":48043,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrwboCRA9TVsSAnZWagAANooP/0nA4ilHWE5c0zj8FaSj\nSPZ47mADnbNlfI82pPuiDsLTkxvyG1/CS0tt3CJtrzzzTVj1fumxQGdN3xdC\nvOAWbEea0Cc9iAz0QXRDdxlqlckA8IS4OVxsVKreIUbeyxxGVCl76j+Ssh7U\nV+CgcAubI7Bqxodzh/hmAUnyQiVwvGA5XJUNx56CXigyCg4o2ogo9AzeFVI2\nv3iS+ww0Vz/AJnFqXxHpkTI8Q1RsCW9q5En5Xslsi5rvmw0Iu0QLahbW+2Xz\nbyzAUZQWZ8WK6lmfTaLNSVr3TgsROXgwQ4KObZ+1K4nh2AoXoqmtj6H3zQZo\nYkLi3Ms4/bo1Tu0kCW0ESNsNzZOk2SMLBI4aPIog3jSjLOqJG3VpaRp6ibgJ\nQUkZ6hrFb3151CErc0XuNmIyIOvZ4Z3VyAOem6oD48tuWS652b3MZPJSot2W\n5DfYD3teUZslk+GItyAoU7F6EyONZv8qpM5pGfL/hIuubzkVxHFjc0ehB157\nNOzzNH8mltK7B9J9dM1YptvrrpDpw/JZfrsTNUyAGCmWRkFvxtF6Z+OKA2x6\nizMHMjXvxlj9jzVALLdIwyhmNA/rBCwv8LXeaW8ddbpzCyI6KkxUcy5OO4Hd\n2iCh1Ost4j5bLChnqaoUV3GFJp+k83IoadC0p6GdTwEB3QPoou0CwQshY1FE\nNPZf\r\n=MimX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGz9zvNd20dS3+XbvZKu2skiHDWLRzt97GPCQ2xplcfjAiEApA24e6n6RsFaG6lKDb5EjH/2CntkwntYCVblhs8g7Vs="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.64_1571751655777_0.5989258554250516"},"_hasShrinkwrap":false},"0.5.15-alpha.65":{"name":"@react-ssr/express","version":"0.5.15-alpha.65","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","get-caller-file":"^2.0.5","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","normalize-path":"^3.0.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"4e3d503244096772aff07c9df1ef2be8828377db","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.65","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-iic5iSXxFz8wYGMqVdRyqKFgRyjSV4lT+E3Lqmlp1jbZoEnH3usgYRB/RogW71HQ2ViBIAAQpXLcsGLJPgUc8Q==","shasum":"be5a2583099fa7f866aee4b8772fd6c82909a9f3","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.65.tgz","fileCount":14,"unpackedSize":47627,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrwfTCRA9TVsSAnZWagAAx7IP/0fywH2/+wwH4RPzW5k2\ntxysu2iUUo+Ry08Zr0PkYfL8p6Hjcs/I6Gl5o+vccHQBnJznkT0ectoP8jbi\nBxOgs2n+AIwajq9a2rzZ4em7th/hRFqEwJtMH8hOgrCVIfvKOeYKkO4md+/t\nGY8RwrfWN1Ew3jBSUDmpV+L55uEdKkJFMm8zJTAHoiJTwYcE2Vrq1fgfc69G\nFj60E0HXPr2Q9eFsliWt8N6X/OrULujxY1wS5bq6vAbahUj8S8uhrhK03nuQ\nLf2abmHBlXqBqg1B+icYJcRA9gmPLGTpnTkpitjbKiXXdTPFXlC4pEN7puHl\n6sDPwbW0U/8zYbIKx6p/D/Zsn/3vguLpahljFZFPvZWD8NEqu3DCotZ3xUV9\nYdKcqapdsttNLuG2lXpOBV2A6j+xuX0Rf287DrkWl/bstFEW8Wf0CDa+UDb4\n8NHg2Jsm9Fe9AZqScli/I52yblKnmmvTnAu2iQZTXd5Tx+O5n4boU48dRm9P\nhU8Xgq4YwdBLOZ9DljSNaUOasNLmOY0IzESP4BMm18jXp+Fly/XakVgndiUH\n7HgLIbT3x9YEYZaZXfy1nRxd4/17G9pIlRXKUcCGUDmBCyMBeHmFRGhx43vj\nX0HR/juOqh+WyDQ5pyRj29tIHT/lReZeuzUs91K6WUiAA5tG2Qt9qpR2uwiQ\nzINQ\r\n=I8G5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDy4bZ+0aBhhE5gkbzrzdMu4zTfeMo0/YTgHD94azf9TQIgS9MUoa1ru+tnPIbLgw5LjdWRZfvBDXHeNXmMfvz9QN0="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.65_1571751890621_0.77781591540694"},"_hasShrinkwrap":false},"0.5.15-alpha.66":{"name":"@react-ssr/express","version":"0.5.15-alpha.66","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","get-caller-file":"^2.0.5","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","normalize-path":"^3.0.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"82d398b9da2a53abf5f4cffaeec428145cd275f9","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.66","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-q3aL+il9Rf8aS3607EH2J6igPPab00zhSffa3LVh2CjP9aW3OlxgWTkBc1ePtnZgWGwX69Xy8uhI8AKySVgjxQ==","shasum":"ec072d5642f7aef12351f1aa559edd9475cb0353","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.66.tgz","fileCount":14,"unpackedSize":47529,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrwg7CRA9TVsSAnZWagAA0cEP/ReRsDEhI+d2xkMXk9Ql\nnS7gNY/x9XHHii6JwTlTURNKw5hcq0pRqieNBmLV5MQ/0eZLcRJqqehDqGXE\nQdNERTSNATZRZs44R5lA1EIeJzA8sbtv6hOReqpKiaQpxfK/wVBWcdP5m//x\npxcMior82vPPqlq4iU42zLboQzpn25OfI+xpJ2LZT4vTmPUYVAEdlS4Rz991\n1q7lG4zkBa9+lWZhrDvl7N8q0xN1RHe6gfs9H6kBcMqRp/Zle/EKlTE5soBG\nW0BtnNYoO4/haQxeUEIkOXejoLWsnbVRuwBV6KLmSYPmuvTBq0jUmT89e0rS\nLCvrjvWZH5N8cITOBHFSx5JExdQy1YkX8H+/8frBww+w0gAj2jX2scnljE6F\n5XROT4QieT8spNSlFSal+N5RQRQ72yWLNHVwhXYbkLscc/qK6SiUOlZtxieE\n8tZuMpwTzUJdOlxzntnUeapGh1gvRciJoOkYmxzO4MSvIOKitKYBa9HJ0eu2\nDRtXCBYL/ggOeZgBoFJ/Zt7HI6kLYCAF9QyMGs9K/B+KqTJjZKK0ME/G4OEO\nHEJHh8cXrNR3AzRYuo3BMcH67JR0EcDtAMo6iC++yCyZtFV3Ktx7058qId3K\nhX2kI5Cfj8To65Du4zvwhGCpSkkYyDLxcu7dGHHeTAnJsRHnrTwm7dQmwElW\nwnE5\r\n=6PNN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDyrzJxYyaQI3GatWezNu7THy+/piXZLBrSOqzLTWT68AiBdQS51yBNK8LoLJH4PQunwtxfEC40aNKPDW9bn0X+jtg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.66_1571751994512_0.0007127389459569144"},"_hasShrinkwrap":false},"0.5.15-alpha.67":{"name":"@react-ssr/express","version":"0.5.15-alpha.67","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-react-jsx":"^7.3.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"720214b5cd2f8439c941d7ca520f53fbe302e279","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.67","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-FMjmc2VXhOEv8yMgEiiBWvrr7ltJunrqNQIXevfBU2KnBZFPvZGHqJvLUA7YYUCGCA+lnMgJQW4sVZT0+eoHOw==","shasum":"793b99013eee24308f061301c749b5de8a4a311a","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.67.tgz","fileCount":14,"unpackedSize":47374,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrwl7CRA9TVsSAnZWagAAokAP/iKWwkBl5CEiUIYSNj8S\n626EykN4bxsvyo2xAD/cI1mmqCtwNinWZ20ShL6t49EeNo5f5+zF1E8IcESr\nCpOJOh5p2MT4k3Gvl0vKUEUdq9wZdzCJ/HOO4Fk5ZdgmrOseobVaEPGbRQTs\nqmjO1gJo3GepH75I1bhzoHf0aaAdkLplI+dd42YSKxfJ0nIDea/jnbJwjC2a\nV/+NpjmRughxM6o3AY+5MNXhtNc/OgUTZlI5n25hysn50CCco3e0Fx7tffDd\nONcjyA8YjQGrZnvfpnSOMUlndkLXUy+/XcJOMfRsIHroJA42Qf8PdKn9sNWF\nChZEuvl8dEADB6TRhBrttKzGsm97f582NypF5f+I/ESM4hB6IqPvQEn9dDsE\n5GildOp03Z2QP5ImyFbdtAeQrXxy/d/7pZzooyiC0S6+3H4Pwvy2BjlSmUiS\n/qK+SfAIa4o8ADvmmVAwg+P6Z/GcyFUWj5OTDDlNknUzzsY1+jdsOI237LP9\naWez0KYmcoz8vBza10Ub3V6pSDc9f4uVYGoGNVqdH0Ae65qlQ6dciNQhyti4\nCziSrTOv4+KODag6xNMqAr6py5p9wEoVnHTC7fB6ch/ppx5j0PuMfYOgmkPo\nE+w3K1GCQwSB7Iz70rmXlbPFcrZCg1TJ/bL9WPQ5gb4FJjGO5bkN38pQTtaD\nlqtl\r\n=qCJT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCMbG9WSy8NgtFeU2I+2pwFzsIU+TWElU/U/65U5J+KpQIgU8QmBhrZtaFP21eMn8kROXK1h1ukjtbhjcq4/ldOOdI="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.67_1571752314985_0.6532863199551462"},"_hasShrinkwrap":false},"0.5.15-alpha.68":{"name":"@react-ssr/express","version":"0.5.15-alpha.68","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"59c9279329d6cd7b7c1242fe5180a1a759806938","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.68","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-4DR4TPWdMX8XxpBqHDCCOxHMimNaILtlIO6nXQAy1NN3t6kfOc93bODoEPQaY1Lz/Ato8pCkxPMPusV/A5RD9A==","shasum":"3eba947e10d098042121d09bb58ff66a59faa968","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.68.tgz","fileCount":14,"unpackedSize":47185,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrwoHCRA9TVsSAnZWagAAgb4P/Ret84dnWIczIPOMihOE\nkw45NpfbDFXpdS3TQDkV+aT6OeC5RKA+WjX0wzEgm7Yac7YbYD2bJ/I7X6UL\nVZqAEpDh5xA910si2eYbNxP99Evr6aPn0yND7nTeVvq16m6C7vNzkh/R/QPd\nu5TItPNJ436vgTmNnMcszYXLa0hBCr+WqxIsAIBO97Lw+UxfjnWbcValFMt0\nNjSby+zp3YhtOz+N5tlLNE5yyhXokkvcCAW0IvFyTEM+cGJjAcopUpJEQ+ti\nTwmRf3ANMxZswdru7Hz4/p2gGme/Cnr1gPH2urQtMjTVmO2n5KFlgaSYggPV\nKwu0eg8Ib8hVTCMUtJwDdmCzpZa23C1kSSdP//P56ZgWpCvibrpfi/BU1rdT\nGnXVRH44NJwavc738RyQgytKk/khUNrofG8oNnzAo6ZZbO1qgVph8Z/R0xs2\naQ0Q8x5vss9LKY+yPifzeTAHA/2zzwJVD5rQEkyKpg6wR+UtQFUJxSBrP5o8\nRfuIMCfEnkhu6/SA368AUPnBS/LkSfErPPI+/vXO539yfDVkI5uZCXjYuRSx\nFfxRiw3SVLmB/zZkK7lfoTvvxloPG22TR0ChKY695jqu4Ncm0xNVapFODDmH\nB9oD+xBuGeTfr/cHwLq/Dd4FiMVg75MAaYZUCboFE/iAXCXgASM3U78xBTaN\nBjqH\r\n=cO4I\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDa6ZprtM3br2qKcV1yPUKXaloS5KObBJ5V0t5LHc6tjwIgBzytTOGY+nXXpWj0bMgNfh6t95tC10uMeZRFI9JFiGc="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.68_1571752455109_0.15246527615487526"},"_hasShrinkwrap":false},"0.5.15-alpha.69":{"name":"@react-ssr/express","version":"0.5.15-alpha.69","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"0758b8663b0419c63829cb577c1190761b4f8441","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.69","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-hzVS0Z01U679CwV6d+ppPe/YnoEr7xY+hkQvaa/9zMFV+PmUJO2DhqoyVmBYio3kzRv2TPSCI/6AWW/uU5CWKg==","shasum":"d56f6369b02905ff92654620f7965dc996d3c027","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.69.tgz","fileCount":14,"unpackedSize":47184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrxTDCRA9TVsSAnZWagAAwHoP/2MD2O4UxOki0jHxNxcb\nTqZT8JTrj5svjgzkiSpvoXojctdt1+SvDv3w5hXwSEdJHU8keb5BnYjjaJIJ\nKBPwVOTIiyLnm38PkKH2qsr7Hui1FyQ3KGGw6tmRRhTbIgdCabilZmvmivUF\nf9lZ2OloN0jVK/DaNwGyNUzNeb178J5aoFaxrxR+dTJgoR3NX6VPV+vODX0C\nZu4fyS0ewTMeqh4difHvZ0KnQdbDQ6PY1nVn6D+jvylMipluwGqA7LuHKnCw\nWzrt53vwh/M02QcsKtrptwgd97SKp/xKSoanzmiBRfj48qbwxgz3vazcPfAR\nVzyClmmcdCS223rLPfDcTNKEk7KAODxCBshqUIppkORUJQvuQMgGGI8OQu8d\nCyOlqomhUoutWe1BuEgoQoqeBAMiZB8r/cDKrDFdeOodIo4fvH5jpW8nc57n\nfhVTINbbwXs7FIzsWC/k61sTNy/1payieJdGgBN635TbhhjrI92l04uK20Fu\nxL00hGgBFDf6teVfk+yqna3trRQlV9riBb9OlHRqK6hrDgbGPMu28QYLXmnc\nOK63I+A7Bwb67q6sSW616zYRF0x3e3kg/kzMGXXz7I1FKnzY6kmY0IbcIAzQ\ndfhtlcyKvgIASDwHpUXMhbe9z5y779iJhfDt1Can0ZUgeIMuGaoPPu9Q/38q\nIPD0\r\n=0Sd8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDDi8FsPPN4wCubw3SWoPbEfEOXeHU5L089HWkkIHtJpQIgPq3cNEYUxR/Omu5rKlgNJs/JDn9WCcSuFuOVq8f+sS8="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.69_1571755203148_0.846050665573157"},"_hasShrinkwrap":false},"0.5.15-alpha.70":{"name":"@react-ssr/express","version":"0.5.15-alpha.70","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"48cad3b8069d185931a2a247885defe8b2f4664f","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.70","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-F94AKIbHuB0MRBo5usNFU+VZzMwp2z+MPceU5oDcCUHckB9iZgdBklSoxIOPhJUZ+b+yQb7DF3yXL0CjdzQMbw==","shasum":"1cd560729f2551f210ee69eb1248845931ecc139","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.70.tgz","fileCount":14,"unpackedSize":47130,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrxaCCRA9TVsSAnZWagAANf8P/Re7e76iZzrQ+/CC8UH4\nLcWHC+mrxGXGruvB0Pcwh7yRueA3SBlpxOFsfUAXPxiS42t9sducxmozYAgR\nP/dO+pPILfuGjXQn0blyShroQgwFnhI66y1MOrl1HJXc3uVOTJl79yvI+oh9\nFz6gT+0r0PNveLyVXGWsgaMoDyOpoAg96zugCFg1nNB8SruV1Ry9BJi2Vpn9\n6UNLWl3Chc+NQhGNDz2CejaK9NSPOmPMTdmcVWUGS5231KdyDgPj+70buWql\ngDO19ucoADliV6dVFSjImS4BEJl1HhzoPDq48Q6bjfmtn9cPUcP6Q2RJC2Ug\n98Y0exSntzrLj9RNzU/XrYLGKHGTN6WvMesC1Deui5OG59DxSZcPFBHBU5Dr\nsgzbXP8wkp8Pl8bYBNj8KMg4epdiaYIEeUaPYWzNahRbBwqw+VMgl8fYaEBY\npQ/6WabPJEo30qMueN3FGSA9KTdvGb8AlO+WEmQkhcTpt3+trH3k/2LsSO+o\nZaEydO5/DMQlOmcjbIsoTnKLJ2ilsivZo1ZV0TbEDzOL1PYjdVVTW9eUFkjF\nQq4by3IMQvhRQ0J9PfCUtpiAOegN1Ducr3s2mj55Z6zEs9Vo/Y90S3HMf9HV\ntl2pVW2Jhj9cyAhk65BgBn/9S5rHUWwfmi5yk0f00fS6FsPJPszobIRbJIg1\n2KnQ\r\n=Ge3G\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCvhhhjPg26vmIwXQ9iG/1B3EpNJbrgfDoDd3ldyIiNqQIhAN8vgqtBaZQu8p7U1v4GfJq1rDCSvyYF8lwD1FvQ8OCw"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.70_1571755649833_0.7408195326151006"},"_hasShrinkwrap":false},"0.5.15-alpha.72":{"name":"@react-ssr/express","version":"0.5.15-alpha.72","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"47d700e1c381469588442cb6b3ee53e1f6b1ebcb","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.72","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-bND6emQYKhXvv0p7GBS+lzJ41Kh+kuwOSEwO63DOBrSBB0I3O4NqVsZahrvehvV5IEfcTxUIfq6R1htzc379Fw==","shasum":"ec43a2262af968b43bd2f47ca60abf97cb69c9ed","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.72.tgz","fileCount":14,"unpackedSize":47204,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrxm+CRA9TVsSAnZWagAA8VIP/1d1IkJvg/AHRgC7Rr+s\nquvvdV8h9VRf/6ARhwYOHs/PaQmC9oYzXtMhS6Vp70lERh8uCn70Vo9OIP5E\n2c031INPugDmTMkHbhfbe0DJtllLVgYBgHg3Fj0uiVx800jLAv5PcxUSwL9g\nM32ltI6I7lddRAVZbolfA9kNkZKBU+TqSD/PAvkNiPBOGK/0wYwBlSknhlsd\nFQ2ONoqH6QlQY+fHC33nUxY5l0Bgx+MxO7mcSrOJel91tKZFMZ837xcY12MW\nPbgbn0JNDcYmRy0yoGaf6VRmCDQ0XAay7LQ/Kfp9geaS5ILlw37OzGaUbkC7\nteVaRJ1RExuTuruNSl9w08A6DShedPqdQMkRw5ob/bwD2UDoFI8QHAmD93Vl\nA2+eH9GnrhVnysXyW9tyxNiU5fvMMmEUwlJBUA7GqVfqvwA6VHRvrqa5VBYY\nxaZV0uYlMTc9IULr/emD1Kh3grst1qvZebzpnLMEYK20cafE+7BXvRLoAKjE\ndrXEA8sYbi2VFo68EBamMUu/MfU3MlUiQpruGJU9E7v8A77E0S7OcgQo8mzT\nkhygsZoDPdFRBnSJW+tLHTGbfXAPKg5E5D4hlyoQLj1nJk/j3sZUYK/IWCUM\nhvU3wRWTpPyBdPb4redrWjAOETxlAVOOX76cQ3B/t9Ygjurfryb4Gu+eVOsl\n1B6G\r\n=Hk+9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDIqFwsdfHJ/a6GeJwiveDoPgrRydr1xIfQMVXW4oWv8AIgCEHXnMFkLWRjcOV24DAlqtC8ptIxR62+lPehiw6NxKY="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.72_1571756478082_0.6740903957771274"},"_hasShrinkwrap":false},"0.5.15-alpha.74":{"name":"@react-ssr/express","version":"0.5.15-alpha.74","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"49f8deb834fb62385f0a9df89df626b223871d6f","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.74","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Wj5s/AR6P5XE/FLozzq7KcyTJD0YFghWPxb7hIS6FTXx5sD5d/PjysOy/NIwZJosZJOF0fsq1x2aYEo6ZcBe3A==","shasum":"dad4fbd1f6a1b08adfbb1c60f757e52fffe449ef","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.74.tgz","fileCount":14,"unpackedSize":47204,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrxr/CRA9TVsSAnZWagAADhAP/2rRee7Zg8xmnoDLuDP6\n3oF8+luE321h9lF6X8tkFKZirXMVvCHq0U46sFoHZVRpOVf0iaEPI3251p8A\nYQm3Q61gweTtgFmUahIXjqyRenoQcGS1YyxHvkP10J3MnkfvpiHpqc9qEJWB\n2auiA7x27tfCqX5x03pa3mfiAifIlugaOPLt6cYJY/Om5kIL6Bk09RxfzNLu\nCAoee9G7bxVOeKBFJ/mE6CJfeOm9eh+cr+3E79Jl7zHSPhRQ+xg4ExGKJZPh\ntomUAgy0xqH9LX+5tqiuL+fvEx5GHBes8nbDsG29EaVJijMDQ4s6+zQ7AXcL\nbDztLupBoVkc1eWZocH00O89k1zyjm/NV4bKJmkvqeXJFVVGuMGNIubszoOW\nDHMrvCgd+lbu/UHjMbOFMyU4Hi8pVfOR8pDBmAygPssqHCVr+BhcyRchN4QJ\nXtHBuFIQ5/WDqZ2pOrUfQPauLF5ps0vQJ76HdxhFDasfBcXhbfr4L0g7Hy9S\n+fAwaH3ualB2coKSlRZYkyVfawmFfg+5O+k3Sna3WwEDJqPrnbLpgIpKceaC\nwAW6WQyfsbjj6dSCLoeOO0Kh1A1wjGdi+/Jj07EZ/qH7LfrsOEpb66RMIaZg\nSB/Wy7yJRANPgttHANDBPMLSjg5VR+//lox71E+zytKz9DkGtgkPUmJUX4kc\nR1gF\r\n=uFck\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGOE/KZRMw4iN4/ikQt/JmWAQ/+h4W0QGN8NE1EtHL6oAiEAjJdbJGfnOvh2jqLruL+0YMlblUkOK1iYuO43leCTQ7E="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.74_1571756799176_0.9896466115558975"},"_hasShrinkwrap":false},"0.5.15-alpha.75":{"name":"@react-ssr/express","version":"0.5.15-alpha.75","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"3d1274f333475d52cb276f74ca0e6762f58800a7","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.75","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-+Q0svDucqgwthlOlzleca6fzg+rLYEI8Dtw2hQ+cvocb/IeJrTob8iA079lolXSLkov1Q01hQbuIHDZXcpyjCA==","shasum":"c1c1634f99d9d80fc4ac4583af97fb275f2a23a9","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.75.tgz","fileCount":14,"unpackedSize":47210,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrxzfCRA9TVsSAnZWagAAEy0P/inXIvjVTlpYnJeqXdoP\nLvLzdK9snN6OErLiCYL/sr7sf//LBedCe5kzXaIdc2/yudLumMrIVlFSrEzt\nYdMMvSlPVs1q09RZgamDPHUc+QNRelmGQ4PFPLbyjnOzNPUbMtYlqmaJmnbs\nBb2Hsbuk8a8Ocb6TDkgeG6YXu9NPsEQSMe7KyGGPakSInBabIuLm0FrVmLaI\nnkZzl6hz2CKd5+T6VXRnYW0OwRwCKR0NPih/GocPDtMt5+0+/+UOQJAiMNm3\nE+wMj9+uSpiPo/gmC7/zO8k6Nyg2tDSWll/cikLeUFA8dy65jIoNDF9v7slY\n9I+ltyDghIMDJ2dgXI6M4vhEqdlFHkluwOrZPMXMtJJNHMzre9uRsLJgz1Aj\nVE3n+gAkWzIQDn/SzK347uGrWxCa8rc6N/I0pSVqquaHRAel4tVEIP2I+Aam\n43KwI1dVdbf5fFbQln8crLelCKOrVsZtqHdSMBr40Qv+sXze0yDNjKh/vZhe\n1+AO7tLlMWvlg2s7aqEWVgBNz65Xz9WGKTZZYYwQZBNwOHoZhuUjO5tgSYAu\ns1PW1mJ7m0r+uA4T9qHT/UkRj5w4lD7rtlRivoBETSvsTJaqaKH1sSXqMTQW\n4A4FPkqmkRsbUnePh3/C3EplgySgtqQONYICF9+Hv6ULrCMuX6fTxfK7K+Ip\nqxTS\r\n=qJuJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAHac1ieGP+UpvwWpQOgMLykrr8mBdq+dOgPIiJFsnwdAiAMNL6CCjd1G1nrcLAkbe1EI8UfaUorbSduN1p0NAjuBA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.75_1571757278982_0.8943818600787223"},"_hasShrinkwrap":false},"0.5.15-alpha.76":{"name":"@react-ssr/express","version":"0.5.15-alpha.76","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"2e435faaf4d175aca84478a9baff94c75340e69b","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.76","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-7MKwjod37N8Btngg4KZS8WkUKmHX9A4dclMwwzi+BDNzugjdnaMhGFL4LgOba16NMcC1Xc3lSiVwUqaDuv4isg==","shasum":"08ee9d8512ecb6982206ba3254712a17e134d111","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.76.tgz","fileCount":14,"unpackedSize":47294,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrx5vCRA9TVsSAnZWagAAzWwP+wSv7oPoXjBE/K0gibKY\nZwECuLS/thW1+Jo9f0m9IbgPxi50lWc7A2pfnuf0zh95TmAKay2vXyCC9iDz\nIIB5mMysNwExJMQKYdQbE0SM6r9VKG+g8CDi2jUbAs5N2tJd7QUjprgMDN/l\najn4Qf/uxqr957vGUJXqLAl6+hWKVVNeE2D5zU/2UMPErptFL7eZP99HCl+f\nx2TuRNL3f0rlWxmjw1h/YLpqEAYqDcz/0JOopfXNXZ1FGSBh3raxGMJ8364s\nufBGukWVbIHjc/JeGBzyXizCW1pHm2aMj/DLFyqC5uKCVfWP+6wpgcyQ77iY\n4iOFEyW9osKG8g4vIM+lFnaEC+37kyyhLKyjKFBJJJLeR/Birob3FOpLIpsS\ntVq/Ncagkq/5/XUhtAkeUV3Orho6upI9mTha1mUCXozkgh9WJ+PNZHCEtVaH\nUK9zJRtxMfRsUS3AMiosNSRx6hKP1YpDOMN3jPAuDd/P8g3sbEqAypRnaQRo\nMcJWqXFQhPvzXvOE8y0XdKl2YGSjhk1rSrQMnVZ/7HkHmk8sUS8+7olHmjKX\nR4aSMD1NLiuEVPli/XREqPYFqpXf4FboNi4jPD/MUyx8IPYEbWiy03qOQ/4I\nxNFGuoNYPYC99PXaTvXGpVHFtfpb0UKQQYZHqeM9ya/3bDDroNHSpcgoGNHd\nKQ5V\r\n=2Q79\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEfFogg+KtHK2on86ZnECnalNF+y+wLj3lgpaQtSH9DNAiEA8YdshrNTrZ18NSxUvumALnaOAg26yxwWdjpdJjdVTJg="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.76_1571757678780_0.8660711687392293"},"_hasShrinkwrap":false},"0.5.15-alpha.77":{"name":"@react-ssr/express","version":"0.5.15-alpha.77","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"1b56825fe97be3f3633e46d7ca8c19752b0b3ba3","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.77","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-PYUtuEsRcSPZgMUsBEzsNuX3yAgS5uiaFL+uKYulqp7m8QXrTQfOl5kw7VeJGP3zO1SGVWRptuAKYUmVxFy5zg==","shasum":"b6ebfb1620c74b2f3e483ad3a78ba099cfba54c7","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.77.tgz","fileCount":14,"unpackedSize":47548,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdryGTCRA9TVsSAnZWagAAnfMQAJw5jf1CeMQ6LpZ0Cuhs\nCE93k5UlyE7Oaxn9kGYLdIrTQb7Dol+nrDmCUamUvAaQ3H7UmbYGL4DUtyPh\n6/COcxvIpd7CSvEhVe2WHdqJgKkc4SihzjjcXJIerZTznxEgk0rqvUCNdPjt\ndroyiMYXV7WRXcHW6RVvhlb5+NhualyKF+G7wjc5q6CSjoVKLrIxdLZ7lF2G\nBP70FagxDHOFtcZD+sbnkpKpc0Ko4PZLTlZkVIZpPTvHOsHtnNuGa6pPTs/l\nzceSS2v/8S4ZP/E4X8MLQnhfa3eSemmAHqfFDSw2GB12NmFJ5zCNvJPs+ZpV\nq863LWk36VtU8ykLX0LzTcAWziA41EACxuQjKa/R1COnNUGefCnQTMkkNNuf\n5PjjRlDWaJpRJyvmV6Lg3K3JGG8+NWwhZRBiR3USJlhWgMi56AUr7Ei7/XcZ\n7vncEWDsH67MvASEtLJ3umNDvaDdH+WgBJBhJUMndxevvcu2xYv5apLHNmDJ\n8NdeOPvcB8DT9eSGOsNeGQNm237jdvyxzj3WeNkNV2f4WWHhawgfIG5Thli6\n7CgeN36jGG7/wiTnQPahfiz4YQfhgCtHX/vXN2m7kDwOWIfToPFk/UDSornS\nlta111vgNKVwc4TMUUDDql1rnrdIonfUiYNNuX0qAvZ+1IcGMPBY+AmgkFuu\nHv1S\r\n=Berr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFVhJFMz4eRrzcypysSJ0M4q4pEKYYw1AEloXpx55hIzAiEAtCOFhABJ8J6nBRuw1xdCDihlnWD4K+tI3TVHyRMfPTs="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.77_1571758483013_0.5439543036334142"},"_hasShrinkwrap":false},"0.5.15-alpha.78":{"name":"@react-ssr/express","version":"0.5.15-alpha.78","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"3c78e7bd1fcfa842ba335bd2c71ce59ffa616512","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.78","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Hm52Ujf1YvPt0ZiZYwdzsBUyu9xJ85jZ2PshlKJ4Ef1andzjceX/5INGUtMktCZGl5pEwulPuGGaRKmTPuVbsg==","shasum":"60208a6e4f9dd8c267b4f31e8d1e83c0fafbe298","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.78.tgz","fileCount":14,"unpackedSize":47522,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdryJ0CRA9TVsSAnZWagAASskP/3oMzsNK1arwBUkTQ2vP\ngpyoyDkdZTLH9x28TUg8CDzzSQn2bT2Bq8KOmlyS7RFlMPEXbOhCZjpqQFEj\nsCwTMBKDxtuxit0Xsnri6CxiCBQF69WlnHk6NENOKIWq/2GSE3EBjBK+eS1G\nqJ1BLlKNj8odC+BUxC02bbON7IsC54T+eR1ddhY6SRLo2sIedm5y8Rq8l4xs\nPqb//TOzWa51YdKOV9qm2IcvUGcm9B8CtCQpCm/sGo8e+P85pzEETCOYwl+f\ngPlOnrkMIeZTC4lgh0t2/NFGDAZhnYaHNBT6HCrWiOHDrTOeO+8W5HTQZ9my\nTC8gX5aL5LheSGooHFEG0xHX364gIbHooxu53IUZ3yqhS1VTO1EYrR9milAE\ny7CC6xxNXT4Oo83LU+UQDvZBR0h2QX/8ffnBLtK8ub1cwK5Najy2Bw9L0bpG\nonBLjOiclmYfrpiGeRhcIdYYBB9qqdlX/6+o145NKunHInJzE2U1ElSkiKUy\n7ZhQ3u5gKQF8PaBOXLEpOowp0CWAgTuA324BpJYdvs1CSiZNc3BeWtThThHj\nwIzUmx9a8PHdUdAIDxrIX4Mb7LJRJdz8B6P/DMDO04It7abwPY4+NEc/fvuF\nMWDYuYJBPf8H+IgmrUDD5jQuZCfKCYwCWbO4zLp2ZbrZRV59ndvFc1EiRi6H\nJ2I2\r\n=H0v7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGleQq/WTKEVgLiT+ZK/NrO8lUzf0sebzfBfhnAhL9+gAiEAkHZZRH3wOzTvx5gou4vVg76owdTGVJCK1n/31CxXlYM="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.78_1571758708149_0.528565628059346"},"_hasShrinkwrap":false},"0.5.15-alpha.79":{"name":"@react-ssr/express","version":"0.5.15-alpha.79","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"057d8bc58a56b00ea4ca258a22c7b8325be27ed6","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.79","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-qlsn6KbrwjweYB+ulI65j6WkQhDf6pFjBBRtiO2C+c1aOgwIcj3QNxQcgyDyhom/TphczZcmPYRysr7uk7QEZQ==","shasum":"76b7e84b68962908a9bd4a4a044e533642d97978","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.79.tgz","fileCount":14,"unpackedSize":47516,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdryKYCRA9TVsSAnZWagAABMkP/1iCWfFztFaCAAH82gEf\nz8dxipfCY6rW84YxvejTiPgpnnk3lOKsmLgJCad2O0ECP7owWM3Mm/j3sszt\nqtpmP1dihNon3wKo/ME8SWk/LA6H+PF15fPklAW9AUNv5g5stYXMhweFj6w4\nU9VxsgVh09AU2DMdb2t58J4N0KNAgbIWmTHEpkrEEk2cMTfK4mkfoRiG0gq5\nt8WYI46zalPEKrGjhFINSfyeFogluUG9c13HLDV30jXZChQqEPY88X+g3Hzz\nbpSeQQJOwbBLeNF3/LPePKoAQLHj6oPe+3XI7MSFwJbS0T3QMqZuGpu0gLX9\nNa84I63plGkugLi8yaR5Gswzh5O/SuvS91TZHZO0GL6T+9oUUL/tEs+FaCEo\nrro/fZGTnifMAjwIBB2LuI3G6VufxOwp2rCov1lA2su1o5zBSc4QgAJ7LLvz\nSGZIKkAKtPl8iS6Mv8WGrnDfe2ihAhMRc2/rKcRkuRG7P7GrGppLeqsUsc00\nT0MlC1uIUbYNexHtwiR8FyeI8JisLc+jkKosGvnaNeZA0rPkvSJCw29wUSmy\noaQ2T2tl8SMf/9dlU5DUFAE68iawTiYAsUwOlli8VikstbW5PQO7Xs4OQqJA\nkefbTB2Iicc3mv9hgmQqM2NA3TtNTr5845D9veU9EXy7GSOAwWzcjzz57SWm\ng61P\r\n=w5jX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF2KFrWs9xjig8ZEJ75/cFzNH+JcGfza8kPueGtpCU0AAiEAqNQsNDXM0udBf+Px765YsuxJ7E5mKlMzm/pLtAbRw4E="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.79_1571758743432_0.7900942809218654"},"_hasShrinkwrap":false},"0.5.15-alpha.80":{"name":"@react-ssr/express","version":"0.5.15-alpha.80","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"19a81f14ab3249614ad20515a12d488c7806e7c3","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.80","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-eNnLS0Q+wnSTNMhs9yYkzzJFvhQxovMDRDaPLBeILg8kEw01HNa8FJ41ZDjrGb1u2J6EhG2OQZshgRrRUhCcsw==","shasum":"f4a99ce8e8f557910679f1ddde2b57c886045ec0","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.80.tgz","fileCount":14,"unpackedSize":48586,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdryU2CRA9TVsSAnZWagAASfIP/Av/UrjGNi12WbYEa5xl\nYITkOnFxWCAINnvGna874PdJxYkdeFefDtpz6DbHbZPaI32m6JJm67cQXcjM\nyfoHjecHI8Zp16EVzz68QJVCq/n2Dd8/oMgxQkwffZNyrHhdqheK/5p1sZyN\nmDVeUcxEagkRsh8o2zqcYtCjSIRkcd0waIUQ6c5T0WkiM0ppqK8ZN4ZToRgg\nVuKX3othVfIWPcNg5Af4tW3ASv+2ck7OVCxq0zD1oYpkdU1aqCFcLNCHvq0k\ng8ggU3tZxhT+mw1hb7S1WHVxuWxp2lI3P2uV/UlQ0kTz9uYZBtqLm0X0Lkrw\nJ2mUcCBBxIYz+FL+72FtcbmWZnDhl+nTpKYdhqtL/JE1i+YMvYEPvMU0BQHr\nPtTByAhxI7sOCZG/WO6Qn9WUQ5sTsHLrWnLHZ7ygd2lV/d0NhFDHpZSGVbtK\n9dS5KUW0Ek1lUQ8bJ0kjP5leTkRATqe3oUlUSsX7CYc3I0BYczM445UQ2V5/\njFJM1FbSArv27SoEe9GbA0v2wOUM9f9RdeEnv4NlS65N1KW/2Qdnxf7H10TG\nIMKzi146z/pLQiHvROc/DpTw+MsKVL6xslO9nM/yPeG0tMiiBUa2diV0SjuP\nUi/cW6qY7FqukH1GHHVZv/bvHDzRm+CB61ofvATlkoaqWtrbL+sPcpV6Ky7h\n55hT\r\n=S65t\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBw1rj8+q8mr8IVg8Vr0l/8To4JVyo0QmC+JdV1izxjYAiAU1/Y4UkT6AyqqT9b6hDcxMt9+Kl5diK7H9Os+HVr58w=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.80_1571759414048_0.13275875915434487"},"_hasShrinkwrap":false},"0.5.15-alpha.81":{"name":"@react-ssr/express","version":"0.5.15-alpha.81","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"ac10fe48ae3bc8c509ac6f954c690f95f9112a5c","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.81","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-CktQMHVmZwRGD1KYxDp+g41mf/T0DWCwFzhnarhjHwiPSZBBexOQPcQe0ziguUj2DZPczvfOPA+abPvJbbwDPQ==","shasum":"f52d3f8ae4ce051c2913571c1227efc3d3a3f88f","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.81.tgz","fileCount":14,"unpackedSize":48618,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdryY9CRA9TVsSAnZWagAAiiYP/Rw/nmOTvRN6ahuBA9qk\neMA55sXRfrv2BlKwPinuFgMmvTx7lGyuj+tfvvUyT+OzyADYsjgmLnfm+Vj4\njcN1nyviWNYeLTrXj42sqg1dQV0tKeUjwo1pHcL8FDCEkJ8jDQGZCJMj3W0R\n8NuG5oZJyA9xAwBpT4zdbmxOKQ2KcGwyju8svuKMqLcnQk9TYJ+1OIXCZTF6\nD+eP5EeTjwiC4GPhm8Fqo9RUiwCHandr05YFL5b/XRV1mpfkrfAnhy/pIhRC\n4pzkuHbcCz1GHM6vtfDi9IfIE6ZUimUZsyoolLVH5BmFIjgnmMgd9ZNSHv/G\nE7c6iGMTgzVwNJnLRZnP3/jhSb1d3zPMKpG6m/ajd5pQw9owk8z5wA3vsS7n\nY9nzbbT2ScJVENMxMjm/Brj6K9eKTYuavPpu+f2vIKcdrxXZyVZwGRw4vH6A\n9rIwq6bFd5YO6oI1e45cu+O8iD4GT6pNGFHK7bfk1yTVtrYeG8/c0XSyUqjU\nM+CVSkPeNkD56vBfc2biYR7wt/6mMqX8NNxA8f9+Kv6ZJNDvr1fBrWDCO6Ll\nfax2aRna1zuzz7ac7f53FU+3RFDib/+rmBjJIho7x77GqnES+ns1ycvC8ukJ\na1+4dTq9330726ki2fqV29FpEmdnKrIvSUw1qlVNyWIPQfFNZSTpsqkefeoA\nENpU\r\n=RCoN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCRSQmE/yMwhWvoDIl31QNaruOcafiOEnHFfy8yoeW8kAIhAN0vVjYPhsw2fTfpdbH1dh1cfbrsMpBqGvPOVe7VtHbF"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.81_1571759676549_0.6948300360673709"},"_hasShrinkwrap":false},"0.5.15-alpha.82":{"name":"@react-ssr/express","version":"0.5.15-alpha.82","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"c88f10b9eed9c5accee50281db9fa4091daac2fc","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.82","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-sp8cCbTiNTUXOA4mgpw9EKtLMcw8CBjVqBdMQiLiS4sl6/a/kLMfMJwmSFeBNOGLJ+wcfVsK6l2uCetJXgc7rA==","shasum":"e0a891e25c2d5156373a69db7b0c9f98a2dd49ae","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.82.tgz","fileCount":14,"unpackedSize":48692,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrykbCRA9TVsSAnZWagAAC9UP/jbmQ0Xe0u3FZyrjxAGN\nW1x7YuFFx7PfBuuxjeh72XdpCe71A7ILp/tljkLWVXCveGzbq3eiYI56jC4t\nMpAnfnm2XZwar4S348lSt0eYRMF60BJyWAEYqU+hvJEABVRdZQWovzMYMup8\nmfmqFLSK2UMUhCUeb6v6b9MHWTwPwVzomqPrP7jdAroyhjEl7GxKbmtrdAPG\nQrcdxIavTElI0uKFtPAvXosSX0geOXApk6ptmKXcUurEvE5uK0NyfuyeU6wg\nLqEvIkAPo9LcEA81EAjiE1ETI1zLFxyLR7S3pyhkqv3NdaerAuCi+7QboD8D\ngfuKS+IvkuHd4v3MupvscShRtEvX/1KqiPx0n0YkoQcTPvM/6hWOslchRpWy\ngs+c7z3bmuEh6/p1PMiY4b0LvB4bxwLQs+62pvCjbdSXhg7SYJxv6QfU6/hr\n5HC9pBSModZ5PFU5sYohnZwOW5rFLeBFjDASDFVyflw2IcrHwq01zUcGhJqe\nH+IP1H8rNfiysnqDJpWzUuufWEDFNBaMM4kPpDtSKmIuGtUdMcwOBv8BSePB\ncKV+CjfCrTUEibb8vfpyMsuCi/sr0XPP5ClDRJ7bHqRUd+1QkMNp9/4C0v6j\nRJkZC/CvLqhb2a5AdFDBDatWQwhKXvBFOivLznRYXtbppFyd82qLGUcsExD/\nn5Yv\r\n=AWlS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH8RU7WDgM0qMCTW7kzaTNpaVRVytOhKBcDQliSz7Tj3AiA8H4c9bUBEP4C0JsJyiPiyZIqWQjc9LBxx5Bnib6e52A=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.82_1571760411022_0.4501649943141177"},"_hasShrinkwrap":false},"0.5.15-alpha.83":{"name":"@react-ssr/express","version":"0.5.15-alpha.83","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"169e273d9ecf899822c682ed92714ab35143a479","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.83","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-1/coOvren2IX2RkC5QBQAYgsN3szTHhQJIAPsxs24VmHg14y4HcGgmDJcKot585SdwL+/SAKhNsyOQfreq/qMQ==","shasum":"12fd00dc3993e55446e8f350efe501d3589ae2a8","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.83.tgz","fileCount":14,"unpackedSize":48582,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdryrkCRA9TVsSAnZWagAAsc0P/2lmdmBqhRUE8oaPZi1U\nhmpbVY4cJi7Q9A8MHt1dLgVeM0VzwzQ7U/NDrOGPMyv86i2H2PRDTurdGS79\nS37KcBU9TNFlzrLgdp/RNzgIu/65ZsHL4RLJXpWjIo0e6svc4H+CXgGiw8cw\ndlZ2bmHS6chjZ3kidbp1GlJ1XE8sEvjvFHzGwufCvUd3C5kC3rqfRdjsOF15\n3i+Eudb6f41OfGapP/JRcXR5cPWypXR48huJRgQ4Bn3JrqYDGr8eH/hAuOXC\n7OkWajG8CBLTO8sy+jDkVHY73URSKTCHSbA6Gpjtlj03KsRp+YQg86nFXxGT\nNlMcoxl1+/tlwZwMg1v6/XqsYcu6mxALx6O8SQkESPLnYZXjLLPV9cZK8Ya4\nKm+zflUvHOXXPSUlMXZkMX58NeSrRHEwXbhOAYBRE7kpNJ3Gzbvds7Y79qk5\nPF/KGJDrsRKMzgfRCSKVRN5hxBTkhbRB5TvW2WT+dNERb2I53GoeAvfmKiSC\nI1ckbhlxT9W7Tg+67Et6bvDj/g6DXcKOoWb16VPyCezgvH2uPrjrsvy8+DfG\nGolk7xkW28N4BRxtM/0ab09b1bRc9+SRMXEZz19CX8ibadwIKkuvDoHrooaw\n6VqW74Lp2aE5uedWrFMY4bvVvorGVhIduT6eaenEAYmYaMtlxcACgaQYZ/72\npbHX\r\n=sfEE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICF37d/sx4v6f2XT8q+RFmiyclpHbD66xEjeSntaMdffAiEA7VXF93m4A6yIHS2cYt9teGPnMvTnFwtu9FnBLsrUcw0="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.83_1571760868325_0.4965610121965911"},"_hasShrinkwrap":false},"0.5.15-alpha.84":{"name":"@react-ssr/express","version":"0.5.15-alpha.84","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"508783f95fb06cce06a164efc59cf6f7a75f6f9a","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.84","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-c+YST1CjnSwLs/1l4Wo8MB+lCrQCVdGGzK9HF3cvI2zThIXnYSELSaLOa/WYMS3rDEM3D6EstAuQQ7dFvSlwRA==","shasum":"aad6ea861e543119444117fc4f93d016267484fa","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.84.tgz","fileCount":14,"unpackedSize":48654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdryv3CRA9TVsSAnZWagAAfrkP/03jT7B9PfDFVBpJH8SW\nlrXPYAWBLHliBgcEM8j3/kfoXREUdHoM7jBIXGJAh+Etm2CnJ2Z9qVNOeIuZ\n5g3julsWkwlA2QcQL/5RKtl7XVrXgKX5glpHfV9KUgJWRXEx3M0YGKYgwZ3P\nzEs4T8a44BC+0pKP7aJgwnsbHpHGXcBsfDXDi59q/nJj357BLUXItuOFoYZ9\nqwWWvw+gxak8cLDsCGm0SpvfSESkWTtPJ8tG9NjOER4Mv3+3DCttaUVAfvkw\nSgmgOWNDSsv7sSz4CaamJQNPSH+vfURIHa5w/Gr4hdihj/H+ryAQYPll/X+u\nMx9PqFsDwhtChg8hTiOUqWEUM6KUOnDxiZjq0gtNgy9FYq7J9XMydHj5U6pD\nJbcIF5HOx1g8lcbDsn9Bermzu0PCkOQqhk1pyfrYStOQwiv1yxH/OXT14EI2\nlMKsv4AXd1f6Whp78WS+UQZTo96Eqle/CMYC2eOJsYNBQunbmlj/Y5EponT3\nm3X0RMEqYS4WH9f55f7tD6FG2i2UzE4BwfaX8DZxt/qOXMJ0AwHJMsntCV+w\ngBMGWLsjBdTDwcuf5gCUG80CcZre7of/HPVkPCAzMJ19b29Q9vJ/WmRsgW+y\nHpOBD4FdVKLyGqUuMbA/B+/+5TuPVRksjXwa8jhZ1axccZFJitiKsV+iigSY\nBIwL\r\n=9S8R\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDb82mW4s+iFDoFdyk0XHrtAeJ3kBsnVZYJ2awiVBwAgAiEAyHdlXKyzGJqlL2RGx/Q2AikEm2SP9mLGg3nH68/Z4iA="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.84_1571761142967_0.18660822744774297"},"_hasShrinkwrap":false},"0.5.15-alpha.85":{"name":"@react-ssr/express","version":"0.5.15-alpha.85","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"8f3dc25d7104822572a1bdb4aa0d251a1ac9a406","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.85","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-2IAowJ7wO9a5DCpugM3p6hm3rG7eT5ldD9y0iqtlsMyX7n9xr1qcCUHZq+XlfVSShenPRltrz3NhqYisXFB69w==","shasum":"3a0e5e7151bf74aba0d35828a7f81d58e998d74c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.85.tgz","fileCount":14,"unpackedSize":48648,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdryy5CRA9TVsSAnZWagAAj08QAI4spnGXBWN5o/WxLui/\n+5RIM3FQX0oWHdN9R16BVx1ZbOupI7hDHIF8hXiqNdfNBB9V7UrTFrdQ9kY+\nTcwB5br6mKjkfWneVKU4tOBqkYKySTYz29JDh8lItueipMXEulX1VZaX6Kg1\nLdIeMlLUWdtcUu+a0hS7nwlACXsqfWKRC+jf7kpxu7iuZvEmJLfZrajhPZ+u\nlcfEw0ZrxvZbt6gKMpoiZAhzBuaLMZfBKCS0V/q+4L+hSxJQj7Kz0mDTv0ca\nFX+NB7h/m+IRMPkMeRibvBw+0EZs/3RbigR5J6UHHfoj0xLHFGlU4hnxO4KQ\nctmNtJkpp0+XNfwftAJ3w2FUaT+Y9L+xQV1kIV56rGUBoKFY2E2fM0TqPPp2\nEt/323d9i/CtQSeQQuFIo8+XahlATUtpk2GOUvpp38tVywYzCX6uIjacH186\n+NnqwkP1LQRa6qGUwI2Pl1woMvL8f0FMtmd90xyyjp/+R06164I/dSTAVu5g\n9eavK+iTs48nICeHoear8B/Bv8yJWSUVeKBgyTEgWJ7V7cQTw+P9std6u9rM\nbYMjWpwFGWlGoa7g7SjgsV6efo+MoQUF2KUj4+vx/Oz3XQoEcj2M0FaolhbD\nTx7cFqLXwRL0Pqi3WeB7FnBCoZYLh389FUUAjvjCHdleBXmVD4xwJJVSn45d\nuoIE\r\n=DMVK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDSEHbg3OjZxgUcQwxPHJQ98TcTolIuP7WDVQnR9zyBsgIhAPHUIuGq0ZymfTh1KY63cHA/CkxzK6lGURjsVR92aPwL"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.85_1571761337238_0.6121975453814859"},"_hasShrinkwrap":false},"0.5.15-alpha.86":{"name":"@react-ssr/express","version":"0.5.15-alpha.86","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"1482d397ed38a09ffe930783689d76181a0e25f8","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.86","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-x6oHrqw5aHfbxQyxTf7O/+CaPd+PyfLETglsNZT+ADyHSUf8jUjRC8K56nEOAtGTSkDp5KeDsKTl3OSjUQHmOA==","shasum":"2b67d50165bcced29fffa6839e007edbee75b18f","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.86.tgz","fileCount":14,"unpackedSize":48810,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdry3eCRA9TVsSAnZWagAAxL4P/2qEGV/HHHHhX8Ks2lbr\nUKBH7QWDB5dCOjiebEbWsIRt2syM5D8QD5c9ZFfbXp4aWhOgW03cOM2O7Zxv\nBOnqGz6ZN/3ppS90GM8c/pwVB3q9llJW8yn7JqXjkUJE8YUhU28u7Af2GC9S\nA56r6TPqrIagwlb59PuyomkkRqB2Y+ElfoCxTuQhCiRdUl8P5iECfrPjXDjM\n/UmR6wMVl/2KDWkK/rso2LD9wr6KMnI31hPMKcfVZK3IW7URjpy0n/92Ad/A\nskt0FzgtNvFLC/ruUQ3EBFgWqLSR5znP22d3MsIZMRS3GzDQHcREFDixVESw\nEzYVuolpUsWHWcMJoO0EzDIZGTaqKoVWVGQ6xX809Sdv8dWI9Yv3SGJKcGvW\n0xl9mq/0V8xHebk1G4qfQghauze7kl0jfo2ma5t45CaBUbLAEa7OyHtKVjrQ\nNOitHjuGfX9mDD4SqvSMdq6tXI8gNK/iSDFmmj4Cbwl/7iCzbsTl1R8JsdIz\n/RW2oEu3RXPWVoyKIES2/KqS567EEEhFZ/t9sFuqQcwkS/hMPFgYpkdrjhHO\nusi5rPPAvrhSw+UXJWsMqnKNsx0IyND9mIEhGTM4fd7aAjxLDQ/dqGqwgelI\niOt68yULZL2IykKBOzrnwGHFTZlSXbUkcbHreWONCZUEX6vNlhBGcC7JPeJE\nLPdT\r\n=p83O\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCWq1wo1ipmNlARcs/24z6GW2BKFYASUrzNbvbCbphj9gIhAO2at9at1wUZQRmqInjgy+ELDf7XdO076uRLe8TuoYJl"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.86_1571761629524_0.9836930857350707"},"_hasShrinkwrap":false},"0.5.15-alpha.87":{"name":"@react-ssr/express","version":"0.5.15-alpha.87","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"c43fccaa2ba2b56fd3bd19db11c3a80e9285a085","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.87","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-igg6h481e3GXW99M1yLvzSWOdFVvCpIhkH9O+SI3aJ2P9vqmHTwhTtxzdG22mUUv5VVizRb8Bov2OYN0t6Kaeg==","shasum":"dc2300bc50332b8e6c0c7f01ab4770b61dd82a99","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.87.tgz","fileCount":14,"unpackedSize":49104,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdry6/CRA9TVsSAnZWagAAyMEP/2Qa+/eu0kYZikm263eg\n407qEl2dn1qK3yIFq4pHY99TUhIsabkoM1wx4OevngQSWXvSyEnllmoa/F6C\n6jIjdw3WV7uSnjlimCHdnzP6sDMPRYgYK7n61gDeOcO9tS7TRR+gNewqaO1A\nf0NGMe/xxw2VJOmJQRnK97tdp+fDBj8BlYPFxn1q7XOul56wkbDdTZMesCxf\nGG82aWjlrdSe41TJdzJ0ACu4EZC7IeGezxOZMdu6rQg7bhSMi8oPZSCAp6YN\n16VqSWNxbJFt/EQ6tVuHVTqIWICJP54qSqRWqMhAeQtAVL1DbX+1e7rQivEH\nx/lFZ6mm153LaR1M8G7nCAPc+g2kaXN3GGEjSe5FeKoM1QNEqT96/3hpZa74\nB2cVNcUkrQ3hRZd8dMLJF2zf7Lx1W91VVRGLO9WytSCzDWvX8sWu0mUHhTvx\nLPnnxYH1zeKTKyQsV8rOxM88jXlTAvN1NH7xRnsySDEB+A0CH4vF7357GpFF\niO91Ipb5A/+RKaG7NiKHCt6mx71m9bAwzyWKv0B5ClV1qsrW2wuSwAfbUE/s\n7tv9Nv7hpaPCAZ4N6rSgfG7lWA0isBYG1jgq29fARU2HsB5jfLW4pgQsiE3s\nCCWHKI3dIPE7NeWElDn6quSjsqPcOTQSlDTOf9Qtre2R4hVbxxhY+100yULt\ndGJw\r\n=51Ri\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD0+Ss6K3J4Vp4JfpQFWIbfuHSrrWHl9qL5pS+3il0oSQIhAOqcJRNtbW1pT216/+SHEeVhAtakLhJ1POKd6H9f1vhA"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.87_1571761855131_0.19732575030541866"},"_hasShrinkwrap":false},"0.5.15-alpha.88":{"name":"@react-ssr/express","version":"0.5.15-alpha.88","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"b8a399a4ea196695bc9c5944d9195e2eee12b492","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.88","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-rxgDTo+L4ogYCnj3WfbDsaj/BkPPMmqaX9LCMn1VymXA70rzPHc99n1nAhm/1PSH5Yoo8wqpWJTnsHJ8EQwCgg==","shasum":"db31dc1494c923aa6f64810d3561a7985360dad6","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.88.tgz","fileCount":14,"unpackedSize":49170,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdry/xCRA9TVsSAnZWagAAb0gP/2V960dR96G88mvm7MG2\nAoQEorRhQqLEl/dA14hDI4ZNIYMaQ5HZEqS1pG8YBsaLoyaXrSJZiFzVrkda\nCgzFkODnjae0+4vl6tntk6A/gG0nU4UNUT4C/H58V4+lPU46VWhWOK174MIL\n+JU47oAfEl4HJuUbDR0z0fV8Jz09h9+Cgh5CS2FqpxJ8xNgk3jer5maSeCHu\nLO3I4aL+cxPln2k1eGhBYJbOIekcSLfSrTQQEqcPrR5F2D/B/mK/FeDIQr5j\n5QXuzZEXUU+D3fEwYLC4t5JX8qkQ9vP4ur63HztsP3AEFX6U4949ucnz0GOw\ng/IWrMukcVWNbXaM0X4N9FDzvKr8U5XqDER7hvlLUT8JwyZ515B4iGHgBQPW\nBqpE9cBNhvF+eOqLnwnV6E/zu8fTTkfVFavfVmmQL1Au+imS3GrbFI1KTj4P\nb442bUGcH9Hhn0RYITiGww/newayn4wcqr8J9kx4NVSu2xjB4pA9AsTLqTTJ\nSufx93SDJJkkqi2qEqoEYl7FR3NrxfL43FFIFMtHZJ3UFcgaR4qc/YJeZ25R\necwaBz90kcQXiS+xyHg58rDQsymKUBVCjLtfqwqYP9daw0YjldySlwg0w3/2\nrGbNwPfLjfNmvQ2+ARqkK7DgGwc/x50ZKW9cm6CZk608DWbS1GQM3+e/oXAU\n7gSx\r\n=tKQb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICD1cgtyYOiobSrYy1uPLx8CzQaN88oPD54nH8kJOAtyAiEAxlNyZdOwUh17u+AWHHLbHQWi9ctfwbkXbCIo/CeJzCk="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.88_1571762161111_0.6104657749580558"},"_hasShrinkwrap":false},"0.5.15-alpha.89":{"name":"@react-ssr/express","version":"0.5.15-alpha.89","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"ce64a86dc0ee3006a2a72b75d4b02dd4c000be0e","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.89","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-LsK0a3GJCiwz85Q0KOER9Hs+tSDc/sB/M/qCXngN5DAzA2Ya3aqZDeJcqJktu4Cth7QBQZx8Q42IF22A72x8Dg==","shasum":"6ed4c009d98fc0e67c939c5217c1a8dab3cec7f7","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.89.tgz","fileCount":14,"unpackedSize":49042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrzDmCRA9TVsSAnZWagAA+Q8P/0DDlWNtyyMK6ZV21FUQ\npZmitv3laHVUoU4ya41DSl1u5/0PM89XoVqtdLO7zoszVRQaMD+TDt3uwW64\nGwlKzxXTALQaG9i45XsfGuNZ72tkiPaiEsYNxAGpL7aWR34F984CQDZFtI/S\naU3w1RnSbcCcWj5WcmD9Z2cLWjXw51gRPkKYlkZNDc2BQ86POG/H9Pu95VUU\nYhEoxdjK98M6PTFiAy6NMJihxu7GNvLzkxuXknMnfzgu1EEi3XUH/y6EkcFC\nLyjnXWhx0NG6833VhI9Dyrr97XIYT14PorF5p4K5cXRzvR6tcqWEycymDJgF\nngPFzEf3/CbJ4gUMjWIPpmuHzep+dm+MvEDhBetZnIr9QLZ46Vg3hO4YfG0H\n65uvuqtRHh/KOAmDl2C9Gw4epxxA4FmrOUHjfL4yAhuYroy85rNS0zWS4+yL\nsDZ7r/7fuealWfFbXeDaT10+mJfstTjC8uIJygLgd86HMY8jPhllIlGgT+m6\nFI5oxvyCtyxRn4QMPDTJ5AFMugvbwcOIY5w2pDZsTGJEeEoD/jtKJ+x/K4o6\n0x8EGukWL84N9ef6ssp4AcDEOLxgeTdQXI7VGIAlWWndqyJWWznujKGzb10D\noz4wk44tkwU5Si4vkYg7WSb7IuqHmzSuZz6wNOkZBroYstahz1AXS6jaI7sF\nOckd\r\n=nQ62\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCFvmKIspeed86NbWKaBx5cr3EZ5zDB8sTVQ6kma6aN4wIge5ZumQmS2Ok9b4ndK3KUvDjVNdmyaGuXKofSjzDEULM="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.89_1571762404835_0.27349324960780175"},"_hasShrinkwrap":false},"0.5.15-alpha.90":{"name":"@react-ssr/express","version":"0.5.15-alpha.90","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"adab35692556718caa69e420343a6db843ae9b35","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.90","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-O9JpF0PMCkBibSrMHlzUjccFLiFqOhWbgHux8B0qm9WbBaA4R3uhb+ylsARIHuOlxCeH59QpS3JrgEHegaGJgA==","shasum":"ab830df73ae4c38bd2ad35fb30c5d33026589275","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.90.tgz","fileCount":14,"unpackedSize":49354,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrzGBCRA9TVsSAnZWagAAq18P/1DtM3QlvEsjdUGZIbRW\nOS8eyHc/zztafLqK65fH28t4pMoNInbtqEh1eTkqsComHESUUOd2NGu7ewjR\nHksvwXJb/7NsJxBBJi+NBRoRppsmmHZBUtpytwwoJYKuo3rJ1s69kMGw71ju\nKMz2XoqEhN6gTkhEAeMLun3hnDWdnz2F+ov7/C++eGgamZqravE1hYHQZGHM\nMaylil/DDemU1noXV5MjLgnEHUlXxk9mLHSgX5aR4Ja3VVCzqSDdAfLesIuj\nHq5fCgkIx/AzIZgHP2waTSeZ6qjVUHh01p4ChP0haqGoEYwYYgYtUuZpwQMz\nfaTdYtuwfzGZKbHZ/y4rUYmXSSlxd2jmaqEmbPy13WCQ5CCVe/PQIbS72/UG\nYYC7mtDeFm1ZGMQ1RSGgn3erRyXkUON4S2g67mA8/stAuCDdUC9IBEcfQyNl\nXHE/Maq1G/bMWQ/zEJa/71bkanCVXUheO4q+gYgWi1rxy++njQwPoOKxwfeA\nrVR7E36GhPir2kKCTvh6chjIAGxpnP0TDKBgFdant9nSDQzNcazZaQ9mWG8U\nhI+2swJaDgd5Gm6MsFaMnw9wtMf09pdwRI6m848EsDOCUKphZN4lP6zGbVMc\nGnke7zAE4lphtP7qEJzM4XzQkvYf+gi9J78+dWH1y+lK0QLpzuYb5LPHwdMC\nzRtg\r\n=wqWb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCa1xvVmgFTnDTAWUaN3JRsDzcvenK06LfTVwEPoK1U/wIhAPpfYNtAGmJLCf8Mveg4KcwrBct4VcM8EkDeblfMdwMU"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.90_1571762560263_0.18196988700198236"},"_hasShrinkwrap":false},"0.5.15-alpha.91":{"name":"@react-ssr/express","version":"0.5.15-alpha.91","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"5308f5eb2e1ff0fa0f034ac4206741dac3cf2686","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.91","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-v+D/Jk9aRtdkP3tJSXrMQNCtwjPyKaCURyX3kxWhHpBAvml+pcueWkIWqIB7WZ2M7HycpVRZ38EJXm42H0lO6g==","shasum":"16d44d7ca3512afc5780554e2d1969bc9eaf201e","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.91.tgz","fileCount":14,"unpackedSize":49446,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrzINCRA9TVsSAnZWagAAzJYP/RcOoZ0HYPkWYhbEbFQB\ndwsNZbhjlCpAVKzFKv1SHjMJkJ/4ITZ+nbdLIEidvBxh2CykW7XhMnh8vM+o\nAoqw2aBKoCujBosC+gIVHdelHBzQPClrfCsjUPVT34XOGj046O65SCsWtduh\np5LJ0LYGFUOCJB1X+6YbVE9AdWhQz1ZtL3+YZ3P+Hn+QHe/9b8lc50akn63n\nt6lKjg+XZyDmq3QDS2C8xiMeuVSKl/7eqizAvHVp60mH4ARPjP9m1+BTeAsg\n7QjyqqA9f81Kyl8LIpdGiBBqemFlkKjYoLiNY6oLnSBftEe7duayHVdNHr5q\nFM1/uEWz3Z2EI4dy9fNTp8/PV2xDrGq7R2xDnhokt5RvwHXEil7BokiA5hWl\nHb23bY25ZWAYYpprl3zLZWEdglPueD/Y/4/B8NeMySluRf1oK2efM720ZWOQ\n61/PLyZYGYA9FHr36EtKVGJs0+uM0OdSxGiogGaaOqAGKevTDdw3hOz+7C4O\nfD2pMFNYILDH0F5iu1EFTfjfFpA3tlYb/6voPhvBN2jr5+otvPjpjNKQ5BSU\nnO85LZvdIiKXjU8fdxdAkgrkpLbMCa6bmXVt7ZOjxodA6zMMPwvdcv8uyALB\nO4RMG53g/JEPxwT1dtZQG39k8HZ8o5nOwGjt/W4/4tsUO6cyXk0ybtJiJkRI\nHEfZ\r\n=/KSH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCA/2D+mBiZn6U6R80dKOrMGQ+KorLQJezg28ErEzbMTwIgWkFM/IWgSIMykTjhWVDm6zWL9FZJ7+9sWL7AExutVdg="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.91_1571762700579_0.6057527165645749"},"_hasShrinkwrap":false},"0.5.15-alpha.92":{"name":"@react-ssr/express","version":"0.5.15-alpha.92","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"80f546dc0127cadb6a0a15da0b92c071ff570f52","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.92","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-ydeYTMgG1fd8DY6/TQ6MPYTXUoR8h9CwvAxYB9jATyNxHGUlJbv6iryKFcXUy6dWAprztz69TaUSwTkNr6EQhQ==","shasum":"3f6e1f1fbae78ba699da5bbed735084168d5f0b3","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.92.tgz","fileCount":14,"unpackedSize":49504,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrzPsCRA9TVsSAnZWagAAmn8P/3klMUFmpBR27jqjAfv/\nP1QS5bZlehoITOPkqOGVuMaYdr21Jo9U2pgx8wkXTljRd53iOw/F2kzjvF7c\nT0r3qx5k8QAEoW9RV+Y709XgCc57AC7DMNEgLdv6frJzoeXi1nGPZyS3ARZT\nxkGtreXLDuySQqM4JV2O5nGH9lBhK9UfrQ0GJOJvpRyllUizVRdGeu4wAwTb\nMvlo1jr2aSxtnps+6JBxulG09ojKi1pWHYh8D1cEKIf8TsE7NRObstCrLV+r\nvJJrxlhO/oBOTRJQEIMbZ9XX3LWcTeh3KT9tHeRrcjrUJIQj8haSTJPSXDdC\nxAIDIG9vVx2DcQxQPurKeYQSco9eC1wQjsEJtiuFGGT9F/RW7t7X9n63nghU\nja01oYl3tcQOACM6HM0S78hVjJnEBgGDQXE+1uMCKEMHHNWDLpsbuzn8cFYX\nEvtaJoft7DTn3Dfa/oIE+JLvG0Qfj5YhihUtLIfAymhfVFtwbhVyPVb4V7ue\nbbHhgLVYIF7MLbO173TDtCS/4lZxjGvYH2WKz3OLb60dysJ1PJZJQdebPToM\nZZPefaNTm3VrUiXVxkBqKCpS7mGD0mh3/dbnmxj5XqugJkm6/JWIxUPuqYfF\nBxLw3JS3sZxSSNPXh+oiHhtND+rmJaei+RDhAF4ysGtOZEaN5A/nZVxofFq4\nBamT\r\n=aRvg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCRhuc8bzfcMDskxMepQZkqW72jjSWQJj5bA/MbOQSQGQIhAJuySuFH8fkdYOllqEIjXYHKJJisicMY62TlsCaJH7nU"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.92_1571763179799_0.3910084969070582"},"_hasShrinkwrap":false},"0.5.15-alpha.93":{"name":"@react-ssr/express","version":"0.5.15-alpha.93","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"a0893455757a5998e54b99fe61fb671dc24bc29b","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.93","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-JcDF0EKle4AdhKTCijtIAmGlKhlHmY0YnNo66V+MiZ5plz4+LfAii6+hPk9ar765ZaBDDOXuAv8ofGHXt1MdaQ==","shasum":"63b6b05ee126378d23718acd9a9f019e4fb2951e","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.93.tgz","fileCount":14,"unpackedSize":48666,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrzSRCRA9TVsSAnZWagAA9gYP/2DjVnKmKbOubwGaS4df\nOJwNgPh6HsaSxiYCEHv9Uc4yWaht67q+A8Frz5b5/96sjFb4Av8/6Wy7+P7H\n6WfM+GGXssPXKDGXTXBDI94b2Q68gGi9bUkpw5bJ5Xg2vfWmussyKvfH0MaQ\nlhQ31AmpdP7IbO1zymJE6IA+qtVKlorVYOYVWPgEPxa3hXWBIE+ROkK55KmC\n5X+oU/D5xY57zGn1YDWBsxh1bUEM8gOM6P1AOq8g1qcY2ndnQ1H6n1dn1uxR\nZ9pArZgwE2mMwkMI9pzx8wKL5rQMBlgR38TCpQGJo1D+/xSCqnxKWy8HYXNy\n7P7ixcbYEDGf/q+idVlX2jzA0Ca6X35lnNDRP0deqdv+LfCoII18TEIu0kZ+\ncXG/wgwl8gx4ZPFHQ1SXPHXHJ/YjVyWDQthbmaVj8s76nUdHHR7+st4h3mzA\nqYZv4nDauY2prkfl6yYmrGZaQpHdGjd78Yj6lbmrOb4LK9MPLplMsluYDlq6\n/DpCH3w/oCcZ3S1PV8L7cyK8CrGqGnETpr1+afaJHsVcmzA/6thTwMGQxmy0\nDBMIN1HrXnA1Kg/TcaCoaFPND1/5hGDik3agVzPKXt7l0OyK4t7SxaH4CC01\nZkek89kJTgM7iqpj3HmNEazvZKj4KUhuKtuCu+0girz4ieev/olBdtQ1v7sP\nBCdM\r\n=3Nvb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDib0aFI0rV3tCa13bFqsKO5wqsMOr3ou48bF2MMfBwlgIgFugBSod9ZadIzPdXgf7caQfJp4cQ7WmJkgutDTTAO/s="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.93_1571763345202_0.609427784453209"},"_hasShrinkwrap":false},"0.5.15-alpha.94":{"name":"@react-ssr/express","version":"0.5.15-alpha.94","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"4b238c0356c1b60e14306d84638309f02027ef15","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.94","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-36g86EIOJlUtNso9RDgMYqRgKfsfR/M+Wfqr4QasbjgZzAvWa2GkBhpND2SRsVOpxTR2L0Cq1PdBn/NZljVS4g==","shasum":"b3a9f4cfa0e0e4c2dff7e9f24fb249b26aa40c22","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.94.tgz","fileCount":14,"unpackedSize":48812,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrzuQCRA9TVsSAnZWagAAslUP/RSZma7fvXNz1o7xoVI6\nPaEuI4eASP2q+GUJfPiym6TZ4B/FzMiC3H2kAm35YHYoJIpXSnxSIQtymY9V\nL2z93FcFg5aumlLi6R6/JGJIAsSRr+af1vvrOIemfBBtraxPoV/HswwKP5eP\nI2+SdAy3Dr8+kCeP90C5tOWU0iaqu7q+fx8Gwtl7Jioz8gQezGDxopiGacYD\n9YpIOBBstn+q9SBJHxRmomprHO2V9TTOpSKTQaxQRE7ss++Cf/zP7TOvPOpx\nZWdY3gfThzWIQ8b6BYxTstqNWFqchaFi90vDxGQqiIpBU9cQwhOGtJjgs3zG\n+C6frp7caDtyRYAo2KDshcnhqNAp8ojRvOYNAssAihiKXyaDOQiyX7XKYn7Z\nZxhSHlN3hiHz8L2vtXTSrdoxUjuCoR6Vn9t5igaGYEFiC2W7nqW3hktbkUVo\nbWChebps8x4GgRr/g/Y2zzdc0d5wSTqwVfiasmpYblPDrG9egTgu7aWRlYqd\njwDhrTJaswdGpc29sg4cqVFveVdRL9XcLBEGRVdJGr4wOlgpdBi5Io42nvjP\nqZpro+HrT+UBMxviuEQvflitSxwL9gjKbO5//fnHowMITg7BlYGKFjQ85o/O\n5rcJ0Dj/FZ2PZGODttCoKju4S9jeJgzOA56dVH8wSIHnxpK0CTqejMT+CBxm\nPVgb\r\n=BmNl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHeB4OXv8cx//8bBI9RNKC0JIZhVeiBYEmr38+kwsn+KAiEA+1zz6cu/3sQabcKLVsEcn+AVHnjEfkQ0gHr9CJDatJk="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.94_1571765135746_0.21890295155443185"},"_hasShrinkwrap":false},"0.5.15-alpha.95":{"name":"@react-ssr/express","version":"0.5.15-alpha.95","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"0ad35b2465cd2e9f9dba2ecd5125dadba820464a","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.95","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-AmFYJgeIydw/7U+/BKrH0PX9uGlUjuJhE6uPJAlL79xkjxKgqtYTf3Erae4DO1S6KBMp2zM0yYah4nIUEbcfsQ==","shasum":"9232ac557f7a9013124cce208a4c0705e48bd4d2","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.95.tgz","fileCount":14,"unpackedSize":48858,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrzxnCRA9TVsSAnZWagAAlocP/1j+ayKjbJXF3w5Ymz+W\n0T3WWQMGvDVqsCNZvM9HI3jaPsOEOg6fWMN6Y3BGvPCI9WNgB1l8ZutJC1Kz\ntc+PHz2d3J9+Ym2zMpQL0ZY8woUMIObrmZDimfIOAgwWUJvQSi8tdHuedkQA\nIYs9e3w1FYHTH1QGQL31Bm6KRyfq+FetwHC5OTvTdPIReQ6CwNuhSt2F9Y/g\nQH3XY7WvMLpG9V+Qurcokps2CvzUDxq93iLYdfAmlquyhYfMUVCLdTG1Yc8p\niVVpanvd1e7suOOWnIatUDIJ2wsdwYm6uBw4E62srvWNmr1liGuk4rJEhR+2\nbTUK419BLRnBy+/gBQ82pha7fVoz3t1eFZeNwI3p/yIyLrSR0k5IhsOpRWHV\nipoBPHFGVq0NtNci9MaPomixC8yjRXUKZdGp6G3q7OPbne8TcmRUlelEbot3\nIt7HPzUxzotUIZH2tyqfQp71HPvNtxAWmHytobH7uBUqBalGYa4UxDpQ2Jg0\nh/pNsfRxwcG+maK2nRqHsl0MdqNlpZvZIVv22EjK+X0e2OIPid4AtBE0mwR/\nYDqx15NBLdOw93ypxx32NugRM55Bd+NSvDYYRTmEnI5rZR8c7nnXKBwyeu/e\nLRtGPvWYiWk4cPX6Tr6gJ3cQzAYeW4KJ68VqynukBYvM9DkFQWFeGVaWJMVp\nwKeb\r\n=xSJV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC2mNc4VKhiqwv+s6fVi8p4IeTpiSZPwbMl372smZogJwIhAIvUTYGLDJY1PkkDk3t8CXUEoWztisUtuPDwmlNdBMz7"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.95_1571765351296_0.9808837394847822"},"_hasShrinkwrap":false},"0.5.15-alpha.96":{"name":"@react-ssr/express","version":"0.5.15-alpha.96","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"c302be88347895206f94b53d580a7e10c03530b5","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.96","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-gkxNAeBpnTIJ9YVJKNysN2fMR2AwNXqpy5St0Vw+1629qmbtE/4pknEH0tMNJekUItJzFWjKGH3QVxIKmDcHEA==","shasum":"beacf52822e5a083e985f163eddda796cffdd2c1","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.96.tgz","fileCount":14,"unpackedSize":47250,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrzz3CRA9TVsSAnZWagAAe8gP/0IhYyGDZ9XDRg9wYOf/\nr3HJosmu+ZkDa6JOtt3tfP/dNRglCWTXOm3VMuQeLg8+6vVAlYrghHvH8fm6\nUO7e3Vnbut4nTOPiQjNNjFuBL7JpCht66hkYBPYHz5gaJUIJuOP19A409BP5\ns6mN73S0ayy6C4WhqmdyEhhyZe42ua2ruPPH7X4txotJFilBtmzWZCt7Qqfx\nPNLcNwlPXywtL9/LQk2eCXQnaQthlkGyVu8YduqQKZeKQcRnazZd6pLGPWyh\nbpLUOS8OR0mohKzgbfXIFHNpU+G6H8Xw5ZUjWUAs63k7ScWWcVww+lOvUSGM\nMZsNrxo4aa5bqKEL9xwyk/hvzN3GEeiZa4GLf7WfzxsXZ7DRL+BWFdHVhaG9\n3OHEWlCK5nTu49RzyNdN5Yr3fVGnrfdzNQRvKjESx7/2bG1CLVPMJ/IbzS0O\nTn/KEWcQxAZp3EUw019ASbzPHqBf+ylCE9K9PwYeZ9qLSj7+QQDCdwnxJQcc\ndK2UduzTB0kPEZ3LiGqFL4lC/zGB0KkWyktybU2r8a3ciAbcOOZBTl3Px6yT\nXo3nbDY7c0PEoStY/YkjRYxa7N18cft2XvxF54NrZ250nxRrnoQfzRVxEmy4\nXlwOC6cjYney7xtaqeGUU44viDaHD1vLI5q02sAwQywHZUbwiqnTM3HFMuM/\nEz3c\r\n=dNxX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDC46W9lRQbmyx2nH7+dj6ZdgGgENl66TLs6EP2vgxfCAIgHZtPN7FidS9oorJmOOxtn7R0VA/xkXUHz2rdL1j9qKs="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.96_1571765495205_0.9941180567818768"},"_hasShrinkwrap":false},"0.5.15-alpha.97":{"name":"@react-ssr/express","version":"0.5.15-alpha.97","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"5cc074418f19a777dd6d7b4e0ba034ec3370b39e","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.97","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-4JBI/+Yp6p4gYG4ONd4+L8n/d6ZU46WTkUZELONB2HJX4kpkbLeGNAkHP63eLaXQldlkPNUalwdX6otv0voR5w==","shasum":"9d605ebeac39aa2659dbda28dcac8b42fbf5f12a","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.97.tgz","fileCount":14,"unpackedSize":46016,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrz5wCRA9TVsSAnZWagAArG4P/idpuo5IIYVV3nH61J6B\n/9qM1OvkeDzY1XWPDe2b7Eg2V0GTS4rHgmCUnPsWuoD3i7DVTwu6UKcy0hmz\n8eOk+ptrOjAKZq99XTL4n84Zw3NimQZfUWDpP9mMcHeTo8DDTWU54ZFDgRqv\nxmssqBc5w7B9NxdGm4FfV17MIz84vMugjkKAIazRsK+OejVsjygstPDkNPBl\nnKIbV5oytMQTFJHit2Ng/fDAvp9zZpSkSsS74KMm1hOqNY/4zqr3t1KwPpRS\njDvY/W0s4Nj0ti8QVYDZXkh1hm3Vg6/iOxDb12ZwO6ZGuioNKJxJh3KNYdrN\naKPnjf7WlAFli+h83ZAgbq5yYR++LUIqYLMFkggGHMnXcu5JdhrHhsPPkuBG\nEaRpT3wbJOwYPahiT9RfxXIGDjsNqCHNUL6NaqETHp4MK5+0yvCbBG2Cz/EE\nNc1IyyRnPN5YgPlVrPn3L5L3T/PRJcvtaf+dygLuNRbA2bU0ekE7hkJ0S8Pz\nbiuoaJPt4RqCakPLAFvkejfyEiLyGQH0zydzRXve/10LuQl4BdfJxe1tLtQS\nsf0c/O/ojaZyx0qnmwUD6jDt01hLoFR3WoL5BJ3Aowvn/EiSLPvc5azIoqmx\n+650Ms4pRd2Lwzi983IVwlrOWsKl8dzhU7eZR3Le+svDeMfjijqyIq7E0WJv\neYIa\r\n=r7XO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDZnl0CW/V6BJ5Gjh/9mKNQkkjfgnUZ4ZDr6pc4cXLx9gIgd9w6uy/R5Kk1UNPTviZacS10z32cQwu2+v0eRsnvIq8="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.97_1571765872209_0.030252988432700523"},"_hasShrinkwrap":false},"0.5.15-alpha.98":{"name":"@react-ssr/express","version":"0.5.15-alpha.98","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"995064c315c4f0905bc0eefffd464cce5d444516","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.98","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-WgOonipb/DUJY/yuLwiwCi4F8rPWuhoGDcpWBxI2y+GTRj/+ng33fPNgPsf4tPa1O5f6nZpOeHd295qieV+rYA==","shasum":"72419dfa09ecf7e69a9fa32db941b5ee89015b48","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.98.tgz","fileCount":14,"unpackedSize":45666,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrz9tCRA9TVsSAnZWagAAJZYQAJbxsl/Oq3JcbIiERsAA\nHZH0eQoii8o1j3x65i8JveADiOUiDb4HjdAPdmOPxvDUNUHPKFRizhMFPuOh\n6boFcTI8QnuVfdcstdsHUH0L/ksoTY+nqisdJyuJsyGzOrIKc4mrHJHAPSDf\nBaIokiyQ3Ylds+OTuHG3zriVPrB+QKiWvmThgi/stClRpt/6ECRT0ZpJYK41\n7QZrTtDQNAb7dFb+rLftRGR3VP0AGU3ckyww1hqOLT/ZnA2GkxnTmTcX0dNx\nFtLn7dSqXwtjIBzcaSCCONMmAZ1d1yhxJKWhTDjjmZqk//RoLh49l3W0zk5h\nemxafcYp4YaLw1WWj0vTV7DMSHUygeMSdUjkSgZzOFg1FLno7UZBvWQGznST\nsiGTAGC0Bd4iYmlzKeMY7yI57Dy1gNQ93XoVzNySHedmJo+Z/lh0jkEWOadj\ncFmHaTMsaPyHAIek76tW1FbmXA77Hw/VgO1LuYsGvDR4zYNkOjABC/qWVeLK\nJrNi3/kEYpecOAoeFZ7r3q8Rfyl1aHBWHgm42bFEjvbNl8YlrTr8nRYPdnoD\nRRRdW+H506CYhHuWLvHli3HGc19a7px1dKE+YKGdS0IOpVLBNNcsru30gQtC\neNWhAtl6mLLa3TIw0WPqKBPK04kEChKK8LR7GhKKrkT3Fxec311BhZJz/j5f\nsPzE\r\n=5FIE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCsxQhXr367utry89wbtRwqw7U1GDXYGULOXYyB7TlmyAIgFG9mth+LEZWj5TBq+9oYJQf5I+mzGUmpFPVcH6B+H9w="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.98_1571766124945_0.3396790725802039"},"_hasShrinkwrap":false},"0.5.15-alpha.99":{"name":"@react-ssr/express","version":"0.5.15-alpha.99","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"733195bccde4ffc89e284a57252551c5a28cc502","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.99","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-MsieYaIygLCFjTAXP+IeMT485ku+tOTSOzt+wx6Bkc6SLYwHar/H7gckBAJ0KJpohAiLDgWf6Wgg8OtA4HCV/w==","shasum":"5d3887ba3e6b61fcb7075f45b0581385c44382af","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.99.tgz","fileCount":14,"unpackedSize":45786,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr0EmCRA9TVsSAnZWagAA07UP/0GlHz9tjfArjeqF/UDY\noJX35B/3bHvcuSVDjeGi7QF5nHodGLb0i5V1yrY/GfXe2GpITeyqPtDCi1Co\nbbrFU4p5vJAdJLiVhX7xJwuQ7SRZ8yEPw92dFSCPQKa7KjMg/mPNSdJHjaP5\n/D9ZScuKiMW97wHeGMi5KcSM01Ss8WxwnBumqtOOEIEgQPqSfRvrCPgK5F+S\nQZX5CC7zfrUzVSF8GrcI5NpvbCKhpvo1apYGp+ad2GD2RnBSnD/qbIyG9ipV\noSULv+SAT3AyTDtWCIX7RS4iQG6kJqWen6L2Lp1VxjDuf3uMPFj71qoyItp+\nf1VB++Ql7GgV7cNzulbxR3rNFeo7t2WaKDWLmJGZnTp3UlGmsq/L68aGNELG\nj4NtyXQCYPzr6WoSZwVKJrRWmNrDDQeU18YmIMyl58Y1yD3bqq40gjPG3WLX\nPX2MQnW34YMeeJttgeDpArAnq4+sjlIEaCwXX+i6q+AqHRI/Onl7hYqgWseY\nRjc6x5c+63u1S4vbinoJuMUbOUJaecu8pcaaJB3fM5Mq+/Pn5R9A7y6oTPyb\nJBMhPNG7tA06UbdY42gVWnclValiFSFVo570upP6WoLLlJ6tsQfLPbBSFoqa\nl9IB4PHQiRZKVdUCzcOeMvP9m7TdMqRMsXD8NrDPT1VLY7GdX2fPotoB+c8C\n2OuA\r\n=ukvo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGj6vojWaQAdA5GyvM8e9FCDnEa1VNfplHGCy3Rs3YmXAiBFcwIsnkG3izMJFbYsdtp2LTIPgbDC27P1BTyhhV2fZw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.99_1571766565563_0.9791108650847042"},"_hasShrinkwrap":false},"0.5.15-alpha.100":{"name":"@react-ssr/express","version":"0.5.15-alpha.100","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"af81c0a27802ef57997bc74b9e66ea66f6378bce","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.100","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-sUuyH7/+xGqMkbPQlSLlilsn0nRXnVyrTihZh9Bqqr5b0EjIwy4qj1CNPIWUnGBXX76/WQQy4nMFrPE8leRung==","shasum":"16dc5681e54ecd1c797a2fbe64737d62b0a5db4c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.100.tgz","fileCount":14,"unpackedSize":45189,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr0JpCRA9TVsSAnZWagAAQ9oQAJu9fsnOdmt2rJ9u6seK\nStoUdRIx3+VQW2L8280f3Eo+sTwZsfsUH/xDWW+os5MZa0raKShARme7xXEE\nyTNse8DAJMhvh2rLmTSQOwu3hKRLDF36b7XalM9nxeTC4ybhlp8BBf7i1BWt\n6R1XKy4AM4JeicYT2wd9BCwnEJVeiTOTz006RPFFHo3lIdIotffNjVtSnNZr\nc2WZpWs+byU7yRDWArCFb5B8oKXg27oodiaeCXgr0oepMGVhq7LTv/vELjyz\nJUuPKGS9pXmubyt8dRojM+mK8RUXnV/bZP4T9QgbQ1JrnT0fC1fdxj8FtOIO\nqPEd6F8NPHNUOe1aLQ2KtH/ZzsNsz4VIfyoMr++pU41MicvomehhUT3nsBS+\nH87gZlrQ/0TgzLpEyYfW2aC6nMy39yPDfCbR4ZeGQeJadrmGrFy+W3Pviqzy\niHIMKTsOHTYMqPBnaef5zzPRN5O9FC4y/Zmq6Kn75W8r8iyOS8Yb4lvySXd6\ni56feTDB30PKYfhVqcGm1gR8Qtgix7R/jrFiu8M3i1HL8+r4b9Tne8KAVImY\n83gWxLA6Ac7RaXSOegY9R/wd02GbQKxbFoVAPia5OnfxjqWYn/Qd9l4MvZft\nfp3UwnNcZH/9+bkDUHmUyUrHsKgqpl0h+VNhdx90oqxkbbDp5TZRwCDLReWW\nocLU\r\n=SkaO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIESUOGWHalbU1U+OXneG4sEyOqMWQxn0E/H0heQVd4pVAiEA/1MysJfyV1afXr82GZo+IYEkT8jGIf1+v5BEbwEsU5I="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.100_1571766889231_0.01864755982419153"},"_hasShrinkwrap":false},"0.5.15-alpha.101":{"name":"@react-ssr/express","version":"0.5.15-alpha.101","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"f01714960da003d44ad9fcc9d2ae2cadfd9ab53b","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.101","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-0/zUDGvEWnphro87qdeZwlUVCEzkC529zyr4bmdUIJFR+fM8EHvFzDnUmAOTuinhy+5tA9ja3BIzhWQxtACrXA==","shasum":"61877e8c55036aeae970e7da01acefea87c2ab9e","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.101.tgz","fileCount":14,"unpackedSize":45685,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr0LfCRA9TVsSAnZWagAAMY4QAJ8/m4jZeepfODkRcYY9\nqGyHNg+c/MCql6l5Umu8X23b5E27fIxZiUgetdik+oT7HcKeRSvw9vnwvwMQ\neS4uo8nQ3GC4OcltkYGevOy+goD8aeadlAEiu4w5BZROChKR1fAqbf+CrGhs\n3Ow+ZMzkK1EGtlinZxLjxqWGtfEWf9WMuHgQP5871G9AhT7oLmL6Vi5V2oFV\nE/OaXNwJXCxPqBV8khMFZSBMCjyZgB7/Cyh9pXYhLrAOxv5oEBkkH+igWcEx\nM5M1HHVqCmMEdi5zFicGXmDzqAJfq7d4Hgp0UwEzKAfDDGfM3G0M7DjK3RKy\nylpCpDe5LeMk6kVr4MJai/8YXbkVINNzl+dMEsvvrPricLULTL+Ep0D51Dmm\naKHBW84p+vCHmv3WVq3pWZ05ltog2x+7W7iIgYL4SP72qc5VRJdL0TtrdJcd\n8M9u7cjPYQfGAxx7egDr7FStpWsBoZIhLg7SWzds9nxdjW+er8gbFZEIF3V0\n5ii9hr1oNPFdkQHBjzN5N65DHH6esr3ArUIAXglCZ5gsx2WnvXS68I2c8ReG\nNbzAhEW2UdbdKCOuOjwvBx0JEThmcqn1sZ2MsMIWsPuo+9dcxRgDg/lhbgB9\nOrg4FY6i5HsokunNMbL4R5Uxxhzj/5F/1iUMfI94/VFkkmx1+5qMymUkfXj1\nxYnT\r\n=ML60\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC86be5gYLgxK7Lsj462VYgxceLe++dIgmSw2dcYQMnVgIgA6q9Uq6ViLLABXgxPFSfofVVpJo8Whj8wvuL6dj/te8="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.101_1571767007231_0.1937972791740028"},"_hasShrinkwrap":false},"0.5.15-alpha.102":{"name":"@react-ssr/express","version":"0.5.15-alpha.102","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"0c2de33cfed4f86b1df7746d8e65d4aebddcabfd","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.102","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-doVDQD3PT+uvldqlWZsp5FNYImKrJfNs5WO4Det4GtnsAmgb+GyL+duKUVe1SCtvi/oZW67ikd/tgV7lxlPQJA==","shasum":"01049710e31202a2203cc027102be846abfaefe4","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.102.tgz","fileCount":14,"unpackedSize":45361,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr0PRCRA9TVsSAnZWagAA4H4P/jt2Nsx3MXwtgiJmeMTN\n0S8nLt8CoraNaZSBb2AMUVOlWBheY1/HNQzuUrq99v4ksEcUn8MBBJulo9S5\n9X+FSfYdg/GfwSF36xg8thhIMfU5ffbEWtDjdHIWySgBwq9WTm+NKVa4fXwz\nTBDkFtmmn3MW2aVgcJUZVm8T7fwz5E5pIiQTU2eamQdCSHHgg1cpUSDKEOZY\nfGQrf2iOXD2K484EVOdRojfo3YCjxiEn30x3U+Ea20Pcigk1myxM6iyeTPeQ\nXhORlsdeE4a5jTYm9hkfgIrJL0yWtrA40GFiAmhvxKdKeyRTfIeEXImruN8a\nxFf6co8jXk7tS0iOcrYpn8eEhpppmkbKwhj7vm+LYMpJaYAGABSINcirTe/p\nMk3KHTWxKMZ9YXF+tOE6rbRhmZpxk0kTlYXqiN67yZ407E6SwYJgUWif1smQ\nLxkIzT05CfEgrI/cjwU5CawCbhD5jSUOb5Z0t44lWnYw5lh/BumvSpGQKRLX\nx9t9ce4Uozhu0tW7phcnwN5yje9Qb1pAtD6RMDQ2DKlcm59CaZCoKI/0+cZK\nTfZBRCMOSLqOPkmqpR+IPXCcun56DMugDnd5lK48DuxUjRjOZ/KjVJW4/FJo\nhhXUKnN3jfPKBR0ZcxeNg62004wCujM0qCxzqWMpqlK59nUxA3NHrO45kGsk\nsIPS\r\n=6KIe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHKVtflQQ+6dYVxduE+ZQDRFzJJ9Zp6NBnepW0n1zOI6AiAZc2bQ+v/H9KYRiWK8M0huz8Cia01VqnwHZdMuzTghOA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.102_1571767249297_0.7759103129039977"},"_hasShrinkwrap":false},"0.5.15-alpha.103":{"name":"@react-ssr/express","version":"0.5.15-alpha.103","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"91c319a0b43208051aa761d8a7f8d3acd5910465","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.103","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-WFQE6HM7Fg6cSEOICEU1JO4B9qUT6lUrtU6lP37lPV9v+bq8Tkh/5RmBbGgk8gc4tdn+Iz0fDQkotZV+6vMj0Q==","shasum":"0497c4a5b6404e8359488dbc4406f4047780073b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.103.tgz","fileCount":14,"unpackedSize":45255,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr0T2CRA9TVsSAnZWagAAfq8P/2u+f0n+P1qnguSzU6XS\nZumku5mss/YKNagyOUdL7SL1wS3xVYyWbhYpUvk8KghrtfyPSpuhwK/K32L+\nKSjtUl7ZdKW7pm1fGYL/MeS5+Aqdb0lFun4tEZ0W0rRa/ioMmDpFErOvAnMR\nY40LkN7TeknjcnKQu6vTPjLn7krweCGzWn1wgI/N8Mw66/06JyxhwMR9ZEt2\nawxrJp6Tb5SDkYYkdVgMvmApinOcvTgFBQ/l7j6YwO7jgxsbMueRYt4a86Ub\nWkiKOsmJFXJ0RSJUXILfbdBTCFVGssKXaVEYy8NJu6bWJ99D/L1/i+fQm3M9\nHvhU9QjKNvSwpjC5Iek6fJN5t9e0F3e1OUAyIyVicApUqX6GjnStyxdLebdu\nJpN38FJT+d1ReD/y3QDjBnoblpSNP5rPXBfEX9S4anK0Usw16SAFmi9xHoan\nZNgf35g1iaadWY71QAt4/Q0wjncQ4dzILxiY/dltBg5KrtRuhmqEsTKXTmDg\nBZmwKdwl0TxJeXP05ETQxC0AMSCG5RbLX/L/y6FNuL4vo9Kwfqu4b0kyqf57\n8wlcJ0+ry3r/DdUYk8T4pZ1Fs+MOWuR94ZD1lDpf8taK5YqspXJ5hAXKBGfF\nr3oURp63eaakarewo6YCnY1/luUQyPW9vocRO0C/958WLxLRPEOZl7hMjL7H\nURik\r\n=Pinw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBcJHC17CYD1DxoeZjLxUkjgtl5YCOpXpsHMvmRZplN7AiEAyB37JdnF174PViuYsHA14LTN6KlzGtxkiuvkxize7Dc="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.103_1571767542339_0.688403226540049"},"_hasShrinkwrap":false},"0.5.15-alpha.105":{"name":"@react-ssr/express","version":"0.5.15-alpha.105","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"13c46439f3965e4ff805d52af987ae4c8252e429","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.105","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-p9ojWGdQ3KrdF+b+Vi73av6v13x8iSW/C5rrUbQK6mTADppDRdI81wkmX/LBKaRXqbLh4KAXQvMOoUtwLkSznw==","shasum":"0ad578267bf5f9a42acd9f60d53b2ee93eeb8a77","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.105.tgz","fileCount":14,"unpackedSize":49527,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr0ljCRA9TVsSAnZWagAA7h0P/Rq6PyjeCoYrtU80ByjG\nvqX03+IK6ITTGwmMDbqr7V74OP0LFcj24hn9PMFSfSqnZxn1jVHZshfHDxBX\n/aWtqhr77/95K8EJ1G6s6bkynJtcMvBYfCijI55Tw/7Rnq+GPGRFc64FUSI+\np9tctsals0akRasT5TIxOODf0v+ac8yCD6ZzyFMowY7xenvXkUoZdGRQ03/l\nuotlHx35oAxLiSHNPfd5Z5hGgokDK3zKLfCSXhQk6DvF5YmGOZGub4LL6ErR\n5d5/y32te6DqBoYPdEk6/JBTQEOZINppLFtHtGo4XM2zEL+eIDL/R3M0iJ6m\nsJcHBoI3eL5IrZETM0pqaOmHQTembYa8fLUkJhSIT1uowA20SNeqMsmJyD87\nZAx4ER8O22fsykSdqo4HmEHZoZhpGUyiI4jT3XZLIR8c0rIVnso5dI/iralK\n2FBeIxYdrQDG6lz+MWZSnJpQKKWapdVD6r1v/+vl3IIaDeYaDWFysNFaT3I6\nMQjlQ/dIsWiAw3j4W/ckxxloRvREwga9cpJxZEbJWkioQCsMgKoSNSEHr7V0\n0/PzGFX088TtdUD/SineOgHZsD5+UPcmwIusWO4noaO5hWRxsAsr0DJLvBbW\ncDx9UUi2we8J3L46br2//Qtk+Uc4nBv+ZnFJOnXe74as1JgLkKL3u3wnwoUp\nJgqz\r\n=5rGQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDrRZT5t97vL4JHCJAlkVa2cijNpahD348yJljzcFODIwIgRCjLx7QN6qE0tDupFK1IGVj9RQ/yJH5VKIbu24xK12Y="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.105_1571768674830_0.6302561918835763"},"_hasShrinkwrap":false},"0.5.15-alpha.106":{"name":"@react-ssr/express","version":"0.5.15-alpha.106","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"de4378e18e3c63d8eef7430246a7d3595a8cffe1","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.106","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-/ybGeBj8nb60bl9nEmHMA7upkh0NhG8xuP6KbezWkqZDCKa2NDZiYi+5xTmX2zQaA8QbUaCWYppv/cS35yE2Xw==","shasum":"f2573238048a73e156ac5767fdd83881687fbb39","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.106.tgz","fileCount":14,"unpackedSize":49537,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr0ovCRA9TVsSAnZWagAAM4UP/0cOBfyaqOGzYo8dCViK\nvP/MqPEtPiiQvxOWf0ZB1j3U5dRaXeTMRChASBG4VZ5WW2xMrY4OJMegBebW\n8lxIMKwNnH0t+GMUbmVoHsPc5sw7oeoAYJC5SEhaBX1+6Ieqi+m+gD4JPW7c\nlq7INtXLWnSRsM7jjDii+7Btk8p2H4EUvSHCSpzkByCr+HYAyQcgt6n1s8GD\nVqUijfCcxw4lJTd3G28hS3orQohr6Z+wqRHUVQSUZ08Zs3CRVSsGRv96xbQ2\niIZZlzPVgS4boOEv+0bTMO8Te9s0EDzpx5itKBaKp71pRgzbaR0VIlrVqjf5\npQ3Xp0SMeQGschWBI91FDo9P8Ed8wlT1r8PJ6QwyxOHBgSxLJJFMysWbRWMi\npJUcQU+eleTXOjRYXeV5NzckipdoH7JziHuwVvINzQ6Rtm/BL5YJOjrLNVcV\nHAlSnyQVvsXkXS4y/tk8zmUikzlgx6o+KyQiLnVWT+J0tR6X3uNnTL4vOc3F\ncALeEuziK8LXV26c12CnFTSkq4k8fdNL+ncfunBOCC8bIn71Hy7myd3t1M6W\njfTEYh/5p9u2gU72GNc6Y3Wjj0PGmVOeaLUohxhgVdVlAQnf+srzPKlu2E5A\nbrUlvnBVamPv07q3Wduy/U+jP8x913p9OqO3JiDtTZaI2wkcTHHUgMvap1ic\n/loD\r\n=+OAp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG40j41CTg35zyyfhrnS1A7aRQ3FfE0JI8cL325TllVHAiEAvEw+iUXuAtJ+vNWMLaXeEmh6z+bK+LEoEzCA8eotDsk="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.106_1571768878815_0.46530725695437924"},"_hasShrinkwrap":false},"0.5.15-alpha.107":{"name":"@react-ssr/express","version":"0.5.15-alpha.107","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"272892df7977ca398df4509583a2b82464b4b5b0","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.107","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-ak4WDPz9G6x42/l4A0eJMblS/BFtcyv4LECuU2KbzU20XVmx0nXDP68wxmF6+pa7Gak9Jtc9ClOCXc96PtFspw==","shasum":"d575ff01e943e422051b41fc135ce2e943fd2980","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.107.tgz","fileCount":14,"unpackedSize":49621,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr0yuCRA9TVsSAnZWagAA+gcP/3yFzNRNFol9PVqIPHiT\nqgS4L3IEy11OKKHBB1HkElyfHO+rOLVPXSXYvfJqnOZXrvRiG77qSfxcSn/A\nOHj6j1Dj4iaqFq4sv9EcEN5MGx7SYSGOvIAlfkOWRltefCWQJfPipYW3NYV9\n96v+1hUn5olg+XNME8uZ85XXdP89eSNa5BF90YMye11uHhMmDR5m7rPEyxA5\nLIeRvxywmEweBC66Nb447FhFc7lpAK4EYVdKL8x6Ay8wsgFgZ67gkJcM+EtS\nXFx7RvPkozcHEHgcgEbHsMLr+yL9wkMl0oFrsKwJtdbuwvEHOU8rc9wvNVZ0\ngK+6A86Uj5dE1l9qN/EHAR7xUY8HsMsUY/RXjbL8hIwgoaMPstWfMUOTUhyz\nvFO7n2TFc3+Hvz9mWyQqnqkp+nCYtE3vlFfpRn2VZ5FOUDkbqRREVVUgigb6\nDfv/gbwSU9bMdXngfYb2yJXBX21u8sv6WYWw6DAv3eAkjWt3L35oEgRjpwUM\n0O+KtpdkGxeS0tNtIpnIPyWb20WlmSAx08Uh+0nEWfb05F2YxUyW3ctnqP0y\njpPishnjslpakrzm4P3ZUmX6Jrgd6s31qK8JZakDUCj4W0sKlpN3TtQTNRxG\nM/IrIhx5nhZjg/03vSA+w5lLJeCQaPov6z/AIXN8nHgl7xzxGmui4/9Dp6TW\nFF4+\r\n=PMah\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDBaQD0HqWxiyfyvixmKbNeb8SJI3UCWWgBmwFfdWq8YwIhAPedNsr538KgHdy22oFF+WQhU0xVrYeeuJ9l83DFP3ck"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.107_1571769518000_0.18333450177901356"},"_hasShrinkwrap":false},"0.5.15-alpha.108":{"name":"@react-ssr/express","version":"0.5.15-alpha.108","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"ff307b54e84fa57730530f76b7f2b900220cee8a","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.108","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-J2tdfFMmFG0zSpYTdyc1mb3r0clMCLlnWViL5Co+iPO6IiL5eD3dMIvhtKR3jdaWSfV6TmLoieHALj0VbVpAaw==","shasum":"e9b21834dbab804194623b96ba50edf276087fab","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.108.tgz","fileCount":14,"unpackedSize":49557,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr01ZCRA9TVsSAnZWagAAu98P/RxA1yKvc4v290R7Mu5Z\nVVJovzewulW+rbgU1q/mKjL95oWjIlk+WkYZK4hRIdS7jtmUGvqM6OhX2hdf\nykKiSXULGyJZt0Zei4DWGCYXXXAuxKdmcQVuF9odbcMC5W003h2Mwymmi3HH\nnHtr/qkhO61iiUHJ6gu/sEzV0Ncjyr8a2qVKgKuLkj7ptgPvFP0MYPRZ84yr\nANnC4V3GdYIZ0kNKLgXsjnBsE9v3Qau3TGUOCioIYYmL4NewLNWpcSnhH5iX\n0YcXwpy/uB1OEHkeRRySwKklz5zN9i+n1gvg7rURpV8UmZStlEVB9V4PnuLR\nguY8ZdzyHfy1L2YHM9maPekdWzhYcPO6HdBVDrLZRFucSwJ0U6NI4E7dLVv1\nh0ULcVNK9oLJ3jVCUAfHhdAyOWgmD1JAzyinB99UK9bGaeKBVlfQxzR9lIjj\n+XbuflKk9VRhdrrr4efpW9iP+kSdGz8WVK0MgXidXZCDMbKGcmnv7YmR4AiF\nqIAeyJZCB+VMmNt6kyAqwB7zFVMfDENor4/LIZxTw5sbwnMazdkScRepklmV\nbjd3Q7ChHJjuUGpDR8x35wE1CYF0hObJvY3GsSPPy5doQVmsIr5lgr+hQSrJ\nZpqM/FG9nZEG/4uTuZwxbWwGZxc8lyAbnWheDn4v727BxT8xHrMdKefHryrq\ndYkh\r\n=nf6G\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEAxxpyKWGHRJWMVOve/H7MGdjTH4CrkVfuRd/JHT1VMAiEA2yr5jahGyEfa0uz8WONk3TxeBziSU1jYCHLWD0soqoU="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.108_1571769688956_0.2700866199702223"},"_hasShrinkwrap":false},"0.5.15-alpha.109":{"name":"@react-ssr/express","version":"0.5.15-alpha.109","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"7ad38fbe716ab3dc1ead0d3964761be1c8d92551","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.109","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-k0G8wgUzIfKi1LMlZ7GCC5s/HlgqCIrcPtoo8ao+PBGonsVnltE0oVH/CUByq/lTnNZ2fPwdesjd8nEPn1ihFQ==","shasum":"5fcac3aa6445f2d0c562ab0d9f2207b26c1cf215","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.109.tgz","fileCount":14,"unpackedSize":49871,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr6UCCRA9TVsSAnZWagAATiwP/j4d5oiaxJZV7KNvidhS\n0HG6RN9K44CppwgJXee2pDE9tpFJFvhJS7usACBENw8LlN/8huObADmFqobq\ni1J4GIAXyjBAWKLdJZDIEn3uOa2byX9LSoncLNnCscyislN4cgXJhs+TPELX\n04q2gHo13XBIkyu+Q5gFlnmCwURftD1RROJqPpdkxcG+NkmB+QiFjCmUFhtS\n1JTeWpxYLT/NxR3VTOhPaEPdmL0ycqvemIGs9HKGWeyJhEQDBUQYvynmo191\nAy1xCeWu6ZGju338I4Ov9Vocd7zDX3RsMkb7BsDaSkiWoeUeBg6XxRBxqQ9C\np66ZfsAPLgoQgToAWpSnDS+TTWL5SC4YwBMOpOpF2oZOSjh78FJO3E2K1t6z\nnfnmk74ghhg76UFepHPLXpPqNwcDdcZ5jv1fqCHrgKBvmgTmaaTjp4oVa49C\nyIb9czC/pWe/tkZq6ML5QUGriRrB7GIotoqoEMiDhjCfozg5AVzvPbj7p9e2\ngkHcA5F4Iau8XVcWoEvwrptG4fLtgIVPFra8r2MjkbXHB+c6G5+JPAnj/9zq\no74mxOA5phEPtRG9VTqeciTE1gJIXL38vyqiOAxP84+UKS6GIxhrQynEAZLR\n851fpUMK94rVfu6i4V1drDKy+sCBIrwCnTNX4A1F6aOjPl2ag1NRVFkjKsNl\nXMEf\r\n=tUYE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDuHKV0kxQlurw5qUw+OnAc7nFVGyMnn4BuujykF1W6BgIhAJrmvIeyFhzIUmDCV7TrOgsxUQPhNmZpr7VBdRK8OYd3"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.109_1571792129588_0.7267805062165122"},"_hasShrinkwrap":false},"0.5.15-alpha.110":{"name":"@react-ssr/express","version":"0.5.15-alpha.110","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"2a8ea1a2e88de5d2291e5e73caae47043cc44785","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.110","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-H5mi1Hk5nl2cdc1TgTnYRQ/1hIpc5T/LVx39lxjydJ6vGLSv4pmJbHLdLGTEzvmfLucDt3lkGBXMjAGWmlFBrg==","shasum":"877d9783e3afe417e2064a74d5d7ead07704a2c1","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.110.tgz","fileCount":14,"unpackedSize":49923,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr6Y1CRA9TVsSAnZWagAAa6wP/RrAKWbct7XsYxaGmFpQ\nSWn7HWSC2FW/vho7v4EDUBQLECWbcCaAaarwgtJnAD92A9XALw9JgriVY5a2\n1OvXG4b6jVkZZB0BFdQw3QOjWG96UXvdx5xwfpmwtF9vpcNrRGOAmIvDoxCP\nzwdv3IexM/WtpMutj+wDtK6IGN6UQfqLkMT26hVpayR83Wu2Vrj5aAcGaw0s\ng70bruqASLc580dRaXLuhdkFEyCVlRt6ZuWwpUT6wsYa9Hf15VpXnL7Ble5X\naupt9v6v6Lvx627LLRpnBcjT+j+x1AiBA7UYlO2th46Cj+BC5mAbqYHIK+BZ\n5lK3jTG+qTcKmfFizzuLWcfVxMQPqELGQ4i/5FQhn/BzEPNAnKYiE/sq4IIO\nEW6Cc9bS3VhPpQgDyOTk5Ykn203iS0b2C07Z+T12FmA2i+h2dVNxizMsvtlt\nZCi3kIlBwk5nlmczOlp9L4VDPrqVcZQYqTlKLQDaUzTjEal2F5uQbak3IrFv\no04LKy7c5hREmNqQnxPc1tIKNkpGzDxEbxksNvNgKeQI3Vh2V9NuLdoqdQIG\n2HycSkc19m3X/t7aSHiuJvmCwO8ytHmLwS/HUhIYU/nn55WUT0RS7RTmnbTG\n4uK2s0bPrIBMEhfJNoAZc/90h2qJpfW/4gtpSSJDtQ8lo4BQtv/cnzM2idj2\nHM4X\r\n=nG0w\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCgOqsq9pYH6XhNcV0MZdNqoC81C5zcicQn5o0G83KPYAIgKtfBt4C3wl20Due5zZtfApChGRZCLBXERvEnnTuhZa8="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.110_1571792436838_0.60700883645373"},"_hasShrinkwrap":false},"0.5.15-alpha.111":{"name":"@react-ssr/express","version":"0.5.15-alpha.111","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"7ac96c85ee721abdf2eae777abb9cb56c669b78e","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.111","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-1quhwfqgwyKY1AROgQGx0YCFUBiFc+EzeokZupugHkPjUAEzy5zVwT/gKW1/SFKFQGWbGapP4md2J3BFqBBeIA==","shasum":"87f843dbcf23e0ec9f0ca9516c7dd65873e564cf","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.111.tgz","fileCount":14,"unpackedSize":49953,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr6a2CRA9TVsSAnZWagAA7RUP/i0QD/5TNo3c5gl6rdAH\nKMBsigdmWsq5h4aaZLXlN0p8SiIMgm42uF7vQfAcponj7Dsm2Qi28CMNGEgk\nsMtG/TCzC4SDqZEbsqvC6mcIvV3Z2Agd1z67gT9q+hS/UDGyXKjpX5IpO2fm\nb9XR41NvVvS9u3PetpPeHl1xLPDEQ6dONvKLnPrWHpyyZFOw3k0jCMmBEncx\nEH8V8U6EHQu3XnO8dbU7hSEYr3swsccyXQlAP2PqjS60cR1VNz3rWndF37XA\nzkikByFAFielL1vB8K2yq70xQpTxOosdaieGD3a2IvKLNh+hIBv6tEJEjH+V\nIh/D64QauO4axFya/nf4nw6/9a8DqTeRpt3IsLsjEA81YgkhTwLaK1Ler5em\n9mdjpgo5mbwGQp5Tg/JfmtJPvfprD0V/kSTZnAkhK9RYb5LRrioBpZHHFTRP\niGWAHpNM7CIJg8dswLY4kNzRJwYAoShF7/Q6X+Kwf8dhn/Fsk4rWIkyxjQLz\nbgDqaNFPfYLIrKrk3An+ve45fR5buUOoXpCDQjuf/+hTzdQZ2Mmp0gHjO+ET\naplEv6T0eakKnBSYX/r+kNGM0yapX0XX7jTzEdf4WtxauuMUweDgQUIpo6si\nD4osg+nL2nG75FjBy0V1UnpHB9EQocs2xsWV8IMmoet54gCul1e16prpifJZ\njQ06\r\n=q2F/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC4sFfrX85D9FA16D6LmhRVfxUhwW7vSiM1B6cO4GxIRAIgST+iAFjkQXKs5I8lVh/5kU2q5OT8BtCX0YtZdXECaXQ="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.111_1571792565571_0.7580008304725712"},"_hasShrinkwrap":false},"0.5.15-alpha.112":{"name":"@react-ssr/express","version":"0.5.15-alpha.112","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"829b433ff32fe91dd0132f72b17e62692a362305","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.112","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Wf9bttWLEGvAZQOPzLw2Ark+lJqBiGpiuIgnBmwCP3YiZPlSeQN4VRdwvW1fhJkZzrvisvSAA7RZnN4P/bQLUQ==","shasum":"e1d21aeefd2c6c3fe8c309ee553e0e9f8415bab9","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.112.tgz","fileCount":14,"unpackedSize":48553,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr6noCRA9TVsSAnZWagAAVBkP/RrPKHnIdvrJetHrD1aS\n1W0zlSvdAmxRFj4ryXiXzt+mWOso17bvJaedObIM/gMQrF/B1RcgvRyTrPZd\nCx5GzLeVknphSdlOOz3GQ/uDwaPcYyPpRMlzumdoiE6i48zDqCfUv5SdQQoJ\ngj6j9ipR2UWLHcOT22KQrUEZ1CXrrZ0QCh9FyTp6+36jV8eu0ZanC84TcGF+\nmF7YJA4VJF90UMVF55DG9gfaiRYPnpgP3lzpEcpPN59gSz1giewyFDBrupEG\nPpdpVZ4rPEnaEXf82nZ6TSyIsoeN88XsYpW7leoTXM1q1EWfheEya2bI87Fp\nPxJ7/3CazQcQRg1sXSSr7IgYm0zBWWPDW45UI9f1n5nirD7x/856xRrDT4zc\nU67KRRiG5Vr7p1oiLra4HpBZ/TxpLPjKYt0pPfhwEWccWwiHy3i+k9Woz2gq\n9Du9y0kquOMzDE5pNPc97/xMI7yeqNYrNKeWX/nZG1cPhianMWZ7VnAi3Uzj\nJhGh6uD0iLzM/Rfb9kdy0eIuZgpfhbs5mufzM79pFNEoqDED71+7cJZO2YXP\nYa1Oitw3CruW4YfqE8MP0jp2WRCVwKuzLf00aT6jZFvY9gJymxam5gUFYno2\nNO6oc3wGfJJluKXs9AozjmhT1OmdizJxnNUjqoBbA1LdrmccBLWGhvXcBo3u\nSebu\r\n=b87L\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFKzdXT3d++IcGyXdiIoW5ny6jPDFre4R2Vxa8+WOX2bAiEAnmNLKiW4OFgyEY+cjII1yM6TFkPSlIS+fUxnCoA4S2g="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.112_1571793384197_0.4468129307638362"},"_hasShrinkwrap":false},"0.5.15-alpha.113":{"name":"@react-ssr/express","version":"0.5.15-alpha.113","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"93719080b462f62713400d72604ac15eb80530d6","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.113","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-jh+u2pa+ZwKEOtVvJAb9ZW10I93+NcLXbSiIKAsWa90ApAv/EBIrKMUwmjuxNeWW9TQ1Whc78rgPkeLd/VGyvQ==","shasum":"5f6de0ce5338495434ee73bb26e1ef57d553ae93","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.113.tgz","fileCount":14,"unpackedSize":48581,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr6pJCRA9TVsSAnZWagAAdG0P/iPZu2iUTbiKIx47WkXp\nZEVXQl7DqIKt62zkxNR89BHyM45CB8PjXNhDqVt6KsOvLPzZdkOAyC3OwUnp\nO38WTpmvK1K8fh5BSCH0hFtqNqwoePiUPWhZPHsc0ZKi/4dnFtJ5obd45JsF\nynIc+xgxRH0/2u+zIRRxtPXPnn6o59/StNZKgSnNH2QGLNJuajx+Cyclwdrx\nyZdBQ+npHE0wGfAtWtgmJBbIIPGSyC7kONdWEfPxR1Vyrryy78+nhN06OwpJ\nYmybh0Y0KBLWH1CSxOXj4uazVC5j+sWmUdfsNFCZ86i/SkR1kGdM7ig1MBEf\naW54xlp9AhfEqqVtjWwz8qJvpE7+4IoEPLqM19IJ1e9jeW8SJPVpI1skz2G9\nL/Gaox9gtHrRY8EDQJdxPbJm47L56LslwoBUkYGyrSzP7RO93C5THDGRxSaU\nIjGghHQp6S7elnfYTLv2EB119hRoB0W3hmeAIxuzGen+aR0NddRNAyaJRcz4\nRR5IMzzq1OMGZmRmHcwhEvu6qjXIJ4MmjUWYL8ASs8EbO3W0VMTBT1etwGH+\nXWB1wgOCkec1MtQc3xLmpHpylxpWKQsGOvo+ZbEn6r3vpS/W7XW693eaF7hN\nvqvrc+cVjblL2mrTGL2PJP7c1hzvYDc7CdJM8ArH2bW+rT/6uDVeyXEMWkJe\n6x8E\r\n=EMUP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBqhhyjOiH76YS9dn8qkuNDstl8J7SVO8eO+0wiSftktAiEAlwxET1NrvbIEIpIlmqDJmnXHuDDGH8gL/s0/tXWErk4="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.113_1571793480837_0.6494651934395848"},"_hasShrinkwrap":false},"0.5.15-alpha.114":{"name":"@react-ssr/express","version":"0.5.15-alpha.114","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"9b973b7be57df7fd6ebac36de785e1b26b9fc995","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.114","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-/SV2SjMrIOPdq5zLh3PMeuI+No0gVmVOj/ltMUUjMj5MwTP6FZG1xSlG4J5eSC3dlw8s6x+jTmMa2uEIKw69oA==","shasum":"49c11c94def57a9e1e817c9b964fbca04dbc3633","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.114.tgz","fileCount":14,"unpackedSize":48495,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr6rkCRA9TVsSAnZWagAA6WAP/3PlcZfVbPMWNMHQtsrh\nRC1dhVRLXOqc5oq2b8m8ARNJ+beF096rjYK19y8qMw8SnxtfCOY6JgV9AafC\nAKmXmwNQJq8D3j7m1ALYtb2N2VTWIu+b8Vu0OfBK7ADTlOicRP0anG4nAMC/\nEhR98h/wpga4pgoXU5TZPqWhGnEmL4meCnUnYwFvXUngbU4nH9DexJnBOG6O\nUaZCPFPIZEwXxHx7pjd8BEm8kGLzpWnDZ7ALfZF+ChO95AYggRact+aRjCVx\nKKsJsWVH7L+qNWZqWkHcmKPNq2xqh1Xdm0Bk18C30Z+mxR//jn1egIkjc2Bc\nQ24cgqDKXUl0EmWOES9ZoxKdhZGJ9rAkz+T/MDC0dyJz1rsqn3SBxz4aLazs\nspK2afT57Z/fk+Mf9EpQu+Z6mFSY22xKCjJChcqCBC9OVMeByA3skYD358IV\nDGZmeSepeiw17kWEfq4sOTNPUSkJ/sjpKsl3v1nE0iG66XtZogMj0sgZs5Vn\nfYl3SkVyggCIkpX9gf0u+4ML1jgQXV/IO/OHUSHi745T9W5cxz6KL2ydVCIt\ngiaMfN1xXnwh9LkhDx2ZH6wXMm71fCD+sk0ORF5igRWEzflY6lnPx/oILmW1\nCk/22i0Hodhuod4aO/R1ZRCQivGkz7PDEjvi9tCUADU/Wt+W50sFYxZyM+/b\nhOvs\r\n=D0Th\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA/uNJ/QavzinWqw9V53OASyz0Jay+N/h9Fp4UTgS6c6AiAaPm9dGXNAfo3pRkve3q//kNfvQBZntj6VZSHrkoRnUQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.114_1571793635999_0.174754685832206"},"_hasShrinkwrap":false},"0.5.15-alpha.115":{"name":"@react-ssr/express","version":"0.5.15-alpha.115","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"9384069f577e42551a7abd2232543e45c6b5c163","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.115","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-7fjiE44u4h73Od9lzMGvuA44aBKb6mBngJeRcdslfnulm+z3B3rPdFs73yJBhT1fihq0UpCL0cXxoOSrGFDyYg==","shasum":"64fe7ac1ca937daa99ae000e063c25752aa39b67","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.115.tgz","fileCount":14,"unpackedSize":48467,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr6v6CRA9TVsSAnZWagAA9R4P/j7gxALmF1APZ8f/Epxj\nfhRKljwQ5nBPA6p7oovRmTLhxWptDvXGnn4szdmBxx7h2qSBYDOUbYK4CRuV\nopTs4NUOFdfmPo64ox4m5GnRSmtyHtYpu5GlsvY/8KcX8nPUdhtnvXnysoM0\nZerafzWkKg+IlcmfIGFEDwqxPZ2v9r150B+rGsHywJRHxpZiB4VyResX3xzQ\n9WxJYTtcSmZm3VpbpB1j0fOlelLsdHRCC/CWWH9Sp0EAWDOcMfhHJZFBKjuB\nvH0Nm1ysW2xv+STnYlLoOfibPTye9wzP7MHNMOcY7EURe7rimMwKEaWU9QWp\nGJTz3aPG6EoPf1nAqXgJ6vefhPAcbU35eLJC94U+jxpqNCxuUSNnSKFsMZlj\nEytQHPNUvlAdu8GxZLV4tsvluG1yIM12WRaqzLMQqplL4z5y0mqOhUTHnuDL\nAixDI1c3Oa8Hi9oSKaCEE0srPAgIlUylGA6thHrUN3VKtIKPT0vxLjS4fMxn\nEBjd9bex774Dil+nRcpbXB2ZcMhxXnzeuGKmd62MDfW0GdJrY/KDaOdJqrql\nOgw+F7HGsCCni5aCAfQqusg3Ri5CYrHhxhFZQsoyzAoMjjHq1UWNE+3W/Rct\nlCCKb+feEZruriAXGeZ3F5/UiNk9weHo3UqniaOi9QrGt56uZvhH/qwNMKMH\noSis\r\n=/OUh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDWS+ExygEY2S6BcS9czKCd9LqC3JWsElmUUNWEnH8Q0QIhALNeHLAfFA4IOARTC0oMDa/CsE4F/hy3/dH/7StJi6Fz"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.115_1571793914486_0.899304931220613"},"_hasShrinkwrap":false},"0.5.15-alpha.116":{"name":"@react-ssr/express","version":"0.5.15-alpha.116","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"14edf1ed3487dca61357a304b79419db4c6b932f","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.116","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-OSWTQvshkXOrJ1jHfDxz0/z62DGSeOqcFsYPxEQeqPyh4TNZWC32LjGHC6rDLUSNgJ1FYv+LiiB5Qt2YPL3q6Q==","shasum":"6d703b997fcdbf344b32df8e35d3610d9fed3fb5","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.116.tgz","fileCount":14,"unpackedSize":48463,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr60GCRA9TVsSAnZWagAAdh4P/2hGXwaxfvvYaNopilsb\n9i9msj0u67VyhPISusWQmbE7NTeRRAcHsJxu5i7FIWNGZBZvAlsjTINFxsFR\nVlmyLUUnUSOXXaIS81JNk7Dc6UXeo5C5gi1LCVBT2IX9/3irvcPuCeHHW+Ml\n0RDhABkjJ57mS90al0fECYsdihCLxyHotMegARuXvtTBWHEGP+LhqF71AV3n\nzw8nrQ8lZzbzbL9NmtzyoEgWpARyTuGlbAmTGLZ19kJxjTnY4kJJioZMQ3Lb\nXXMKbNgEFYIrs1zDWBzG1khQAadkHhC4e/xAXhjG6Fj62tQiuho+pRGFbAse\n6cma4Eel/7ironyk/zb84tfwo95aYdRCNJBp67kv7PrWKXSFZzm+z1i/bho0\nf76gh9BwERUo0+ffUvxirdeawD0O3Jus7iFYrhfGexubjwqeWuAlpMGw1UBL\nSFX1BR22D/N6oSj+3Oh6wsdM6+9P6eywEmheKFjWxA72x5MzJqSXyqj4BQpA\nT4jyFWViUA8kmiN1Nbch86gFUKJCQVioSFBKw87VsNaJD+SRodxhxbn9Fq5s\nPtJOHCUjSf3KH+jI+AcjfsbvB8Y4HzeSpgXXppdw4TG/0EkdmeigwnLywkhD\nKPMJG68Wpc0M8tRX8VCZNmndUo6XpzWDz9RnNHbPWlrRRo8lXUOwLKK59UwJ\nKvJ0\r\n=Ir82\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDuquQlX+WkA3oj5HMLI+eCtWDW/mgej5n8p4ULfz96lAIhAIJHWkxTxsJpULREszxNGx9QS7zVy23/DL1FQe0PQ3zh"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.116_1571794182192_0.9002700405117272"},"_hasShrinkwrap":false},"0.5.15-alpha.117":{"name":"@react-ssr/express","version":"0.5.15-alpha.117","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"ac83e6eb17485c16d7dcf8c61e30501db7cb7167","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.117","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-bt+CZlPH7O25YlwUCdKMQjdxjHDxRBXq7kGwSMjSfu9AfV6uXmOldzKLuX9NFeYUEp6VagJxrvmtdo5v8Ck2zQ==","shasum":"6ff9b89afa2239c0629f5ff990883073565a7245","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.117.tgz","fileCount":14,"unpackedSize":48753,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr65ACRA9TVsSAnZWagAArb0P/RuVv5AA0gy13AMrwIVu\nWzDCZDyFEOgPumg+T/p1wwElcotlV++voW099CTpK8xiuYi4NZQhBSZrcKNO\nam5COxUGDYw2kfwIAM2etRCY5KXnCjSVHs4H1O0rj/iU4rZke+/G5SyTuRKn\ncsCHkpJnHckep4kn0un5slPD7aebu3y7GxlWzxelDx3W4rPmUoIJDLaStFG2\nNFQA6/NTuY9hW8wiLh+8QbCQwsEz9JEjTOx0ZNMVUXuikZHFy6lHL4EioKr2\nmvgtrpqzZ9RXA/RKVoZOuuWcfZiTHyxii6IEa9lWUVLbce1IRpTWTKSK7AXv\n4YrLkMP6geE4mPeVBymUKUMJPCJKtbzC6E1IEFTfveSGUW+/f21DsvdI2iKT\nk39bc8ouSeY3WhciYAk8A1wA5Si7Oa8o/BcB4JJTdlc2liDUJ94BlIU2Xl1D\n3sLokVgBHTXQYexu2i4WaD0OSprnDRHckwJ2QG89o/oWBw36NosGJ+7Dwbry\nsGeSd3HDsG3CAB1JwmHfkaK4XsHjoorcgl2JjehiPF96bl/1NaLYA0Vl/M9D\nvkOjf/kxY020OzLov8SDT3uyN0UUKVadi+P31khxmZGYCLF4QIYYQToUy2l5\nTLFVgSp9eZzSAqX+9FFnMZJHPnAUKCQDK4Ia3KC+ZQhK3JhlHnJiH3BJ/NQm\nz5I4\r\n=ECik\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDXzWptaA6stUns80SarJuFLGv+3Z5RkJ9fZfUQ/htylgIgUnHeJD+2c0O5ivKEwj8lpD2zIlEUyYwb75MohyFLmOk="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.117_1571794496172_0.4385142916850553"},"_hasShrinkwrap":false},"0.5.15-alpha.118":{"name":"@react-ssr/express","version":"0.5.15-alpha.118","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"a4833ee2bba913bb31d0760ed9fc1c976dd5e3c5","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.118","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-BaH9FYPz8901qbT0GtEfsTu1W8fi8jK0kqzder/rbij2VUAPOWSYOe2p5tBxNMuTPwcc+NHZc4CVB71L3U1pfw==","shasum":"4507c9105f40fe8c9300050cccda84864357febd","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.118.tgz","fileCount":14,"unpackedSize":48687,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr6/QCRA9TVsSAnZWagAATykQAJaFfhNZyKnyBiNz/9km\n5R+lW3t0OBMuaMBrA6A+XQcsLBgxhPr4z8mCoSkxJ/43MbTLK8lqzb/3N+xR\nXsTk6PEaZftxu8lXfqLRU8/hUdPnYIDBSNw1IBE2CVuIufs6xCPi3ILBW3tg\nXu3NlDA/hE6YDURWuDeVkHQTZQuzg9CZyOnnRymnnRS6VEjYInuF7mj5FCMo\nsWLn89yGNg+LRSb2yDw+pjxp4QAvgCIiqQ+r1YCb5MUMNa6Kp551J2XDJtCo\nrwYxo4T50z94FSGGZlUuvvKPXmRBHhrOOsBrI8FKlsNt0RcCNXIbKJgjww/u\npZuQIpSMRvLP+KHIj23UXLykFUDdZpDU1gyJWkfBoWS177AOhPlqMYD+5FE/\npam80yB0CL3LC0zJPdtIbTHDBhhizKQ3BdBpR6+1LLBGf/ZtTAthYom1POni\npYNWFSWsgyO3HHe9tv8qMOiqrxHhFsT4CxCNxAiW+L3AspU1M5fgSR8lhLxm\nMYLaNQFT5xfEMrlx/owmC2Pk/W3kERXRtiFh/3mUqWeuWY/pyjR3U6E1vHTE\ns1QuijH25rTKwv8XF7xXR5CypjaI3COX9SAymYVXjOg+HndbtW+veG+Z1Bwq\ns2AXw3JdH4Hoyd9Qh/vul0pbkl7FKcdf1RlLer8yo/9OHiyHkLn+y2Zu783o\nJ6D1\r\n=lCGF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCsCRGctxybEVWGANug3J3Ii/sHh7mpgAS/lS4Y4CQDBAIgKFYIskqzmiBP9RcdpIZ4+0V3gXH2+/Th/8KKOG6DtzA="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.118_1571794896392_0.7868090670203973"},"_hasShrinkwrap":false},"0.5.15-alpha.119":{"name":"@react-ssr/express","version":"0.5.15-alpha.119","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"1215bb188c338c2be619a588d3b35d76f8d84afd","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.119","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-JhYg374XVYONeV7Tjj+67lHpkoFVll8FAZgO6ZEBMvDq8KPRvc3PWvWMyXSpnfiZTvo8dcjfjj5xjTTMySEX6Q==","shasum":"493e4841bb5a2aefad9bb07dc9e890782c7cda64","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.119.tgz","fileCount":14,"unpackedSize":49021,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr7BYCRA9TVsSAnZWagAA8UoP/RQFofp+Fe8jXBwvTnEe\nLJ1NEhfLSaquet8pvXifv6Kk3Giri0ZQqqjPqE56E/a1CyyB2KjXJdT653w+\nLerA2J6c2kd2Ae6hGn1qXMh74yOjG/Z9JKvBgckpdRCV+SINTYN2aSjBgZAR\nsrEijx7f/sGvoDE/lQ9VFTr5iKbK4PsmUNzpWOjJlKtpD1CwGx3WLu3gELFE\nnSkhi4h4Y1PsiDYcjdDLMvJkokV4oWqmlDlLWFgn9Mcnu2vkQOTN3xpSUabY\nIZdxT7MFSFZ/BTiWjcIpwJ09sh6PU+nyPC17AT/hhvIyYUlFbanrkkke2YWk\nz6bJ4m3gLnYk9MvaVffihcQdnLERTum9J2WsdFI6Y2cQNqrB+O+RGSqo4RwI\nLJMS9g40jO5D6kWrinqEIzot+oyEmK1nXmBlTl8E+j2wmA5Q/E380VphD8V4\nQikCYX1t9Ma2u3TqWvv/Go0Jmy1LQNEfgYOh5rnOE4AzEOpgsA+0Df2FfghL\n1WLuPfMXSjKnP3sUXsacJPXEK3gqz0v3fMMEG4vpTANLQwSG7Funlsl2/DHm\nk4ZACcjZNO+YJXKpXuGZg/f4iJw5FZ7BjNT9w2OvvkrfXNu/xsPEIePLwz6x\nv2hRZxjGYrMW583rKWGpvLMp5E4xzSXJZjXAfdgfa5Phi1cJmwF/bcGFXOOG\nCbDO\r\n=a4x5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCWmESMb7kbwcaJotoChbj74O9+umBVw9qowywkQs4x8gIhAJdZj4wQyADYG9MU8t9pt9S9zEWO6myVx8us9EO4uVpe"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.119_1571795031748_0.6441416567078266"},"_hasShrinkwrap":false},"0.5.15-alpha.120":{"name":"@react-ssr/express","version":"0.5.15-alpha.120","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"66dbf9f3ebad60381aa2faa8bec7646627b7ddbf","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.120","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-q08hdotvHLmWa6nbDpFFXgReKGn5KfUHTLxGf0+L/77gwUcxN5tApXyL8Mfh6S8xiACu5Lf1LT6haOSKHBWueQ==","shasum":"b2d41a035093423bfd204e06aa4ff877abf2f0e0","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.120.tgz","fileCount":14,"unpackedSize":49019,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr7D/CRA9TVsSAnZWagAA/soP/2GugrQvhCcIIkTSOY4a\nhQ3S8zEpQmMbSXuI9N8OeK2KluYbw6PNyq2dMu+47VPltr+Z/8ZGd+AKJc4R\ns93MAQj2mq1dK7UIMeAYJOmNUUAFtIYEBN5ao588yPZlRs20Ogbt0lwj9fAp\nBPbQPXfn2tBHJoyYWvqrqmdMvLHi8jUa9Mee4bOqqJuaVcQVYZjwj99l/wAT\nQ2DXdIu+QP6AMjlL52tAdMn+gH4lDimK1hdzsmaIQtFTvFffScwOVriwmv+8\nwFu8wnAU6o3ge/kbLCaByAIduh+t/PGvl5hFmGPJZr9oxhUZmfCZwQd7MiZa\nxMeE668J2vnZZkr/bZ9zS5kKeG8139OCwmCHcD06hrYDw+/ryPpDyoRRS1ww\nj/EgAp6SkCEYTNo5lUhdu7RonzkkxysxQwr3bMImyfqJS4xJ+7RBraw1G8P4\nkWb5mk38MRj9bB+DktI053WL0cveC6A29ncYK5cakfP2x0nKcvrdATigTjIg\nCRvVoO7dMPddSZYItwZxt47DbijSGYsxgXr2g6QFBL+6AWcatwQF6LFbs+Bb\nmPV2MSA2RqXP/urbX1RuJKm5UNgDZf8QISdtOFuphydfiSTGbMrc4C8N0pv+\nGFSenIxr/awLxv2w/iRYPcUB8uYKDBX68fvXVZcYZuyF8GiXj7Yg5ozdDC4s\n4ray\r\n=KpfA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC3zFiYVDUHYaVXoTqvMshGvXkMZsygZWASPfNS86nmWAiAR1roY9ScvIva7wFNEVSVjdVnS9JoBE9UxqjmbU8cHPg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.120_1571795199011_0.6802078787804184"},"_hasShrinkwrap":false},"0.5.15-alpha.121":{"name":"@react-ssr/express","version":"0.5.15-alpha.121","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"eaead03ff2c90b8766499f1720bd1d3ae34e4022","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.121","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-u2COZpgfQkr+MD+t4DvyuT/+JvbNZEHDZKo3tUUlijIbJCyBzD4kAss+IUM2kJF2i/474xDtSsFlCVm+Ssotfw==","shasum":"669606efce2222cb626bdc2d5b60d276bcd32f6b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.121.tgz","fileCount":14,"unpackedSize":50007,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr7POCRA9TVsSAnZWagAARuMP/jYWqWhilZtMmv1kaKzY\nYWxH6EslMxize3lDwP/XQJJnyh3Sy6NB5vUYjkXZ218ClHmVXorQ80UpQai3\nWrFzbdoM/mUesaucvhX96EA2Evaf4uaF1MecUtyXHH+6fp+zNqPLO1QhFAGB\nzBzg5V8U8iTpOXkIE2WKb+DCeN4dL12tA+Whveb8gm7Kg0B1gwgHwefTl4p+\nr6jYRQfZTsK1HpZPdyp0ohKzojJiEveRxomIIeDCfjW+fe5redVmVxqNIMJ/\nAEZjqxrs6jj28qfoBVrxumCDXy2JrmNOs3O1j+Se1WzuLsKwW0OoLp/aoCZ8\nLevNSwkj7JwNBcUsvCqFou9zoL03/TFz+bdB0fCsjWjueI8zanWPC41JArxk\nLyaMYvCKHIIQbCM9QXan9r+Pv/cquWUl7wXl5LrjdYa7enyM/oR4Cus5QvM7\nLeeZB+SkDeZTcQa8NBusruRF/wjvWLKxbVAwxXfkTCrTTXJUjhU1P8+y9XGh\n13b5vkSLHYr4S+gzU4HylPx09T6VJIQ08pcM9LncZ74Gca4vh5GRU9WfvvgJ\ncP+osXcWvsBdAQZDT9cFpdvQ2I1blzIpS/dCQY+eCCHoctKcHSYj8sTrFRaI\n2MHIswT4u7g+NMS9NSq1y/MiKe2lsoc8Bo3mFwQXZ2bvp5ZS9fnbv2cn4VdJ\nyGTb\r\n=WjzZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDzuleeAEx5voD5liltAzWlMx4mEr9zS+zX0BRdQ+i2OQIhANuA0pVL63Gh3AfHQ+pWhSfttWtmX4rQPA36/hZOl1E3"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.121_1571795918355_0.7865080805565483"},"_hasShrinkwrap":false},"0.5.15-alpha.122":{"name":"@react-ssr/express","version":"0.5.15-alpha.122","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"d3c01d74fffba860d8e9be15cd1f0528c6ebcd36","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.122","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-dfkIMBGZQBKE4qQ3onEj7wRZ71BKrHA8DJL500HZvf5U/z+jC/qeGi6jZ8IZAbnzWRQhu7YGo15RwpzzpJ/eqQ==","shasum":"b11dfcb5d8172b5bd943f5c7867e83899dd57b1e","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.122.tgz","fileCount":14,"unpackedSize":50207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr7WACRA9TVsSAnZWagAAa8kP/3vMBkMOLWmj4cS9JhaP\nyf68cyAN+ARii81RXI6zinRZm+/41uyGYo0vBA3uNV6PtbQstHx9a9dHmzxu\nDgQVYq3N7jsMNP6GAG3ezCa7rtHP3sq5r7qpZEYgyOZ/0jc3xiMU6+Z8LIRO\nMaSGuMU6EGinKiCfzr0wLlpr+mxs+40kxnX4LCAjoHk1re2k908f6ab5RqrE\nEVX3bm0Y8jOX0fvq+V4qJfS24fbVJmCg/nWrOCPBK+yYK+kR9oTx//nP6ONg\nTFqO/JqAoBhXaRs0kIPOMMwXIyajNwZO8Ek3hrryzMR7gQiJx5RSZfnwJTTG\nhMH+4vp9BzcREyuGkWXFMzkTBl2BKpDjoMpdUVvct+0aLM0DS+Fxcj/8Z/Ka\nNOYZGBEsaVxE/RcHhjMH+aHU2oxajxrKAPsihNzvI52ZBP3xfOdRrGSFZhBq\nsCIIptmSbrnh8Z4BeXLXtnmsYh9eNbgro5A1AwLUhM3hqZpuxqKHEaq98trR\nQDPyWY4Zv5d9/r+7va4FhVZWz1MhDVN/gfnmIkaYAP2IcLpAi15x03YMxuJU\nVDasv+EJMvIjlTJt0hFvBlaop3OnapOrnlNZJcrr0LZffceqGR62BkmCWqQO\n0rNCUVJlUPSyRmrYK3OUICXC7OiHwnFcFcL+YPXSgrvnq7SEkfHnv2Qar9KH\nU/Y0\r\n=U8KO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCv4nfk6uwHZWPKCp7z5PgYnK0gAJltsJUhoIhIo8uliQIgaS5Znds5dJFQRYr8l+VSNWA/3Z+bWOUmFMtOkZkMpKE="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.122_1571796351662_0.7101623241905339"},"_hasShrinkwrap":false},"0.5.15-alpha.123":{"name":"@react-ssr/express","version":"0.5.15-alpha.123","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"e8269a35656415188c34ad6c67a6074741597e8d","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.123","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-BA2w3so/D0ZcfpQtJwme36yZ7Gp9h4JsN16HZxEYrK+4308VSkLlnLa2oquuJj5l07tKucxY3EY+uAlEGNKiGA==","shasum":"7340a85ec0fc206fe94e1598d26170a0e8f5312b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.123.tgz","fileCount":14,"unpackedSize":50247,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr7ZoCRA9TVsSAnZWagAAD2EP/RcrDHNLveF8PGQjLPh3\nhyHbVTmauWRVAiHhpT5IOBwi9TQLQjVjuJA/EvQFI3nWK4DVWxijD37mD2A3\nI2uWo22oPPppzzlXSVzEJDXZTp13JqhXOigmVaFuULMIZtp1F+Z1CTlt9nJ8\nTWjtV4liuzQduUAJmS+idJM8vx4GMZsefuioUssKH8tz3azHNXJEK9wer+zU\nQMG1b9VzUmB5GwBCQaSPmI2SgL3m0pvK9Yd3xEYpMmFhUN5LM9owxn0Y7Zeq\nemTLPaWlxh+80ZBtx90iIjyrn8Z4KP3ino4PWPwNcjz0xJO2VV0zXjXKuBq8\nAxUGi7v5eF+8eJPQrhVqkdNg6M2PFix0MveVBEd8oHxF71gLf/19rMSMSMjo\n5AXbQI+fgg8qob5yBq2+tKJuBdic0smC2vrqq8uSGhDEYotvgzpEA+AJb4bV\n/38gWk6zWM+j+YS5TGbn3pbRh2p02NsM+BXfVZJrbym8CDNBNJlQ2KAGXXDY\nZf9GwpTAACMWBpqQiVlGyU8ym7iuXjeHdBIzvEXfmfmW9l2JmyC9nNUfoGAk\nRP6VpatWq1WXpBdaCjzBB24GH30ixRBb/JucbpHvPqrSBybangZG7MuiOVe5\nPAmdlcsXRIw02mx5Yv2Te6JLIgbQOV98wuvUGH+MWxMPN/+AS6ayqfoAvPOd\nOGUW\r\n=6G19\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBvLHS7IK2eEoVn8rzEj8WgTYuRUrir56vMfgLmuS3H8AiEAyQsqzoa5Uj6jsuNXAJcd/yv2duFNAIw5bgC+iiFXGss="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.123_1571796584202_0.02037941250775832"},"_hasShrinkwrap":false},"0.5.15-alpha.124":{"name":"@react-ssr/express","version":"0.5.15-alpha.124","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"a607840216a596eea201a7a853f4a3fa3ce2c2d7","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.124","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-5KunpZGTWIc8EQXWLrJOajafDM98YBuhFhQAV7cJAmFj41JXYwEcgWir73zsTSr+hFZ1TcUxkYK4KcAOyN0gow==","shasum":"2e4ac3d09fd5a5b8d9359f9c342d20e91a4ddcfa","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.124.tgz","fileCount":14,"unpackedSize":50247,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr7dDCRA9TVsSAnZWagAAAnQQAJ/dsM93+Qi/e8oZajVT\nvHRhH7Ck074MgGPR4flFgOwGQARNDD0cTbfnCC9EKHpifTVTdtOa4eajOGh9\nfsEn7MaAYRWkxnvZCs4K3MyR6y2BXJAyUGAFemeu4tiuGkUxC59Wc4yisl2V\n8bHb1KO3hV+fhYcBr/Tj1uifqRvoQhV4338zjWcFJ1er2C9E/gDYwA6upRIN\n8pM21R5yc+C50g4ELAWAoiSE69TjCxVmBAbRZyfJ4RmJ388bFFc5pyelZqPN\nbhAKZIZnWa3ftTPEve165JDZPj3MSYpRatsGDVklnD21taoSjn5uHYOyzHog\n8OiQaFoH5EkiwpyNepXAYHKn//fdkQ1GM0NGtzvACK8jxL8xT/seWew+XIWG\nbYSm/qPi3YzAvk6n9PwPL1DoU/Df+OpDOimwE/6gnTMmQtc7Eafa3cfb4JvC\n+GhDtVHyJNJXaDyRuX7TeaYj0zGr2IA28CcxB5Z1Xu6mtkHaK3UASaIYV538\ncHBwy2yR1Moa+tb+U6cpaRQE81f3dVpQdbXC2qwXNLRrfeUBdlMthsJSgrg2\nSFX0JjA1qq6kGajL5AH/sVPUwqjZhuZTtNCRQncacclgyZ/kO/HzWI6qAo1r\nH+brxNDJuvn9UT8TrX5aXdtisUxnbQWcnxkYwSPjdZnZTds7KupFvlwDckec\nb3MD\r\n=457e\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHGgfCGDSqltsRlvfnupgBeBQjyzGjygWhq0z/RLfXzsAiBZNukmjwpnFmDtwoViMFQjLnBBk03HDZNofVUSuwAGvA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.124_1571796802677_0.19383900688777378"},"_hasShrinkwrap":false},"0.5.15-alpha.125":{"name":"@react-ssr/express","version":"0.5.15-alpha.125","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"4271af405b0a80d1c07a233f8d27530aa6ae3986","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.125","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-rBE5vI73+B1DfQ3gDOFZfF4Y+iIu+BbKmzRIP63AAMmhKvBeK4c2hGLUfnwvGWvr94T9FJHGwh883uFuH5QFTQ==","shasum":"9fde75ab53b457ff5206e1b714c5163392cccd32","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.125.tgz","fileCount":14,"unpackedSize":50379,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr7iGCRA9TVsSAnZWagAA9psP/24CX6+EShnzR5NV+lTE\nQTE6I5ZHpofFSzyrp7pHP665a32KecGwgDyokY4JZnDgpE2/zzvoxHwXzDMz\nuO11VAZKOAbN0ZEfhh8alpsCNZwIwv5SlnweWyuiYSSLBzkxzpVZCRpVBv3/\nPz7Xbv9Xtoav/r4HZZtYhv8QKBBv4wIBUJ+Ns1mxdl4ULYUGAhAYOzbB8f52\no6TZFZsGFOwEl+mfc21fW4hP04zqJPfARVh9nsfqng5PPzF7CI1iEAZG7QLU\nIZOFxPT6O+pZ7rXXYe3GBLwnira/azU6UAL1IthsorG3MkcxgHkLEkBLOXdZ\n6V3uLUUM7lhIowhoOYpynqbsV+lxzXQm37IeAoV9adg7pcFTRjxbcFOqE7Df\nQ7YVmb1vloCDDH4OsU3fQFrEiaQ4trhcQlYNVY8fz8/yjSXji/8x1GMid3ZA\nM8s9Bw3Oqhp7VYFgqf7rDqdVJC6qtI+rCbZOiKcUFRb4G3kgKRmnSuiWL1v7\nOkCfD7kUWt+dddVPbH5AP28Nnutirih1jJYLnhLOwr/r+B3Zinaee1WKAsx+\n8XcaUCWqsh8ygjunJ1TIvsovuHyXbS23+zt+gfqtT+B6xiFek86UZoKlRBmR\nSmhXefSey732kilfax+8XALoKNDHH/mMU7Sakx2Vvs9vx4zI+qseAwEzekIZ\nU0i/\r\n=4P/I\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCrohn872Vohb8vSfaD+QUTeRQ4gG2UTMyNbS3RDjHJ7AIgepcSoUIjwapVOtg2lSQzUMrly8bGWiqeoe2iRXc9rQc="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.125_1571797126210_0.17485230815476305"},"_hasShrinkwrap":false},"0.5.15-alpha.126":{"name":"@react-ssr/express","version":"0.5.15-alpha.126","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"ffbe4cde6af8ab032b0ab54d5486b6604993728d","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.126","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-seTkCH0q0lAEps6qH9Edob2wHEkda+oIgNivUkt2xE+ka7DmX8jWIsbMCo1qfkMuMU9gpLuQ8bbSmkice7hWZQ==","shasum":"52911d9c4dbf141b5313ba493047aa6b58916d10","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.126.tgz","fileCount":14,"unpackedSize":50601,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr7npCRA9TVsSAnZWagAABEgP/2gJMOlV0+Igpg9DflLk\nH94q+WxnAflwvTPuE6ufahaVdH9Wc+9kpvLQbKwczuSpJuwpi7uOGds4bbwR\ngGuTfMM2COKXWq/MYMtp0fIHvSXasKuP1kyAZkK7ULMl7dz7Ce1DDLiV5CX0\nll2gAZK1A03PAzzfGEkT1zSjtKTlvK5J4c8ODh1NtphPRp1p85DX77VpInh4\n80rWpFzibe/f4HBVayM5lf2TNTt8z0t4l/zf6/D0///dmgLaBMQLWwk4QerB\nABpiKtqyMwl+M6cHS5WA15mxCv0i4UFi1g3Jfi/YB1giAaMn8P9ttZ88EKFA\nQVNBEzGJ8jhykOrFmexS+WwrFt+ASRLfnqVEhvclH5tqf0XJyAQiCx1fmK0F\nbnMWnRp4tYNOibcncu4X5vZO9U1E9cRetpy0Y64egYk5tme/QdvrCJew4tA9\nGnjqHtasGU2rItMpJVEu27giRGMmibJQDGkimptkcsu6k4Mn+ghzfSUkmXtC\n9LXQPz5JBSLjfiADIfCamUWdoGb+fl7vLt6dJJWcOWCCs1DXuf1ibdXXDD96\nFFcgYLHn2SHCGqLVM5t0EQig0URJivuEPXJLHBZjXSLp5XdAhaSqn+4XaKIe\n8Itps1YBcOwhPAj7643X/janvcSlsH6O4G/8G+90ynI96aaa+4N/MJUWufvB\nIaXi\r\n=fy2V\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCidrmFs/FKx5G77A6h+ndSCr0GyxsXvYlSEnYegENHfAIhAOYfYYwWaA8ieRyRig9mUdd9kwo4/QLk6BrOAEpTYmMO"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.126_1571797480515_0.7035009830738954"},"_hasShrinkwrap":false},"0.5.15-alpha.127":{"name":"@react-ssr/express","version":"0.5.15-alpha.127","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"2c7f97d56720fb8ceb758b08e2c5280cc83e588d","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.127","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-LsOj4Wk9zavUqaztgvgQKO92l5jKNgI0Wok9O8tqs5gjKFJ9rmNaFDTBiVfeIKNsJaWZBPT2cCLF//zPyBpoEw==","shasum":"c3b693c715fb7b3e911b3b2e97812fc5611f2542","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.127.tgz","fileCount":14,"unpackedSize":50611,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr7ryCRA9TVsSAnZWagAAAmwP/2cacM1IziXkJsWI74qt\nvEd5jTwzQIj5pb2GUrd5OrsJgKCEuc0sJQhlbMMcx9a/+f1nu5PDC5LBaGyF\n3kX56YXRQch94FiopSxz5e/wsayN24/eobAGzGI4/hSLQWWDFK9oJurEou8E\n4OLLG64KkMA5bVhSbsUiViyLLmr1BUhr2F3BdXtTfXQmXGcrPec27J+FjxPA\nMJKkIJOsEyxd9fjMadLFgQXETAABqua3isbroWh/xO5/+5v8InojeYgLjH1D\nNMdgwdSu8tgTkPdbw08bc/dX634fs5COd4/SAd2J2DVc4j4hKn74Vq2CmhSF\n7eH1haU56yrQs2ld1vlZk+TaP0QXzKl6A0SDoLeh5W5ucLM/3GUOS4+SGA49\nwlhOgfJWsORIyjlMdxsvrc68EhePMs6GvMIA5N+e/xu9F8qQ19IpyPoHtAYi\nU8AE3SzZqQ+lF1kLMTjXiOxx16fObcw9s4ITespbOguhKOzw1rQe+qqjg3e7\nUjtg+U4h8ezg17QLeqA2mQin2IKIppTf0KjZwhRKvfkIfnmoB9y4mPSVknvB\n3dHXKil+kKTlzLh5f/QVhyDuw0PjJ0+gtiWLj7+UTiFJDCCmhUVQdkCMsIql\nC6GW2NoITzLwLwGY0Q26OJ9j6gMtVj/i1GGyWmpuot5mYjdjLHjEIpquxVCc\nAa7w\r\n=mFuQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCLYozqiQ5A8asg6i/rhfNXGMTqntbmyZhMn4Y1xWXXGAIgHoApJENylGqPuzuuGaBHGLxrLlor1rhSX7M0RYkuqJo="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.127_1571797745829_0.9759902465561068"},"_hasShrinkwrap":false},"0.5.15-alpha.128":{"name":"@react-ssr/express","version":"0.5.15-alpha.128","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"6f3cf95539397d8ef6240320bf91e21d3bb22aa6","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.128","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-JROmK5iL9CP/LiSB+seF/OrIxOPAGSZzPELsN1LTvnxMdmoC/cE+4pWvWdXGDZmB8F2ml5mvRu88VdvNgkeKEQ==","shasum":"723cf3f1cf5f26bcc40dd1c5c18dc2fbbe80d948","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.128.tgz","fileCount":14,"unpackedSize":50051,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr7y8CRA9TVsSAnZWagAAADUQAIYCehUpMPAGJliNztCD\nmuwb/uAXXzmvba+uG4+sO5dXS8eboCvbmXlcRAmCcWpsCzkcjvw8gkmP1yEW\n0KxSRsMfti8Na29px9FYGF+6BvPdTquapwve/2E/XXo0ilNx5b7FCVLVPq72\nAKL+LZpylsOwQWNbJzjS2skUXu2VQvJhFefdU00VRHm35Vv4qSs3cf8N4alN\nwihhK1RXYdGHiS193lnFAeTENslZnDAR85jZuU05DhqjhGi8BwpItRTqNmdB\nqIbL1eR4dBKEd32e5mVCJJfuCMe2I99zPDTEYP4GlTHtVRWsc2fyKSTIR8k4\nQiLQzIRTXPiUpxy5tc0tMlSQWlj3awqQ4xQdMmEOjpTrs1q+tVKNjXT/OIOY\npk9j7SCqNaJ+ciIaDj0LsCPfp9tx0RHjNRdsgnxmky4mYaPtqD/t64hvZ7Ek\nu5fdgHPS5x5UaHEd+aFiYVybhTSbSHWKx9bVNkGmJzkNZruXqhElQ0/Uajnu\nThQ0SJq4mav/JAbVYIk61TVGYf+ni0nIbrydNmmE0wnj0dJMNwzZ0wEqXnb/\nrH9/Usiz1wt7euTf5ocTjVfD29fQ4WBrfu7tYYKn+Z86UtuBBhryB2/qlBq9\nylGOK68TY7HuRXtxjFk4y8tmBiJ0SOvhDU+hunmPpPCdSb3FUEBP03tI+Z8F\nrrKg\r\n=E9vI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDnLSt+NNzjLVhPTI11V3GRb6ITzM0I3+V4qFkArvgiRQIgQTT+uz3FETqunnASr4ngPUJSoMpwVvWthZ/ooUDof4w="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.128_1571798204220_0.17075375422687222"},"_hasShrinkwrap":false},"0.5.15-alpha.129":{"name":"@react-ssr/express","version":"0.5.15-alpha.129","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"15ada6de482c9e27f7907cf347f3129616cc6514","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.129","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-1SH2KqdDSMgfYG+1BTLIB9DCOhkcD1LeuKqinzNDTOVZnvRhZN5bMulbxWM5gI22a+6LfqFo37KZaFyZsb7hsA==","shasum":"9e1f8dc6de9aa93c34ed0d89f8989303686a7255","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.129.tgz","fileCount":14,"unpackedSize":50059,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr71zCRA9TVsSAnZWagAABYkP/RZcT55kHf8UUaiAOjqS\n9xo8Qe+EirygENK1WliZXdz0HBwCDSQMOE81A8do6Q5lmnB/NBnaNKhrdIAX\noz2fWmmdlgXCXnsh3Q9FYiVVI/I87i4L1ytLtQgLGyaFg42T+SlX0w00zhD0\nyYuAacqu6WczqIvN/GVLji0NqTbiwPcROcmVIybCcWvC4abf7tLPRjn5yMSE\no8vKYQK4xKgkNPq06kRejOaYOmENUjHCwNVtrR0RsSUUTBBsVEZ02K+bkvAz\nE36iJRC9lUm6lO0mWESaabIjW25cEly6pgZiYf5Slan6kG/ilqI3oIeo0H7s\np+k0xyfgapTzgl7kIz4mRIIFqcY8pC0/N/1l6sKB7U5hzfhkUP7bjDwkf/h2\nLnrTXzLh2VC906CBZYQGkJ5S25rWwY3D/DelEG18qFofkHK41qDypV91q/xs\n2kd1YCQuIROqII6AF79PFQ6pS0PpfyQQK+dr0WZFkjb1mXm7ty09IDmabboy\ncxm2yZxPvYgsk0WaiAvWBu6nNO8VeOHlzTxt1BCIu1FyTPCgQD5yA82FmWsd\nuFh8AcUxokJl7dkl0ZPMX082HSxbst+xem7dRuCRDRzesTBcwWHvmp9GbECR\nhkcgbi9ZZjnSS/CkwEtxfuDb4emE+9JhkW9JM1F9GIFbWtd15mj0QbdHsRlN\n8+xb\r\n=Xb6t\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDTQ8uCrG2LyeEN7ePAvRJEMfzW9R7e2ZUpvznSVvPoEAiEAkkukopC50tTfyAynbC5Y1r/n0ZTfsWE3mg8SlrG4Fws="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.129_1571798386812_0.9534988294007285"},"_hasShrinkwrap":false},"0.5.15-alpha.130":{"name":"@react-ssr/express","version":"0.5.15-alpha.130","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"479cc308612f3f99ddbecb29a49d2601c52006b9","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.130","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Odb1KDKW/MxnvqO/XuPV98PdnmWmemtvyyMQSIvA3U1Ddm+Ryr0o1PLfZTXKdEKdWAygbn+NQSYGwBKG2SRwMQ==","shasum":"042f9f465620a57c8e71bf92ec1e7347648af562","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.130.tgz","fileCount":14,"unpackedSize":50055,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr8EpCRA9TVsSAnZWagAA25wQAIl3mud5+I431P0m8YFf\nmdJ8GzJQOqFVQvxd2bmB/kP8IEx/Zhq4QnhsvPICqZuzjWTYhKQetFBUovmF\ntIa+9/pT2wu/ShwIxc/T3n1X+AnDVVoXitB9yfGMza3q4sSfstYcKMqsFzvj\ntw/YDK6cAT8qSHci0aEws+v0ZmN8i+P4ufyRywopFarYjX8mS3JlW/ExZ06d\nXyYi8b4DGkN8U5Dl/ZuseRK0XBSCO6+fn7nBlQeal6AAQYYpn8CMMqlE1Mz0\noouqrSq5Xi6yoUSFskfXkuyl+VuaCHfqo96rDYUjxR5GWkiZEBUwvCbnnlYr\nMfa+kCvBRLwv6mjm3EFO7R7Z/Wb6NGEHedxOZMkuakrk5g+feuGdQPQoxaSp\nw7t4PoIXQZAW5ro2OkniyMuqqKYtGn6/aIyF1PdHoPMf1MP2OPyK78b8MzVZ\nG2FTT2pjzuuBszCvPC94eMuJBSZP3r0Txk4H6WNabCNZGqnq9aV5qPGdYJSV\ndT2vRdbtkuEjW2R8rbka+g7L3f7AQqrbnkcE7P68XqZ24Iq3jfDFeoSgq9M4\nZtOV9HhUmEB4Dg0H1Za9gtG0UwkRQ0o+FrIztOlp+Dqc00ucHyFY6y9xYLbn\nPmiGXcJ2sjPolRLPyLVM86SuwTiyb1a8PCF80FLjJp/IJQ6dC7Gl/75I8RfT\nA9rJ\r\n=NDUC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCrl4iUt7VoSuxC7WJ1q8Us8BxIXDTbmdsEExETPJzwQgIgJiH7uILkkcE80nOqEJ9x8iTXyC01ghQfG98LsU10Od8="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.130_1571799337465_0.8996256429992897"},"_hasShrinkwrap":false},"0.5.15-alpha.131":{"name":"@react-ssr/express","version":"0.5.15-alpha.131","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"99ae84c51978ce88193f31181af70af15eb6f033","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.131","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-ibl4T5XWuR0eqs1p7Gh/nTsSAblLswA4tT1Kqsd05HiHLZpT2h/voAZW7PkRUhkLno5LrKLURiYHaEsyhFq1BQ==","shasum":"b2580b3bf83348a4cf21c70ff4154110787fe191","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.131.tgz","fileCount":14,"unpackedSize":49961,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr8NQCRA9TVsSAnZWagAAGYQP/je1aKIHZTkZZKj/Pgiy\nLQjf2+/bG+lSvbQ+fu1ZmF1+V36SvzZjfJnKgeM0vixPm+UVlOVXOHLKG+7b\nw0W3WidMB1zwj/GCF4eXPfIhbKUlslahS2et/POJUHuUUr9lGKyw9MV2j8KU\nq/6bc5715x/r/u0lvtj6Hb/22lezoNIq+qDrDb+hpHbCqi39qrgI1TvRhF4b\nuaHtKTSQlMlWtjaMG59oKH35owFYQuBRZXArD5u+QGhFNFJ7GtNcRk7TBVQz\npwJYm6l+tHjnBuSeWSEPKfNzMw9JJVZjHSbHdNXRZu7fLVNrMV60aqotonBh\nmYRCgKT8MaHEpREc0ggi6i6VKZQkW5zec2udwonUo9LbE/L7Vs/dhqy7z/nw\n8gQOxpslMsxoYyW43pObX1dwq2v9cIHvC9yb1c0lQVXwEEICunpjfXR1G9od\nugsLBiqNx3JmUpeuvgZB86xyPtwLmNT+bJTcVDFQjExgsSWXlfjuTXk+JsWh\nGljLI6xgDQa5Xx27g8xywhTf8tO52TWVVibe1uLFsCJX8Vp/QYriCAdAfKkM\n/Kk0boniJFYyb1f0APXr1wwKauLIFF8XRoHGDurA9+Oj91kMy1qoX0angABx\nGiRKtvSJ09t5XUAEUHZAvZLWkjWL7OgbLyET7f1whptBrA7LEYm8usiVuk3F\nkWKy\r\n=poXF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAaBusFVuaZKysNchq8wx9qOkOkkWpA9pmCs+/a0rWjUAiAWDev74P2hPL4f0fD81BGqxIifjCm0WFdaYv3wYIwhkw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.131_1571799888293_0.7194515546943752"},"_hasShrinkwrap":false},"0.5.15-alpha.132":{"name":"@react-ssr/express","version":"0.5.15-alpha.132","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"d98f1141ed3332dd3d8abc59ce8412b0e4f329f7","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.132","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-HoJSqnCU3GUsAslkpU+ZORVf1R7WaTZnCZCbGIljWDzJ4GXJkt54ShNHNJgPMGx8l2nJ6z19wPTD8JRvqA7xJQ==","shasum":"9b7035bd069884fbde35f0a13ad1eeb342f592c9","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.132.tgz","fileCount":14,"unpackedSize":47981,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr8Y1CRA9TVsSAnZWagAAKh0P/1AtQa8Zw4YFRYPs7oFo\nqIdKE7zZ114hkN8qowhMi9WuvDhZKMYdOPG8y7rssAih87cUQajUVLmulivi\n+YgOIuOQKx5H7Temfq4zxNfuCkOzLrrlQhC/0r7cKDYL2jhSNuLlqcRok4Eu\n3CbTWOKw8XXvqF6f8fLr/jFVXy/7MnXk2yBMC5WjgViAwh240bBY5s3+bpR9\nN4xgpqKurRBj5GVLRE7lzXfBx8KjEvsoDQYIrekCDFzbUpF8hFsx1m28T+NO\ncrItFxR+pXLVFN7F3mnlARKCHvFGVIdmV2GfI+YAe7np/PV/Wjd+SXapA2Un\nFhgB9F6KFb1Fe4KJcawnEta9BqySgdPN/ioIAV+36aMzctls+n6rgvEKgS7I\n9bxk0vLidExilzSb12FIW7ye4PWCTM+4jlFJt6j/QVhQGiuiLMWsY2LrQU8K\nQXOISjSD0nmDVMzdeJniqqxCc89cw40czRGEMC5ija+MS57C1M/EB3MsMuxg\nWwd7ylsmdftHP69aVeTBcfS/ZdQ32m6m6QGkNL4AVeXT8YgJW/EZbO2uJBVe\n193ld1fbKv9GOMe5SazZI6fRqyFsAGYBvZffy1i9w46AHMVUJ3IWCbGQjlNN\n/zEWoA8xCux487rWWIjbZoPSQprw2LpaBS3CygmP08BfWRVWHH+KJBbOM1IL\niz1g\r\n=RHfu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAqlvSFD0q3UBQfACEC3ABb5kMLyLXgitZrNTQXPiEp+AiEAgIlui9ys+u+YKWwu8Pt1bBu4P9rrASkDKArBCyvT2mg="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.132_1571800629522_0.21214779838557662"},"_hasShrinkwrap":false},"0.5.15-alpha.133":{"name":"@react-ssr/express","version":"0.5.15-alpha.133","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"f00ff5b127276cff8284dbcfb5dd94e53cb74508","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.133","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-MLfxbkjdvQN7uTDQZTI0dMYiDWWlbN7SJekPUeMww1pgRTr5NP38lQfgg3tbFj4cQIzhgYZcoEFjM5P8QM+HsA==","shasum":"c0f7461171f2a9bbf2390de18fb0066424c056b2","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.133.tgz","fileCount":14,"unpackedSize":47949,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr8atCRA9TVsSAnZWagAAVN4P/RdJtziFuZs+db7z3JFu\nur0G1idfT1JUYaYMLodG3gBaqLalQ2dWNpDxeZaSXh/y1PTZVhtgTCwRpdxr\nkOI/O8HW055tBdyFpdC7abikJXnpJG9GXZmF/PgrLytmk+05xhETYo8hT7qy\n5crnozMMNfqxLp1WcQfzK73P/ijbEFgfKd6TuBmRtHj47SYQzSqGebxUGfPf\nS7Xyx8+KWKzVM/l5OODJkL7y7XiAy//0RU+yCpkvj/WKt/iRJbbfnYb5fJlz\n75PorH1sXW7Ydjy+rlNESNI/RzhsozXsZ8ZN6aIXaqEeeOekCiCwVWwVZHdf\nj8VKl3kd5RqokZ9/ayWaooyh5Cb+KAp+qFwaQI0Iu0BHRVsP5ZdZ/6eJv8Tc\nE6h1GfjsWSHMOCwwTqH6Aa66XXkbmBlOXX1tJgm43RfZwgA6AlOvGAI9V1NI\n+jPUgD27bF9JIitVXAgd3+bMiZBEhGOXU52cphWTd48z0eKHGD1kOjieBBf7\n1v4ThtW50HY2plNdoWcXwUMgOkoSHZOf91owXTJQSMnT6cLNf8q+OkaONWJz\nGAyMAszZVPwbRn00kNaEDYeVixg6hINWt1hnfP/Z6SaQpiKaOKSrMY7bfQ3f\nsqYx24OIf7c4FDSCgLtqJbBNnfSEJVWo9zAvOPB0VobCBpLjvbXpH5zguetb\nvuGE\r\n=JTxv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAVWQNGEUlx8KE+lY55wwQVq35HV2Px0PYURXDQCTVUiAiEA2UoznSeT/yPCBEMpoHcnizoFMgB0D6GF1UoKuZ3oXto="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.133_1571800748619_0.10253052012465846"},"_hasShrinkwrap":false},"0.5.15-alpha.134":{"name":"@react-ssr/express","version":"0.5.15-alpha.134","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"60583cb43eaf39a7d9183cd789881a65d1956010","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.134","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-snJxsTy59gMtn+pb88xlPp6t/RsYBDgkipSHxtDiJobZs/RRcf+mJ9AcrMAKB+llTP1axzdeB3BmKdWJNmCnYw==","shasum":"90f905d07c069fc6ddb754c145832503b6108316","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.134.tgz","fileCount":14,"unpackedSize":48043,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr8qECRA9TVsSAnZWagAAfGEP/Au6tbAWN0XQDw+qLVZo\n29HEQkYzX3cwyYppDaUXdr75zDK3jmhWqzzk3R4aHV2MVntn8XGCAC3G6ZUD\n2JMps6p5M80M1iqfsuhjGsc96FmIYZWLRcj2RhCXLVCg+xANURHeuVx5y3qa\nkEq4/Bc5ia4gJ8HkQhegF4bXKNhogT6dv5N+0irkWyl/aI8EMFgfUpZejkdZ\nbgXijujOApmVX+8ItEZwtSsR2EjD/q+csKpJCY92gUcL3RIAJXSNd5MaqBOI\nfsKXaUzUW2Acf3phvQOtUoh3cVfnHrHxAKYFJKQTkMJ9pjN64Wubk0XdLCAS\n4FtGX+FMdAm1BQE1+UIudmpKdpSk4+V4rQcPXfkAqd8SLRjAtAAu7C+DbB2q\nEeSE6L/S/3EPww642bVswGDi2rMWK/0OYGqfuj8bGF6PRsvCnwj4EH8TvFlf\njIq66XodR2DCqWA9xwSH9TANXkmFyOhTZpFu/Sv8kD2G3o/KLsxHGdutVuQs\n5kB3Z+Nt16G/FUZLf2u9+9tjfb6aSszD/mtZLgkicw4mV0AIfsPXYObD+Bgr\n4ki/9wQJ+7TM/QwipwAEgd5L8+x66iMnDfr/Un/yrNdb7wtTRmrBfRLE5XEH\nCM2mLmeRVuIrcdndya0DA1w+SP7pgEeg0/0cK7HieF0M98cFX7fJX2OYjzhC\nGxSh\r\n=Ed3A\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFB05u7tmzEKyRlzwQDVKrXRhebfmc4JmvjgPYb6FGoPAiEA54VXBTWHHJQUHL+FYarvMMKzQNzwxXKJUIQZwkkPtlU="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.134_1571801732159_0.9153286691319524"},"_hasShrinkwrap":false},"0.5.15-alpha.135":{"name":"@react-ssr/express","version":"0.5.15-alpha.135","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"fc3f1336703f9cf2e8079e163bfc7ce228b5134a","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.135","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-d6MTrwEejoYtq15S9WR3Hd5q6fKgVJtpYu7R83YszByvXAa9kJ2+vAtv23FCp70kqe0xLk76ip8yhxUsGcPpvA==","shasum":"63d64d41ec924eb23ee93760b3df9542b0371405","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.135.tgz","fileCount":14,"unpackedSize":48053,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr8r9CRA9TVsSAnZWagAAVkcP/iQUD1WLYTEv6OI+IO2c\nj4wveu3fbufNy7MMADJPoAHyzfd+Co/kd2geHurYIw3Dpdfpg8ocnu2NBCnI\ndha/PiBywUbHyQfLqO0Soo9iHGljyYYJlZIKRGhhsfwlDwxkGy3b+MDaCpps\nJ20pJqnEQNnd5YVGj84SL8BWCUaOLj1AFFulFnme1F3CrRX+cZ1c5pfiOb68\nKteBzolTYRGYuUP9kz7HKmjAWEZgUmX4dQ2xkn4o8f3E/FXvFzh8SwC9Dmtr\nMlWk83vdu5DTzomxGOA4j3I7jlmSD5Cqo+p3zqhYgnLfrGp+D04moxzYh5nx\npJatSJO/q3Zo9h0REHZ5x7zW4xbSL1iDDoG2mIvyRVvbQ9Ko6V2ySKipycQY\nUfvLJz4tiqISw7myJIbOepbTfdShVq4zwG3O9GRBaxZTJviIQhcqhkXsoQ7I\n6JoAIyXmANb3iNh/SnJ6MQKlx7C/LlQACAgbouF4W7fye5gqJLRgr48FDkxQ\nNsUUnNjzXjVFAhhXdxxeP2F75vjmNSijbcOqDwjkdA1CNKcl9da3cEDncyCx\nHei+cSrKXcL/ZTfaHj6EVj4RvyvIc30+2dDjHL0BvpKqmujLHexbPcWba3PS\n1CtQdJHUAvbcV8puIUuoUIkLqsaeUJjsYG+JAvozyMAhxU2B3VhllCqs7xGj\n+g/R\r\n=rmBZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCPQIxiVaQolyKKeTY7uGDYJKHxSirdR8teaJceUsLs1QIhAJoTx+6FUmi/QIOlHAbYcfsSL2XC/dP/WI4EXMAMA0UF"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.135_1571801852592_0.8280051754217741"},"_hasShrinkwrap":false},"0.5.15-alpha.136":{"name":"@react-ssr/express","version":"0.5.15-alpha.136","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"90401ca04d6b275aa5c9f0e61f9b50ee1758222a","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.136","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Vi51AIrutbWOVSHSzOeDUMBJqIkTrZlvzW5Qw+DAPsKsvudFjljoNJPdtYwsgvC/syPg6KCnRl250bX/2tE0Lw==","shasum":"894849e10172d316ee5bd4a6a45cf5542e658d9c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.136.tgz","fileCount":14,"unpackedSize":48289,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr8vcCRA9TVsSAnZWagAAIxkP/A7Z2lbhlx/aQ9kmSWTT\n7pt08OeJCrHGTYCGIebGdoThav+dAnREsu02KLftr/QcJUnw2tQ1R3WFmTbG\nsQi7TyMBjKgrX7Xg56nbHya2G25fiVcVt4ga+5yXMmvUsnsSJa/RGlHHL7B4\nE9QqVwyLX6jATcCK1+bol0b3SdrhrpQDNPid3MqLS1XTGI/0YsjjnWYPYNkr\n0yPso67AE4creXeafKtFHP+rMhWGk+5EIFWVsuf4V9lcv8WNmkySlDqi6x7H\nr9mKUhJcH7xMcbWEYSRS7g9k7f3B+a2cwLQe81nALhkmYoUOi28nZyZGnfbx\nV5jUcX673crhDMszGeMIt02xpj90MqlZ9qs8IUZuwasmA4qNlINxG6Uy/oDF\nlaj9zbfEcH9bZ+rX9gLAV/ISCKfBQ7y4BN97PT6pzF8E1P56eo8zepdAgwbv\nBh9ku8kCo2TsOTi5lzXQ3DwpRsGAduk5glkACcs0/s0Ebol5M7AodgqjB82e\nTgx2iGGUHmJved2s5/RRu1OMcKhsRDtIAe76vtD8aNCoHOTQlLbMu2sGxP0k\nl9jwo7b+GYurpBiYjhuYKo7Ox/eUhyUKaHQmAHUXET4pBc3zkYBSAF8eMMrh\n5+vUmji/DzFP/UTKxI5EAXyu1L9aS3hGc4/k7Zz8OMZc5h+ln7EaNMx6c4dS\nyvZ3\r\n=3l87\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFXVukRU7isfXxxKAzhnYoDtV6P2AUKv+azEKAPOaOB4AiAM3iEV9BHaothBb0bhzODdhXNk15eP4TAdBDRYzt6Pxg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.136_1571802075784_0.6553838667830709"},"_hasShrinkwrap":false},"0.5.15-alpha.137":{"name":"@react-ssr/express","version":"0.5.15-alpha.137","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"cb126e1e828d695f4d60f9e46e1c5d7449b2c5f0","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.137","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-QRqYrJM6vguS+9xU2hU7Y3qb1L+KxAxpM3H/Do9CoMnuHoIVHqUer56JUL5RikwLfJGPevjToniCZwx9VTmz+w==","shasum":"52e77be47197a1bcbcfa13e8562d9bb5db4f3c52","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.137.tgz","fileCount":14,"unpackedSize":47627,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr87ECRA9TVsSAnZWagAAkHEP/1tp/9C2Or34GtV5T8FE\nAXCtjqVkzKNEFLtgvpvgR1WMiLuMgW3HfNsONyiPKp/JtTWZmUbSfCS6eVBv\nzCYFQ4DXurO6tq9wu70LrGJa7reXjSEHhoPGToc2iW+7DOgjKrnetjfTcR25\n3twek45Rxh2x/G68lFUcx/F0QZfGvTZc42+QxoZhLevlo87kYK9GTyaCauzh\nL9WUSOW9EJqxcPuAzohsQlGocXvebtHe4+UW2kyUH7KRxTDnmS/BK2EwyNcF\nALkbUB3Oi1VuRJk+L/AO3gbgL15W79uwBGi/02i/gsAe4mR7vIhhwMq5hFp5\nxpSvB96ZpToSJBBBdDfdI+aATq7CGLFWBKlbHduRU/kYFDJwOSvU+LBi6C4t\n+EwhB3m2tc8y1MxdKbgGvkH3EqWel8fKsjA+CAVSYsHwTbw1NgoWFIoN6svm\nLzO+WbWVO2Uff2IAvSw5zqO3RujAD55/wmGbbm7N6EYJwZW4O43bDH+wilCZ\nWHXJTVoKouvAei4JZjFdJZSRVPA0btkLmesDyv5R2v6ZU50i8DasC2pCY2qt\nL5TDtpfm+qTQjwgAZiKktpqgfNmVJr8wdZHoaYTbwo3HbMb8K/DFSEcsLduN\nKNuTq0a9Ri2z0nPg+rf3Qkwn+EDUKKAo2+zGmdtuyYZKaNh6atbNpN0LwvnT\n0MEN\r\n=nrvZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC07E10+39Ri57ejflgvrz2OQX34U/JD64XqV9mxnqbkgIgLC0S/KPhxZD0bIAA7/VBbq/9QMEVlH+KeydKPZa5ASQ="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.137_1571802819680_0.48044236197748535"},"_hasShrinkwrap":false},"0.5.15-alpha.138":{"name":"@react-ssr/express","version":"0.5.15-alpha.138","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"aec9d2e23f9daf25e287b0eb584387e9d8f2faf4","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.138","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-yNP4qVDwpUCF6w4kardWSv/AgQ3+fYG3Wm7T1qITDsj2HNRAXXlREcYXFvnujacwCMpWkLx/WXk8bUo8IuWETg==","shasum":"89a2d55584762c6cba1bd34aeae28846ced04727","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.138.tgz","fileCount":14,"unpackedSize":47627,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr895CRA9TVsSAnZWagAAOCUQAIC5n8bxoXVF+FO/C0CK\nxw7zn5GCGfKYj3ewdWf3m9LhY96oUuXM55Euz6Afqxx6/q0GISJHpsx+E0ro\nbGFXo29JG/Z8tuwTtcZKAogm5z7u/meINlETDi0jvCGqUj793GfrEAxxy0TV\n0hQzk1HLAdT39/6LVKfYzvAgY7sFMpFyNN9YJaxh+nP884VeayID6jsEByl7\nWCCMQaH3ACj4HXqgTqMzD8FxvqYBdhzzCBEuVgYdA7YjaVzQm7YQdzZtOpd2\ncAIfjiHUAlFXyVhsGCCWo8NbaXVpFgcmzzM/buFJI9HwwlnkJEcpnTYdllSq\nCfMJOqugr8e4UQPjvkSX74nDhTvDk1taEt1Mu6DcNgXGGZh/+y8pfgId3dd6\ncb2R6Hho5JOp5IRZ7Ow7HVN8+8ET1ajH1USB8vr2LYTT6+98Ggeg93nebd+M\niXHv0YG+p27nf+7M+E7UXmhKsbfTWBR2SQL9UWJyyixcnhfMeORp6Jf6aDGX\nxKYpekdq0I92MCndu6IqPnhwZD5GXjxCI3ulx2rrM54+0WNwBKjroDMK2dMK\nNiUoyOEYW+a4OVhKhPhPvW/kBdiOYa5IncvVHIrvx50SxcmHA/yv+El9m0+x\nYl+0qVEjbTrU7pPOtM+dSULWm64m2fdAoYYTm4Gglb96UZbVC3QSrG8dEQHH\n2g9U\r\n=IeAM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC7MNPAu5L9SAO1FTkzo45/tOAfa4dY8r8Huhzbnp5HfwIhAJj7fEdoiriF4zKBqAH8PuikgkVGUncRouMWikWwCvnx"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.138_1571803001291_0.4727024706128806"},"_hasShrinkwrap":false},"0.5.15-alpha.139":{"name":"@react-ssr/express","version":"0.5.15-alpha.139","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"c8476a9156e3576cd322ff2a4795c90aed65f5db","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.139","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Dy3PbTtGL9k5M3mgNVoCZL84Qbw4JULYWojiIBw3FVHwZ4nKYiB6QcegDT4EsooaglISEB1EaMQdfqElbAnarw==","shasum":"11e39cfc33d7106925dfd40346ddcd0ca86673ab","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.139.tgz","fileCount":14,"unpackedSize":47799,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr9GnCRA9TVsSAnZWagAAY3QP/2PYmHsv5jyVMb3UpK1U\nd1kt55uUersV0Puf7uH2AxyhNy/KKM3o+AocwKUwEmHznApk9SA7vAgZOdIe\nn4vHbCbLeI/1ZJXp3DWCsunUun3HLuC6pUvTq7Cp7tch1iTNG2F3LRKj5ttv\nTyrD6vFJ06VsLYHkY1NjEMlugbmOkg7f9Zy3kcX0Lu6f4VDMmcJgEl3vK+7L\nkv34nru44E3/5ck5gLB9JoRV9SpOlCDyJIXeW5yCnzjwPpfvN6X8zenrGarE\nLk0+JYuhbFlL2u4XiLcWiircAYd3U/CEvGg2lvRj6xTT5pPkSz9bqn+bdpts\nnKHROGUmr6cV6VeO970n0ADDjZIPxYdd0wCkqYV5iaVbWVJEBll27Qcu4//1\nQb10vqJscBTc0mZiqBVgSKAFExhzUWCPOVheqW36b+g6v6wSSYoJt4ZMroWe\nocTxUiavtlP0BwhaPClu8Yk650ZBcW91K4y2+vQZvelcJe2B6M87vBew2AV7\nLVqsiZhpsVRkJnup4XEUKNZ9UbFG23S8ZRkdNrVOkd2NgjImp5SOfCnwhwuZ\nU9E8NlOOEtd5jR8eUgrT9rHv9sNJHtI8GryvUVjDLCinKVeRR7cTlQoQFkXX\nUeFEsE0R8TnUueGGrIxFvJpNE7g07L3DG73YaU/5jHuMoFOD6vVNhBbAHUHM\nQH0F\r\n=0DUZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC+rY+vOIBiLz5KSD4IZxQiPbL/tNZLJcw6ASXrfLDTzAIhAPgG1GnJ6rDTzAe2ypR1mHWH3I2IDRKjuHaM3jB0Q9SK"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.139_1571803558653_0.5738204475727782"},"_hasShrinkwrap":false},"0.5.15-alpha.140":{"name":"@react-ssr/express","version":"0.5.15-alpha.140","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"c3e3bd847e02dc15ecaeeecd4789507f6bbada30","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.140","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-iayc/cEPU7mbzhl4yTW2tO65nJr4UPmzrb/sLgjziQV3+ze80nxJRUW3BXHaQcrKGwkkypI1nxkbuspAb02zhw==","shasum":"8ab34d672c13c34e7c9d9f4bc6894ed07653e138","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.140.tgz","fileCount":14,"unpackedSize":47709,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr9MgCRA9TVsSAnZWagAALMcP/jbtQMtyze1yhmBKI8/D\nwV/zfLEC9lSQJaXWyELljjbSbP01VV2+vz3+2vjJ6yVqC5zu7WRSAmCumKOb\nef2sCvMaYYxAqjMiq47uDdafUBNbtX+VVCtxU0KtKlsSOPbybniuxch1ul2r\nB0J3jMpkN/7Q6nPUrQrMs40iWQ57xzbI8UVQOMDi3D78Aewh7BiJnwxECDZs\nYn2W+JqsIcWbqoVS9FXQtwMiflSEqijNJIP4coG2BclTLGWgVeYXlQZ9fQru\nTmbq++txIMjMNqrv30dKb/a4Tn1X9Wn6wANNTImtz0uo0Vk2L6+txb4IJ5YK\nQs4cCDgSuDZsCk/7VRUnYnjf9rJagRBpRbtgc1sNYxmIM7kiWoZ9IsI/Y2IE\nUx9yMeffSEHg2YQu3hixzUBXQ/FrzvUdyQJPuyZ8JGoppBvevS2YecEYe3lA\nkn3EUerYlRUdhskJH2LoaVFzxrdrnftpIsIvyrYKjFbZjVXEOxr+ou2YiloU\nJJRs//1NJF3GKIsx/JzhexahWXNB5dZbLh6KjFELJgiX69kFhkZXXSTnuU8b\ntSSzkTEZzhqHT5/ke0YAh0YlUtKt/eKApnMAf2kxQImVhJ3N4TeH4BTh1JxW\n21rj0UwBr/PTnHhIVKcl3+IHguIklM36+ptGFxd9xVzQRpxMwdWomRqfcfDC\nxyfD\r\n=Te8N\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFdtvr/2ASgPF/EBshAQ7lw+P29idvSngYbM+Q1f+WiHAiAxgzvLPUQeqrHdZw1xWtEmrR4A7YjUYQMw8GvDT3hKkQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.140_1571803936297_0.06381162405367591"},"_hasShrinkwrap":false},"0.5.15-alpha.141":{"name":"@react-ssr/express","version":"0.5.15-alpha.141","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"daa65fc61c52a7fa2a6529b0ee68f46d839acb26","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.141","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-JsKVLgIDWIZ34YVYvRX2nWK5XpOAJTqNRc+kyl91AvRLWnkKXpPEtVPM8prt43bpxlLJzBwqHpE+pmp4n6EecQ==","shasum":"19c11bb457d679f7c9543bdaafa829facade8b99","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.141.tgz","fileCount":14,"unpackedSize":47679,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr9P0CRA9TVsSAnZWagAACUkQAJiDzRYilKXDd+SD+Qs+\nwMFcvp/kzx02MEzZwDzL3yQOIIQqEveXHcDuoG71j48hrxChSfcuzUG6f3dd\nYzKZvjXg2Ig3EGGbMu9f4ItRp//sAxXRcKcUN2+dgaX2NGIaNS0kGQS4Rp1c\nOGYZqgrc33L9DIFiwPxV+U51pD993wempj1cHCTDC1/np0yn9sq3vAzYhrYa\nPLvQP87Gf/QbUWux+zjhp3dUwac0NsN3qJtd1MbuLuDpdJ/lw9DLshax6Qpn\nHC8KMlRWTZ2ibTWW0DVBHwj5T417a9psTW62BNvWzP+YrA/Eczsw3RYnpptD\nL2FXs51fHMtVGXizOOsNTpwBxvja4Z8HBi8uXtXzKT9vtu2yIWZ07+xQsJB6\nR2FB2mdT760g0+0YXXct6qtQAaG9Qi8TsJk+elj83XX8hvKLpsWFDPdNsyWE\n+g1deyAAGCl7X8FqEK25qu8mQyHGsLY8JydTz6TKKKI5siwANcEbmFn3mbbZ\ntHz4XwzjSDomxWJGNowFLaRnaANQJ+Bgw+JA32k3Y07MSIcq+seC71CGQlV4\nWNC/P8LLORUL8U5ZK5wVIXX0pP+XECeg2PdF61kI6oETzex95r3B8E2nrO/b\nm0WLgXLgZXS8Yeo3GTT40Rz6E8xAySI6gW6kvL8jwa7iGp+yCMPQGgUnFHqm\nfgpz\r\n=YXZ3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDCihU/MqoYQeTGI9CIZH5hyv5nwK6e8DUBXmqk4ks0AAIhAKfoYI18X9UTvowUItm1W86kP7smLSBg+Q/trziKoyPQ"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.141_1571804147643_0.8843965243935659"},"_hasShrinkwrap":false},"0.5.15-alpha.142":{"name":"@react-ssr/express","version":"0.5.15-alpha.142","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"1d7877869cc23441c1efe2d4c46ded72d4da847e","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.142","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-CF3TawKVuFcDVTfKraURIXtZeMLjR6sldIBKtHTvGeO/nXQcQegnaFdlQ++imWBgACywNq/Ctw0tcnxdFSOzJQ==","shasum":"ace94e466d8d6cd5e573ed7f0d58da5fb5f63784","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.142.tgz","fileCount":14,"unpackedSize":47747,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr9StCRA9TVsSAnZWagAAylsP/3E1q7XxTz1Kduqe85A0\nhD7IEQZ0XF0e6EY5vFq5DdJPsKSprfo2pChwnJJjA36a4hFnyAER+t8EiiIU\nnt6oGdGj4+MO0Wc2Wj2MzfaW+QqAxj867ijOR3YNe8cDL02PExLASfnmxBoA\nOqRN2xnKN5EZK+eeSHl5iVDbS1kzM8Y3Yc3Qbw+m3Tgqf45BR8/gXVYCVwNw\nomAnGZrPcfHH9cwU/nCaGBIIuJNxs0b6prxYRQOxJ1qEBP+Gmc6FhUDZWoFH\nqB8ghQnvfNVhB8y3CF/sTkq74Zr2b3EBgEaB1jlESsM7oV4a0IIcvtRbYIEK\ns0jos1zquKE2nIX798XdJHTPcF2tolex5GSa3OOlpUksud9FmWtI83I4CK3g\nS859Wpus4djBstpaBPRRf7jhqGWCwLqVoXyDqHgZOR2U0uZ3KqWA2OQImnSp\nORsrU+6XzhPx1psQxca/JJxuV8AmXodGDzSIdmGurnXtcCE4k0GNXOdb4p9A\nnMWQLcweWQIKss1+bWs2g5RsCZiG6+fs7BqG+EQ/4tMb2vilmYWlKo4Ju7KO\nnSP3CNqkSshUMgbMFXrPCcpXIGQ+5b01eFw0Mrrvd3LxM+H3YUUymY7u+oxf\nt7U2rh3K+YKxwW4Qq4t45Qzqps+kIaPvmap8pdUmj8c7hcHKpVXcd+0baHfz\nQSKF\r\n=vaxH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGHCfoCLZvyfr7nv0wsm7IDGjUfNwnuILvbh/CpUqsZlAiAVpdMKhwgAuaQBXmRH4UtaghAUSpqtdgbqXsiTkhKsPA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.142_1571804333406_0.16768748193593686"},"_hasShrinkwrap":false},"0.5.15-alpha.143":{"name":"@react-ssr/express","version":"0.5.15-alpha.143","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"67a5acf0e073899b3ab0613aa11221abc407e628","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.143","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Tk2scV96VOYeFOw9a1z1lrnhPnsAdwzbj9OV73ciQtIvwA1zGJXosx1YRBkEbrSW2+uGoIGXVaRkEbsV+U6Udg==","shasum":"d4b04ea205b7bf6b108376851b5013a7ed46af73","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.143.tgz","fileCount":14,"unpackedSize":48035,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr9XNCRA9TVsSAnZWagAAQwoP/iWHTEnGN2jejI5ExxRY\nzAC8Ughb/EXksOIPQ1M7DPrRxWiPDtehOi8fitBdwK0z/aThD9iyun2D6suR\nBVTPWsPVNTJRPsFWe20x1s6j0WfsUipK2GYvzz+AIQ81v2DuztytrLeqm2D8\nUHeXpcd5nhVP177iGzZKEdEkheHZlE04DZ7XaWE1D4ibkXjNDhlNTOKNSj+U\nfMXzaJ3ld24Ja8yooHKmtUkHwav5d0M6W5Ouna24ulWbzinsCRatXowsAiFI\n2LLHMkmFZuAkBj1CKjCOJIhMKBpZ7NRWKg0VDaYuWqYYQ51rk9NgSssvazZg\niJWiuT23knosut/TE5amPamsgqrfZF2NwguDLWWbEgXtbPcpF2JObeJcSSD1\nYo2/86GAjkPLJ3upwgK0Q7NsrnOJyBluENBpiSQTe1OiLjnSC9hgtSsMy+9Q\nYNmqph5cqfPFfTXEnZagYwMjlg6jfvJ0AQpH9O57GaEmChfPOdCd4JNRkD1W\nxoSoStO99vtlexjoNlfLzzwQ1F26BpSqegWbW09yP9PL5exzScx7Kj7ydrSs\n62Bl7fRUxjmdvpV1vv+uqTXsZ2QrpoS0XSm4Y/EdThBTG7SiKm3o5Qh7wop9\nXni+6+XMWkUVhbI9KsXPpgu7BuGfPvngrpx+kdRoL2mkww2uLjnwh2ZWaOlY\nPrzE\r\n=bivc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFAxJR/K4Jushqt02ttV+V8MIICYOGqIaSpi7ugdOJtnAiEA6dTg3diq4M3pUVUOsRzVHpIEq7WQBsRsVQkJicyloWA="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.143_1571804621370_0.6371947845660113"},"_hasShrinkwrap":false},"0.5.15-alpha.144":{"name":"@react-ssr/express","version":"0.5.15-alpha.144","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"fa47d252f6826018ede4610e6ee9dbeaeaf4c5c5","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.144","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-zHlh9T60Rv0oDFwesX4bIoDVrZHDykRM89Lru1eKfiFjhepPSNRb8XoDvm0s7xko1TtmmUOnhSYeiuR7WVcjqg==","shasum":"c371a5bee3f32aaa380cb69f997c1225ae22f59b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.144.tgz","fileCount":14,"unpackedSize":48293,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr9gpCRA9TVsSAnZWagAAvdoP/RnwpruZvwyEIEFzW2Hs\nploHIrLl/CvoEoTRvxip9+n8mMLWXsioQDU7n1NoL7WSfznjXVRia2qAjUpE\nJCv8CPK8w/tZsOuMkAWd2XsSN7qwmfzXvrSVL5NaX40knMEH0rr3tEROdx3K\n4CzAJsdhjlXU1bCKe2NEUV/PJkwk3BetHWKAnX2SqC6BHzwScFCRaaUoR6kZ\nIfG6n4g3ke7RC3E0gZZJ/0354mjrg9AWi/7zZ4VmXr+5TFt2nVAv8SkarIFM\nc17zRRZFa0QIaptk/nNS3+ok7Ju7YARUgXWHWxOE/EHuWK329LCPAdF6CVu2\nAg7Jpfx+ooKeyoPg7eOk4+M6riu1+iVOFwAq4x+EPMmfGL9EspiFk6z6R1uO\nQky56SLJWF2EAJ+eYjbdu/t80DSn0DmuZMXdC7J8PwNnBbSrDTBvfe6R5hpx\nsukfi6uagSdr1imCkBVD0C18wVH68mXQpL3U5xB1iOoKBCVdo68aOoaDh8nv\nx81UEEm7pbM8JJQt3dE3GAhCqytoEHLjoHDs+6OAtBTbaZjOGa7PA/Olp9zu\nblYE/F6qaNKRbxAFYz6xapykT191TKrIW3BgxsiRFdlzE6k1mVszktqfYwWP\nR9wdCqLjfsit3imJJnoVcgDsD0dSor88QxIfucRYkZEgZ8XnK9eJ6xTXe2WL\nA+m8\r\n=ldkv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIADxGMeKn4jHQTBoDhC869C8/IY+ltggd6SGiRUOSJdSAiEAvxibdp06mKdTzqxhmCgB9/VZOQ0UO2SjhK91Ax2tDJg="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.144_1571805224277_0.5316301193807562"},"_hasShrinkwrap":false},"0.5.15-alpha.145":{"name":"@react-ssr/express","version":"0.5.15-alpha.145","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"4b34ee5f7aaa073a72afceaa80fc9f6fe9f3ac03","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.145","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-WWvHj4QgTcA7aVFMikZ46cGs91Hi92hM8uG+F9JV5tNF++BxctNR+KITdeAEkBBvc/NcVa0Vun4tqrxeRaGlTg==","shasum":"39271dfc02c23c662a45fa70f297eb774d89fbee","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.145.tgz","fileCount":14,"unpackedSize":48345,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr9jQCRA9TVsSAnZWagAAgrUQAKPBKaO+qmod0GzdvvSJ\nd7oE1fPzIOgmeUvNkNCvjODZKNxC+sqeO9UT8ZtAnwnEVvR7vUGJVfwrrAcW\n/stJoaFNtGUBKNyjB5V/4PnImemUqBDu3ZHIOzq+MaJ2yCllX3s5lRXL0yTo\n+o3NrfcoeKtkcDkaq+/oCZ2EnNW5Eba+5J9OvtgeUKni0oG+PNVXH1/Xtdyg\nUqla2QwE6+Y43U7qJSs9JVRIDkDkdnygtBcCEj1rcJ7kRsJNXpxKesWJRr46\nHaV8HWmAIlu5F0b6Le/38Fa+NpN5RU5FY2QscweB3SD/RFkb+COi26XtmVZH\nGr3DQ+CIqAYIKMiMhteS/hT8jr4v4z8sg+JosTDaL53fwqhkGEq6S/4L6eq5\nV4rolFCOdtIvCdtS/gd+MLwp5J8FFVO2MJlflJWUVgpWYvQDhr00SJ0c5o99\nT1Yl5QVBYMxFMSjBiUm+11h3gzvkQpJGwcRPrhxp9zJNSFYv8EsY8Pnw591J\n30HV4xF4HalviLJOEb63TrF6a7VsFrbTSOBT0jK9KuuYyOiZv/YysH4NkDpF\naL5+66nOcLZ4QUg2ZFAqxYmC/saTy0o1EBJyN63jZr3mk5zXrUaqq25fZVlV\nfVR3Qs8hIh0arKYfIluMvYaFexC2lj5G0Xz1NvJcqHjo3/+CSeKmjKsfusxZ\ncpwf\r\n=rz8n\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGK6pAXcdaim8htD9EG9k4T8v/oIncL/hRVrJDdEG4jBAiBeG8XHkkv8XWKOV0pXu2b+73rjRGaSpPXrAYcDxFIy2g=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.145_1571805392045_0.5533967289576929"},"_hasShrinkwrap":false},"0.5.15-alpha.146":{"name":"@react-ssr/express","version":"0.5.15-alpha.146","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","babel-preset-minify":"^0.5.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"5f7b55719702b13d4fba5fb28205661fbe2806ab","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.146","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-c5/XPbpB+d3+7qEvYW+ZZffrAmFAfaxxcSPSMZD5t0i95A+zl5VbWOJD3Gh96OWePMjCn0H75+pDTjiBAeA1Bg==","shasum":"601006c251efc9a354c006d2b5a3870646984dc0","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.146.tgz","fileCount":14,"unpackedSize":48444,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr9qpCRA9TVsSAnZWagAANcQP/1FEm79x5Uzg4LMVdc0T\nVhLLxqnn32EYo5UJA2U5052Efm3nnDRCKjjWX8WNImfYW2X2ZZga54JRo1wT\nrU2YbrL78S0x1yasgNDGW5PaKNm9jmsnZ1isJQ3AFgumjkPzF3RDRuwE71Ec\nqlgxsfH9MZkA2KTLzaPGcNkaHbQ59/VI3y3D3xVcj+Gop2lJgp80oGBI4phL\nupCUGn98HseFzSFsMmOhOSI6FTsRUzARvdp1RjYi69zaVdlP8tO3vC7Bk4FP\nHC3bttyqqHz9gBwy+Q2oxaP7NZjzwKMW//sDc4ebyFqQAdr7WqZkGNmiiukF\nsXOnzKrLy2YHbJXrsbspxvPsDkzRsbloPkuYuEApJyOPaWVHripa02SBfrpR\npj8YGm4uvpWvR4Vdb1G2pC3Z8Kxsf8ZPjGKaFqGXixz9ZxvSUOSKP5sUOSLM\n5K93UL7sozCOH8Z/NJ/O8FjWeky2Ya/OKwfhmAcEqeG6+BOunD5t289mCW/4\nVpjimLX+asOqPALxIcytWqMSvnspGOuff9Vx2qtHauw+sMLXn6U3Q40NrDzj\nfk0jfXN/kjQARmOjpXLGMa27f0dgBXfxSGNLWi/n1Ydjm+jdSun1JdwWn2Q+\nAhXIBpAsj2hD449SJfAe2paogZJBqauvZXRQrvLljO41BH+YuHGODy0sfi1O\nt1mX\r\n=1kOH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC5PicmStIyex017y4xKUICCn3DHfjvoTSKdXmaSPZQdQIgSXI91Ql7Oucrc3MNRBFhLcFiaV9Gk0GdJITE1J6s3TY="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.146_1571805865299_0.5497207583510815"},"_hasShrinkwrap":false},"0.5.15-alpha.147":{"name":"@react-ssr/express","version":"0.5.15-alpha.147","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser":"^4.3.9","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"c69bb59a792aad49d34c0abae68cc27a835e9251","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.147","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-/oyzrMmtllfgG9pm+YxD3zZ+P7/29IqPqmPJoATHDfjqKUgHjfWixXFlqQOw0edfne1+K9X/evZT3yKBfDN++Q==","shasum":"64fd91dee8ff79371655cdcd8ce4b73a6caa062e","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.147.tgz","fileCount":14,"unpackedSize":49011,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr+GACRA9TVsSAnZWagAATl4P/34P71CF8ToZHx3Yj49p\nSD6OPzxJ1uxnuCBuD7enc83paz2J+YFAeRAk96E0sUvX5bvHcf2zq+Ux+NBZ\nSOQcJqzSuxeew2T/XtrOxAPJWBatLwHZifuphDKbQakSC0dDvgd4BXES2tPZ\nR6D6PNaRCYEsg8mNanZD319YVNwWJGWT0YP75SA0Bg9RPP5kAuMNSv4Dp3xz\nCPCX/ARbddKQeggkRUPmGmyTPHy/I2H1wffJbwttBSiyuq717q0PAKbz6FD3\nX/1/B9+zWnDhTfKuzZc+xYV4H+27OyHav9zFkofI22fMm0LKMlLhrPzOOemW\ns33NAzhC0UdSXT7QJhlczleCk8WWtuvwkhP5K0txlyv/oDQHW43uXnuvAHp9\nWSHE/AD52ipuvmGoHJ4G2KxQSTC7bzWfT+GuyjG03fOGTRHv4cqEJPJh28vu\nRLE9wcnEKs2816bYPS+dhqBsLo/6QB+jqVMOAZQPGVqwQZP2tgkkrn2ET15e\nLAPb7aZTbFrKubtjDpC83Ps4U5KF1BTiEtkRUmF4vLvQzqpqmL0vL9tf9Xi8\nWn1Fi3hywW79vAsdZfn7qfRyBVsAThfqCgy6QjQvMvBENxrL4+NWtbfiiill\n5nP7WQY4zr2sfCh2gEruUjZnjuhqBhbydHetajZl2fAd+CyTycsYDW2+oTdJ\nmrKY\r\n=5Z6O\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDd5qgi3u3A6H1VN7zUNnRmBM1WZokHrZ/fCxIeQLdOnAiBQFfUmr6v1cYcTUolfsRWvhR20P5zS/v0X9eyryLc98A=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.147_1571807615777_0.49535338724752553"},"_hasShrinkwrap":false},"0.5.15-alpha.148":{"name":"@react-ssr/express","version":"0.5.15-alpha.148","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser":"^4.3.9","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"a71009026cb6c086155999b306a8e7580cc08491","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.148","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-1rab5jsV0J1Grbrul3ZXd1vam5C0ApYIMELuesss0bhDPM3lBIX8so1Cr7lS3be0BS6Z3xhehytACaugKBuUkg==","shasum":"de9ad908149c51eb2eab0c054dc2ddd59935b1c9","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.148.tgz","fileCount":14,"unpackedSize":49007,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr+JICRA9TVsSAnZWagAA9U4P/RfRs1OlJBpaHnG65hkb\n5s369IkVY+EkPut+U3uUHlb+xPVBdxR1XiY+WbmS/4d1JTp2s80GKwWcoB5q\neG7emFA/WL+t4Nam2Q7F8ZEYPGhut0J50bgJ3PHoR2PcwC70ehG3nlhhq5iC\nVvRwUtDV89tBTfdRENazJHWNbKdLvFhbJeQo1kugaU7xVO6XIgdzGeCY7aQL\nM8o6p+U7Fg9Mh5H+LORSSm2MhjraO1G7BZ1BFYGaG0huIxX8Dohk0F95wucf\nIaXYeuNvGE1aph/Zx71Z1SqcNa1yq9O9csvDGVoz7BHBpt5vEMN+NcDvXIGq\nme5AbiSnrHf8/I/fEZE/VRENa9wXqzPCMHo3rmJpb1dTjt4UlznHfpwY7CgI\nsPRnjbECSVc4XCyeAZYxg0Nr0qeFkuI5QN56h18zjn9J2H3JXxYrlFTvv7Td\nkdeQLiRhB+5OB1rkIKyXDjfx8rV+EdqCeQSKS1+gAMw7KkhMw9t2DKYEPbyH\nwi5/l8K/X14JZ0RsN1IuuidAZ+SyVKjW+TCJspjuDXOOhg3b4oaF+0PS2xmD\nTBZk2pkRkW/SrbFWmG5x0JQgECrY5Jaj8bOMnOcoaIimGuA6rT/J5hUNt37t\nGljcHSQjY9uTsab5sL/kZrnQMufq38Kx9BIvhzGupE80EMW1DJxPvVwLTL1T\nYZSt\r\n=mo4I\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDcrf4hvYRlCtl4jhT5B9xyYRF4ptKNIIuff9fz1xZhjAiEA9M1GdxzqEoGDNLlP3WowS67hpd+8UTTBgRQCkFVsANE="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.148_1571807816206_0.20545341301479914"},"_hasShrinkwrap":false},"0.5.15-alpha.149":{"name":"@react-ssr/express","version":"0.5.15-alpha.149","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser":"^4.3.9","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"714514009b4862e8e86cd030ae419b3770532374","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.149","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-WjMR5Sfm/K4Miir82GczJED7lTHVex8ho/q6WDuk2iJfBXj4To7XZczPOkcl/+ri5GOZnWYmuctCHhHHCUl/Og==","shasum":"4f3887b6dd3c2e151374038b1ae3ffd6eead0873","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.149.tgz","fileCount":14,"unpackedSize":49003,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr+OVCRA9TVsSAnZWagAA5IYP/0KV36zYb6HyCFk1Kmbj\nq28qrZRCfbE1EslApRss5cRSSrEZ28hs4YDAVvHljlKgVt3TDOOgBCZ7QvDO\ncCfJwFyBZItDI9oE3HRF/n6D4SMaBojpVPuJh/vfK5QtQt9cGYgSS1OSgMVM\nI8/xgntKWImim5d/h51xvmfxwtALilaPnyfVZoVh9mV65YxtSfTozOt0r4Aw\nFkBJVn3DKsjW7VU48+q6wYXe836uBeKEoOrh8a6NPplvfJ5xCuSFvDtF/WsW\nXUWU+FXXBS646qqyTOrOSFzekdReVv6N82LZsFHZ9l43n4pZSbYq9pbAibB7\nZHLg1mgJd+R1LxC2VARGWDymcA/jWZg7YUM3ZUzkKQAV40XqrT8JcXJOXdoa\n1mztWUcdv7/hOoIrWLAVi6imdUMYyV/K1Sz95Zt/31QD5QBNv46PtLoAS6lS\njkUxDu2EgVlk414RTwAMmJm+9b4VlDn73ISgVPlBomcfodOniiHp9p4kNsv2\nabqCSJ+lPrpmqXBBEDBHgrriyTK6YDufYf5WUN6nYvxG1ZyA618ddLE526/m\nvff+iRYPi/o/JEtQ166WuQLJLtlo3x03eDhRBj/Lswv3JnO21ZZ4uNYtCPuw\nlnhSB97n21gDL7V43MQBo7lDN7fPPVtzUV+1YtBvCSgKF3QjTX3ysAtrQce3\nKETy\r\n=zs5Q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAijGB7k5wFhmLgxYP6486URJrFQ1KkQOUoYaL+xOCp7AiAxA2srSPr986cXlL4aprK6bIipGniJZP9FzCD9GV67fg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.149_1571808148820_0.49781691502672576"},"_hasShrinkwrap":false},"0.5.15-alpha.150":{"name":"@react-ssr/express","version":"0.5.15-alpha.150","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser":"^4.3.9","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"43580fef5e436538304596754b94b961098a728f","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.150","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-FD1BlvZxYCUgMD38Eg5ERGpUIDK14lkYOZIiXetI430OUgo0meZicUxLv34LgYWqSY53JjgyyQ4NJcjr/1/ARA==","shasum":"ccb79f489c5d6f745dc8827c101b34c3ce05bbfe","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.150.tgz","fileCount":14,"unpackedSize":48997,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr+QUCRA9TVsSAnZWagAAGhsP/RCzm4YPpA7Qy1GG0vu4\ngc59Ph7cpju0H6tfXk0DK7/K/kU70/88J5i/2le+zT6qd7OOL95rdjfRRidG\n9ZL6xqpIvx8LGdYA8v5+3l1r9Zks+br19UbUMWCFE/IpOrsCBcree781KQdI\nxgzDL/MKqm45OiiYhte/nknVip1fNgB0l2wvVO11Z19MEDQF64heok98RFq8\nLdpNp/pwISzfhQLSj9POgkxiL8h1n17crfCmFwo8+DD2LRX2BXPkN0wIPSL7\n4WBmttLEuygjLTClgctXC2FOybi+c+7evdcpc70un86+YLFVRE6qLBR1cBNA\nCXpCX0mhKxYhx+R0qeeRNizUf7etGMfiZA9OqP1O3Swq+/G1ogsZG0J9vwot\n5BsJp/xi/lfSnoJv0VovGh5BnyyGYyP+n2vnvxqB9MqUJ4u4hNC/vxxSbOQE\nzu+Tc1RicaQnIqV+iyGIbOhUV6XspiNHf5iDNcr7jqFEm67vASFKqpxfwlLE\nEu9fL2664hl03IF+thpLfRvdNQOHjFgajGCundJKwM7QL3kj5F3f5okElNUZ\nLkUmqZ3hk3U4pb0UcdaVaPINM5+wMqDr7kRx5XmVqtqbgDvVUYZ18cDB7LkW\nMb5gEoeHeP24s6nVhsJuctAW8kqsJnWrKxhyjup+kRVyq/chs/Byk6/IVp9b\nVJhA\r\n=XlZ0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC3cQ3r0GFSt8ZkLH+lz/NseaIbaGZRLVjpxg7tvUa3VAIgO3cWpQLk+xfl1LneGpWIcRctpXmxLEjo2kGFiQrxsO4="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.150_1571808276232_0.0333909322674093"},"_hasShrinkwrap":false},"0.5.15-alpha.151":{"name":"@react-ssr/express","version":"0.5.15-alpha.151","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser":"^4.3.9","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"0ac54252121c5e7bd5495dae0feb1edd886d3ee4","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.151","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-2rDMx6pyyU+K3AS6siDLFu4cRjWSDjztX67Cbe7vfn5r85XdqQBmVhNIpk+GQ8RTs20BajjjBkZBuMDDXLYOdA==","shasum":"57b2364991405963bd3f8398cb2717a2bdc80bd7","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.151.tgz","fileCount":14,"unpackedSize":49033,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr+TJCRA9TVsSAnZWagAAbjIP/2a2F0Fvkmz6Ka8+jkfM\nXJ4VtWAfAwhNmOshsOwnbvIJNHt6es5gLsSRM52ghysBle2sBpdafGpGqwEg\nK97rNBUZ8kOUDJCncih0P9gyDDBIMw4WobdwkYRicWcy2nCv00wRDt8dtXPi\nsG5x0LYxkmlIAHumoUqAwHhYZjYhypTfSv0Gg0Nbjoh64ePYqrArsKfbxqKk\nDQvZXeaNb9oqDHSxRDjmTDZHDTXkNx/9K/Fk41G8Xewew1kt0Emh03Vh974r\n4g7TWVuKrDVWJDNJkorEp2bOe8TAnabzASXabK1gIXKVSYXDaIfNbwvl8j5G\nwEp6lma3TlWeyavNyabAIvwRHcJ4nYmbWYEVm9WUEPEpmC4C8YCDQ0VGiV71\npk/Afi0T67t5zjrTO5hDdiP9r4FrZK7cPoXBD0gItH2G9vewpQRKaJA47Z2q\nowXcGNAW5ZEahF8KmkFw6S4wyjZhLg/3QAB7qCaMI+elDMTDtU75mdhZ70kU\nW6sVNIw+dIAR5KFlE90wloek2JAOTLQjBQ850E75tNXOB/EOiwD0m1Svf5MI\nHkggKatoW0MTMNOR3udCLRFXTLpWY25jQ3TuKwjumsSMfIVXHuEHGHo1EvsJ\nBwK5yOoa+yR8CbsdyqGdYrUAHHT/JQ8Z85C1KTEv7RaMvqPIYoRxEytihVL1\nsQ4F\r\n=XqP7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBnbIWW5l7+DnG+WXU2SJIjUGb3oH8GrJSD597B7cy6GAiBDhMojkBBteUNYpBSogR1UMCmDN50Z8aQFvijSqIg+gw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.151_1571808457303_0.08965061920742023"},"_hasShrinkwrap":false},"0.5.15-alpha.152":{"name":"@react-ssr/express","version":"0.5.15-alpha.152","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser":"^4.3.9","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"f7b42a026b9ad1200c73160f14831bfe8b5769b1","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.152","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-KFPQFJs4yAY3VGJt+D+BsKm9cn2xBy03vvNlUMi7ZyIkPVhir4GaqueN7av5m7JoBYOthKGJ2oG3/xgEFLmWcw==","shasum":"82109367e37fc32e607226acc7ebffff251c7731","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.152.tgz","fileCount":14,"unpackedSize":49081,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr+aTCRA9TVsSAnZWagAA9gYP/119N7oGi3TpWzKqd3YB\nTnDT+SUkbE67OvPzuWcH5NO6msXscLs0mmH7JzpA7lsR8I3nF4FYBvTDphIl\njM4Hy/bvcnnP+2xp3jUJa1uNklmm1Jf/7dDpsBCiLSfzaFSox9DW6TSfsXg1\nMShp7rHhZ/i+btNRVFuQ1wMYLOqfLssPqoW81m3BeJgQHkHToyOSmLkl2NiR\nmreQMOUUSIgkoZRxPHaWSMwywaa0o9RD4nsvABrn36fqO1jv1ZiSwW4b/5bp\nGnKX/rj7YxVBAbCHOTGJhkmlEmUCpML92rG7IktjO8Xbpsejhix3kYvjDvpo\nz03xQb7bxYqWz0iSIk+lKR8EfjNBQkrIgi1VrGsevO9XaZq0Qr4pfMpspdkR\nUMUw0A5bLBFkEtTZoMLPQ/12sGVGszQz4vdp2yEcIHVPDdW9GOoDBZEO2rmO\neN+H2kceGzCutiGfjA1dm236sAGJJqvm2JtSUxyxpdeJciqywSnZ/ni31VP9\ng/r0GEx72trXntnNSEqqE15dSnxBmRR+QHVeGUtG9yoxFBIMhJL5xc9Qghse\nEOvxLYhFVCH/IEfYOrwQZ2bc535h/M5ZZoQJx2Y2pGuLDxIBusnl9dzUrKGq\nStI4zxWq5K5dgkoPVUGMf6IQH9rJQKMq6W6tZe3p7M2bHLFHsUyGuHf63Vyt\nmaCr\r\n=kyHZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGSJNtBRAN2ZTfliNefsJQXLt70kB+PHzH0pRuR6kbg7AiEAthV41GGhMeYzv2rNqVA/RAHTEACu+ZpkflibIf2W3L0="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.152_1571808915037_0.5328852390225565"},"_hasShrinkwrap":false},"0.5.15-alpha.153":{"name":"@react-ssr/express","version":"0.5.15-alpha.153","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser":"^4.3.9","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"cc35a062731352362defdb803ec3c3c873775bc6","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.153","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-dLpwtgJUvV2K8nf/Yb6UcDR0InqWihkdFVOFB3pNjCjumw5NIU34OC3uuJN1n+5lN3oKunlR7cB8KcwNnrOgtw==","shasum":"b81414ccbc3bc6e39f4008d9fc3c56a813696005","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.153.tgz","fileCount":14,"unpackedSize":49035,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsDZECRA9TVsSAnZWagAAMAAP/1jPGKmdPGgLfJiJd3Nu\nndZxOcz8Ltqm5mQqYu4rxBnJ/nE6klcfY1+4if2I1jPF2/0+5vjwSRiV6pDY\n25fSow4ZQl/1GnGMbsSIfiBQQh5K8Fwa7B9Drh2FkQ0B7xh4TNR+uLhJQeI4\n6noXfckNMFWAbcguwafOKjq6lJ8I/f7mCBOwCYUHMARblV6/pA600Z+L4Zit\nG+u6HDqHXbxMvvtTGsaplRGUejxHiAoij326+ZgEl5vrHPkZvPdqCEh7m+0/\nycMNOLxAob+pIc/Z9goIhq02Q3TMFMk0ViFmGKQXmH+ajaJZdvzVprZYWVQO\noX2rS8iFi4JjpN2GsDycJXIv2RbxvyLHma41rVhyzJOjye1EhxQkb/Nx23PK\nrtFGIgCPmgLGViYjd4KCaIPKwoEFUnfmukk6ydkaRIDiX4cFs3Bhfq0OXS1k\nK8Y5TjRjKOvvtbjrya2jPK3JSk9SMEs1bK9kelosax2W2Xr6no4Zhai0/1R1\nZNUvR+Txy9KLDjW5QPfmsfxZBoNmyM60owkJKVnliACEFqs5n4kH4FzYMYrZ\nq/DWC8O3zJHWSjTfMjIfsigGmWstVxoGLSXUPObfuVQ09TsScd+Slsgsst3Z\nPfKJ2djlTvdsUO8RcKOk1DJk4xouQlCzsjvtF1IRY0kUspuN4lIY+JRlYYZL\nC0LV\r\n=PQtM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCcO51eX7xr3Umd4uXaEyyZcsfAKJ7XJHo1DlH1UfqTbgIhAOrDYU1wWMrfTgnQcr9g93REz2aCS2wxqHTrlw4pIhLn"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.153_1571829316242_0.07013353393127453"},"_hasShrinkwrap":false},"0.5.15-alpha.154":{"name":"@react-ssr/express","version":"0.5.15-alpha.154","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser":"^4.3.9","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"caf34b2295239c07f1d303cd20a0edc316e56b71","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.154","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-gUU2/zcVM3SDXjFRPYWjTpAKtcrm0H5rotn64iF+FRvaN+PRI+ZgPIttk04ZyU/BAMF5QrRs11+X3Qf+Mt6VbA==","shasum":"5da9443304fc651ef269929fd837f3191714d1f9","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.154.tgz","fileCount":14,"unpackedSize":49065,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsDdMCRA9TVsSAnZWagAAvvQQAIJBLUrEFv6kMFUulkEz\nGLBZE/piPWXO8JxSDS1EUebCtZ+RzBe82khd2SGuGCa4hEfY/uzdZa1YRa6X\nbsK2B9lzVf8l9lPeLk3Mq3cIZRzA5F40ftYBbZ6yG7TErZEpKKEcCVbdVLny\naTqsh05lp42PoK3MP9Xev0Oors57yngoOlT1+gKXZKCtE/5PxoxlSGJHAtdl\noMICKQneSb8alR/HH+zifw/+juyercw40+dDGI6wBghY8ltOrvTibPay8V1u\n1L859YHU0iGRWI7sgoV5/+/IHt2/MoqYcgKhFCCsKWcX6cB6heXZRvUn7/I7\n4PlAmKBXXO6CoYjIlFDeRubdSk3E/8Ck+ck/5EOudunlR8Yo+btS8+giYROW\ny5CkQbGlZgRSSkxoQr491vy2YPL+y66HjF28Sf/CzcJ/6JnPtNjPUKIUyv+Q\nAh6V79qJEp4yX3nsBAWBg4c3bMwxKnR1kcJSvwAQUkcUibm7CCQJ0XH3NvQG\nUaNxp9D+oaemAQF5g8+ui9JaWDv78YoyItcbB+91jVYJvsQ26B9z98rAoPa9\nlA4GEcNXAVdMFBCKnAtqLNMT/qD+atCO8ZWJFOJgb4i6pac0rwSq3xI6GRb9\n9VMDGpjjJmWPGky9xHzg25SUGygoK/yevFoy0Jts6z3H+VBlVJ8wx7pQWjwA\nm1z9\r\n=nwd4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDyJR05Pbk7QRNzk4Abpmzkb1CHBbfjRekOR3DTH0yDgAIhAPYoY1PacA7/LhroBOEDDtDt+k8em/0a2NFLAJbcoO43"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.154_1571829580530_0.34291505349953755"},"_hasShrinkwrap":false},"0.5.15-alpha.155":{"name":"@react-ssr/express","version":"0.5.15-alpha.155","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser":"^4.3.9","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"95381072e0f75e955d7621f05fe55cbcfa0b7d52","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.155","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-5CDKonlh3bWJxby97VYcjYuSWERsowfSl1xMhyH2yK9uH6rYlVk32eRUOVdCjOg6YfP+KmB1HJSYiMJ/Oenj1Q==","shasum":"ce6399ef8a04448abc4f6b325cf0a48a68483c1a","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.155.tgz","fileCount":14,"unpackedSize":49095,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsDf6CRA9TVsSAnZWagAAvAIQAJgolbhC4Vv2Ww4rsUDG\n5NZhGqQ0DiagqSzHtUXkgaNMk+1ovqOtOuMGRyVWpZFUADxJxtSN5bY/m1c0\nR3oyRm6IEEikhjWIG6nBFLQsGs1bpVPq+6fs4L6OSeB/iUBMGmWL2mRS3qRM\n4vnTYzGOyvWUHsdxE86qByxeWCTMaomRNoLi5THkjHVVH3+9tZVy4tGqLavm\nH+b8EVvsI+bD8VpS3iL1XRHyWiVy43clZo6vlcKSOfPBtEWF5RlobPyW9jKG\nSJJTutkFK3yOx6VYnpPyaGmJj92GrwrHCQEcGCM7N9Mr9uBbVD4+E2WjxHGo\nXegS4m2BMzJJz7qAI9oBREOG4E1R73Dk5ufdyTlXy5rmCgnC4+kbo/echspN\ndfKyZRH9nr4T3VBlJZN2K2oqXX0I7X8v/hVkPUUFvpoAoqs8QiNrYZH597Xe\nfYnYUq0D52dzFbl2lx0xh1K5PAj60xBb9L2eKxiBIxpL+VUYEJdcNbmiwz1Z\nLZDeZRpxuxN3dEAINFAsIELvxx/Bb/ZmCTc08ag7nNhVR3i7zEOlkdQ/mcNz\nSiY230TuDKvr+GAEamEPVAYeh2hG+UFIESCp76oIvcrqoW1yV3bX0XBmN4dW\n7LPqrH7aiVJdOKmlAcnmB5uQ+YHIY0PAtEJc+FMwP2+eb4qRELRvp3X26+x7\n28Mk\r\n=8zk9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCFfi12K+Z9nhteBl9sEaBPHrjDBd/IQi8bFImMn2WDLgIhAJcGO9ZcQZutKVoxTEqCMMoBtlgus0hDeCzJQTHHtLX6"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.155_1571829754336_0.5406038358897749"},"_hasShrinkwrap":false},"0.5.15-alpha.156":{"name":"@react-ssr/express","version":"0.5.15-alpha.156","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser":"^4.3.9","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"3b225554e3d14e1158af3e2d44d22336e576a261","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.156","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-857OdIy75FvGkpBc1wxjilu8fToAN9j5AdN8ZQWA5BP5L142e0rrwN2KN3wK2ra3anQ6lmZ3L9Gbf2EG9wxoTQ==","shasum":"f978a208b4a4d66609a3fce347c387f3f67ae7e4","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.156.tgz","fileCount":14,"unpackedSize":49101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsDicCRA9TVsSAnZWagAAexwP/iXPLRFBE5J4ZZIZQL+u\n5gvz9cYoTHOiwSn4j0/M18N+WyXBa8BG2LI3flIMlLYRhhlrnqPvXmvacX+X\nB7SQRnuivYwnR3rlVbI7bmtqsCtJc8Odc9RcZFwoRerTiV0G2/9pH9huTfiU\nWpA0HjGetjvM2+bfG2fZtY0B3gsXJliC0G8DQqwaWfKGHOil+J46zrPo4Dbr\n/vAJ6OQFFUD41c7v07FNZ5HLqjzIxrw3UIcyotk2pS+AFizP9HfVzfspJiEh\ndpKhQz+3ufPQjEmISjmtup9wSz2x2Bbl9g82l/gsrgi36hUbAP2fsbAIAuTn\nWMrIaQHxO1o5b3SUebNuz08MXw/dAuOqYLCQDbfZZ28AoaqeVRsdsfgsjNy+\nYNjWvTPOqf2EFUYXfjHJcpaYyYKVAt6zPL5oSFzwrCA/ofHAtRon3fDS7LHw\nozr3EoUhCjrXAo/+QS1W6zIwMSwiElVC0ps2/nXJjAwB74BZ2fFbaAPy2dYh\nFrigJKN5VvVkFXfNbTPxawAWyD8ICpX6s+w0Zcujc3pxpg/gyfdGxMQKXZQT\nFhWGArSQHFW7uffTcoVkBjJhD9nrb9ywtW10oi8Oq3F9AndQ/bVF+lI1ZklP\nVpCP4Vqp5fnNUCoyNn36GRD27DnFjqJjn5j3iyLAE2gGlbx8+p0G+RpQYthg\nZk3o\r\n=Nig0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDaGgP4jiKKXXeUmlq9DsP9ZpywsRQSC7lbp8bLYtLpXQIgJdO1Pp+iLawpcQNXmx0tRIHn1Lw7h1lFuKjhSw8kKuQ="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.156_1571829916201_0.5089414399033734"},"_hasShrinkwrap":false},"0.5.15-alpha.157":{"name":"@react-ssr/express","version":"0.5.15-alpha.157","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser":"^4.3.9","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"23501c1f86d630ae4135f77ebcc99a3d925444f1","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.157","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-XHwamFiL6/sn8TtzQYEgtlr92A9fqhBJr+QFj8TE/c2Gv6Y+ZRRjv2bu41xKcM5g7DMcGmJYV11GpoQlcAs5Ig==","shasum":"2d64d755fb891a2e4f578d3f9bef5982fe876606","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.157.tgz","fileCount":14,"unpackedSize":49093,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsDmkCRA9TVsSAnZWagAAR/AP/2j8eIiEUCyhsSAhjct8\n12vDh0qAEZJWUyyKXpb2kVGOzPXBABAVi2pg2CglyB8CAumzaOmA65G1avVg\nGq7SwzezHNZ8uO8oJbXAXmWWzq+/+9XU0cPtRCFjGG0Tx3I1wZFU0X7w8QXe\niy+7P4VhKNIdQec8RROuAdWKUco7JGT0ZbMDsEkNLj/+s8hvvcQDH8LaVDcO\n2K54TCwCNtPeeGVEKPBlx2z/k+8F4ZwbX5TqFuu4q4X5kbAZsTnqqJW6aaoV\nYUjgqivgpwoEiDUND7HMjbJoLZVyKWsou2ehS9b/SHrvpDTRSPhS8NI3fwoR\nkAVZeuZXexYqq2QsnYXaosjUvspEwAshzxbMLTOpRWjR9zQn6ouoYQ0jUnr+\nFAnlDZCfIz1o1dmbUtWsxSVRv8sm7i4en4/UMe/lUjjnLijNUsPVC/wCxUMU\nQ09c7IBf8c82LVD4dqhK1b/fcy/icCMhXypgi+CVq/zx/YV3RrsKAlfmEOri\nUDc3iJ7Mv7/Zr3KlmcZuhDCHSqK+nSpqofmD1T15wOj7RNJbyr/eN3HFZLOv\ni49hCnZ5JTp6mL46LDs/p1/nBjKMkLCLKyiNnOrtOE/bIXkfALfdZpXUVzer\ngK6Q4Y98WX7XCpoEVESP6FaMYuxu8t+wEl1DQGHY30LMT1t8kNj8X1YsC1hh\n4Gtk\r\n=n1Tq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHnLAViWJwkI9VUe6b3es6Owm/5pECJf//T9Q0Um9W01AiEAkXV9gwDSt01s4KFO2rPJrwOWyaycK+gLN/X6lA2r66U="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.157_1571830179617_0.8597645939360024"},"_hasShrinkwrap":false},"0.5.15-alpha.158":{"name":"@react-ssr/express","version":"0.5.15-alpha.158","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser":"^4.3.9","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"238e9f026a1f6ecc9328466aed14b32534f206a6","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.158","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-mFpCM1eZx0Ak5enTvbbUt1KrthShj6iaFqMtd2t/hC18uN76n0bZP4S3U2b8LmvxfB2ppAGbcWG2i63lxR20MA==","shasum":"66e9d0f2da02f7645864ec0c8907636eef9dd289","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.158.tgz","fileCount":14,"unpackedSize":49123,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsDtTCRA9TVsSAnZWagAAIg8QAIuqhB2+temzLewVwN1B\nVPX2gtF+wNWDrPx0tQsHpwKnrzuBpKz3ngC8bFbiAiSrJ5nbwwwKMpiLxcAq\nRYpEAbZuDLRBwBC3Z13WQIWB68K1JR6d0XVBqL8dxj/pTOqV2r8IgIDTHmgW\nX98oGIv/QiGZooPaTICpXWzDAykL6m7osVLwEYsNNdGDEAXrRXvm56BOA/bQ\n/ITkSGABjn6kdCzO619QsyyER6D9wFBm0sC12w+Ap7iZEP2s9pR+6pausnpK\n9dZTmzTJKQJeAOwLPwPHzbFbfQCAEwi+UZ5D7+P9/hrfsoaKsb1nPhLDfT1O\nr9bgiI27RscVn9bUwFK0kwbtkX2WoVOphoiolht/dYyhVBMaxo8iFZvYZtQx\n2ZVsziY03ohuq/QNr8E0VAFUQAWmSWFhqBMjCNU9U+f2l7fIuyEVH7rOZda9\nmm+THicfZpab7NXGtopZjHUzvKERiIB+TLJ1Ikg2j9j8ZtFVvxLyTvowPhwR\nWPfuBSWH9NK+Btwt68kYf6juEA9popKvL7fXP7FSddTLiEXzisDZ1j88OpP5\nSOGf9lMr9cwRzBPJUXt0yiU8pQvuQQY5R2N7gOoPOhYIOwfPYE6wHC/j43PK\njXWz0wrUljfgBLwnK0AoLVTWaUwQUrBBQCtRbG8L9UEWlVBnCaNvWL1ENmCB\nLjN6\r\n=o7aA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBc3hRkr97LxcxbqpHt7kwyd0Pbz4HL3u3UVt9Kx2ipfAiBIjj6HFzx2dB4VdqkGnexu9xacxgSRoPKXzaCEsxz+YQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.158_1571830610656_0.2779233108533823"},"_hasShrinkwrap":false},"0.5.15-alpha.159":{"name":"@react-ssr/express","version":"0.5.15-alpha.159","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser":"^4.3.9","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"e6d61b8b8286ebc7ca8f40b07e50811b3342730b","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.159","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-QiVVhEVSNhl9V4CvgnBnfQkdSm8Wcn114OLei/tt5iNDs1+q1wHqUjuXo5EOUnRf2YM5H2NxwVWy25VG10Cc6g==","shasum":"6088b25a2d4fa76ea1603cd92a5e101f30bea56f","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.159.tgz","fileCount":14,"unpackedSize":49163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsDvSCRA9TVsSAnZWagAATR8P/1yFgu+LrSKnRouhgKJ4\nLq9naQ6IPn+fi7qJ1O4yyWltPlIzawAYPcstyjE8Ouey3eneREYQGtYNW6Hf\n4rLg+OnPA3IbWRWkZ5dEYzJis9pB01rG9wBvgsIkRU9urEomKE+//UdwbOZb\ncdmWoo5wI5SIyRoCOo9UVLT2nKlwOy8usVydZmGf2xxdozO1wxVgRIPqyovl\nu/vIMs5NpnQ5xY4mw2p5xawjmk8E8JlYgzKliWYecGhVZrSVe8yxAv2PFyxH\nt0nON1p55epTAjR/QgTlfZWC6nQFavYLVDI3YbnRJtFwwhg+FCMBhjPoOdYA\ndaP+OsZdakAfXvYV3dGqbj6OVJnBKTHoqfyVHbDHd8hqbLmD7UG7wg4ELtQd\n2U8TuXTIju7FcgnRMG9YNypR2HYa3XciNIE5CbnsQO6FPOC5tPVlTtG5M3Ce\nVKRsvcn94mrtgmbiv8DoQcP00Vti0LTyCddSbXDAkpviFlazvG9OVIVxuw/9\npGATtZcIf8lHMub/rm2NEI9e0xgXtrbC77DrJF9F9ZqacPXaRk+2QOWwn6r4\nKvuP6KLkV2FahA1lpL80PvCmhs9JV25/F4JNUibbUisoA7INiS3EbPaYv9xn\nFAjnodYGXKfrGXf4iXtJh/kQkjKtjcTkOs4TL9uKy/2LVduKQOfoTLjgVKR1\nhT5b\r\n=lXVk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDTnoW4y6oNC/YELyb741zx/OcsbqgnWB3zqe5fQVyB1wIhAK3q/0LABzeaMzOueZGwLf2nb7aG3CmoHYeeWYyp4HA2"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.159_1571830737860_0.4196011237514914"},"_hasShrinkwrap":false},"0.5.15-alpha.160":{"name":"@react-ssr/express","version":"0.5.15-alpha.160","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser":"^4.3.9","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"e0793de9c1cfa45c350fc9c2ea4ff34decbde472","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.160","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-4Bap23fMN8SPPTSy5ggeNuLT7Gk5nPfrn5Uz8wMqvgAMssVPeeYkP5RK9993uR6TeV9lLwPZMfYuE4JQIIG08Q==","shasum":"4c08b3fb6956824694c1e9fa8b64929f8b60955e","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.160.tgz","fileCount":14,"unpackedSize":49167,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsD2gCRA9TVsSAnZWagAAk3sP/jNptFLtifHIOzC531s4\nze5aT/Q5xv08VvRjDz9FMkTjrMWF0tYu8dUgBk+0LYuNqxxLKM6aoryhoVmN\nD49hcFv2wtCuHndusckBj+V1vJu/yYDe7MZCBSTqMRCXk4HOhgnY1cdRC9NB\nnaoJl5lvrzo5ogOmigf5bfu1GUjxsFjg/si0/4/K5HsCt/36G1RypZwiLYqh\nhtP4+ff3u/DHpgfvcA0e02GryHJIbATM4t0iDsqcISvoCEyozBkC4fTYPKJH\nYwDxaNnAkZugf9kki5wd+0gs0HUeGs9cEqZBRLSbgNtStaCd1tIDYrG+Pjg7\n/h5F7JUPvc2BhtBx9gZraGhYNQFa6feucrOd20801nY2wh0tLFBJ9vjz0ivN\ntKhp8fjPvpxThKm22IQJbx3kqI1K2UefSkSXSn6AjFcTbjRxfv+3GnQxljXD\nfuDDxQLKomTumawAkr/A5A6PH+HhMCeA3eIw6MZFvA6xzeLmBHgn86a4Xhb8\ntpGazeGd947dVN1pbyiJgYwMyZrWcsIVPOz6NLi0VfozarfTDXEr3gMvYPIt\nvPuQnk9G3uq1iWSbxLwP7x+zxdWkzDvN2q2pI8yaKV7a+ZL6qV9iDzCt8go1\nS1T6SbVc+npaKZi7glMZ4Z2v2HgIPPeIJrFO3BuNDUhvcOrRD5mfMuYwsmAk\ntDn9\r\n=Fwj7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCYFwG82KGnvqyQVN6av3oZOF52mriTYkBWLbK37Vgr0QIgelSEYpR0Eikz3K3dSo2dhZdGCjXJdLa0+yhurtCrnp4="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.160_1571831199637_0.33726472587761913"},"_hasShrinkwrap":false},"0.5.15-alpha.161":{"name":"@react-ssr/express","version":"0.5.15-alpha.161","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser":"^4.3.9","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"e9ab21041cf850e7ef06a728ebc2d057e4b1dd5a","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.161","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Aa8oB2c0lqbqIWgWSnWYTmjUr4pt5MRPEWCcsyXDhj4NBMdcwqwOBNa2nAl8q9LXNwaEoTI552UKWp1CsOXEhw==","shasum":"144bf12058abf492cf433126236fadaeb89324aa","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.161.tgz","fileCount":14,"unpackedSize":49197,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsD6pCRA9TVsSAnZWagAA+lwP/RPE+XQ5oefeBD8SsDif\nLDbTm4MNMaRfVzUgEY/wHN+7ZrLGf4JH5gj4NKpz526mft9ThM8TCDNHDta5\nbInUrMNqho6larSM4SsNolgIq7eFetj7HyWuEdtpSx1RPVHspZLdiACA2ioi\n92PwXXBkhJBurtfQ4knfPf5crRLiG7pYbMlXDqrZimnAvkQv/oLakty+2bYJ\nVr7b3q/T0ZqkB59SkT+uO4vX3n/vBKWnvRHg5xv2wy3wkM/XEyVay5lNkHwC\nRpusVyscYB1CWVEyJsZQIpBmyKGN6XxJ8QTDWVIsVYqF/ySvosLjClGVSgOS\nZKri9T6YJ1EHANLCRgAg774wfMUmyZ0kzBw6lfNO/rJ03hXZ1LLTeBNSl2Vk\nalJbXaosa2qF2xbtXXeS94bRvkLEOyFdiJV2M/D6HN4/wk/9fZgpfmGPNE25\nkOZ/tsaRnyYjeYOpaDpKVkgvoYMYriG08PmXyhz0+cNGQWm1SRhexqU8wN/w\nIS+7yCmCEyUJ3NFq81L1sKvg7OpBdvs9IH9IY92di9UXfm2Lx5ksw/TVvK6l\nZ2NpWFlZEzq/10b3D+y47E8cgeFIQdgnTnpfOS1TGTK+6VFOlvh62SipuMNk\n7muQ7XFa6Bwk5JlDDSjCNSP3LZhEx0eLpR6jRldmNV2zvNA5DAnXWgaF+/49\njS+7\r\n=UkFg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCdHzxnSItMP2WxXjkBMdrP8VWnBkdjr2bRn+snA8t4hwIgedNcc3xTOuwGshcIv57Jgs6YaxDvoies6rKNaI2aJSE="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.161_1571831465410_0.394909105637264"},"_hasShrinkwrap":false},"0.5.15-alpha.162":{"name":"@react-ssr/express","version":"0.5.15-alpha.162","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser":"^4.3.9","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"a6f514d52aaed23b314628c40b758f14e993e91d","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.162","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-49prATJfIONtOb1TKRSEf651eD1AVz1H3S7w1mT0SvxVw8nBPb1/nxBDS0jgQ8hPzBb1K37ogM69XBnjMS8DmQ==","shasum":"b51d60a3a939198c85e39389081b2245d8da0528","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.162.tgz","fileCount":14,"unpackedSize":49203,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsEAeCRA9TVsSAnZWagAAEF8QAJ5IqienGVBv1AdUVFfW\nzuMefNMXNNiOB2wjuZeVMEs9REWxZ3HvYkJqC+R7ZO9uvvVA3VA5YWnrMwgO\n1rS75Wm75d7rO3pBIU4zcjAdCHHlx2wnCkWoYfV4sWWJcxdDSTPHxT9ghzf3\nxs8ifsYPgNFYfF/6IqBOdrA7oYFGJ2K2kO4IB0PNRmqDf9rrNGLKGPaUEyWp\nXA1RRKE0+xt6PYkUFbA8mFU8D67PzUzvzEGDTCiI6WZBzOQcDEkiY16lmuo1\n03vEfnP9HWlSoXRVb7DkT59mO9nMmWp/Q6NAzYaT238zwNyWzdcHAJ6CGA3Z\n99g1tKwpThNFz+haxZ987Fn3/Aac4lRh3pD6Iiw4kfT86a3qV0CykUaC73pu\n1JkidYxgCsBOOHfQwwvFk+Co89TrN70BUoYr6NgJoQsK2fxaReON7LAygTd2\nXgX3rtZaIQHswXUEsHVMPMfJclh92WNlM3Z0kczc/ZoosoTIHEYKIE7F7viB\nAeD699ecwVIaUPNn3RxPKrnEIPtxuXOQuVV2b9BsvSVLynn+EwNfaSNeDiOt\nNzlx7C6/knGzqvwO81CTF7BU6n9VNlLY5/8G6bNwo0rlAm6KK7QqT7FAyRzG\nQ0ODuOLUq4qLB0fMP9VFkasa7077QMemISEevea9uy1PPpPwmYBU2cMHJMGs\nulzd\r\n=ncNR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCX/cFAHZMvBYR3oG0OYa8BfeCfA7sL/1IKgRGdPRfF5AIgee8+QKdd4Qvdvd38oKjAE47nqIYoItUrbOcl/7v+aEw="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.162_1571831837769_0.48188597290692714"},"_hasShrinkwrap":false},"0.5.15-alpha.163":{"name":"@react-ssr/express","version":"0.5.15-alpha.163","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser":"^4.3.9","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"2509b2aca0c65f4f0d9390884db96b564919dd54","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.163","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-+lwpAeSyyg8eaXS5//rlY065JYuY9kYJk2tZZjers+KTVy4J4V7heX+E3AJ7b+LhfoOU7JgYalG10jUlJfeh4A==","shasum":"7f1e17cfc29b46e9ba1a8a96712f9515987e33c9","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.163.tgz","fileCount":14,"unpackedSize":48779,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsEa1CRA9TVsSAnZWagAAY4wP/2gQyjVRhxvL1b1t1M47\niNZcLz9Xy1HfCTTGT8jsllNfcjXZje+nGT01+Pkd9Eamb/JYT3pC0gF512kn\nMTn9edJPJ0fJ87Q/5Mxg6pidqeHXid9aMNsItwJdXl+vCquFzfD5duRZ8a3c\nsGMTMQwgQ312cXSwCCg/uB6IUU5nW5RCWZMus62bfQ8lcqnQEe+bvYj9UvMB\nAfvX/mcST0DMAdeUY+mSTumhiV2IBtOQHgHiYeEUA2B2iCIE3zveDRVKYJDN\nlQt8BA1j5hYnMtyZqtEj0RvxiGvPoHcSC8WX5xR7nTWvnmTKmo8FrYgZK91j\n8W+LmBp69r34kIwAL5FD2KY9wNOFtKUHYv4B398gU7+lh4gGR2r5xsi9EARM\nDHt3H3o9nieJ1Zn/KDsH+3y5LwxMFG5t2Vf1RJBvGEv2WDKoytt6OXPAJ/7Y\n9ruNFM9zUNeBADqnxVWKFsbAli47+GhOenecq+iSYle1BG7rzoMYm/e+IhPe\nCGFsLnB6UKK8tBRwQp1YfVvCisRbYI7/ox/ad4MP7nttD8uj/cwQ9yWxIQY4\nB/ttywM0F9RWrrp6I4eLtvjBRuTMvfguivENSyUv+fD9D4jzVEWDOTQI66xd\nv/u/KHjyZwCCvFqAw0YI7DB/7fEKgYgbMD6BJPzX69BnX3IJKpuqG1oDsX4T\nmBsu\r\n=1tGi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGxB0lDJ8I5FGrOxNQ9W0jHIUHGAtI4AolEiNqORCZenAiBW12gy8xY2oKVCvJw2A1bGp6vfjN5hhhoABowsvA4DbQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.163_1571833524631_0.843593094881304"},"_hasShrinkwrap":false},"0.5.15-alpha.164":{"name":"@react-ssr/express","version":"0.5.15-alpha.164","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser":"^4.3.9","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"1f57df11796b270cf226459024977e87e966adf5","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.164","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-7N6YKADS9IVWLK1W9sXLcOnqM82M2CFgQYIx+RQFNDxQy1IftfvJAUpqoNNVS7O6Id77C2iBA9bor8S/6PpnZQ==","shasum":"c067620eb2d34bb4de1f167b2b6ab05233b60432","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.164.tgz","fileCount":14,"unpackedSize":48611,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsEeZCRA9TVsSAnZWagAA8xEP+wfi8c9oiBoVp2xlHYMH\n/PRMga8L98t4L2nkInvVATKSkHWzqCwgzHv3FD0y9sQBZZ/E1BXnbMQ0Pp6L\nWDpkrPwOQaAsoVYjZ2d8YuSr4zMY0PxlhMFaUW+vf+OH2LuYhtGk1zcCf2gW\nWQMo65EVC0bWTUascicWjAgdb2Ol1hFlhlgawqvbvZu4B5UF1OJ4bij1rVdZ\nErxeJD7urs//vYKMa/fpF2/HuwJbhpHMlvsWDhPryBPnBVt8AMwQCqkS9zbh\n2Njo5U2TzdROzXJMP3mCM+/RC+W0Yw1z+Xg+BEgtTq5rjAG3A/qQHOAMWV/x\ncAAZ4h8BHX4QsOgdmLjZXEEvq7bI5FSqlkHqsE56PRQB2DGsHDBr3a5VMORc\nXnXSTgZEPWl3oRjfSE9KBF78ntzpplWKo6rXQAAvdTUO82B1+QmGMCz8qD5F\nFfbq5SwRoaJUXgw5cUNfafoO1CtCVYixQUh+CHVXc5JEpfJ97+uMBAH/agFq\nKmN3FsmdlD/+MYOwZfi8ko3Y19gdmA/YeMkLxEtUdsen09RUK7Pb8fyA8gwb\n2LXMgZlBv6VPh2fvE4tJ3vyW50J+40e5nXlTcxQAmrw0ga6lok1XyaLGaBKE\nlPHcUswgKqOEQzgTTDMb7PWCT/GL5Y63YvZ2M0x5mskyRwzFk3Lq1kGDIr9E\nImRi\r\n=CVje\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCyaG+A8kTKZHOMshvn2KEuY+ODYhqhhJ+5NrUT2Ub/9QIhAL34ynwho4NSqNU+8rSGTIXGZtg7J+KFqiqq33XittCO"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.164_1571833752969_0.49433609356396935"},"_hasShrinkwrap":false},"0.5.15-alpha.165":{"name":"@react-ssr/express","version":"0.5.15-alpha.165","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser":"^4.3.9","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"9a4c8da415902ee80d46a80eb528bc7772472b20","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.165","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-1ID/ulA8rmWfcsgMmFOnK66LujCrLO6mAWhx86e9I69VbRik65A7EWZFIHVCis8t41XuuQbzfLMv4FNB/Kp2gg==","shasum":"40f9958199030cd0d50fceaa651ced4bde828464","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.165.tgz","fileCount":14,"unpackedSize":48747,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsElGCRA9TVsSAnZWagAAs/sP/2urv6hjmkYuv9ivoGNP\nDhLUwXPn3n0eLu+PEWPGA1UI+WkTNIxxrEl6euDSJXQRK4sqT9Y8sRNfJ1Tx\nulJHmEzdCV6NK/etoBo0RbdTpLOLv0E6O44jHe0tfkL3ey6FhMn4mGoFy7fh\nIOmIKc4zdQLZq+uW449rslLsfhEr4mK0kDAHOwsbp7RMTvWPeWx93QTsFp0m\nxte0FKxbSDLzZ1NnikqHg85RBoj3m36unHGlKwYmZFKJz6dmzkGk1wwNynbK\nPc5gvE24Z80wUmjGJu1XAEDyUqD2T+GwInRsn/CypEcT8pZlEtnhlANu8kZj\nzsrY2YIlTqI0crGl7Prm9Z7ekOyI4KWgTSi5PBRipIR5Jeq8VOSOEIQPQ9sU\ngV3omF+2GErx4A/mxC4MCZ1nKNIR90mdTBey+j9ivFH5pu+rHEEjtcKse6c9\nGF7tHWy1CJVppOxLPV5srfs4FFRsaAMaBy6LCNoHjANVa3kOcig4n7FkLsEu\nx8n7H0ZIOSe1KJg0n8EwKaf7lZYYVO7hqa5nPNvc3jHZiOjSK3LjBhC24oil\n3IOTUtQDdaJ/gIKDRsohW+vSA3YiO6HTCnWAqeKAV53A8Mt/dNkKkJ5fRV6x\nPUqPo0F+weB4e3oFKRGRvLZ3AEVaShU8CgwmGOqHdKiRG8BCS6N+IAdUKV3n\nxr9Z\r\n=Eh95\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCNpx11MmWrxtUFfcCXvBn6aAi5SIl6Tbmrmm1iyXpG3wIhAOeN2eNijv/AB+Q9aScxM5ufqzGiZBTAG1Pn4p7cHY2v"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.165_1571834182383_0.4784059400137177"},"_hasShrinkwrap":false},"0.5.15-alpha.166":{"name":"@react-ssr/express","version":"0.5.15-alpha.166","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser":"^4.3.9","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"f574f9b834d3c6572d955c7eb360f194e1f16fb4","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.166","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-eo4YCTg/VSNemYQbL3GgWjHxwRX66pMram0fudC3eOoxr8N8vUCN7U9ASPW2mO99WQZoQNF76K0hLop8VMRttQ==","shasum":"ced3d8541004e53338a2117e2bdf696d746929af","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.166.tgz","fileCount":14,"unpackedSize":48817,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsEqOCRA9TVsSAnZWagAAFQsP/Rbv/dFwgwAWuoyJlSVy\nhZwes7JuopB+zTCGaKI09RIwBuq705vvgqOv8LjVm8kvaSigccG2iD230lMD\nCPjY7yOQedrkPDDx/+UMeWqHkoi6yQeCD1a2XAgbQtgsCNMlE8VSuXIfNtnB\nEGPka0NCyXr6vMAnwiRxcUNmWUPMlhY8biU7er4pAiTbKAxab8n2auWbM+lN\nGX/uFVPxyO7xdp1+8wII/x2GUGqZP6I8ro+pR27AXq+dqYpQXSGU+RrMYt7f\n0sytF8USW4iMaAj+KX9pKDRuzlob0nRNOJRjeJUfGEoCuv3RxxD2taFsjpKT\nuotBCAQgaKWaZQsuVn5sCji34mGZ/hGHtX5PR3/VDbXfUmgL+rS1sviiJRIs\nCveseG1QHddh2jBeq7Y8rvf4f5T1wHr4IwavvMAWt44hgCZV14ROLc6hgQG4\nXu1Vl2kI+bs295vEZwQ1kRMEAeHjP8efqaG013yD+WwwGONMpj7TCB2Z8IOB\nQVJ5oprtzePFlG9qiYFW1onSDpmkIHHGZdEa9lZkhoU0/UfKkRlJ60rWXqlh\nTx1NeVIXLdg/c19iNI5BwIk1l4p7JUHdzzVtXz745F+/i3OklN2R9sL4uxSl\nzgPERmQH52WHEIZPAyC9XVNjnWyt1LMDVEYzH6D+RvaMesh5mZ0fqkDt7gFH\nE9SS\r\n=GItQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDvbpNZy3gbV1NC1psQhtJxgD2ZBDQfA4nYj/Db2akBgAiEA6HiHoCC7GWIC97ZR6YMe8IDQ+oKm5LIh/KIyqfRZxVE="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.166_1571834510145_0.014727246416885942"},"_hasShrinkwrap":false},"0.5.15-alpha.167":{"name":"@react-ssr/express","version":"0.5.15-alpha.167","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser":"^4.3.9","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"c665c7149339c2bea0eb53c18a310a729aca5f38","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.167","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-4vZAJ3rD6QS0dEYYHHM49Ix+fpS7TBxI9ocoVFF4dn1P4dGr7K/6ZIHjP5yNr8cjiKDUcEMjo9kefLlASy6tsA==","shasum":"8b6d2898531d2640027707ef1707aea78bc5e56a","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.167.tgz","fileCount":14,"unpackedSize":49053,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsE4zCRA9TVsSAnZWagAAJ/QP/iwCMR4bQF20iNW7RoOQ\nIh8RE/At71X12t4TuBmB3W5LSUT7rlfuhnW+fQFNCzMABRZpmOWg6blFfRBN\nhgBaW1zeBU/RlQdFs19qsPe20wMzUcYIFKYLImYYBcbfhL0T0pBp78n6/DyQ\n2WYzOkT+qyVPnjH2TL2FzLuote1MpQH+dZZSQlEFAv+s073sQ/P6BVpFT8g5\n7yVOd8EETbgo1QHauWQ9ctoYgQP99yndeFs2gqaK0gxo4XDpneh63QFYVD7d\n+bMWoP802QgHl0oQ+kc4BNbYuCaglXDWOtiPtLkWh1bK8XQkkiJEDXmk888U\nxIc4n6JyFFxxp3Kt7uOGuccGZ5lYXRezDuWCdWsMjFoQZo7ZbQyl2/LZha94\nJygob9NHnVTRY7jN33qsq/UAZ9D+Ypjj1rYRI6io2Cwnmhw0IsxhVtXrd8OJ\nKtpdPmxRqyjSXD+Ayr+h4UxO6/6ARz/lRYJxLrMOrLCWT9V5kRHy/NL33dsD\n0+BLudypjlWNbZYfNxS0cD6INQoveGIWmWVOsgcmkQY3Ps16EaMvdxJb/pBo\nBEXTQbHeXDHZrGVeZ/jjUGbWU3M8FvUTw4RWpG1nDdBMzmfKAtjFlURwUkIe\nQFcJDAC19UjdfJb/MzIvXEOdqovmimabDroIFqyM4wp3lKqeIfZSn7jQf6jR\nhoM5\r\n=goHK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCqtigIuJFgyKKOm61ayBc/rWexPqkW5jxklqnbtEm5wAIhAKcbS0LPK1LI5P4iXv0ZDdmSF9OvR2+6i2iYi5qyaNtd"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.167_1571835442206_0.15082362851687425"},"_hasShrinkwrap":false},"0.5.15-alpha.168":{"name":"@react-ssr/express","version":"0.5.15-alpha.168","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser":"^4.3.9","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"c6e7047964bfccada85ba7013395ba0775fd02cf","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.168","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-QSrdXtjeoZmcqXtEPWnoES2jGJzVKoBoTHXbEC0tSJPC4f+xRklHKCAT2aT9aI38PaCWlSXDxm9c+2IGes+lXA==","shasum":"f5559aa21292cdf602c5b88de0dfbf2a8c3963b9","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.168.tgz","fileCount":14,"unpackedSize":49089,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsE8KCRA9TVsSAnZWagAAUbgP/jHufFaAHMiuBGjuBK3I\nqO8z1oIIs2SjgmH5GFbqdM1Nl3lIgAUUCvolcI12XCUCGVK/uAsBejGrjoPn\nqJ8MRD9GgqTtLCOSEXP9C2/hWouLDycTi4dFTpjTrfGPyIPcU7vEmG2mOzsK\nMsDRgqzV/T49/1Qfy/SNr5sjGFFSK7zFtjXSLKJJeELiTUA8I6G6AwyoqG8J\nv8INNH2jN6j9cEZeQO8Z0wPTHCYp8KTWevHrQehKZGZIZXEUm+C0D/AwAeW9\nlxzloUG0Rvihx1vjqbCW2OCBYeKWr08LRDbZVM3LG3NUhWrgHoBHjWchR+iv\nGGJUFKn8LXsJW7tW8eZ/bTKGnsuQtQdD0LuSNw077ZGWefPw3IfbFZ+hx6AU\nLoP5DJmE2pjFXu1r7yMsrfDgGcFdpEgW+J3JoUqasg5j+Zjkgnq1uG1TK3Yl\ne3+ptHgdS7zIL7eso7McPJQ46bx5tXJ3a6vtA37MW7Dm+reHgPTxlMu8uS4U\nBh0921DXY1/Xy1m0HiOYBkZhuVydg36ZgC8sptRi8cRb79XCZfhGoSV4fldS\nW8TuWRWDRW1ksHyvEiVlJkIq6lXYI7MfYXx+7I8V7cvyUudKGZOoq5oT55Sd\nOPIq07t3JqtZYBx1LJEkxQCKEihxTiXcZqOTjAkgZ5tyjULFiuzVmC92cC5z\nVmgj\r\n=Oz6c\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDbHouXS+CKo86TTolVHVnqIOM4EJMYhMqG5cPcz4K7iwIhAMLRsN9ih7U03S4Ms/MPAL5OqX6/T6fseze91Dexc99w"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.168_1571835658367_0.4470163833416627"},"_hasShrinkwrap":false},"0.5.15-alpha.169":{"name":"@react-ssr/express","version":"0.5.15-alpha.169","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser":"^4.3.9","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"8f3da24112d702ba3bc2e61dae338ce775e6b19d","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.169","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-LdXv210H0lFO6Ls+JholmNukn/4aZFierI//+mJyMUCtC1X8KrnE3RY1WFt3yKehoapN8K77JlMOnaeDnXsZzA==","shasum":"77254278c7e0466674afba69ae5e61f93d6ec6a6","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.169.tgz","fileCount":14,"unpackedSize":49089,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsFBTCRA9TVsSAnZWagAAj6EP/RMru/XUZJxT8dUEgnz1\nYm9R8253u+YjB6tNPpHuXsq7yDDUOm2wGGQ+DwKXkscpH6Z88IRVRBHZrtui\nKUCnMzCUKfGgj3zuesSde72iS4CZ4hQ/2MDIawbb0+yht0+HQj4p/5b8TBZq\njN1WWqQ4A/NNSTcIMKUjiPNyS1MA/ApUHvM3Bd2vJPdqJxWu4OSJz5xDpLp/\n1JC6Z51CgVwWlc7yipUWpC6uEEq28xJdLEFgViXCUoi07JdQmRjHiC6yPqyM\nAPe11qLecLpWa9JG5IfCZtrZgJGH729B9ldc4N3G4UJIR/jFi7pzrQEnmtQB\n5f1U1Il+V6i4AHFjUmf1lSy8qdH0GrlAytq2k04smto8rdGsP4hvrTHfJ89T\n7a9NmqzecV+SEuFLfg41Iq1dQy5qMsbL/Rtbivyo6lit3aqKEF79+iHSOtG9\nWTYf1eed7XpTmuV0jGK44u0f+TG9svo8+qX7FW7Nc2hj+yz4FdsNb+TOYOjc\nvrBGdZZKVErjiYia7zujzghU1Rd8NYTG84mTqbVXspY3AuY94V8wBCEzKXxC\nr/O66swZno3/8pEyuvuvxvi5Ue0P5JPuWg+J0kTfAxUcK3Tg7RBma7WaJoQY\ne5VZzwaLjrJRxCiUnkb85is5s5rxbGPWqHrqwOeCpEGKOaOxvfLww7eYQNLg\nPXF5\r\n=kb9/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDC/n5LsnDn0eIrX8uloa/aU16IrtlAYcUZUyjwUjxNKAIgKNcf2XTsWDSkxm/empsEeFhcjWV54G8qGT9+7BT36HM="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.169_1571835986844_0.7081705034288841"},"_hasShrinkwrap":false},"0.5.15-alpha.170":{"name":"@react-ssr/express","version":"0.5.15-alpha.170","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser":"^4.3.9","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"310a9f05bedc33a966a053577d3c417d0df0a78c","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.170","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-VvWnWJUw5g2EqtmYrhcpiFAwEg5yZHiIGjsQ8+SIAp3GzO6iASqpRNKMbMM6gkdk/jq4gP8m8lnC0CzrIPcKtQ==","shasum":"906b712a5629fc05fe93e2b1468a48d4ea714e79","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.170.tgz","fileCount":14,"unpackedSize":50115,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsFdrCRA9TVsSAnZWagAAxkIP/R56cO4ScNp6mI+3Mrka\nKg2JhWIHJEvGj2+MNcVBaVVMZHrnzdIv5FxiPBNz3XQlW/sfEqniGyyinJ27\nMPn8wHlNBXgHXYWypaoLJqouDYuYQj9QBPtY8sSFDz31J1MKWRchFLv/nHQR\n0i4FGWjYeS1/jOXdkKhCMp1mWdfadAmb3c5++i0f/y0crynP2+s/oDfWpoqa\nst6c5mjgXl+7wAwwMEyo3ePz6CFI7a8mWSczjbzZ2Gq4Y6Jocwmfz7um0WhX\nrXkN7ZKPvCrOSky9o51DoH07F7Emx7fn5g/L2Aw3PIMkHVfnjtxNWPXL6a37\nOb3EMXwK2VdtOAcrLwDEvWC822YRmkdZAStrHnOT4eVtcoDYCeai9mdZGCRd\numkbq5WX0KwJ9RrBOhzu6JiWjVF4i6vI2IXrxTaJBjn7tIPnXBHvGux0zRs+\nQudoA0TvYRKhV3Zt6KVFFs9YiVXMRGvQp4F8J8cQjhb4UB/nN7wlVvvRB7bM\nvJRfBM1N+DTcftZRkDzRQEfR5Sl286sE9IVuRgj5NYJtreVSpCdhNqK3sRQ9\n6gRRGNEYHj/M4BIYSDBQ8hX2v8REnHThtJ+LCeJxnpsaTQcuL8rXQuf3ecq1\ndpJbVj1XOD/QKq7I0xwSZ+MqVDOm+Yjc2OfYa8DPfYiOMH9cx8lsTHC++lEm\nf3My\r\n=58w0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDHfLvBbTm4JhQNK7qpbCfAAZ4VynxZKa9++PBIdbxTZgIhAOqxctWhfRbMHSEj2mukJc9fX1g/tcrMa+KhXiSpIM+B"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.170_1571837802560_0.21113009879197375"},"_hasShrinkwrap":false},"0.5.15-alpha.171":{"name":"@react-ssr/express","version":"0.5.15-alpha.171","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser":"^4.3.9","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"519eb2f2862d058b128edcec868979bcc5bc41dc","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.171","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-p5Lnf5mMfuR/gP61081Moyt+ydsxw3snOb/1B9++U45NPLS4qfquJhDiExB02dB8rqn08/bBUiKk5Q6eKVlw+w==","shasum":"f47e5db20a20814f2e41b960223c2da594e478d1","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.171.tgz","fileCount":14,"unpackedSize":50119,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsFhICRA9TVsSAnZWagAA1msQAI5OBhg3mdUnnmPHjVu0\nOGlByqeuwfg1UOX7w/sgR9ITX7HCvQCIOyQv42EsjsxONrQn6P5mC8H515WC\nMp165/n/agAvjKjVFt9Hu4kOE5ceNRR16HgxHnQjVmkDV+a6Ie6YaiPERobx\nFSpWwvL5ZDlsbgsYVHXvDskpylDgTf1rtc/v/6R01wbxfSj00afeG0m1QsUE\n3e9Xt5c4ty8aLTvtqI8e6bjV2Cm9x32ZQmmIZLLCr7/mqeJPT4eH6ZACs6mp\nkMbV1cg+4W39TNg9JczXx+zPuK4jlR0u5XBM7n8GgYUrLxT9VbWisC3t8C/T\ngRjD+Lh0A0EeiER/rlHvzAx+kzXFF1PTd1zm/JVfx8HfEpFibwdNwiZ8qGKS\n6U1huQ86ZVQjlDp0Maiu3W67jVqFqbfvULtMDNQatxyHPbY9/TZLOuP8sEQM\nPVugOs6ytL5NFEdjWG9W0Cd3gDVFfrAfxRXRMlohqxDAh9eioHzYJpxlMpzt\nL8Ey6i32ogkuXMdDSbuiAp+xWmDgh4JNV+hsiebc8c9BtlIJEmUCcIfyELKj\nIEJk/7tHJauKNBU1Me20SovtxwdS/zn5RejiSYhoU5ReEwa+zvHhnkeR4Fsz\n7j6JqMG71qOzvenuYaAXLf6Meerh0jV0AIDrHYvf+CFfJTpZTUe6YdKj4m9o\n7V/K\r\n=9fAa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC5TSqnv1PZz86itrDFrGG+gdCv0e1srzOSZrbMNWT1NgIhANqSB2VdG8OCqWwz2dSGJAqcA3P3Ee4polXLvRnxHvQ5"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.171_1571838024009_0.4888479821438938"},"_hasShrinkwrap":false},"0.5.15-alpha.172":{"name":"@react-ssr/express","version":"0.5.15-alpha.172","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser":"^4.3.9","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"16e96e352d00eb85eb2e073baa0591cfa7b8cc26","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.172","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-goxEVE7GAadEc4ptu4dWwK9UgvEpLA6hy6b9PuavRI04AsbkgfYf+lROhckc4DalKwA4plPMUWFKOyfbwlbvGw==","shasum":"9a5345ff1650a2f5b0d467ba2ca35cb1e39ac0af","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.172.tgz","fileCount":14,"unpackedSize":50335,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsFprCRA9TVsSAnZWagAACVMP/jBS9+BAPTsrO8v7qoJZ\nPTcOb2Smge3J/hQxJBY+GgbOVDSDZl3KauzxmIZE9YdomxmDeQfR5kho9qAk\n0bZgrdXTOjWi1Di1Wr7nMT+fY+V36fy5DhWmM/F8bfBuo62zu4l7U9kuIyJD\nJ5aonFZRI/BQv1GY8dQDx4itpfVjsaudXPiYBLDPAETvrabg5ZBA142QuHRr\nPrnkWZPl1BACe0ch6IRimVq4p8qo85bB4o14ECN3AU4oirDQ/hA7EV5A6Ncz\n7DDAiDuSwDgkKUtL0kmnIrvOkJXquABKtwxLnaOCPt1znhhKWJMtrac1go1o\nxSqEKSGsMKMPkCx6I3dDxag1Bm4Ito0V9IR86Hlu7DRG+BdkBT7Oa2NtGmGt\nmW2iaS0111Y9ES2bWs6B/e7ySRFKtXhzhdReSWWj1WY5aLMrot4O9mFvaYZ+\nUyTrn6Xs0XCuDGRCRssQhQJhr3REaLfVMsKFjF5yKXBkUl9V6qHaj2pa4w0i\n6GpbAwU6mEF80DnP+JDttbEuW/SeCWTBgCxIXj4sspfsK5+oN1ojHyt6xSNL\n3m94YEJYfhjYomNt3cQVKeV7z7AeqdtZ5tAq7aNBkTx+HEzTY+6SswxNn3oz\nl342TcZijga5p7b7XBg58/iFSU+ffc2gIXOsN3E3vvtI7EsmPdUirXRurfHy\nFr6T\r\n=0H+U\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCWXK3mus/Z5GxYNdp3sp7tzFWQv1upADL/kGBwgyW35gIgKHRjOJwaDTYYfWmpxzvsTOWSPDCyyM3JfwHF8nY60tA="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.172_1571838570550_0.9804974667929698"},"_hasShrinkwrap":false},"0.5.15-alpha.173":{"name":"@react-ssr/express","version":"0.5.15-alpha.173","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser":"^4.3.9","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"6d08b9e2e553b2bcd0576ce815f7c1fb3c1a2e97","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.173","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Qlr69JFHNNnegtT29Q+QvR1+xcL4StsSQe4cQdDPltM63sWVj6wz1fFAG7NAqP34twUmsiAGe5nHy5sxjpM+mw==","shasum":"498796df068e14072612c23288f704a1226c9ffe","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.173.tgz","fileCount":14,"unpackedSize":50335,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsF7ICRA9TVsSAnZWagAA9bgQAJdCb0fAeGxHwYcL34M5\n8wkBhZnzhorjYBG5XpreorK/ZC9I7g7tLZtknDhLylEiymcsZ29P5h+p0zPn\n0geYLva2EXszj3PozwLEL5PP0jDkg9km+6xphhCWXY3WvZp9ABtqIpkg7WBF\now8Whlba9tdwRAwJKkscmGoOhiHW4fN0pn5slO/f169gpnubeVnMejStqXrQ\nLmjBK+SXyjvWYAKfodRD/iV04NLWX76gjRH3qn2Jz2Zx9p/yqPQAMq53LYDS\n5aEFaxxY9BxnxIyI367FkMXC32LSW0mZ9OcWWwDzPSGhGM1H2lDf29Kvlz5r\nmO+kNplKnEsCux9uOKaB9cR5uF3mwYwhBjf/ENxWqySp91pr9+rC5TAgbqKc\nynO8De2qnujgBUAHopIQK5Q+Z8+6UDwe0EpgM2nCcTpV0iw41nrGp1PDYn6Q\n+hfMW7vEAQPbTVU502kR5FkNy65WusFAPs6A3vMaccB8Vaz3X7avPXiDMhlM\nuHhfIDVmFENFN9GpI0We6guZNf1uC533kbDkjttHZ7Ciwu0kSHoAiUi+WCoQ\n4xGx/uBp9uYdWXb4TwBFAUX/eJto35QnYG064eiLagH7yPeoqSOjWe+BwzNY\ncxXmWiHctMbEopR0236Sg7zC8VbFSttm47Tt8B670T7m0bUJBvrwrlbbZeEo\nSi5r\r\n=z88J\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC6k9r/XHes12L4nKKLxO9Q5RbLoyuSHyLUVBTc+ZH3RAiAJPciicYXmb1rnwEKtOulqYSvJaKqD1tUyXM36Eka/kA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.173_1571839687501_0.004982757437854035"},"_hasShrinkwrap":false},"0.5.15-alpha.174":{"name":"@react-ssr/express","version":"0.5.15-alpha.174","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser":"^4.3.9","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"667f9e88190f03060822607c90f41fdd88702e84","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.174","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-3A8LCkO29T/4PJnxyuiTVrNNQEer5LBFU15mQxW2Ka0I8EjmbUmPvmBQQDyAs1IQDykm9mPMostY5bjx2k6RWQ==","shasum":"5c75f1a275975bf88d2c568061b285c0fbe4629d","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.174.tgz","fileCount":14,"unpackedSize":50335,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsF8dCRA9TVsSAnZWagAA+bYP/ik4G/Qjo6QBgSGEziFo\n7mu8rpBlRUo6I41UcId/uXqYNT2gvicItnOhm+jM9s8mFXC1WVyMN37Z4iMa\ngg2zjOY9d4xlizwWbXVSXrmEhvL6Qv4iDpwiJkGj67RF8oJPB8pm2IzRBttb\nKSsiyrcjWkpLdMletVWaS+DFm5TNfCV+3vCaQqyRnEEc/vKKkScvqyEpEu6K\nEwDGlcwpY83Fx5zqi3UN3iYjMzZy1vlK2f5UPZ1va12GZVr8wSWc4DeUhU91\ncWqCmxulFCCz+Rl50pz9BLLJu8t5iHLDGx1Yi+oeX5L9nCzokvn/Ignnkumu\n54j16fvtyBrwjRujYygpWCJzFLZnC4AjzyUYBL9sF7huuucZxYO6zoI42HQD\n/+oa8Am6iEUHUhakthBiVRC0JoVKdDwH/qd4yd7Wp4JBqWM0S/Qq4kjlcC5Y\nn3XmRJmvdFbYrZjG9genmwbjNJxUMrNwa1FoGj9jbMJvRQM1wxoFUEA6bwx4\nqZEzBTSRudNTwTJ8LSlidwN1Jxw3sANekac3GeuG5N3wtzNp4D+7+fNMma7Y\n7YoTLrt4zpc0Kqpgr/VVDScwUu073/Si+I+RQbEy8BaiZH2tIDy0B2LakA9e\nsR3nP2rRplNdriyR6NynX/5SR4e83LL6mPQD898kNgHSG03eu+JS05T2ZVZ1\nRjAi\r\n=wNWq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD3PIlxyCT+y7LwyLx5pF+HW3HPnRzNN3NzhHS7IxP7VgIhANTm/dtubqQvnw2yw7CsJp34q5yBtOBL7dckez3R3Ykv"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.174_1571839773330_0.885799420438979"},"_hasShrinkwrap":false},"0.5.15-alpha.175":{"name":"@react-ssr/express","version":"0.5.15-alpha.175","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser":"^4.3.9","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"9912cf69467a50129cb105058509acdcf9e54fc6","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.175","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-3q7/JfGjTtNK3QVnjer0Y/nNC5Tl144jIvFLhJEo/ZKQaoVphz7gbMDYt+z9r8NLMjLwFt+VcklpcRe0n35dLQ==","shasum":"50df2d5f607577b6622a2be93ae079e5a77682c2","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.175.tgz","fileCount":14,"unpackedSize":50177,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsGAdCRA9TVsSAnZWagAAZJIQAIqVKtMXsmOAqfjIVjwI\nlSZj2fEgKT0Ri+AnU3B36oJtC2AmhTRhshXnx5VHfj86d869LrVbmYmugcs5\n2Sa0x5MOUiz2VXQPceAa8GVTefPu9StYrMZBeNPiHuqwtPIN5vtQDQUe/64C\nhu6Sc8CKxVEjq3Onnt+CCneSZVdmLqdfNt9lKFfGiZN/z9WGZnnIkhHhjCRw\n0mIVsp+Kr75m5+G9W1HY29lG4AVaqxq84kthRczibc3ziw9gUZFL3VdBAwbQ\nvebzox5L5uQGk5ySzOvqA/9U/Yj1EJRJmFY/+Crhan4/OacaY6KrNpjejGcO\nIL4s2qhevyEp6eDMx5iOI5i/YkOXs+Qxx456VnAktGOc9scneVmR6m9Xh/gr\nDmpHYuyl+YeLGBL0Zp+AQnofW9K+yoomdrRgUOqgMXq9UJZEdp5iNHO6ZS3L\n9Yoji30JxccBKCjzszqwhRTviuu4fHyTEg5/ac8X7CrTQvELtd59ZxVi0GQW\nsUu6cNiN4GgBATAcSXK3cZMmrWzvXs0zGfU1DIUnFpx5eYsl8XGK2TJVxB2I\nj/+ZK1jNcCdfCJygpjXf5cWgKgUhCW5oMPYOSN6xreFdJ4GvZFVZlx+eRJQl\neGU3+qu3syaPpliYaQ65dxOQvVHu25DpKW5zkvUpVvAVPPApgqjAHuAt84to\ndZXu\r\n=uF+4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCfiUhwnlAFx01Z9p0XMxM7OktORCCD/crbUdrFOeCRdAIhAM3a9BXDMIiNcWXmAf9Am02jyFt/DtMhBT+rrFbp3IRm"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.175_1571840029522_0.06035053038116378"},"_hasShrinkwrap":false},"0.5.15-alpha.176":{"name":"@react-ssr/express","version":"0.5.15-alpha.176","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser":"^4.3.9","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"c449c0e56fef15356a8a2e2cc95f01ab72076223","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.176","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-BZuSYG4/VJAYRBz20bPMR/SGt7TcPLBACWcSd7FGOblLzdykrLOvWzjjPBzyVsDIaeFU+bF748vm4xHN8Gz/wg==","shasum":"3a92761ac7f44ff0bf20214831043c147ceaedab","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.176.tgz","fileCount":14,"unpackedSize":50335,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsGEACRA9TVsSAnZWagAA/XgP/R51FDl31x5hLjzactPe\nfQdWYittd4v7zYPKxz++VEjjDb6dCDRMlHcOLWFR1pW0UnHpGCycI4mBLu12\nrslcCeVx0NyAdQsCE/3oaefKKz5V02FwNXhCumqa5zA2lGcE2ACUYZ0R8fBr\nNWVwUBHHRBSa3hIVW8M4C4uqiNm1TXwCzmvm3j/No+OgUPUYEw11BjiS6HUn\nkfLYyLAKQ+X9QU62f7Q4H7qr2rrrHIFVRUH2P0G8ammTlohokaYsIjJSrWdB\n8Dip/ZyK2jBhzvTsG/N6FTjmpj7R+QHDcZw8ki8+hqEC27TV/0LzYWvD0F5u\ncgoQ7+8ZneJ641/MrAK3gIvaOkTfGLH4ekx9xZyDgsjklLM1sYgGwJgCb08j\ncjHT3wcdrOz9Xthy2NeK0lwDdHW4bmpH3VikQGufRvuch5YSnSjtHtvNMjdK\nJntpzm/8iutllIP0ClPutG6S4PCW59YeHWz4ds4dlJTzcfxBovNFHtlq8qLN\nqfy/N+yCRyEGv6NKbuHlemrKCb8EKBdsp5o9LQ+isTAmniqtnf26uYao9xVk\nxaUMJjto3TrNN5Iv2ZFZPcLDyntt08J+JEpNqy6GqSombo5u4QqYToQCWEBA\nFtnPVQjy2HcpqypO8DwEtstlhlVyOpt1kmw/+JQAjJiaAWPP5zaPIzO4sWGy\nIzcj\r\n=6hfM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDR5v+vduvgpdUQNi4Mv/KPnMEaDEZABuDQlItr9u29uwIhAL9xuMV2F5IMxDwtCBbRVGFye474SFArUPpr9G6U8si2"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.176_1571840255784_0.6547426236216596"},"_hasShrinkwrap":false},"0.5.15-alpha.177":{"name":"@react-ssr/express","version":"0.5.15-alpha.177","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser":"^4.3.9","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"559ce6c7cc03f95847c8e76df8be4a7e714ec7e8","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.177","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-hHvBlhIBn+903MID+9Kcpgy3vgDLwTKGrONrNNzOGmcDDSTJFmOemv+S9n7lxrYeUYXL6qfO5Ku4Cl9jrAPHFQ==","shasum":"bf1f24ef2ddc2e05903b1b9deff10732444b053d","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.177.tgz","fileCount":14,"unpackedSize":45475,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsNmnCRA9TVsSAnZWagAACTIP/2vNg9o50ed1w6LnmKCf\nDD4wg79YbPi6UE1nhTLTVVtzTC/fX5hVTHNrDx4EUvKRbJPOiu7GwopF8Del\n+2JrEk7IHIg1A87+wh6vpwmElDGaAejv/Ijae7rshXkgpiLTm76ssulPxc1E\nL5fEAtZSQnLpRI3QRhMsX/LQnV+fHmLYvSkCHUYKc3ULxpDU34mW9rIw554C\nxt++sM0SGnJLJUC/kdlSdst6TzWFEk0OENcWjgeIzmH9crBtftb1siH1g2Yi\n8CHJ0dkoZEvWPKTQYvL0LdAH+EmzO5OPTGOgLwyuR2bL7oHNZPFPMzefVY6y\n3kY3HmgLF2B6X/Bim6MLApowTdS9UaSN1fQLsVO4ozHBqpcizusk2G6OUNLZ\njHIR/NOPtBmQjGQK/XcjO/sq7aervYA9H3FLbLau8q/jG3M3buQVbxux+mzb\nE+h08cNtyjxIGIzFxLm9xUttxy3gfQlby08d/DTN4AmskaS2j313t/bqKVZ+\nJ2u0HpMEpt5AS8YpHH8FV3dOq1kJIu0ud4otIra4y66OYKAs/ckBuUkdBfs8\nnJMq/KkBrJdgoIlR4Z4JlMpn8Wqclg8rMSdrp6W/vue/yA31xFSIfxfA/DBH\nAE2xRxezfAqlbZ0mPp+cSazgRWldn5PKhloQ24Tq4jkcZ0apbZ/VPqUl8I6H\nh3wZ\r\n=NyYE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDnmmV6jCRIMqH8YOpUf5nAXlgZ0AjjJMJm/h0kAWHdSgIgHCG+K7+aSY8jJ2usrPZJQRmfR/oYrCwHSTy/nDZoxbs="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.177_1571871142831_0.808793362405066"},"_hasShrinkwrap":false},"0.5.15-alpha.178":{"name":"@react-ssr/express","version":"0.5.15-alpha.178","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser":"^4.3.9","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"0efd2621da5e7d69f9d78eec92174aeb6e7741d9","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.178","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-YKNJZLTub1dV7aDdz6JR9k445MfcqFkd/9Dx4xXPkQLrG+IR0jQcD6nax38lQjUBBOevTM81dmpPs7zrW2LZ5Q==","shasum":"aa641089a7b15a0e6cb0a188d82cc8a7c5f02b30","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.178.tgz","fileCount":14,"unpackedSize":45551,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsNrBCRA9TVsSAnZWagAARekP/1kAYabnwrGzwUGQpnjv\ni6h8XfHXE81l6UYAkuYlCony9XvIho643fdGtExRv/jWBbEvg3bWZI9wLkdH\njH+YYCf/iHgVEKH4r060EwCEqRkw3Ov/3gaZma7UjawSN8FJhADOFHDMW8z4\nFj+LHazq+Sxrgf5HXCBnqVSiFxs2d2JKTQ2YyK/y+UTGtMr6Q3WV+z/ZJos5\nsRzJdWBgis/ZDeCBkXeKTSlAKXjfnoiJJuXbx9ofrh0Y5qslOWs74jcHtQDa\nG8m4Bex1dI/M0AytPe7vC9mOwph9FONmyQ/9X2zRssusWlz4bngMkoTRaONI\n4odEPDrNDRHO7FrIyfMsxFVyLcaEwTdhtBmtaB9Xk/iexWDtZmzYCT7XT4RB\nFmuUB6zAZba6uezkmdGG8+Hd/53yxX/b1Nuc6a2iGRYDxjhc0ou+BMoBqZzV\nv/B+sKCUw7ndR/+VLtkROVhk5RjUjtdrWmBylHkgZVzIh5K/4/SVdTS8E1Ko\n5WGijUM/W3wfPyAN/OI/YEqnPx3m6mU7vkvRMSUEctG3XDArBe5CJEtezpwH\nw/DDjB4jnpWsd+TJaKCHKyD7oSnQVSbKfI3kUm1zL8KfrHPN7ycgwuHILm//\nFHqPeZT7CZUmyv5aNVWyE+YoZQuQA718vc3I1TePf+dxYDK0o75Xmd4SgBYh\niVHo\r\n=sk/A\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGRg/GuRnzS6PLZ0Yc92F/NQBPw20brhM2Jf+4XonXn+AiAIwUwfvqlemIT+AcoKXg3+IifTNQag3MQ0kaJxkal0lg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.178_1571871425358_0.2727931596670643"},"_hasShrinkwrap":false},"0.5.15-alpha.179":{"name":"@react-ssr/express","version":"0.5.15-alpha.179","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"5fedcc77dc10ca1e133638390a903d11946b8ac9","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  cacheDir: '.cache',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` in the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion`\n- `emotion`\n- `emotion-server`\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@emotion/core\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@react-ssr/express\": \"latest\",\n    \"emotion\": \"latest\",\n    \"emotion-server\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-emotion\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies:\n\nA minimal `package.json` is like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  },\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"styled-components\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"babel-plugin-styled-components\": \"latest\"\n  }\n}\n```\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\nimport React from 'react';\n\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/express@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/express@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.5.15-alpha.179","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-cdKIEBF4myAVee8rw+JQb/s8C51UbH8Z/ehkmny42NqcDRlGXXBx7w57UY8UiCQqCWkbJad2BEvAxMOJY/WL9w==","shasum":"ea221f799938032ba7822ca24f635845572ce773","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15-alpha.179.tgz","fileCount":14,"unpackedSize":45331,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsNxeCRA9TVsSAnZWagAAdfwQAJsI0uOkMK8kyrBzf4Fu\nCRNaJ6hfc6r/lYjSHWW0oB+r50wz5P+2YKYeQrDbQIMK4xbjnc72iLxSqiYq\nyUpzay0EhzJRaySSM3ZuZjobfGbFzmnOwNz47xh4PcYZ/yvRsWzqHN9TTTJN\n+CNB1yNB3JlDwF/G9lSBtRIa5c/ilyP+vVainleqPTwwdBpKqnS0hBEhWBQO\n30/4r5j+RREw4Tp/0hic1NA0q8KbnGoIjZymX81QXbYcVetgZetXwlP/I+DA\naAdQ21NW+uUxlzNuVk782dI59hkNj+mYF87mZ4j7WG92iG/Y1ga9Y5iPHBI1\n5OX28YvRmVNeFiSPmFUee8ZR8SJaHpiBEkedzL+qPGaZv5ddM4YSYjQ9g8jt\nXE1h/JX/MpKpBotsTZn2eUpoi1hGeYkNhRXMAdkW8OQOMFV8WAQrCMqK2fzC\nvzPAnxMCLc9fD3JmkLE2ngulGdwu0XldJrCs+n6RBZBXKnCK2rlMQUsPeDdz\n7GZAgQLuJVD3YuMNpkALZuA5WCwA6ofvqThgjzLNHtuN9Dv9D7frW7yc8Drw\n3nCT123MKj+nfpcGHu7cm/jPnKUqMeWod2biq8cNc9giHqOukexS5nlYCuss\nIOktkeDG+U+Du5aLB7KmSWqnHgZFQWJfxTgU3IIq+zmYdQROcbHg/ZMflBnv\n0qgY\r\n=6tEP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDP4UaiCEpX0UcpHz0vO7WkiINpLhU6KVSZOx3jUOTDzQIgD6D9MK7SM3nOHzIh1fg3H+H1/npqQPnK0BLeIQzBLjo="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15-alpha.179_1571871838200_0.5626530878897948"},"_hasShrinkwrap":false},"0.5.15":{"name":"@react-ssr/express","version":"0.5.15","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/preset-typescript":"^7.6.0","@babel/register":"^7.6.2","@babel/runtime-corejs2":"^7.6.3","@types/express":"^4.17.1","babel-loader":"^8.0.6","babel-plugin-css-modules-transform":"^1.6.2","babel-plugin-react-require":"^3.1.1","cheerio":"^1.0.0-rc.3","chokidar":"^3.2.2","cross-spawn":"^7.0.1","express":"^4.17.1","fkill-cli":"^5.2.0","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","react-html-parser":"^2.0.2","recursive-readdir":"^2.2.2","reload":"^3.0.2","resolve-as-bin":"^2.1.0","terser-webpack-plugin":"^2.1.3","unionfs":"^4.2.0","webpack":"^4.41.2","webpack-merge":"^4.2.2"},"devDependencies":{"@types/cheerio":"^0.22.13","@types/fs-extra":"^8.0.0","@types/memory-fs":"^0.3.2","@types/node":"^12.7.12","@types/react":"^16.9.5","@types/react-dom":"^16.9.1","@types/react-html-parser":"^2.0.1","@types/recursive-readdir":"^2.2.0","@types/terser-webpack-plugin":"^1.2.1","@types/webpack":"^4.39.3","@types/webpack-merge":"^4.1.5","cross-env":"^6.0.3","react":"^16.10.2","react-dom":"^16.10.2","rimraf":"^3.0.0","rollup":"^1.25.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"peerDependencies":{"react":"^16","react-dom":"^16"},"gitHead":"ac05109408925e4a298250b67211a443f729b25c","_id":"@react-ssr/express@0.5.15","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-KAtE5EY35aMl/rhoeOWD3Wjk1/LaIn8jm73Yo2fRCaEUHCFJvB/K20GZiM+ne15G4VBM5dwWqF3tRpLdrah7fA==","shasum":"558d67dfb13d29d7ccfed7a5b5e87ae6bca8f082","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.5.15.tgz","fileCount":14,"unpackedSize":45313,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsNzZCRA9TVsSAnZWagAAgyIP/j23gK07oxXNyalzNX9p\n8Udf/jeDh+YBz8AAH+nH92IaVzcFybrHaraY2x6EJK7SlkbEqPV2ORZRiJND\ne7mr0aM456IIphGeLoic0c5wwfDg771d+/UtKJUkJ34JmbpFx06mX8/Dclpf\nQz3J3Hq+mnOTl09k9xLi0oQbO8MMUkLSldxZgT1QQcWZDWN8HTpY2WjwrBn4\nsCVvhcMJVUoHbeIhk1V0JP4y+0DANpi6R3OPh2bgcuZIJFIMLHAITCyyJh2u\nvL4DmAJXOS1RiqFEHb69NQntMTWT34VmOMLyUF8rhZxP/qUAeQxxxoMrV9vG\ncXrWU5vrm6qdq4h9CBxUVqh7LLnQNdhmiyikW4kzbEoulywNVKPxmGIlRIW6\nWVtRN9Q4TFELf5int1Xn5eg9OoaHDEXLmj8kzZqEbSZnbxcb16hTlyUePKjX\neF8RIVRMvY14/EI1WaxAUUlWMjuWNXajbZpHj4ZlXspHClDq9ezyZXscY+A0\nIhMfK/i0JkwiZk0j23EPfeeBN0neycGztbNn3QEl5KPDZaS+nmVRFcNiAjxu\nVefYFbhTKbn3loLVMvkOzURL7lGf4uRwnQjOcPIlUxYI7KKhTkpuH5h196aG\n4UG8qCZVKs6fQ6rzRLsEzczLRnjn5SYCecyKq0dxsV0Mrhkt4cKWYi3MV/1Z\nh2Lh\r\n=/1fs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDOOlOa1dn6/hKo3L219XX1xod1HEMpWxCcYtUjnIaq4AiBHqKmWvtf0SnDqViSaH+DGehz6yJZJFTPlxizGRKyDew=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.5.15_1571871960971_0.706443255490905"},"_hasShrinkwrap":false},"0.6.0":{"name":"@react-ssr/express","version":"0.6.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.6.0","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"9147bdec06aa388f2fc37026db7b562275132ff2","_id":"@react-ssr/express@0.6.0","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-HujEbh2kT/uHalrHJt3zqGKhPNIQAJdsA/BiTaKIvsKPh6QPzvXv7bzdf5H8EuhPJdVv8C1TXVdPWpOsb4o4Ig==","shasum":"5b3d6069340deb81a225499af51fa28d79e3e7bd","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.6.0.tgz","fileCount":8,"unpackedSize":18623,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsUT7CRA9TVsSAnZWagAAUKwP/2VG9R/5Mg31qV47YwZo\nVl31qP6ktxetoHy90C5P30FzecHa2/kGmg4fdmdm5a2iE7VqkdrwO8mFDgn1\ndr/h16LhyjDPMz9WOdHQIa3nIN/Vcdhryu/tguCyDdneTwg/fWX6PnHS3i8F\nX4T/fzZfAmfsOmIKzrbBQJyvqwV2hb3jLGMpd0eAUXK9PUfrrTouus3wROp3\nWU98AKE8NtuRTqGKOoKCOY1QT++SVpJAQPfj0yuLXzXrECwY+aTfsZ06fojN\n+DZJ9StYn2+wb67onMCc7AivTxbyq1hdj71NZ+A1EKsVpC7LS13lisL+FCbl\nnxGIsjp2kz9bNHdeqkbpXIQ9qoRXp3ME1G9APsDLl1Sv8BxpBfyvTa6odrrs\nORbKNPGSjdbZQLWQ842omj5i/yQJ/RHWAOlEvcYxIAchdB98UfSCrNV1TEv4\nXD3A27NE2X09rs2nDsuPevkn9TVIQD5eMVAEjiZTr8U/g5xq8AnD7ULYoZws\nBltF/B00AgSTg75m2HGs1LCJd+MKTnU0DGhI7kPZY380hrEwxNhotJeCK3uj\n400lrGzp5jar/JAfp6b3RiK/LlA7Q/iPsS6TrbErjd8USNCRvmlGr8bkBieY\n5+p/a4vAhNTdaaov1tYhD2e6BX+2ZlaLJF1VCDO14LhA5PdOHTSLT9JAwr9v\nZ2z5\r\n=979W\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC3wsH2CsuGPE+rIlWFIKaeDYsN7n+ZIXXQOmc1JjTVcgIgM39viWFmrGS98staRmXSyNnsodizW1UQmq2W2Snwtz4="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.6.0_1571898618586_0.5642946528432546"},"_hasShrinkwrap":false},"0.6.1":{"name":"@react-ssr/express","version":"0.6.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.6.1","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"c9da0ec0d9e3e63e41d1d5edcf7b39fb8d9ce1bb","_id":"@react-ssr/express@0.6.1","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-+7ak+BTzX8A8Qg1ja2+xVmfQSFAU5cX+FovwW8mGTkTd7f8ITOdNnjjQYayI/8NY0xjdAdAMz0o0QG7XrT6lQQ==","shasum":"f7016681cf8ba71e55a75d6a3520850d2da841f9","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.6.1.tgz","fileCount":8,"unpackedSize":18623,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsUdKCRA9TVsSAnZWagAAP1QP+gKR91shHWl3vpV2nDBo\nmzz89Jwf1KcEIa3HBWf0IyRFrQq7kZHlG4ynDQUbQx85Q6wKkLjfqi158gpG\nwAUGCHeDhV2HhgBHpggCseClD8UVwxwguWyncajtTblJEI9Zcj8D/JflnquW\nh8bsiP0sVXXDZvAhD3mF124X2XEA5V5kFHJoZsMbj+IJMruz4oJD+M+JMkZw\nAkO0bqE93PRk0z4FjkJBjPHqcLBuI8aweOCnrUv9liZHHc5rGEi7WBhZJkG4\nw88xxUbfag8CdSyYlv+p/7fKqcf8dyY1u6phXLcPvkyNocWVJDgja7rUl6l5\nAyUBIpbO/6B2SEFSvS/6Y+WZDYmJQ9QVFBiV9hwvbDUKtbLdRe5GhfqiTDAW\nFipvt4qW64cQNiBnEZsMJRXZZqwM77c5ZAP/Wb/3Rtyfov+YEaBMgABGthOY\nPU4pGqIdgFgBJrOCHx5vOI+oVXG+gZSi7aKMRgkFvRlAniUB0caBp0wMxEma\nLkQaTGDfqMjOYL1MxajzV0bn0OGpKpG4+yQCslE0r0IUzYswsDpPwrztya50\nnBxdKHxr6m9n2P4N85fuCQ+wwIf7PJ1m6BtkvPweYoJ4mwi6UWfc7QLOYbfC\nSoKbeVCad/IXf1Mt1FWdhw+AZQ1AQ9xMYbc/Lvkp1AbPkE4CnYr0wGLZRqt4\nuHVM\r\n=G4vZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB47ZZY3b1AE/ZrGYYho9nFKG6pyhZhqXo8wMy5iZ6SZAiEAzM+OZLNQJCnuotxMCOrK4aXZE2+yl22yog0x1YBkkb4="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.6.1_1571899209612_0.9148495923461444"},"_hasShrinkwrap":false},"0.6.2-alpha.6":{"name":"@react-ssr/express","version":"0.6.2-alpha.6","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.6.2-alpha.6+bdbad0b","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"bdbad0bac0b50fda15c656c3fb585b33defc67a8","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`, you'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  distDir: '.ssr',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override the default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` at the bottom of the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/{express|nestjs-express}@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/{express|nestjs-express}@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-starter](https://github.com/saltyshiomix/react-ssr-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.6.2-alpha.6","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-f0XhXencOdVtoBJoDI+qfBkvobQPVA7QQcsqw83OqmwWzuMspa9623gPOkNGZ42bAbkcSxr/NGl9KB0QaOGh2g==","shasum":"e03a0a7d2f1c75b7300a540288ab4d6eafce6a54","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.6.2-alpha.6.tgz","fileCount":8,"unpackedSize":18659,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsawiCRA9TVsSAnZWagAA2i8P+wdV7OpeKzus6Yi0N9ga\nuFZnYpzcO/0B5HjGZqsIIW4z73txfT4/XxdbwBxCjvECNVmzxaswiebH5rYg\n1SWtLD5ntW+2GWeoa7AoRUT4KISPvkgP9GmTJ2DMnO9vthgoueQkwvx+eS9B\nLJRPaEF+dFgijdr2ZTVBGOtaZwl4h8QiTmne3JfvhMxOpGY4e09zxJzNsE4/\nyNXb3gkgyC2qOgww4UB1vQFIrk1XP8er/V9Jt76wRHc/IDrEoIL+ETwnSXMm\nTZsyqUxPkLczW2HmixeYhY993HrGQ9/C5eCPUgHf6WEy6ec7KueUkUstMRGB\ncwYc90960IZu3R/cAT0MX6Ml5xczDUuoIc9vBz7P8JuwOis494mXSrSYNquY\nU5oiP5fxonnbm/LZfdqpK2RmNIZfZGyNAxTdmIJfW4q549JTS0CDSt/pP/IK\nszLKa6H+lFkfuW4ZJfm52G+vDQGVe+V9gZpPNOK6SzpRTIwgYxXL65CVVXcw\n1D59tIfSzqbQaBlL8pJMv8OD1elgoWnm/VW4KsstbTwgl0YXVwCeFW/GvOAv\nVehxuWwZklXgSRcBuQIzhOpCJcGD+yaL2lcnm90Hww+39Oigkm9fmzMydt8R\nBwqVpYRSxdk9rZnt30MFNZTJbXlmaDpMdhLY2R9eke8llLaOCjyspS66JOqZ\nXWfw\r\n=J+eY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCFAHV+MSL7FO7Pc2hBG4z/fjtp99nmlLuEFn+F8grT1QIhANPNTjAbfdng3ZTtKrRiruKX/qJYHfO0vy6bxeMVn/qM"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.6.2-alpha.6_1571925025626_0.8948333491054015"},"_hasShrinkwrap":false},"0.6.2":{"name":"@react-ssr/express","version":"0.6.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.6.2","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"655bfe55a76a51545fd3217f5e061d44828df12c","_id":"@react-ssr/express@0.6.2","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-YNeGqnBMfWV7VaSiN1TvUJMNfhpNAkjshLfxd3tXAOHt34EDvigVlhezXuGAPKcXEgLHjGTyagAlQuJjBea4mA==","shasum":"ca9ac1277ef5c54ce889021e82cf8de7bcdd1027","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.6.2.tgz","fileCount":8,"unpackedSize":18719,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsbG5CRA9TVsSAnZWagAAOjMP/2qv4wMDEDGfRysjuDU6\n9NNpFyTP1plAwUiSU43RfsmUUX093noqp3dXg+kW2JtH3pSjLfqVXVw/WTLo\nTiXwUsk04u0JEsae5ezqBeJ8wUmypofEkXAJRp05qYkcZ79zJzvdbQtzK+Hf\ndBYQeLDLa9Em+d/keqJSsCPqT7xpA89mbnNRSdlwWxJsRJFzvCl6PzL5T3v4\nd4gebyI2DCMX1qIrmeWs7OvaHSD9TNXyOs1zXg9DG3QEqxoScE+LHQqlbvr/\njl9mIGAgA3QR8a72CriWW0krix0X9CLAbb6EwJldlulKnZW0CJLcRozBhbT0\nLA5IvvIygn5gaOXYoQdsU/P4jaeo2AwnCL7sHE2pcc8MIpOTyvZd99IyoMak\n8Wly0/ypsQthheixJpp/2SqJPTP5uNQz7ZJHmHId+S+IdRuDvID8ruuF/yUY\ns7yPRbZaG0uh3kgpeV5VSDMjOyqGalWNclJGvmF5eaKBFBeLE5Vfw7GZbu1s\nOSDJCbEgBBDJZqBP1SnDajmzBJUFvBggW12BdNO5vk2rRh8gp39jUpiVrk3k\n+lnW1whkdDZpz1tJAjlg+9VM8UAr7cWsb4OkcZn+DllkZx8k9IT203TPRQQa\nBkwlWaitoETRSavIvWBAeX0bvygG3vJSRpWcelfX5HCLNnpMAMzkY++f5WCJ\nCjf/\r\n=kDA1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC62NNJDRo0mpJVuXd9tWMJ29+LxFuk9JuWO1fKXngdyAIgZKnf6DmV+wbKcnpTA2K+lLVZQ7+YF4qzI5Klzpv4imc="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.6.2_1571926457002_0.6946602486607505"},"_hasShrinkwrap":false},"0.6.3-alpha.0":{"name":"@react-ssr/express","version":"0.6.3-alpha.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.6.3-alpha.0+b4ab713","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"b4ab71364f2afdd83bb140b5703d84976457f8e9","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`, you'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  distDir: '.ssr',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override the default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` at the bottom of the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/{express|nestjs-express}@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/{express|nestjs-express}@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.6.3-alpha.0","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Yx4FW5sqpvJZY2/05zGBKoUKVW+oLWd0qs+4krl+JrL2JfF44HgyFn3RstOKI6UFIiLBRXpoo2G2Az0PKOXoUg==","shasum":"c6f3bacc0018459bb08d722ec6259c1f4fcf32a2","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.6.3-alpha.0.tgz","fileCount":8,"unpackedSize":18748,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsbdNCRA9TVsSAnZWagAAMhcQAJzj9u856seishA3GrVJ\nL9wo7UNDgpQQMyUAiS6s5OAdd39xkJHL9Zfpwn7ZVmvbrIYXDaoIHa1pArmj\n+wsg/GbJcdMpg3Njx9q5NG5cvmQQ4Qy86raqBLnN2TRBdFAjSzCctAyPepko\nCQJkjjixPuB1k5P2Bby+K/0JXVpQUHbYhY2qNtfHbEgslB5wsBxTmjLA/5vX\nwdwQ/ZwGndid00aMT4MwIoDnG9+Hbep28RYSyNOEEAjlVwTcqGE1Z0zsdWkN\n3yAVh02wN2xRYbnDSMOP02t9avtut7y7d90BJM/TJi/LZb58EiCgYdsfV/no\nWDzFCwmJaR2lWKJT1JsxJD3lMNKx2oCgfqRs9oWLvLqIHU+c5E2RaMqkONmi\nXvuaUIxUtqPGjCNe05apBczs1/2lSleRjfXDFj2BTgPHZyhCu2D7ddZpOPOf\nyEGYoFOIde2bUXJv05nxjI+x11D7DeJNKUqwMZGWShIzqU5m6pj/1CRXnUTq\nRUeyVjEOy5oLKM3iiKVKWidT3ibBfS4C7THIJ8sM49iqd2LAXZsaphQUr6mb\nqtYcQf1yKotPszXp/ExCIZJ7hH7EqawB4XrM3OmjbpuMQNfmeiPsURsH9nWS\nV+qfbU3YOz2ryeCIaWLPs1A9Xb9wDP+Y3ADBn2n+ftLnB3FEJ+rrggNrBqry\nhpal\r\n=2Ide\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBNmd28OEARuAO4cOPLuzzuJkMUTKOQpqs+M69uumbRcAiANSYkgS0+Ab4kOH5ye76+ZRpDrW71+ZO347q8l8iwfdA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.6.3-alpha.0_1571927884660_0.5418449243869821"},"_hasShrinkwrap":false},"0.6.3-alpha.1":{"name":"@react-ssr/express","version":"0.6.3-alpha.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.6.2","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"3c8c377f693dc4fc375e4937da83e6828f5d3048","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`, you'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  distDir: '.ssr',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override the default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` at the bottom of the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/{express|nestjs-express}@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/{express|nestjs-express}@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.6.3-alpha.1","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-YEAXC3WDVCva1o4aXaHF/6V6k19xNr3hHCW9K4TtS5g6XCDvPIxEJRtQG+h8y2a0PkdaEaHKsMaPsYetpWcc0A==","shasum":"98cf01a947ddea4dbbee5563d6d4a2e98946e142","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.6.3-alpha.1.tgz","fileCount":9,"unpackedSize":18933,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsbkrCRA9TVsSAnZWagAAyQwP/iunQ5/C7j2SrC2mwTK7\nTJVrcWkg3Mu2T8azYALJ6PuJRRs7oa+zElBadYPheXzCFb3+KJvieq1f4P8k\nw9lgMamPx32cvKvbj++wTJWd/rWcgxJ7iTKZRwrqA3MGx3gl1OQE/tM7ORmh\nYasTl7xlMNmM2SFfPShtK9VxIcsgHD+La1cZ5dtjosNvEqOAj5dpw68JjPmd\ne83U7Y0jpWwB2E2Wa+mHfL/2mbQyRxia8wCuHBok6zY8UN4xpLRQzGgo6jmp\nrc9P03YU4Rq9Qoq9kyAv2aWDrgmSHoYCk6uXmltP328x2362m+jMqoMhkPYl\nvAf0dzxRaX35uGqFqXwf0Bs2J1ZaxLZ32oO1p7Qa/L2o5PWn8xcOAsBbKMtN\nuKCD2l4qEn9xVUXUBncSA7Z6QchlSGs2pSd6MhuNgytar4dxRIES085smC3j\nwFnVlHVp2KD0W5lZXTEPM9h337K3Z3MSiWHtnVY8n5MPOZEg/sjye59r+mVo\n0kYLBr4ihunCic1oDL989rM3wmBezGwUzzimXYq1eeNNMWmEPbgIDfHryK/j\nc0n34WxL2YQCBgmTQGTdwuOo5xJvGgHkcUHZBKBCjIJ7JbGp/7OLSwBbxfca\nqnOv1pEi5wRcTMbF9JABbLAsNAkcsnp6wGt9Cwmd5CeUg6NdLC/kpykK5+Nv\nguMo\r\n=M9Be\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCPuN9d2F9YOL0UFSLseKyoPDEhziSCLlKFdc/PLKYiewIhAK0wCPHfuU3mLuZn7POx/NhjJdquZ14BHTM+vPqVwrJC"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.6.3-alpha.1_1571928362895_0.30953880401399214"},"_hasShrinkwrap":false},"0.6.3-alpha.2":{"name":"@react-ssr/express","version":"0.6.3-alpha.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.6.2","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"2d336261cbcdba49a8464f80fc2d08bfac851196","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`, you'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  distDir: '.ssr',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override the default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` at the bottom of the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/{express|nestjs-express}@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/{express|nestjs-express}@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.6.3-alpha.2","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Jwk8NepgA4Ij6wNswtBt3WwjWwmgXS5BTIfP6nPeUb8GR+5EZzsTBmMry/iCIT/2DrnsIjyn9t63qqEyBiV3gA==","shasum":"080426759407f1cd93379146e420714dfd555f3c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.6.3-alpha.2.tgz","fileCount":9,"unpackedSize":18940,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsbmVCRA9TVsSAnZWagAASOUP/1NfLVxkJeDl5Fl5aHOa\nXlQzLK6KDJK3yaLanVuFAgahd21XzkzLtEg1rM4c7hUMRf662LK3rugmnkyO\nM/H+qNhHJsrBK8AOyns+fHWyk6jvPkXBX3RJ9fObdB1pwDFT9lUf7TiT6X3i\nL1wvVl97bRvRGjxDmZS10XSqKqXxrJdPmp0g3LRXnA7IvokMYkh/4iR9I7pX\n65HA/zie7kzDEaYtoHVQwhL1BkT2u6V6oqk7Id9L2jCYUecyXlGI9UMIqzsK\nAif9So60zS/bior4gvSzh02aY7uTocpvoykbJbvN2FoZe81DKmFov+Pj90Rw\nMjAe5WeRzJa0ENbEnh/zH7f7Pdgph0lRLRNfaL68xQYsDGhGAmuAbZnUS6bH\nkAY5Yguv29eZju+SNNv6IqlYiKPky0ZNhRuSfpC06d3FXv/2yUjIHYSu0hTN\n45xgX4321aLWQncIlaKHIsVfOsK3pmk0mCDUtdUaDqLKXh6Ho3fmHzdQPV8Z\numkfiPN8fPwQxBdDbsXuCo7i6cPojJRLYwdUHjLIl2t8IiPA3MO8AmKlF8EI\nBPCAFCbmAzK249RwEt1IUdXt9FlLisH7t9qlbTTvgRZYbYM8uVcBUxMUkLFp\nzJw0isVd7IRE8hun/Ds72tD06IEpmkTLxhqLpRPBqMD/ME78Uz1d+vhhWZJo\ncFZ0\r\n=Ar+v\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAwnPMZD46mKlgMjxIbiuAU9lG8T3YvuWAYQI634WQOvAiEAw5/zoEqUTm/U4zzzcdDXg0qiM4lIcO48ctFtB32t4R0="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.6.3-alpha.2_1571928469160_0.7182022627585312"},"_hasShrinkwrap":false},"0.6.3-alpha.3":{"name":"@react-ssr/express","version":"0.6.3-alpha.3","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.6.2","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"abace98df78a2ac0cf69e840018ddc3985b1847d","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`, you'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  distDir: '.ssr',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override the default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` at the bottom of the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/{express|nestjs-express}@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/{express|nestjs-express}@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.6.3-alpha.3","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-01E07+vyXVfzpBZvRJC+Cb7Aeyetw+82QpkSasmkGyuWtgSiNRKT6de4Ami5R9/4Jad1NuAeuCiaxtM80CbnUQ==","shasum":"b048f849075f5ebb3ece50ef69d27f75e27bae0f","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.6.3-alpha.3.tgz","fileCount":9,"unpackedSize":18966,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsbqbCRA9TVsSAnZWagAAcEQQAJ4CrYts4oUyYy/RbujQ\ngQMEeMu/wRdSJEs1vTiPx04GyppWAtHNRQWnf6gm8z1Gx5p6m5sbayoGP7zQ\nwFDthJFMMkaHwD19mI8kiYgfAQ1sWwDzYSF6gPICysU5e2H5wV4G5HQMSVqr\nNxu04mEXxP0I0oZS4QeHMo73xknsGImt5X2uyAlmhO2e3C/CgY/js3OXOpG0\nbEQrmejwzfo3o9FtfJEoho0NrM1R46k81ePhwwNOSYEVZwOEuxgDjEsx74Ax\nJk6UIhN45/eSHbAPxE3s4GbrOfFZ0XqPDgcB4WNYXV5bES9qjjtmbIzpkmjV\nFCahFve7lO1Wnr5SCvHYcO4BhZdzMQln2OOTQl6pOU7DOkVavHDS4ZhmRsud\ngwVAEgVfM18zyUDAsn63cOUuMm3QaLV/NVHchE4UwSIZ4OLwV4bhOEA8gqRD\nfFSdCG8SrRUJjUWmBfa7qmJEd5uD4znzoCyslu4bvvDVK/B0T6iVGKO9zyve\n3X5WBYX6MZOyEALKsLaRsCnBFnfQQyOUVfdBkhgeLXsYdX5dR6Tf+pSjuHSo\nLq7I+1aRsSgMM51g18cfKRziMMFdc4HuhRk4NdH6rwvpcguNAjo3vk/Fogtr\nqMNkInp++MnkHp9WIKQEAMfwDiREMXa4FhMwxG5knmd2UfgenXwObsqMAeCb\n0bI9\r\n=f5LX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCNuAYGDGn9VxbcOo1FfrdLXZHJsQLiC6vi51lS/NSfxgIhAMkloiKJtrkA2VW2vpy1SOXeECZRMpesHf62asTRXzSm"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.6.3-alpha.3_1571928731404_0.7147831101114155"},"_hasShrinkwrap":false},"0.6.3-alpha.4":{"name":"@react-ssr/express","version":"0.6.3-alpha.4","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.6.2","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"fa2cb0eb58c4dc70e1a29ab84ea8a8ec1701860d","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`, you'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  distDir: '.ssr',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override the default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` at the bottom of the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/{express|nestjs-express}@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/{express|nestjs-express}@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.6.3-alpha.4","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-9tJpH/Wj5JNCAsDv9Labuv1on5eu3i30u6+Bhz92VOP6wSxygyvil9hpYm6vXKiMnW80MY/IsuhPNqQHEWsWbQ==","shasum":"af9d9e097b9091f6111e4d87334dc73302cd6892","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.6.3-alpha.4.tgz","fileCount":9,"unpackedSize":18936,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsbunCRA9TVsSAnZWagAAGmYP/ju5afa0XzFEoO7CdYiB\n9JwgJOHnQNJhAE4Vutc1Y0SFHU6sJyCcrRIvnHmKekXmT8GHM74piVmdFur6\nENQpA7Cx4TK0ZdfuXPP3QhOrLEvn2mn29nv7Bt+UZh09a/Z4vUcxGbpBUMC1\ntXOHkXYvdGKwQ1v6/zYKFT7NGH7g5p9B1VcAc2ue98qFqlO6SZEHw7v7+gQv\nQYqKS/Pc2vkutIctGdh27Bu1NwjAleTiBYfQd1CRd2u0LFDeOnu8KIbOmDTZ\nltzZ7BPawdUCWTqkZy2J4FKUH+ch5P5isxyuwm5AHJyKAlDkEoItE0EVEKNx\nzwduzBn5nPkHH+UOpWsuH54GdL7GMhxJKr76EPsWra5733ZeTFqawYBLcC4m\n+p2Yje2DaRxxFZWOR6dzqz4rLR3p/ApIVegxaTkIemkTDlR68TA0zVw65Gx/\nwSm10IZbAkEfLvVs20qf8ylUOVPuXu3X0kznnnGlVobhGcNLk0beYbwKN+fQ\nSs7NsdJJP6lA0LLTq/3DAQPor4tsqNppCmNvIXHlOx3yMaP6jkBqFmCqd2TV\nUYXBmvARsnODo8zzs23RH39P8RDFEeUmU88xdBfFWBPDjmXy/fkfKfYP3Pxf\nvwOy/q8nVhR7YWFWuP0AXB/JQ2dqgNcWDCqBZNtuh5yaKNpvpIAqBAHrcKVu\njVn0\r\n=21D6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDSqeLIwRpiEtFfj8OQKUoQCgpZJDVgMk1cZHtEmsdhLgIgL9UqtqKJE7plXO044KqjoZEnQWy4ht6nVs6AWk9PxSg="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.6.3-alpha.4_1571928998563_0.8510973697095012"},"_hasShrinkwrap":false},"0.6.3":{"name":"@react-ssr/express","version":"0.6.3","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.6.3","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"39203bc813afde6c2eea4a747fe68f4f4f573898","_id":"@react-ssr/express@0.6.3","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-gE+p/gIcnhMwe2LNV6nDIVEQfX1T0tUhJ4gtH12g3EIAWTnvhs5NbPHyK5d63J3Qo9klg5vV2z4UNzCN5v3Qww==","shasum":"08de088168a73ea26e63a21755a1d4d4e5e6b219","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.6.3.tgz","fileCount":9,"unpackedSize":18920,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsbxMCRA9TVsSAnZWagAAYswP/31C9vsfEiwmHUMa+KYu\n+NNLmA0+W7Hg8ZyzBJN2MnK9kPbTLz0GvtIaBEYcf+ZS02EsnGXpdussvs7z\n8aCU0u5kyCSdyVT6X7vsyfvhpwkhXG+zK9/6+MWINPxEOM2E0yNFCFIggp13\n6qh8mFTX/yMKXw3stLS28eIn+XYAgGhX4nh9iWeY2FW/LmVe2LoBxGF8Z3nJ\n6Uh5Nd6QxftXW+h/e3zbH02rTnlHAtilG0TP95QraHtzYAE6Bfox/K4uVs8x\neQi9sjqUhRkVrlb6EHhAv7azNhqZfltOX0mX/O8uHhK+xHSQfa6tX33TXDn0\nXyAQlrVVZC9h0GAy9EJhyoCNA5KHmRYc13eIS45vaPOCoK34kYraDNMLTB64\nyvnS4mBwinnZ1XIjVTTDEjQY+n5Il9hv/Nu70xmuhRbbXzcUm9SW+L/Ueob9\nZenVfOUm4yvRhreL6PUvGXTf6uT/O2FZltL58MfTuTvqTkk++pkz6IauexEc\nAatQMjv2Qwso1OAOTMGYsOChI3ezKVs+RxI20whDL5tdYjXF22xMe3B5CQbm\nISMUNbFWtE2zqD30muCm+J1zie7ql6YR6VvO/I1SoWnCic9yzT1k49aEaPzu\nOTEEjeG9bgeY0PiXrbAQsqJwBEmfaJFvSsJDpURMiMoMp14iEKH1+S2ZeGMA\nkvGG\r\n=HjGe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEYZEEH4IIDUfJ/1KxwNpQURUTm1qT4tNq306QhaspQ6AiBQQcnHzNKG/eMPSQaJoxOgz7u9rBmb2Rle94cN6zn7jw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.6.3_1571929163648_0.996803627862316"},"_hasShrinkwrap":false},"0.6.4-alpha.1":{"name":"@react-ssr/express","version":"0.6.4-alpha.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.6.4-alpha.1+5c658e4","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"5c658e4b4b3b55432498064d449eed1c34c2cf04","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nimport React from 'react';\n\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`, you'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration\n\n### Constructor Configuration\n\n```js\nconst express = require('@react-ssr/express');\n\n// default configuration\nconst app = express({\n  viewsDir: 'views',\n  distDir: '.ssr',\n});\n```\n\n### `ssr.config.js`\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    // we can override the default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` at the bottom of the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\nEach example uses `@react-ssr/{express|nestjs-express}@canary` by default, so it may have some bugs.\n\nTo use the stable version, please rewrite to `@react-ssr/{express|nestjs-express}@latest`:\n\n```json\n{\n  \"dependencies\": {\n    \"@react-ssr/express\": \"latest\"\n  }\n}\n```\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.6.4-alpha.1","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-737siPWlOYh/CdqVSWw12cPSMnuvaals8RpBLIak1KtLJpPqOPqC0zQ/1onU1FiTfoylxqvb2ByvP5mhWXB9Dw==","shasum":"c2b2936ee64edef61092276133e0517e7e5588c8","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.6.4-alpha.1.tgz","fileCount":9,"unpackedSize":18796,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsfNqCRA9TVsSAnZWagAAKDAP/1f4U0AvaSYuc7Ec+WuT\nhT5SoUwwd6p0QnJMNeuU60H46qq8E4Brxmg0bIbIOWcrGRYvLHcyYnGbr3A+\nPmolQnCV3JLVrZgHZDbA5c8WB81AeuO/vt8WmiPU3Ubi5lT3hkp58AooeLxG\n8JvqAbpnN2VEu03D3xIylhiVGAHqeliEXJzi98zUXBa8ox9DD1daJm6CIW7c\nAJaG8S3392Qna7UBpdZG8+FHGjOLSqxeHsFZDKO842yjJDuVefR7wZxzvTza\nfmEjcywpoZuTjFRenxNhA3k0YVqsJ/zrHfV7o0UnRnsadWbdAMfXFzL63yca\nQBPjfjx3WEUWAy+JDNOHXrQ5K1GrmdrEofNzbiwyOeMGOYAeo/Ze94Kvhu57\n+bFEk8h9pjCdQgahl/pW0Dlhk6QrNhakTFFbtKaWV+iqJPLvJqbYI4sODAwn\nWUrhuzhH8qozWJbcbXnRUf1n3bVaJCeXvY8h2LlnSl29+uZ4aJhs50XYvMhW\n2LWgp0Mf5lrlYh9QN5gnU8LAqXSzYBdwpUB65QW4wJfi1pseoipxPP6Bd9Am\nABF32U2QMGlBSW2XdKtpgsOC9SFzSvw0/LpRBBYuSAxLk64piaZy/vbZkap/\nd3Njj3YgO6saE+IM9UDII+RjnnGNuC4cltue3GCtyTnRum/o1SdJShNInor9\ndDYS\r\n=SSI+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCl25t6TX/gKltmFXegO21l4vROtro+6sPbV6zZAmeiTwIgfbXoKwkOtyRqdh+FlEUNCgoao1vxrPmhn4551a5vha0="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.6.4-alpha.1_1571943273888_0.9762909931058636"},"_hasShrinkwrap":false},"0.6.4":{"name":"@react-ssr/express","version":"0.6.4","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.6.4","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"f81986110f5294125b0e12849fcaaeb6006cf028","_id":"@react-ssr/express@0.6.4","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-czmHeZ3ua9JQOgeS8Vt8vRkHvzp0Kr+vlElPNwDysEPbCjJacitRbDWHkRJMUqStfQQKD+75ctjsrf6h/rmLUQ==","shasum":"ddfe614200025dd66fa57794d3a1bee27551f2c1","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.6.4.tgz","fileCount":9,"unpackedSize":18764,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsfObCRA9TVsSAnZWagAAVaMQAIaYALwClhdR3fUyR/Cz\nbfW8wUu4ka1aXkfIqI2p+zf/jqLA89G7JluBfBWYkZEVFscsvm1GJfxEtJ4F\nfv/++zAybC/r60Lv/Kx13Zaf2SS8QVcqw3E3ADRKvTM/B1dzOwgBZEV4JuRD\n+0AHX3iktbgumyeQHjsKNMS74m1Exdx3L506UffE4itInPJShbVo8HrWmbBC\ntjGGxbFYcOq+cjUkSWlPI6/63drG6fNGlUDvV0u2dpcy2HcJop/LoMKPvxs1\nYjB9ouBlXIDbeu4nO159wbclMXdEPXZx35JGquFF6MK08SWDuU0N5ghdxRgK\nomR5yDeoIGBa1/LULpXIovCVAff1k+9B1/lBNoss8rebahjpE//nSeWQgJdC\n9CT5plO0WBQX9E3QYPZE4CfQKGr9hHpGaaaLd87o/rYc+3U891RJnz3hC8Uo\njWhjXhrhEX/ldvKAffbQ7msllu87TNc1ubr5qtro4fV2WhTthGtSdYoZCjjk\nRqobM3MXKO8lcyY20BcnZ786KdZrJ0MprjBOTrI4Ly5mKB2Im6BDjJoiVhJh\n///bStCGZ/SvX5W882KamUlRuTmkNbAbAtVLguYdRXLU9YRgRSJcVS1c++aJ\nG753EnF0OJv2WywxxctjQJJ58JkCotm+SdV59kJ9vJagcfYcNZOBUBElKo53\n+2Nz\r\n=Tfu7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDvq1ELh03C4+J05bEL3d4jXF41S5Kl6BgqrbaQMvEY7QIgKcaOLCnTSxPb5j1cWYSIFpTcfMUxXPN5fjO2a1LG14E="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.6.4_1571943323184_0.7992220410496447"},"_hasShrinkwrap":false},"0.6.5":{"name":"@react-ssr/express","version":"0.6.5","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.6.5","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"80db8c2237e90181a646a98b2315cf8d355286dc","_id":"@react-ssr/express@0.6.5","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-nwqiahyICkaH4nP8/D57kqbH/UMoRxp/OLJszKlsDplD5KX6qNotVpxX1giJ/ASEWgirTY1gKhUz04K/5pCamA==","shasum":"3feef0db6d45dfc301842bca9cc3ae4523624417","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.6.5.tgz","fileCount":9,"unpackedSize":18920,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsfTvCRA9TVsSAnZWagAAdlAQAJPJFvtdRfbI8DwPzO13\nSvQ69lQKOcBF0F5szaUYAlk1+dQqLlMwyM4YjmnUN3w4rAa6kHMU50CyRtKf\n/SqwkxBngR1qgOEzJ5c95VOZ0Ixopk+jPUdIEGi0uz4fvaZOVwQ0ZpMnygER\n+O8Wg4SUggc3sd8DHk2mpBaQPKuS9zjSEOvD7eHWz5vg9/sJY2+vJiNiHJ8O\nRSGby5oFkj5icTKQHYKtczy382B9iDM+Zb6BOcaWlTq5ZKXS47dUOSr+VPCA\nFXJDoLI293XozhjwFyNZsbHnLZ/VWZOIeFxhuYGDhNCWKyYZQKDfTOG+eoiM\nH11aW05gtdFguWSy+xYvPa+ABJOtOfILO1SOtws6dJGk7wlwRSsbL/l2frEx\nzS6phVIC/4Ri1CzLG5T0YSNwE+SuqI0PkdXAVbMXmk4povaBKAjNPRtN7nuD\nF+Q1Gr0nLyqRN8Bk70EFktaP4NXB6/Z2AStHQojcJH4Tru/S/mTzB3Ig7OBT\n1STpxyCAANDNGlFsXU4ns0mFqNGdACADinEVQoxFuctmYAs2Nt/gTlY3NmBx\np0ONzwESj/tfuEvBQetdDNMKOBn2j38ue7FJQ/v15pWoZdLoPZHCcAN7FsVY\np+LjmQy9RrMefMpJpGNH0kXsZirNI2df03SlIJ2ScFpYicR9tI7h2XD6Q9g8\njmBR\r\n=zfma\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDnHt2TOolvyeNl7yP0mM48Nik5P/vZiIsjbf3nn/2JAAIgL0jxueQ8DSGKR9nel4boYi4gwB8tUcy/EyklqlxGtQ0="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.6.5_1571943663216_0.17373566186942924"},"_hasShrinkwrap":false},"0.7.0":{"name":"@react-ssr/express","version":"0.7.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.0","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"68d86b4c3680c06cf7b3eabd9a0e0ced6ad719d5","_id":"@react-ssr/express@0.7.0","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-tgTv8ogbUV2Cjkm0buq0EZwm4Mi4AlmZEgJfMV3ErRGdqn73hi34Rc7Xma6n59aAl6f6FFcjSm6E2rsXUB9eqA==","shasum":"64c2c2414851d6b45ec348a4be7ea12c0eb5158d","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.0.tgz","fileCount":9,"unpackedSize":18772,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJds6CzCRA9TVsSAnZWagAAG7UP/RciDe8/BrazQROjALvP\nsZijCpw0qQSIT4PUt9EvOjQBvzD2KUtRqumhD8yIqRTWSekgTlGCpiEwPUWM\n02rS+4NAAR8a2D/wzQYKBA1tbblowUO7gPlhAcXk+QvduZnIhAWjUM0YVZk+\ncKpKRCr2/45D6OILbSHFhyzq9l2W2NgOF3RgzYwUe9FVTgR3D829YJSocEUG\nDeHqeMsePi1OVh4WBVAZooBj5svD4pWAGtlVFS8jraxBxVlTcOI8LqKgh7EL\n76Ns9PLi0LRGKlLFrXyZ8s2Zmy9BHwSwCMw0Jh1GTASj3PuD5rQsW3NbDVd9\n/Gy4RS54DtEOMve7ZQktGBfHsh2LQ31vPv9/DiE73sfoSL9OhgBORV6Ebvwe\n/sFmGnjhPwy7JRI9foMNJEAh7rtkhhDV1VBoKB4oa3zxNwPgw1n+y+KS1EYp\n2/H1YjT2wTkuZS55a9Kjv1P/oUl6rnnuNWm+Mc3r3S8gmVGHlkowXfSkoLGV\nTUhL/NeNRat1zqq6evJ/hxuaKCzZ2ekgJNuGXeJHxnqSrhSDnvgztXAbrJIm\n4Tlb2WQUcSx4RovshCHwKCCNcoUOXtwUuMkrQ97x3Bg6PJZWIWcVPCIb9LIu\npsVXUZ8G1dabmKG+Amq+0mNSnmDfq0Rhkf4bG1sF4zK/aEnnRbuTpHtEzFhs\naEkI\r\n=VJFA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFsh+/Y/Ir6AOSSs9+KPVYht2a7tL8f+Lvf/fA6o1KPuAiEAjsuVNeN05qY5gKqJQ124RakQoOdhUN+MwhHpYza0ov0="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.0_1572053171002_0.6414597663158841"},"_hasShrinkwrap":false},"0.7.1":{"name":"@react-ssr/express","version":"0.7.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.1","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"9cb3bd66e9e0b2159ad34edecc72f4cf1bc43cdd","_id":"@react-ssr/express@0.7.1","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-NEl41uohJOf7VOt1tfqc0ubBiVgTxBKQL/lDmbWDyHz87ShAymSutTyPb85FPtqTgidPQlOGoOY7bnKo98F/9Q==","shasum":"afc611091da7d816d188e1341bbf41899ce32116","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.1.tgz","fileCount":11,"unpackedSize":19088,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdtBKkCRA9TVsSAnZWagAAsPIP/0wut0njUUx6wHWnCuN6\nNvnBkaoNtZFoYYMvBmJWh4gYny65KEGWaQRi6TEixIpjRfb/3NTszvs/MBV3\nkpSbu7wGBmEwnWV0HH9zPJJyKI97OMpju3ZDrDlYrFG/7pb/22yH76UEH46X\nGjLCwDawl3Aa6VrewYomV/+Nw3CBvAQJtHf8xKupBuB6gpr98pzfc1xFlDlH\nAwrRV3gnIvmhU4tszKx4y3t+WqUUdDH8fzkz6/koL6yWOQRrXjZyJlNjdcVS\nqkky8+GQMkl3NG6Yy15miJH4Nlwtl3+K6/qJcyShsGwAUNfIYpJNC+hM9a3j\nkRLQ/mw+PjxZhTeKkqUQDJHhGl5gNEJE6881Tsy9rWTgTBxUflWxXc5sbBUL\nyMgGilFwucVCVm8JtO9+DRVThjs3ev4kMaXEf60NuFeJTawsuP6YhXkJZxaZ\nvHSRkUTSN+afvoXAdminUlcOIn55LkBZ+hOKLXTzw2QsNS/cRQFdI36Eprvz\n5ZV6SUv5IPYBIfiBUdLgobgrdpRb4jL9ItF1jQ/13Z7Gzg16u4C8cdlH90v7\npjED8D/VjuUrMAPUvMvwCnP+EnvW/pvM7KyFiF+sVxtfy5k0KBL/5XjTigQc\nrZwq2qmXmbBLU0eaZjUUdJlvZz1XL1bn7k/sAI9hGcTK84XbL95By3I+lrZJ\n+o5e\r\n=beRQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAbgS+S7hMzBrANP7KflcgegAKRngLLj9VVJy5KyBPtCAiBjlWTsTXAjrTvI9XemU/h9WLH8z1DBLpGeKx0vgxH7+w=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.1_1572082340144_0.56836647925537"},"_hasShrinkwrap":false},"0.7.2":{"name":"@react-ssr/express","version":"0.7.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.2","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"a91a227cc2d15c4b958622da247f40c181093b12","_id":"@react-ssr/express@0.7.2","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-6mzQXVmVYKI2XYOWCThwBzD8RQy589MXhSG86Pw96A9RrLa9XmejlIYZc/aItnIyrVK9vQozmIo4iDKfqs6zuw==","shasum":"699e0e965faa1d503212928d56fc8617cc55b5c6","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.2.tgz","fileCount":11,"unpackedSize":19088,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdto7tCRA9TVsSAnZWagAA7Y0P/1ve54StybILrlTWtug7\nv2VPOCp7dAaZyN2uvvOMQFCgyZhy3fCVi1fkLefPwAGfRB2ZPZMpTJviyTF6\ncj/ehLf/kbt8MOYilDklIUWs2x0Sg0yPkxqZBzQQ95W7AFTJ/83BMHAxEZ8z\nxyRbRhqaE1RdVM0a3yf9QeYav+Ln+1D4xZiQaFCeadzSv7cCCXtfAyAYkhAW\nLc+HgmBVQfjq5vobI+Wrxom2/w1p0HfSOR3Q4xZtG5qBe5EmiPmGDmudAFlT\nppXEXYdiVYvZaietAr/2+KHSa+Cz3VI3jQ9HLkZ+0IRAytRwwphRsqJAsVMz\n0LbBBJHrWDBR/yRwaab6fuGe5n2MZ9tVBYRQp3iE98CY5tdCyoAgDZKKqND1\nS1few/Jyud/vf0FceNNZ2yApFnZcqDYA7NfV4RKYR5fSUXpqiMFvi6Ud0Ilt\nkVjmlngwvhKf3W8FdwEd2Ot9FNudLkXhcLuxT7+/2lh4GEtkqsfsaF2KqR25\neAJ7lBhPVJgePhFY3z3dXDThhHfaYwtSfpAjj1DXCRLnTy2eEpcDQKgcoE2q\n/XtJx8Ac/3huST5bGaWFyUp3xWoDNik8+UttKq5xCmJ5IwuyNtpVQmC52sqb\nORPaKlADqrsZuyDjTv/6W/V5d06AgvZB73q3my0LhuLSl1MO/GbhskS9Kf2P\nWwWe\r\n=9Bm7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDOV0xndcSMJNMhmIfJBs6hf8DOUT1cw9u/qkM5tRwkfgIhANZpDF+eYfal+w6Oh24X/ItM5xtS1evA3mfqFJAvX7XQ"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.2_1572245228763_0.7079689884559421"},"_hasShrinkwrap":false},"0.7.3":{"name":"@react-ssr/express","version":"0.7.3","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.3","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"a3ae27701c0a295893848ac5979159033832bb5b","_id":"@react-ssr/express@0.7.3","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-X65dYWVQecjEL5I5RLkR/7jSETMhRhLIoAawYmsx4idYs8/9SA6gdHA3+tyXWv7QLEkle1tdSJ4/Sj9zHx5lgw==","shasum":"c6e601ac9e6b4dac151c9186999a7227a0802a27","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.3.tgz","fileCount":11,"unpackedSize":19088,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdtpE0CRA9TVsSAnZWagAAA3sQAIuBNYCeAqtTty5JkiNX\nlivHu6kcx0XbIBIZx3WNuLCeXlytdpdQbNisAKO3BFWJJ4Ug74acb3+4r4MJ\nPbtIUbUwvJjGH0eFfil/BV7NSqhZM+h/9V608yihVUvy/DANNp71cIAS0j2n\nzk1q0d9qUKeH0UEo7RTdMWfXAUJsbI/V/tfjocv3fEF/aO8Xjn2Gr4F45rDE\nOVU4KFDZwAT01eQKLniQkFLWC+L5PhsJKwyfk1coVj/XgSiRpcmdNHvdFQyE\na7FfpcZetPgQfER77AvnSCApmDB0nAhrQ6xbaCHZ2T4YmZd85+cftTKoVJ13\n44zOjcsvgz0Lx1OTzFrZjGKM/RItbDv9xohUVpCxNCBqoeUJ2+n2Mjw/r5ol\n5/O28DG33O/G02m2fsEA+HchwQxZLLMh+2Xelhz9OaEWenNBS1cwNN/iswCr\nf/JmY8s9k76jQGpkJJ1cYafxIgqelLGOgJAd29yXxn0/+ma2ctoOhbTyaqWT\nGy6k9l5YpYA+2jnHhBAUlUIb+6o5FtYoJyCEk6w0gbCs5kvGWItCoKYAvRee\nYwoQJbSnA3bgl+ofHzSjbZ81Nbn2PIQ1F2wcKoW2Lzfr0a9EDfCXpkvL+YEF\nJSN3f7fLS29lKpr9zVejgydPb3U+ig+TmCHH664q4sRDmdYXbfi2JablbZaq\neg7F\r\n=PQe5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHHamYN7OlwHU21s5BTXRer141fV6rPSaujsN0QLJRqJAiEAouXmDPgQWvc5aUp8c/x1qyHYYos3SKvgL2DWRdojMQE="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.3_1572245812007_0.14617616526771493"},"_hasShrinkwrap":false},"0.7.4":{"name":"@react-ssr/express","version":"0.7.4","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.4","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"fafb79ca95814bf4b63aee571817380bf1aafd61","_id":"@react-ssr/express@0.7.4","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-dKq+4glz0tA2c+lqgM3TWXRLfScdzD7tBJCKlMOZorcRhwiiozFf7E7oXKWRu7lHgHMB4SDQDtDK4tIc0rbQuA==","shasum":"85aab25831844aaad010687f6ad5c441c53ecaf6","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.4.tgz","fileCount":11,"unpackedSize":19088,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdtpJuCRA9TVsSAnZWagAAww4P/RpksacaI+TtzDCFtEIT\nOUb74VD++7HIm2HkIP8bIoEjNGFpWVVHUzVOD0AR5aAp1DmdlaYqfLY8jqRq\nPaCzdiPyzKpBpXFOLc6wsCcbJdyFzRH/tVgVCFT2rbfvdZnGl9pkDZzOnIvK\n0OqmtNTOOzpa4mSWcQUzSx9pu6zuENZjTEANltpsqqkGINeAmI2MGkr1tsua\nuorUg0BXMFf1GZiIlFeeR58gqOH54yxkZA/l9ONk3had4XlEmFoV6/m/RuBt\npkDD/Ep/68XFcStBoQwboy/yQiUMFUQ1H2s9n5tCN9JZtM5WcBg+Q7sFRpN3\nfNPxCwsuTzeJ8U1m5Q3VXmdCCJeWoUd2opHPeIvT7sg/fxqdB/BCNGZeMqO8\nfPb/K2kqN35Lbm1nZrS6Me1OFe5DaWSYrX8Snpox6EnKbC9TbUCMSWS/FWAA\nii891Mh2KemXZZ9lDoj+qo1i0/7KIP6eYlFv5pPgeAqgKI/ehnr9fL5wnBn/\nFrWEiXK/CSMP3NLL7lJijy37CJsXl7Nfm1mxY7W/1ep5ph/Tr+3hCzxFhEr3\nuTpbSv2zI0bbELthbm+qn5yu1/YehLeYLGvHSwCqdR3sQtoC4dL26dq4zwMG\nXCtHdaH2WO/f03Gbrbm5n61geGCRnMUdQ+9D9eyiwJPtVX+P94LuqVoPQYI9\njy3S\r\n=hmQh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIApxY6lCv8Lahu+OMdc8LLttuCXEp8t+3FNKNF7seRhRAiBH/LJMfPDxGy2mQ7GvIRpWI45YbhDBFhV3rk3WbJjxfg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.4_1572246126418_0.8858014633031344"},"_hasShrinkwrap":false},"0.7.5":{"name":"@react-ssr/express","version":"0.7.5","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.5","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"d5c008441737361d2883355a32c178ed6168dd98","_id":"@react-ssr/express@0.7.5","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-1Rq6KRuABx0mr5XEjttQ3b01MD0iODKWs2fcN9pzkaSp+aibxDbYNoMDXsBaUJFacw4X9fei/1J0DPe3wy7q1g==","shasum":"668fc27662c8a516a7d288b748d589903e6c816e","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.5.tgz","fileCount":11,"unpackedSize":19088,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdtpMnCRA9TVsSAnZWagAAp4kQAJR91V/8Y206tQ3PxOPo\n9k9QvuODc/RHcY0hm9TrkBmH6Z/LhIJxPqLsgYf/soShMFYIfJSTDQOCJakY\nk4JPIMZuFgBScgLyPh+rBfoMiG8O6YI7iLwYNE/nWHh40QyaBDWU8G2NvP+5\nUZuDlg+M3mnRBCTxWDnmUKcAZGnmnjA+9zuRpBmm2jgqXjeuiwj+mFHzb8aJ\nfvky/gcYxuBF6dm8IF781H0T+VMsOzWFqnsN/fP1PDLPGAtv0xlG2q+7GUhd\nh1/b34WDSWiGHZLj5pq1IyZEnn8QYt3uimbb2n/alfyEcsYCdYjpjKmo0WkN\nF0m6Y+/I+ZOirHlOpfki/N/ts2lQ+qZBLH6g/xtkNZ8qEZOgTJic/xocceRz\nKioIHkyJmkLQ9Pt0+R6rCoFBQFk+ODzm6kVQYbS4jazVYUd+SPhPVoI8K37L\ndaFHZakx5SyF9sHSY3cTaa6HAFigUTHGiIyKA0ZKpbmDOGijjEAxArbDgLgy\nkDDYGO8HIJuNWA5oDBIl++DqM3mNEFlMCP6nprGZ3RHUUCAlDfINOw9FDS7N\nnsaJW0AAPXnE54zH/vKBHM5KDEwnZJolu8s8zlH5SYtOySa17QWn6zoh4Yja\n+3LXS8HBOwsW/4velUMAoI2nx98/69ksm9fs+15jM48OFEEuneWgpFiGKcOW\nSzi9\r\n=hEMZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDlOPgRxTQ3QTpA8tkI2pV4VkRETgYxr/rcXpov0miwWgIgGFi9JnsTdnJ3m/RuhPisCZjvsa+1324VWsIzyrZ94DU="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.5_1572246311377_0.5185335510222524"},"_hasShrinkwrap":false},"0.7.6":{"name":"@react-ssr/express","version":"0.7.6","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.6","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"d2354011255ff06d1dfa193aca9002ee3bb6ab66","_id":"@react-ssr/express@0.7.6","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-VzNZNpsYmaDNKTc3WA52c4a8Hhr/giZlJWUA/OqbcXBCVt3IpiNnvcCbggDYdm1rT1vhth2a2t5GvE3gJh2BRg==","shasum":"3d24c2d316b5342ccd22ac6874b6011adc8d67c1","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.6.tgz","fileCount":11,"unpackedSize":18820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdtteoCRA9TVsSAnZWagAAya0QAJKLU+jNNNxUGSX/k/Ua\nbdECb3rpbY81RosABlH3U3V/sAVJpTXxWEMpMukTvfgW9gVOEVN3xT7Nf5X1\nN9yZZXCG/W9rrfj9xkqLkK2UekW/gCQGR5OiQQQmqK/fbPf3wXgl+zUfgdt/\nxgOUYUpi+YY3gGxbCF3n4i5aNQ52boiUf9FprOk+oI5pe7UzdtI2Wk0J2TCi\nY4QjUt8wnFq6qHifNgode+LpKG3174HbhzdAbylbvtUQCPHjmIoLbIpqVA3j\naTjUSx6rv8Csl7S/I/rmcgkq7kfcJ/gWH7aEafE84+lqZ+A/K8K6AoU/7/Ba\nVj+vurcnyugZNBy502azLmsqKBbz6ARGTb5MtGUrRtqi3NwpgxuS1w57DVht\njjYTCsPCowMMFyklipUSRszToltS4df48PqlNmlFIwfprf7iDVKtLlpft14k\nvG2cLB/nmN6pUEqrMamdbnrgtcKhMv2I5dd3GZq7LRHQ24DrDHcYAaEV2zCB\nDezv0csm6h5nrMT9h6l0Jwq5iNs/DPKIBiHHSpsUGJLZsSM6rvvN5axhrXoJ\nKcdbsAdZd3Eudgr/sN2Ndu8dgMrjAx9IvZKYK8Zj00NyZEzSjBy0unvdK3Tb\nXQbtbWSOrdoe4ANNmUjUny1/x/kLCL6gV9FSwpaLPvMTt16I1FQAvardUofD\ncYfu\r\n=uIJq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHxi7wk9d0ba7IAGrG+Ulq5FNoZWxPeYwIKJXaBuaJnwAiASJwCrE1n5LZ5BK5af1hkQsY8O+ItiCCE1fh+EXXPHQw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.6_1572263848280_0.7169033624152121"},"_hasShrinkwrap":false},"0.7.7":{"name":"@react-ssr/express","version":"0.7.7","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.7","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"c672f9781cd21b0bebeeacf9d333102ef15afbe5","_id":"@react-ssr/express@0.7.7","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-tLpVejKohlelgiv/LS7S/TwTcv/iA5MCfMwz831W959Q77cvx3OWO1RNLuYChY+T8V/f2g5Lbx79yQ3SNVNyEQ==","shasum":"15b53a8c2590dc80f6ca9c580927a79c50c8b040","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.7.tgz","fileCount":11,"unpackedSize":18820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdttwoCRA9TVsSAnZWagAAmGMP/2yR+t4BeD4aYW4LoL8V\nw9lxoBPilS6lgXBlM/mSYL8JvA660CVcOzhqyLMa7j3j5f5xEi54BagZqyzI\nl8vH68ePaEIC0ewItm64Xy1WbFpUmO6+vw38KbN/onSx+GfKMUV2JW2ZLfvs\nBOWUIlyrAMtFUuzdWGGYCu7Cx2yRdcjTDMecFegl8JX5e2S0O6CifvmRdJWf\nGvsX62V3WpKgCGMbGgE2lF3+5MC8XE3B15jHowAxdEB/MFKGe+CBeYvatzZJ\nWkbe7XTIWzgg+GYIYRemnDvVZJKepJxc6eN8QM+WK6lbkAil/E81netA8HB6\nrHTrK8bN/7r1UBlH0FUODNxUQcohZ1gem+RPrrTlnHMMPCivml6sbe4ZghLH\nx1rUeBRo6uPUsYSKAYipdcqWb+jYBqvzPxF3i79/fLs0Fd+Ko2Cw8y2dV2Pv\nSehwioK+0d3G8nHYhd5XQjr41CfYsHwJ12LhDgCYaxpYcdjEwVYGpW2B8lsp\nVW6icn8eM/doA9r0TunFxGPzcgX2z64HQ9EEjjvGwrB66d+W/j/dA7R7wshB\n/PU9ZPxHNROQD7PwEJ0DsopYQuwCYVfD2d8c2CgQNHTeRCJIjVaGIjzWHPSQ\naZ+jXBLPN0mYMc147n/smG7LKRWx9jomh5DgbMsN6cyAw9ignmmHDEm0L+ok\nTZ/9\r\n=B1cN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCbWSXRUCYCUl6gRY+aAtNJDTCxfuKJlaPnNf3JSTQTMAIhALbg8BwnEI17ABZc6lre6h350eOYE+51U/ph3mXoxqBc"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.7_1572264999989_0.020155601665106104"},"_hasShrinkwrap":false},"0.7.8":{"name":"@react-ssr/express","version":"0.7.8","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.8","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"1aff0b170c5c1befa790ef057d42c901d62a59e0","_id":"@react-ssr/express@0.7.8","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-yhMb2mOByF/PF3rjgTWC24mh5KIfJAUfNeyfpKpj5TGDPkHgqulrZjLZ3JfuqEv8MTGfzflimbAU33OQmlstZQ==","shasum":"3e0370f3f0cc480efaa2e4c602722a1f52d9e953","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.8.tgz","fileCount":11,"unpackedSize":18820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdtt81CRA9TVsSAnZWagAAgqoP/2Xn/DrohbaJmT2K+RGv\nCMY43dcAPv8TXJl0KmBtrTzuLYjckl//6nFtjFnSJ9b27PtsLPnPwBAWPGXC\nPiorPJt688OMOGmipNFd+9lWzxrw7v4MoTkWibkAG8txlp/d8vcaTcowNrb5\nJO27PhwKv/UXpDeawVoDN5/wX9mbRmCrk/ZK3yTENUJXEVhSaxtO7GlGexny\n9x/ESn4GnLi0lSx0Q30viaqsPQkEnRWud70Q9nqv9hovM6le9iwBoKUA4Sft\n9pM1P/xwlkAdhNXTR4bpn/vdslfzrsog8qJVllvU4/0TmwgTpv46dh4YyapX\nxmQBqJut2xHPqI4ONBIvw89+7Ri4lRLBiUfVqiJCEuS5e+iqVlmIbrkNnpjd\na3RjE4qD/FCapDKKalMwqbiBAepxdviZlYEBc6dPNWyHnUGYLg12UqYe6C1+\nqmYh8KvcCmEvXvwG5B+mq1IT1yeuZQU9YY8RzKM7Hgl0R8xoZHDI1qOkj2GF\n5pfRcEOmAmVrmgNgj9ptwpr4G1+3q2uLGjL0f31tRGOsRWhyHW0uzA+eArDL\n01t2zUURTTDWCDE3DOknOMANQAci0RZ/oJsr5Ljmy6PN3xmYmpJV2H1a8gvG\nCywPbDmvzBY4Y1kW5o/iW4Ork6/8UkTvnOMfawlP4/nJNIG6Lhw2OvA3cpHx\n2/w3\r\n=R+TR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICT2FO/NCdYXj1InTrGHceNMqCkyzdG+19sqtmwsABNFAiEA8bcbYNLX1vu1kw4uYBewA7Vi0rUBndrP6ZuKyeBvpqY="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.8_1572265781341_0.9722619810869491"},"_hasShrinkwrap":false},"0.7.9":{"name":"@react-ssr/express","version":"0.7.9","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.9","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"c54bafb34f38db0aef279212a85b40b2d9c3d0a1","_id":"@react-ssr/express@0.7.9","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-fFwNQU+9QYWsc1D2yNuiLWB0PxrjByAszdFsI7nLXIF/wCVJPrJyWvEmLvupFg6v6qN7/Zzw7IeQQPhaBIm1yw==","shasum":"ea4a49fc934ed41b20cae09c0c61e07b46e45329","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.9.tgz","fileCount":11,"unpackedSize":18820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdtuIyCRA9TVsSAnZWagAAKPQP/iC4K5E7H+ih/d1NN80k\nAudi6zvbomXgicvgMA7BRa+Ork/i1To7Ul6neHzW+1D0LXhAh4dfz/dODTwy\nJDYVtfk41+4J+O+SsHSCmp2Pl7AOokVZPZQV3awPryTaSkmhC6YDnn/bsHo/\nkdUvXDo4m32AEDb8RvmLZpZsI+eeVETS1i+5rfhJmRpnS+JZ+E/rB+f2hYkE\numoNFH44W59Ii9cmp9C2FRJj4vDMKawM8+rt0hKKjHaK25duNcQOzyReq7sX\n7f0fuKZCExJle8/leYOWjA49LtdXJRyEpNNzQ8gl+2P7F1Q6EZ4x9insxIv1\nrB2UYnhl4IolXkUkO1YUrMZlPUzL+8ZsjRSHZKpowfRakm8ZA47laUj1rcO6\nLOzEzAQMEd4b3dJQySzQDGF2t3dWGzLqrBv+RJFxH8/Zwf6VPessViWi28PS\n/+D2JmzxQocpAQzAZ9dz3Kn/MRRVn2gtQ+wDNrLtAon9QFOCt6ZSq+po+fZR\no9oh9RcaMMkBALgfsrgrC3cwtRapRa1hS+5kj8Oue++x+Zsw9cfO/p/DYeAt\nHOUIjbTjUPmPnADJGGA44MPsgfxlZbJ1fkLKQZuLQf8CZFigkWwkC7USpb61\ndeBfVKDRf6YHhYhrJUDiQzdfaTrzdWy4uiw6oq0csAX0XKvXtQ2rlXkvSYmV\n62a+\r\n=glDe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAqwmKzWvijdQOQko1Md1UjqPDkovOWk/AdsICMSIefXAiEA4Oxyw2WLh+xlDrengCF+kTbb92PZSpfGWuXOfMHvGqg="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.9_1572266545723_0.5605224597694751"},"_hasShrinkwrap":false},"0.7.10":{"name":"@react-ssr/express","version":"0.7.10","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.10","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"c9356bdb7962715baec2e9edc28fb22d80dcb34e","_id":"@react-ssr/express@0.7.10","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-/B5vlU5DY+HK9f1pJFWpiQ9bzax9hS26UkptimaInUx2xZv6rIGH6bDl3SGpJg2rw6I7Qjjy5Ei7RS4+IlCANQ==","shasum":"97a13e42e516c4a4e8765dad54009991ea3f5822","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.10.tgz","fileCount":11,"unpackedSize":18822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdtuSnCRA9TVsSAnZWagAAajQP/1rTUlWqdWapClO8uL/c\neZIRsAJZn6/5An2HH5BGF8x3Hp/+qB+zH6U/34S+kVXCADQuCZy7JXdl+aOW\nfNYhQnmOkJM/iO0Ju8Ug3mwSHNIIaE6R4U1kjbneIHXzRrn56hQfEyJUj2LC\nJWHAM/Ug+Fg3b+3Rl+p6xmeo4Tedsx+un51ktFkFxERQxK+Bn+OSvZ3OnPJt\n5TowhTL5Sa9/Fz96MFs7uJWIRxlM5VStNiBwnJMPgmi/BRGq83FPmLBrVe6M\nnVYUW5/I0v4NnQI/46iH1d03OWawlTfZI6VfcbMknExsg4QMs9jk0pA5lLWQ\nd/0X8oFXtlY7jkp37ByUpZ4c1+9kR9TKgw5ymD6ju3vaGqjFWawGTAIiKZaJ\nFv0K0Ue7YK3xF9yuzPrJ8RjX88Sfn7/3xb9dziF0/Rw6d3OAvTB+yugBna4q\nJj2SPQaHf52vwD26P1M3tWvsNxWXv3tnWc6pmJz57JXCtHRMLyp2VlhyhrGf\nR4sREBWHXaL6+wo7qPbizTORxcGDaCMxw41z0csuUat+e5Mh8egs+293j6E3\nAYVUZlZ1RZaNk75XeOAp07FF5NQ541z/Hy+UIoolRP3NVrImleNIxPcJWLHs\n0i7fqI4XJDZ8Cbso6Z6tD//HbJhfuagtMhVOe+GOaz/8kJ7uNaF+DBuOpyzk\nnsuS\r\n=FaUy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCHuEd0RUFSFbToaNtnLyIy2MQylSw0xJoUg/r0Yik5sQIgLuKMGlaRGYQRwAjHJNZTGZD/zBaSGdCotbg4KSoMbSY="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.10_1572267175412_0.8767786296832378"},"_hasShrinkwrap":false},"0.7.11":{"name":"@react-ssr/express","version":"0.7.11","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.11","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"5d3a419293f1032bccc2b85c7a12aa7ba4454900","_id":"@react-ssr/express@0.7.11","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-W9/k6HvXInoeRTLsAvLjwzQrOLxbnkWzWwC4zwqX5af7Jw/d8XPJaKJjprqHVCpMk6FL1QOdvNusaAyZhS09Yg==","shasum":"27b1635ee922a0bb0b3e5a0fe1e1b978f0893234","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.11.tgz","fileCount":11,"unpackedSize":18822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdtu3wCRA9TVsSAnZWagAAcBcP/2Am9I/kgpRttDr+NO7Y\nUNPZRcWRVW7mq+J1Vl3SzJZUKTTi+t8Ay7vTCKCcJR7h1UkFnVF0snehvr5H\nX+xJOvyjzPYAPbYKtvAB14T8QAEV8n8Do3jsnZiXUzbjRND57l/1wSKm0h9Y\nv72xNrKGCA9d34qML0orPtEH9zCSFy0HNteXosUrNayjxREcTJbxL7UBM9u6\nPyvNGIvVcb3JiDqZTjmZGJWPR6WZO+of+rHgPvbHTYMgZyMu/QTfTMxNLBeG\nUxw9K2oONTLhj2tNL6sulc1573bR2p27Kt0VWn9VveLgupkyigFwBJvZHnVX\nyh0uhsJp/vn6hcwvkesWeWiF7qVo8K4H2ZM3nDJ6MPSkZET80r3ROuEtj2uH\ntdLeXynuOt5/b+yfIulC8QrttzzrioY1Up7PUzEkbNGN5tAouVJ/F9X14lf9\nQT/3ZUfs5lv67ERvX8tcdX7P6VP8OFmeIqCGllM8JofYxwZ13O40k6SacLqU\nc8KlgaIVWc+XmqUTCHiVx/YpSe9edbZprgS0zNFOqozUhcVyIOSbNon5ewq+\n2mOwLo9OdUdT1X5219bLQwuLEUoNacE4u3HDnHvCJen0TFlFYOThclfwyp9a\nu2+uPnPpKUkiOs6XcWpiaG2Raor17gQTjjufgh1SykKn3saE+5s0S60kWMU+\near/\r\n=A7H4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDoUT5wcpfYSOhvQ18yhWL4aINCpVB5zBbLO6S7MIhNVAIhAJEBwIpIRCPnb0Lfctu7yACSbQpkf4fAi8RN5TNVUb9i"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.11_1572269551750_0.29866824251593194"},"_hasShrinkwrap":false},"0.7.12":{"name":"@react-ssr/express","version":"0.7.12","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.12","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"f0cec7e2fb6d74e70d02685af438c34a74dc7b78","_id":"@react-ssr/express@0.7.12","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-RZKHuhHesjp3LGFoM6Z6pwoUxGjZfLwZIMqhZfBOdr+09vVOmrs58M6yHZUWtGqeHTtWPnYcQNPFfAZczqo94Q==","shasum":"d4051426b2fd6384676a24389683dcf0eba90538","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.12.tgz","fileCount":11,"unpackedSize":18822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdtz8rCRA9TVsSAnZWagAAkdkQAJMQtLSrsqZuAx3TRCPE\nNbXgirfyORXmuiPq3PWWawoEB3y5zBZQUe/RH5o1mTMSBjCsXZvjBfcLkqON\n/FyVLUaOyTMSWFvBE3yH8SixghntWnKAx4VnYVJpYjD2dwepdhWB/RnK3Rp7\nytt1hN8pGQlijYZi04U2a+2UJMJzaVj9NhAjWQj9HCqFYJyV4PO3/qBTpYvl\nKyB03SuzuF2m3VEoCTy+ve8Nw8awUwqfWPUnlArgbO9MAL5zzkjyvGAiDNXE\nLXv2vuIQh07gfNGj0magJRvGl/0aQJG3hwTHUN1El+cq9Iaj7B0ii+Sz4++S\ny/YSipdqXgylWbe2IchYYhKbwGgK/RH176XBbvPNriIUCA5H4MoXoNv8WQgA\nl95SFwBfZGj2x8RXH48fQmJUUS5ArbePvzc7FJylqPm8VQ0bjrU7bEpfd1yd\ntZrRZzN1gWAYvtEKsRqZvnrmH6LTqQzAaiuyHyYHAWrI/WhqmeQLzja2J6O+\nlV4OYBLTdYKX0Hb9AgvRN97egZTIe06T3j57grY3FM69nEZ1Y5IatS6KjS+u\nu7lzbwoO+61jE/AhxxsIYQCGszx/dbZFV1CY1Jferg+dUPVQel1XU6xqC9aH\nLg3QgC1WqhyKWV1lOeDRmdSqx+1PQkxz4wn6Lj2ukqHWAKGomt6J35Fa1dbc\nl5um\r\n=qfT3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDwbWM9iqCxcN5jZRqQVxo0WP1fajXRzP+9YxE5sxnsYgIhAMMGZ2NKUDFkmAlLLfeZYGCG1ukI61OSt+rxp4DRNcmj"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.12_1572290347131_0.6355096715018271"},"_hasShrinkwrap":false},"0.7.13":{"name":"@react-ssr/express","version":"0.7.13","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.13","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"9a4bb8a38c741bbef8515797bbca89006c43ff9e","_id":"@react-ssr/express@0.7.13","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-724DmOusAzyYgimD1CD3+BsvgmFPmO8blRkS10Dylz6FQPVyvi3mAc6YM1clTdQZDuJenMKc9hsmPcqJn43/EQ==","shasum":"e7c7b470647aa30e0061631ee101157474974fa1","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.13.tgz","fileCount":11,"unpackedSize":18822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt0ECCRA9TVsSAnZWagAAPaIP/RxAkCp7czfl9OdCGd4/\n/70xrwEuji/3UKYlq4W4ZGH0MFYxTN8m6jUeBmkDktERImK7iuBbULgPD/Eq\nY4P4K1sihSZZpdYLXZ0O6nQ9qeHp4oXPgzT7eHDza260DzpKMCVWshp7lGmR\nfMHpgGpMxz/kMzOfsRd4UT3AWepp3fzkGf4y/TCebUDOJybs49L8ACMSfQb3\nCBJVW0ls0IbPT5WWClHxihRrxXCrh9egremh1RvC1KDSjWMZfHMoX0gMaF/S\ncyLU8RZf+is29dV4es4ZQH1W7ZMsgaRabO75zbqF4ulrc7OmHI2znif7JpKF\nWAcXsgwON/b4mRCo6TwaSEkTph95AaCKmwjevyKFs2FHD4pfcDYLYdZNcOMg\nFOlEn481yZUPcCRSkUPSJRUl9ehL6YVm3dTQPd7+g2XGaQnSepd/yXvNzgmp\nC/lUafsrXFA7vpzQFZqpxlQ7vQMAYBG84Ds+XXbDyef4TdH0fiY3gmZ4O9M1\nOerpjXzgpirGwwncKhPuRQRQ6Z0dUgSWJN+oXpvECBdyf6zQ8PK66MMoxhS2\noQ1ugDQIddZ86yXt+6P8muz5scDGwB6YLVC7TMEXYJdDsbYBAUnQbozuIqtf\n5mrhG6tEDCCvsS5vbLPHB5jvM4v/geEn54EHDj2wtrkkvyQmkpcqfXJZrLJj\nmnO+\r\n=d71M\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCLoiHbKP5zZQXKLtS6lY0FJahn40DacUDk8ErsvKXTngIhALqFBZ5rLZ/59KsDmqTRfWez1eTzFJdj9jrUFumpn+r1"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.13_1572290818359_0.5604590243664642"},"_hasShrinkwrap":false},"0.7.14":{"name":"@react-ssr/express","version":"0.7.14","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.14","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"c203c66e0cb8ad1b29e4525f97139a8cf8d6448e","_id":"@react-ssr/express@0.7.14","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-A5/Fi81nDLMxwKSyCHfbP86DV0yh4N5wepV0VkL82tWHYorHD1q7Btg5VSaHl6Ev63ksyDiNTg2cNt4SDROo0A==","shasum":"f282d88b2c2aa133114517e757cf8ae4b3cdbe01","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.14.tgz","fileCount":11,"unpackedSize":18822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt0LvCRA9TVsSAnZWagAAwIUQAIk8dRNy97w1q7cTJ+E1\n3ydkD+7/af7iPyspoLDYCeZelF0RRB/kCdrVkfSLrtPXxN8gjIKNzNRTAoRY\n5AU4O/ILLLwSO9NN4HZ0/QyxHOJLS9GNofZV/F4WzBTlSGd+DZDgGzAXM5Uy\nQXfnuOMs07z2J5XiiFIjWgJx5scQahGolYahPSWD66iE8pjqGPqFFd/hZTy9\nxQzDPWRcnurWFdBtUv/rd+YISZNTLBqx1qpfKoINYpPb2ld7aT7MT4Qdy4FA\njFrE1bEVYAwjqKygDOLj2U+rgF6TfBiiUDSeNGVRtQIAvMkUcmfn2EJvOYnW\nKH2TkoDpkJJptfq1wOerXyoqLhMJtH+gxD74KPv1FLo391ZCY4RoxH3QgTNq\nIIhwD2SJ/X4HMpl0aDJJ38MKeu4ILsdVHe11eCyZZie5CRI7xi1U2QDfVNfZ\nyxAYhZCZIVg2CKAD0MKlGlsyYFeIK7fYKR2huHyy3oBte6tOZOo/JRNXDExO\nyNx+DulYW54LJrvng6tqctXYEjRDdRy8UDU5N4X0Ql4ebqYpIwnZrdmR8RDJ\nv819op4b/vJ+d5Cgh1D93LXmuoH/yVfGBMJf3EEID+L/AaAYWEgDZnWy09W/\nwswkn/SICW8s/p2D2VbltaviAxLX6x46P2nORFHrVpj7QsZ9KnMf16pefwaG\n3fET\r\n=4x6U\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHGZLHtrwkUDugJSFTBYAXCqjBRpLGBdTKiH52NLt2J8AiB6q+xeBQOHpDMMTGw8M51BvCnELk5SCQoEoWEq82lEkg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.14_1572291310712_0.21297521750428938"},"_hasShrinkwrap":false},"0.7.15":{"name":"@react-ssr/express","version":"0.7.15","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.15","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"c52c16f57e1758249264ddd5f9eb55efdebe620f","_id":"@react-ssr/express@0.7.15","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-KLLN4GAR4ESmFWAJJRzEyHsE6e6zFuDQJKzGJQhx1LkW1DSv0CU1Zk9Gq+uhq7hEk7HmYxG9uu4jbVvw6WzjWQ==","shasum":"47ec299271c4cccdcf44b5d27d55dc0cd0eb4ea8","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.15.tgz","fileCount":11,"unpackedSize":18822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt0N/CRA9TVsSAnZWagAASHIQAJ3Hq71dHwpnh4QSrqab\nMCDd6bQC6+Aq4csw6vZ6sCskIuC4tEOY/9FzuqNTtzln1LWny7K+r5YxCE8N\n6CRkZSOGCAsG0CQFwcRetJBqfdQ+23zurFr+ecAG5y005PN9St4FCnzb1Kvw\nwSQ+TlPjzTvEsLGlMZ20xKsHUC/VyW3bA4vFmjnye7Lvf+sK7vfuR7i7ulne\nQqwOwSCDn80ctEheynOowKGyLojte8t9Go3r/9yzJEZWJ7sC9V/fEngLAVJ7\ny3RxaA/ODvQCg7NtHYyc3wxsCOruInBlWmy14uK2APjyGfj1cI8wkgVQ3PJY\nKAb1MRt8I+2sVypw5M+350hLXh0drmboN1gzkkUvbn1SYxH2dtBqlfbaGNq9\nHNwYKjLdWUkZVTNuisR2hEF4B1bkG+2GG5vqRhDSXspJoqhjmk2N6nNI0lDD\n3Aci9WNhRZH+9Dg6kqDTJRfgTTdfrmqPnskcLhW4nC7aQKI6KqoqtNEtwYyo\nNPRDtY6pu1+zSRz2yElhRGPaJKRGCcKUi6whnGhV+JmH68ITnJBF/3GWUYzU\noiVxhXQkP0j/54BB0ZtLfy7qIfWelHr12J+YKePODe4X5DCFvZJUsKnUh1Yw\nT4y/xj0Y1W8vRNNL+xdVBctLzrRrY5LTkBHGHIFpB9YcJuyCyjIBM+UH7eT+\n/ZqO\r\n=tRAf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDYNWaFl1MsRPIgL9oD5BaJR5RudzX1yoNpT3rfFaCb1AIgafTskwlvlGjUJKzRvwvYnNxov/f/YkYD9nuTgf/3G6w="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.15_1572291454681_0.3263813354947689"},"_hasShrinkwrap":false},"0.7.16":{"name":"@react-ssr/express","version":"0.7.16","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.16","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"0b25734f16dcd6b18e6a191b8f37b72aff9a866f","_id":"@react-ssr/express@0.7.16","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-IfDax4pMetxH2gaU7gGGhm/WTsjYgDrmuyDmM0au468WfloFIkLxH4HawxMqiDX37DvzcI0RukP+WbxhUYJgpA==","shasum":"06ef7c412eaabb71492b74777e46e8cd8af308d2","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.16.tgz","fileCount":11,"unpackedSize":18822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt0RpCRA9TVsSAnZWagAAkw8P/3Cg9GokwaKTSgPxou/b\nZGXAcCq9iCnD5Xxo3zGtypCNtMultuOnADx2ZaKpOfUXRpoZO0JAMC/oJ9X7\nLWRCqrvyuSURLa6R5uGddegPsVibR7a6LWVoOoCFxYOCOtJrRlFeBjRzqGeb\nwVLgjsYOSHzWOTct6kPKizNiiCYdlJ7jk/jA1AvzPyp4XT5K1XrD/S5nAWJW\nCYUydYFVWRBK3ajOzRL8nfkWukg9EgqHiVRMAg4XnDlTEVzFBFuaXmvZpHQ0\nKAe+c+5pnz6vIyzvBMKCaRgpP/5dZ6QhnCN5oPbd3CC93fYg+UsS2rWOsYhf\nJdFw2qLKzycNUO9awx99d0YnvPMx8qsDRtltdtE45P98YliAG0/tZPR9kwHw\n4HM3wSXqdUOg4BKO8yxokmiSnrtVnUBFoYbK8Wv9TL3Jh654I7ekK1QpL+r7\nr4cdO8DhV0LlLSqMga63MF33CByreo/3fqolPszMJnmMa5hnzcYNPiMvNnfs\nCv8BSnPHCt1xq+uKBFkPSg51Qq791C6AcR4OgelNy8qxwmQqYdhzRY/VjAuC\nNnKjHnBcwWzmuhQvJYmtTUtaQ3VxCZDJTgQ1pTPMceZgFYhB8WQO86EyYr8P\nACYRbdvxj7GJKpIqqp0meWfMMHEtDiJsgJAQetDtcUjFCgfAQJXs6MEMg1Fi\n692b\r\n=SWoK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDjQ+/FuFYUQEbS3rLROeaUs9VE2GGxe5+hAAwdjZrExAIgAL6Aep+oAB15PxOJhqFbfOZcHDwul7UFfafOwrrBNr8="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.16_1572291688677_0.15017823543009312"},"_hasShrinkwrap":false},"0.7.17":{"name":"@react-ssr/express","version":"0.7.17","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.17","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"79175c22794b32c36a4976aba17c2c90016bbd33","_id":"@react-ssr/express@0.7.17","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-MNbkn5VqjfTY0fWibivIr/VJEjoGm4pKnwMVRBfOtQi4cp7DoS9pDimneW0XFS24Aqx7q/pyMLzAjGH8OWeUQQ==","shasum":"8f7e662ff3ac794a0e7bd532614ec68cafe34241","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.17.tgz","fileCount":11,"unpackedSize":18822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt0UZCRA9TVsSAnZWagAA64MP/2/lgmpzK1vugIH53pkH\n27BDVhOXnGlY82BHybug9H4OTQasU2baYSY8BDSBHJDMhX9hfylJ4U1HP7F4\n6voKiPl6NMJolUJmxYF9srbd9WK7P3c8lwGaxLoCwHk5WWkTLDWroor8gcv2\nWamsG2foRggsWnn5yzsPCFei0OhKrjEtnhztcgnfyhNF57xAvHcNDXfog7Qg\ny09k7bZMSkbredEzEMPDC/+E0v0T/hhSweMTtMD5hceMSJQObqvIMia4vikU\n4PdnT+GxDY3LiGxrZWlsD/QIeS9b2QEaypuMfiOc7IlOGrFAcgaL58NQjWcV\nm3D48ws7eNyz84xUT3tWudygzcM8L6tBZN0nt2dq+RRg9O68R5/OxAxOnXFa\nUWlkPxwyG4zuwcu/f9yZbujX/Km1mNf/jyzUa4ajXlcQEUgojL/Xqs01LZ34\nrbDzlCaSl+pgTZSfgT/sQRLH+y0PCM3d5eFna1evUvsC2kDleU3Xzmfdux0L\n1t058HiHQZE14O7GV1UPtXaWTu077B+K6cpqn05aNQw77TOSu2kRLtVsPNKF\nIlUvXMK7camLTPIlu/EnfxtLFNCht+YBsOdztmbRHvEU/LicL+0WBg7pMZiN\nMpfOpCULDiCG8UDo1G9ivM4jVR93YyDTkeUK0+2kkPjFKyU8HqqmzUn32/3h\n+MCi\r\n=kaOi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDlp5W/WCZnUbf0fLw0UcwUrH7zaCDkopBxl+yElNCvUQIhAKzGRJXs/HR5I8b7poFa8i7PnrXNBdNS1rBON4fFghb6"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.17_1572291864932_0.44482059726388257"},"_hasShrinkwrap":false},"0.7.18":{"name":"@react-ssr/express","version":"0.7.18","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.18","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"8849f840917731710492bac3d432f08cd2b9f1c1","_id":"@react-ssr/express@0.7.18","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-gLZZtVQp0JdiwK8m+XzpwbL8OOX51gDQFv8i8ydRJ+87UoBKlRFfevAjayAfBFWYtdhoOEALfWPlERE/ARPsOA==","shasum":"2d47621434b3a4929ca5ce6e43b691d3752f7128","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.18.tgz","fileCount":11,"unpackedSize":18822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt0sBCRA9TVsSAnZWagAAFbUP/itMpvKQ7KXBMmTIPGdV\nQkLvu6RP4WsloOKeIXceXhDcLIQGRkeb5wL+MmxOuyduYL69+zLqqk47mAx0\nj71jZQAhOr6x0gzZCZaozlkafLNrspwP8cBO60VxrYciE2whYCSQyqTAa34Q\nDxyuSCWe1lRTgM9ecdW8HUgLuCEMOvH//e2Q52kETRqzDi7xYScgYiT105PB\nHBWaHn3OYf5q7GK/Bl+2GUCeJcosdnwlwDzsNSBfXzfrAm9mQ/Pcg2QnIs+3\nwkly2bIHSkH3lK6bWEd4KkN0Gn6XTaP6e/k3PJscpkdXEfYmfCgQr28gP32F\nhkG9pZOu+fsJ5BO7zDjP2S2bR0w7coJOwJeqevZjo8viHTEfxoHmyY75hFLK\ngi6w58f1Pe/sle3jPcovWAuI5Qau9ygtmgzk/Wqbjz5d3dh+qlBDzDFD7FZf\nimsksGtQPc84XcZxTHbySG7O2yn2208jNd/MLg+sAqt8TTVfZPqFK1dI5Qhw\nPNSZ6HD0ZRd23DVoK9cylrUxU71H6Aw4MxjVWUYA0vqmM3L2+cw9R7P4isAI\nzgjesZI9T0RXkCMPI/5bqzZ24TIFxcmqzLoqsqLfKFdI7GKWrr7ucInW4bja\nGsYnh/QRg7drBzC3PQ4QX4w1Ua0ajmVZSH+kqRPLr9ZF3veOC+Run2azUHE+\nPj6J\r\n=aJr8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEjqMz1sCEw1z1lwq6Ro6Gq5dQI7DKV2oUBqh0/UdVzHAiEAhEf007Jfxi9I6sIvgVjMYt6XMiot6hH5GeNmWP7+STg="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.18_1572293377171_0.39785782814023896"},"_hasShrinkwrap":false},"0.7.19":{"name":"@react-ssr/express","version":"0.7.19","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.19","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"26071ac4000fc9870b97eebedd32c79f8ee5062c","_id":"@react-ssr/express@0.7.19","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-HEy2+TkRRM456TNAKMKT/mjGK85nhu0wNDAr2m4/dKlWxOi2ff5K/7QrkSMA04dVNb96tF/NlQMGlGCAkpkhog==","shasum":"e397f06dac62ad416b6f55c015f3df79f26274cf","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.19.tgz","fileCount":11,"unpackedSize":18822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt0vRCRA9TVsSAnZWagAAzRcP/1VYgc1BrWdFyGxcmgpD\nFcI4DUmVDmQr9siNlcLinAEnLcoOZVJoegZ1jWzul4Osp3d1DiLEx5nw0AGW\ndlwbr7xE3nMdJfoyRfsjfUAkt4iMFo680Y0Rq1PcssNUM9UcuytapNjmK/vF\nHo3HdrybHEREWdx+ME5yp3kiJ/Ha3zxnTyRBaJMdvKg3avv+QJcRY2kB436L\n6Xb4yVhxRmpfYtkJm4+PBubaAQ4LUJ8GVtZ1ipuJPaBE4182cFE/9330qkKB\nTSnkSKVJ1lLqNHXweN99dWYStCw91KPIj3mXsropEke7r/VS+SpJ+WW3RT7w\nsuRH0VM5C5VpP/bTVcK2Y1APQh6QC4DQFfZtvjFzPEPDq1YI7vYBJeR8rrGi\nbG3UrJybpTUJ1FhOHSG7XRos1TB5+6vyusQKvc4jxWewbUo4T7fiAtZfuAjE\nh+QxtmgGGIuQeGylfc6K15YDX+KEsj69AARgkPcPdf/hUdVvU2BaBLd0tDYr\n5bJOKdSJKgynQPzQNKI3d4DVuRVnxCbpYWh+Tgyk+wkpLHd5IUmh3hTjHYrU\n2zItlfo7rcGA8lCoV5LqJWp/sqZ2n7qmIFIJwUeVUT8e5i7044XZOWmVusbu\nkino7QSQtyv7k3OEecDx4jmLu1nrejwoZQpY95OAXqcmTLqMufPVdZ+DojBT\naamm\r\n=xx5M\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCDWWgtUGCX+uofUq7t7r9+G5lnNCqwt6lSN8vqhUvzowIhANPvJ1zYpjJk/sM6I9qapIMUVNLquKb2aOe0SDw7D051"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.19_1572293584656_0.11688281569003078"},"_hasShrinkwrap":false},"0.7.20":{"name":"@react-ssr/express","version":"0.7.20","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.20","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"44b98234dc2445c5a7f87302eb86219964b5e546","_id":"@react-ssr/express@0.7.20","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-L1pWha/L/fQGhmgF3gUDXJKw5R/ZyytazXszKRKjogUOl8070KMtskGFVWmRW0GrBK3XCpHXNcjosj3dI+7p6A==","shasum":"9ddeb48b4e9da380232964a4d50f7bddfb1ba770","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.20.tgz","fileCount":11,"unpackedSize":18822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt0ylCRA9TVsSAnZWagAAPhYQAIL04zm+n4tCHmqMMx7a\nn4n+kUmTU0gKX96jxJW4RnW0u95ZVlLqHwav+glRzFiyriJULaEvrQj2P/Ls\nizVXv5i18bCuOxAZKf7pRUFuqnBB9/FaxjhEINuGZH4aCmeHkjrdZa+EvlVZ\nRe2jvjsQPOJC7rB2W9PfT1cCsXbqR/NVrdDRoUvFnt72g3KXGvnqnWaIy3bU\nDs2nrW7QCGqDBOUp6MZHXg3KzdJAbrqxYbkdzG2H+one+BVhS2eWldaAobzg\ng3rvb1cYAEcNGFNTNwGRalr2Lgtx6AxxIXSN9aqIYcOFgwb7HiQdqFs+JRg4\nNSPJiN6m1Z6IrYuTZZ4J6eeMbgYkhtqYmRZi5xfwIT/cYSTSdXg3cSRFeZHC\nHuyVdz39fQ32PWwYs+kgpBKHQrAXinssOKOEPgRiTaLlp97basZzsJNiNzp5\n5BUNfhYqEWlBpiEh7WGo7ozIttxd0/QpZFRy1wSy92K45KV0E+kxvUqkN2iZ\nHiel+FDMqqCeLrDBNtpnSSFMoZVpptBsHJ9h1QLG4fo+hB27fR0mcE3xigro\ngahSa1p2TGzZsYcqrWpnr8c8619NuVpR5gKuuVvwkD7E68UqiaCVpIbPYO3L\nI9bBTOOt6vPMozIwOrCH7YpmuIW8x2zl1gvxRZgtM/KdtkTsq69/K6mfgtCA\nF6Ow\r\n=NWBF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG+L7O2VPxB723G6h/l7Kwg+BYO9Ksv77/iiUI4Ql4doAiEAuBV4yNOqmbDz3fjivacNZcFkuj/jb61eYhrHrV5Q+Ok="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.20_1572293797203_0.6890489275700833"},"_hasShrinkwrap":false},"0.7.21":{"name":"@react-ssr/express","version":"0.7.21","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.21","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"16f78c034d72b6d9e3264ccfe8a302feed57e673","_id":"@react-ssr/express@0.7.21","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-uRNYauqhGcDysNMQMz7I3BLsKxzdtgrqlV05gH8hDzvbyoNHKERSQ7+9LeqQQ7J2XMugd4QABNhszfddbdIRzg==","shasum":"a230e17c1fb5ebce310a5df77ca964756a321a2f","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.21.tgz","fileCount":11,"unpackedSize":18822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt00YCRA9TVsSAnZWagAAPpQQAIw36Z8dYH58S/UlYEc9\nxIOemDNn4xuAOkVM01U2U6+I7lQnUECzGweoOwC0QWe5xYU9+VTHdq+ptBST\ndw6HsRRnSjEAXmHgGkbz3KIn125zkaKroeF9oWqlbBWnjYqX3wquLkVl+8Id\nbYdidR2R8zIZ/Q+MwE3tzlMr4l4crywGOw1JnCOTpyAAQu17NAfVvzUEErU0\nCFf9Dtb0qnTSKhyZEg2gfM7Eyoxx39mtjP/PgwAHiG6PcBBEo+T1feOlrgZe\nSkA/Epo5Qv1i72I9xXFqxDllTSinBPnrNk9OFq/C02ILON7yzR75LhI0dGVh\nfdbZNrinK26duwzIF+Lm/HfAbCHtQ554urh2VlR95DQpz8HogbeMX5SjFBpJ\npKlO70wrqGzWDhebwDL59EIXA5Ji5PsZeZY+FOPR4jbDmN/k9Bk1LpnkeouA\nDUbPw+5Cp9GK+Ep1mJFM8U3N2p5STxslVRTUAl2w1bST2nA6+pI9VMpDpNMu\n5NTYvd6LCYRaWUt14GBXyif4ejCMd1yu4twIQezwXQgs3OJcHz5bVwxLVpRS\ne2jhkmf3jCnx9VRuJdv5M4mycJLdeP7C8Zg/Oqw5+dr1NyatgvvVJi6FOrTY\nSg888odDksUxP4qQVmVOllWxryiL8mZV6qEqwprlx5/nYl/NlX882i1HuYDk\nbi1r\r\n=qxnC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCe3RuLagJgrPBr88lbu9YkAuM0udq39JvvOxn2ALvgcgIgbno/AqkyFfB6KNUFO9cn5kszd2gk/MMD45fZz0tqpdk="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.21_1572293911770_0.2679813080832565"},"_hasShrinkwrap":false},"0.7.22":{"name":"@react-ssr/express","version":"0.7.22","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.22","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"5f4a4d1cf10bcdd0c52c04682682e35762d2a5c8","_id":"@react-ssr/express@0.7.22","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-j1iAs7y/BcabYusNKFyAT0c2z1ZnApWUFZ/gqKR+IjluQorczXi/vBb+IYkSJCJkN2bWODco1yzJ4/L3D67aqA==","shasum":"bd6091e87c3fed50484ddf48b91f3408e3230a9b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.22.tgz","fileCount":11,"unpackedSize":18822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt0/rCRA9TVsSAnZWagAA3moP/2ZMsawu/hs3/4vo5i/E\n/P5KB2cTWvtYoTdXmncpLHxEEx2BsYhRLaA6gef8QAw/m7HqBY+z1nyqK9+6\nHzdUqN+NeTMHWtPoMVViAsuSYwBYz2W7cHoDBYRxtRkxcRPcWNEcMA4RziTo\nH5/ktVk3Y3iiTeDuc/BJZk7JgRyEnCYPMFQlEfrlN7/mSywv25HgrMTafYzL\nBAri76iPuBNBnELqVQdYG9t9FDOkaXbjC8ipyonv0XtP60uN9OfF1xmJJVhw\nC+prT7+kbjLt1Hn2Hna4BHFMe81ojv97lpR1JBz2LCyJGgwA5vuRbCVF+t1M\nua5fdeYTRiOy1/1Wedaqt2jxJSkD/WWe7KijKBs75kjSLYTPCphIARupC9is\nSZapGP7sfKmOXs7tYnu2oDi9MbymkNJHUr/r/UG+ttuCM2F7swiV4UoSDg2d\nfxZIhPRHIGW8hk2NnIxPh4srSkOWqb1IIWziVp2DwgL0/UP3IRMsYPpekDtQ\nvHhSjxI2gwtdy7ymLQZK/6DVjyVq/ELhFvU0KTzw1kdYyCxM01s+Nr3euFA+\nK+tV+uI3mYZfjsmSKHRVnoYB2ZzDq2aKAhneoawtlHAfHJivREefFKusXDCE\nBsNEDE+hlKI6wVJJC2NHuiBje4h8IBUZJpamLUsaKFhTbW4/eEPB5v6dGteV\nXb+K\r\n=4fTY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB47zzsjgGoCvxiLdUEV+ykybVXV+eFgaKPADiFXLDdgAiEA3PJYJZP1oVhsSlC8OWlsikLC0EfUqiebyENtV7qYV2k="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.22_1572294634831_0.9922518231336082"},"_hasShrinkwrap":false},"0.7.23":{"name":"@react-ssr/express","version":"0.7.23","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.23","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"f69eac1a0d7977f764fb65c84a229388ff47675e","_id":"@react-ssr/express@0.7.23","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-X6wrBTrcTNTBNMA3a51FTjviDoqHZjYjdJEtnK+eUWv5F5NSagYbFG/8psZMT+JipaoBvv9nytYsmeFhUa23wA==","shasum":"d33ef99830eae8a5ad48e1864254a97f0ea2da47","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.23.tgz","fileCount":11,"unpackedSize":18822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt1EwCRA9TVsSAnZWagAA/kgP/3qe5hrmk/87julL1KQ+\nbrhduAeFEyW5ObJnLFqIT1TFy+6WtOaRJ6vj9eVYqVI+HqLp86++iZ4TxNm6\nj5y4Gvu9rZrs8o/Wz/bXxKQ040y3HHnYXNBuCmN/27SAsaVBQ3LnHlr+ZrMs\nGjWRGVcCAaN0qk5KmffY8+qjBb6UcT+mMfcnVdCoxPgjro6qcF9ErtYelhBq\n659Z26/OZYk8fhCqJvilmuhvQodPCrqtjYCuR/t4s/vFkRBXlxAv5B7pX0JX\nsssQbVOfY6YK6IaaRCX8NfyAINgXngRgoAt7XL+MsGrhuSNv0AHzGuyUAErL\nqyzFu7xZmcVDm4ZmNbYLVPvBalWC1P1VU4nE+D5s+iQoJu+oxagBkDA4np6t\nEj8o0wJGLFZ8H/Umj/nnEw5kmG08P9vNXGSVrS/GwC4wSxgVsjwpdtcqKX2P\nl56v6JrMeTEdjBLWnAeJQmcRur43aUlDUUqfFuGyCFOAmoCNTzr2ADCxeze8\nG0ya6/5d9qXXiWprMAof067FtqFE4Qzrd8om478KBGQ1oXF+RppWhac4B/Ka\nOzqC9cN0VH5G5rpt4zhRjXzbaJf/iKG7Yycvi1B0xLu/j3B+nouBBZM/EdQq\nlG2O5tIvmaRktzZQGBxNUPzZRzUlgLHLce+YCGRNURbqgSKATzIioLQ5akUZ\nepo0\r\n=p3od\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDQ1JGO9QJMqhdQlQY+dlIPniNO+Agu3Wto9u5yrfSfEAIhAMuF8uRp/Wn7eT133TMvF0h92H72CwOlndTCqVSJOFjS"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.23_1572294959902_0.3329289235591091"},"_hasShrinkwrap":false},"0.7.24":{"name":"@react-ssr/express","version":"0.7.24","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.24","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"b33f0eb36dc9087fbc8167460fab1b449049a8ef","_id":"@react-ssr/express@0.7.24","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-lSdfNL9YRvA9D2dydTD3YWJl9roBPFiFs3HloSmS8tdaOLNiYdQKIx0mOD+Db3kpY/E1LqRVqZmA3cVUmG9UqQ==","shasum":"01f425f8fc91e51c83fdd3c51779ccabc14dbbdc","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.24.tgz","fileCount":11,"unpackedSize":18822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt1IBCRA9TVsSAnZWagAA4nEP/AohfUTkokkpGuF1BjFf\nkGeI8FRmJ/l5q+tFDmGGDt/01EM/D/p2ufTzRzSWQYMtzfYv8Zb6l+oMaNfV\nd8aQuWW93m91ARu3LEtpjLGii6BibBOsMmNGiv3VzWyt3ssD67IcrdZdY1p2\nvmHbh/F2dUTp3fbHb8IHdtxeYy/AUH5eOnlkMk66uNZGU0RVx2FmgUV1Mzlk\noeOLrpA825ghTwdilFOGhXBlOWFsNCG782BzkfWfdiaqWFErVmbo5inC2DtP\nLFIBTGa+LY1WFbkJnGx4dgAEsLj1549eStv/shAUx7iHr2gPa6sZC9tBHBrv\nVMVyqFpoQtjlYrkhP9wBcE5O4zJMrCNfFpqVY/y1AUULMDp8aogU73z8Dca/\n1P1eUgLa1uAjT5OPkZvF3/0DxjF040ATHO2z5n2MRtdYjuwAZP05UYlzuov3\nHqEBYVDsklpI98h5G39kVj/yJcywppbfA93dsqao77jsY2nn8GC1GVA9WamX\nuSgvcLRBgcB95AJKgfKcBBq20HIcUnLrM6YxKo645lOixvDiOp00if+FZIA4\nRvRJLJ0Q01CSLshk66RuiQZIj1WVo5ZXESvhmcM82GCBPxL5Xnuy9CrF8gXl\nIHG/Hf5XlBIlhx97m6af2Xy2gU4WRbwBRiOEPno/c0WiZMQQb5lnpXQFyGIi\n2+qx\r\n=CEJT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCcvFibSsjCSLHy/BbyKWJbOpQL9LvmhU89a4FhDySdbwIgQYvJH+vzU13LZdewIt0lPHXoODx5kJkflf7E4p6GDA8="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.24_1572295169150_0.5889026351298516"},"_hasShrinkwrap":false},"0.7.25":{"name":"@react-ssr/express","version":"0.7.25","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.25","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"ace0d3cdab0e6224baea8534b751b04da13e92f1","_id":"@react-ssr/express@0.7.25","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-xiXJPkJmc/y8FOxqIor2kTNwoGa/bf1M8zfkf/dOpEY9GnkQE+Q9qJvdOYA7ukIlkU7A81hH+KmqlBKR8EWbGQ==","shasum":"d1c960ae5d69ed50d26ffeabef6b86a949835617","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.25.tgz","fileCount":11,"unpackedSize":18822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt1SjCRA9TVsSAnZWagAAQ3YP/3jlAAmub0RSmtnL7crQ\nivSS/4ON2P2AkpmT2Z46dXWULlshyB49IAjV8gwTudU94u2HxAKM6ZhYYFGP\nF2OTdtm2IAeNFummnBzUfahUywiyub65oW15vjiT6JJE45Fe6w+1MaVLjYWQ\nlIFfUt6OALf7vofzEeTuMKc93pYO/wChjTgPRETIFveI4YXtv01GpOtq5eNr\n2zE4BKBrEPuRXrErMJfc2awV9Fuixp2ZWaP7JHOuhXCLHsOXIuwFL+fxGuir\n+eYC+kV0VzLVo8cvfmVwTDjB0HRxTxve0vojRpbE5xatDE8Xkf59IzVcBbNm\nAQS8AMA+9ZdBmc56rbV3MWwpMljI4hufMHSY9RygfRMgiJvDvgC0hGIkv9BS\nn55Jc7NhUbI8iN7591aBfToSHQ2LcUit5x0COPSAe/hh0FCrer33YgEoHFcW\nQea+QCiSCfw/NCvyVftmvjuNItWzSKkr3oGp9gvp5sGbm3Zx/l1go7bieCOU\niyoTeDlAJpPfnNaZohRAbgME4MkJzhhJbmfssLY38Rbh6ve8fFK3Q7394yR6\n6SIUMv0JYo9U7j5gKeYQ3bUWpE737xfXJxPe+Mcq9uBJK/6RX86IOSuauFmF\nOK7CLlzTvd4Gs8HgmxU0/b+okTzq6WGERTiRT12i+589tzBEobcHAHNx9rJ2\n0WYN\r\n=1MVo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAOr39TbO7oo5WwEm1iivm5b5fFWXpMSjWwBzaN3cJeoAiAlxrvvxyNbTqdDcwsTqghBlw+td5dqJaVNqQSHOSNcdA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.25_1572295842643_0.3711650976199319"},"_hasShrinkwrap":false},"0.7.26":{"name":"@react-ssr/express","version":"0.7.26","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.26","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"081e6674d650d67ba36ffa10a5f691acd1d74be3","_id":"@react-ssr/express@0.7.26","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-mIjcooL5Y4SF/j4jjyJ8XK7CWSf7Y6z3uFk4sCyrs2FDTN5VEF/6NUXVh7NPtPpWheBaLwSh8dd115/1tI7udA==","shasum":"644baf608a9d153f5c307c0b474fd1a1458176f4","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.26.tgz","fileCount":11,"unpackedSize":18822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt1XuCRA9TVsSAnZWagAA0R4P+QDtJZPlvjDyifTKDgcs\nmwkJV6YKV0b20/GnOUYGjAaQ9t+TdqKsATfatRV6LsCy2iSfNB8V0GSUHpI/\nKhnhK+Kc9soUN01nvrROtkZAq1e3q5n1oB90gY0ccpOmd/J9QJATYIQdYldg\nPq1e+mCSyiJWum7whsLE5HSIDC+r2KZiW982GjxOrX9R8CPFq2BGNLBoZfOm\n4RRKrEcbm8JiNDI+9xvCAPygUX7pGiQM2JNiL/eq/12r/RajBmP1lZO/pggx\ngdR56IHdB+My/lnvfyjHehit5dcM8sFLPNwnO0l7SFFBiO9FzxB6XX06oTGx\nwE/hqNXtLRN0mlWWafF82PNM5i6pSLWcHhDGHKOoZkjIKgXpg6YvTidYo0h/\nceP8FfT+TKFm3JrfT4SRSb5qDTznRNyaw3+RDPwwxBlqAAvvZq7s3mf89iZP\nI7+/LCQea2Js37ajuoSeOecxPn4tJ6oEUE/ghCZc03g3TNW72lkFd4pBpqS8\nCBYuU7luVEiUc/FvcK2oNT6uZ0KckIWe/IK7BWLh6jiS7uBUs5Qc84UUycq1\nxhyqFPQ7wW9XWk6XF1UDODyQIZqsHxycJPMLxUcKbzkmGstJap5ewE4/Znen\njlhCuBnX6w7XW+H4pr3VaZMvYMmY3dKqKBXA3IeN1ZpAp0BEij99FNQeNMzX\nKAW7\r\n=lFpe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCZd3SdywoLOLpYQl4+7m6KRwaFiwNXR9Wuwccb7IDutwIgaE9gm1cPSwk1jUQlygIh2DOnEPBiL0HFsiTwB4P7LoM="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.26_1572296173864_0.7206125003217407"},"_hasShrinkwrap":false},"0.7.27":{"name":"@react-ssr/express","version":"0.7.27","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.27","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"f38972bb642e0bcfe3be5836a5b26919b0087c38","_id":"@react-ssr/express@0.7.27","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-LpX6liOU5gPQcN4VWblJhDMp5YJQKw0ecQAzraJB6cmeL+7Hxm/i7kcOR4XVOxBb5ZOmQvAHhL/AFlCFr2iF0Q==","shasum":"b67f49d172befb4f28b5087ff6099e2dbd7ced23","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.27.tgz","fileCount":11,"unpackedSize":18822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt1bHCRA9TVsSAnZWagAADpAP/2jMrv2i03NCsBkfL4Ku\nb6xhw40BZ7FKE7BSi6o0v+AxcfjJxErxL50sVSesR/odLJE2sDCInScu7xE9\ns5f5cXcH08pAMfnV2/+CTdWsv8JiDPQgzP911J2afHhXw6rOtdwqcd1Gyp1j\nFACZ4sMBnQWXdjIJTBEDE9p0GZu4LyeUIUjc+f7mzCJNlc8Ss9PJ3SZLIAtr\nqQBXwIeRjzJHQHQYF8CpdICFvCBew6dlAVVThQut62OtOmZCAWf+4GVP+T2p\n0sLv1huQ8f5m0KdkZ3Lb/K03mO+tTThuVX/2X3OSV0yEEd5pWex0nH9S2sxQ\ndvLfYP2jIWBxvGsrTBjadnDKtiujuiKa8Hr0YYnQngU54cn0wMj9XC2gxCU2\n4o+l5PCD8aDaGnEg16i1h795LJqyKIg4pN0rBCqpqX2mQz/TNoaCqdrrHbvd\neFSKJoqk6ggV8Ir1F7SU7z8KWxkTYRv6dFaVbKoI9SoAgd/j+P/q+e3SWi9v\noBKKCHB6/GVQLiiEJ0ocn/YPwRZRPuwQcCJ1+mFohxMW66jml0cxbpY/YHDE\n3DAiS/hPdaSvMcmAeHi2NAYcqDpuKvpbQgbOo+iDHTJw/kSfQhaZ1RLlDub/\nTa/Htk3MexADQg24OMWenAbrEcyLbF/v9Ou0+s+yRQrwlNDLYGyyQkUXS6ES\nXyoS\r\n=4bUv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICOy18tWxj/Sm72Z5MbSU2uM78P6QpdT75zxyquAmgVJAiEAhc+d1S0YpkvkMZAj6pTHtVY9ioOsLTeVTlGVW2BZ2B8="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.27_1572296390832_0.2135823178957008"},"_hasShrinkwrap":false},"0.7.28":{"name":"@react-ssr/express","version":"0.7.28","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.28","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"720ad62b413b52aa365b0f22455a9a52942bea36","_id":"@react-ssr/express@0.7.28","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Ho41w0KE4L5xoKQjua8jYd8fdaaH1orGgWmAGl+YagladWxHRI3SdxG80EwlFwrXLbwMCz7jupfyFzD5Qt7KdA==","shasum":"fa8e8074ea30b134b71ea3003c76c90952abe106","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.28.tgz","fileCount":11,"unpackedSize":18822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt1lKCRA9TVsSAnZWagAA5asP/0dFLDl7X7E1A+2hqH06\n50LnZ5SN9E/m4CFjf8Qe/uhB/dEEJg1d5w6z0a2TFaSZkCLJi1olMFirduUx\nai4CnwHbs0aUw8Brt+WFpiK/+7hRi7ZxYgqNfj0NR1IdWMuoXBtk/3ZPQPL/\n3h1oi4L3DOaELM+SD9AcnQ5fEU6rZ3924BPcZz1wAxL/+lSk6864y2riXStA\n6sWCTretDgIcZ3wuo75FiQrtoou8GHtanI3SOG8I5iyJpeWMlCjT2613YuLo\nVhj/cOCByAmSQhbTosDWusOrcIsQ4kxxvIoJWCK7dzwv3bdHJu+kybYkClD0\nWUIjGvT8mhZjV+FeFwHC8D67t2EhpeUyhLjnZ2Co2iIK9SLvsbQUessLMw1X\niKV7YmPPsVwDFYaIOFd8sDygkWS/1uUSyt2U2C5muQ6xmBLsabkmhclOHx0i\nf7z/ExZ2OHwe76W8yIjG4c+czGV5aOTmuDDWtHI1IW+wloaP8iJHRVrB4Izk\nFHlzbBe4bZcW8Lf+lGVNdy3m5aDpNKSAM0ogZwJgwnAQVjHT0452VRDUNTz/\nRDExsutvY2fhY81TTDa8i2DqYnpvJbhkb1fyMgAUa0CYQPxTKOOH5cYr0OUy\npwzTAeLMsKCLqJD808zsHz2Wzz9ILBuoxpaZ8VbFeIlVwUP4S96yIK8fiUyi\n7erI\r\n=nbVO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCI/1WcaxXREtGWNJCH4swRyvM6N1/3doAVkCPQctgMsAIhAON/MeXX77DEfYAeF+K0MSPW1QVPpBhLUim7bRk852wC"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.28_1572297033824_0.23685362790995845"},"_hasShrinkwrap":false},"0.7.29":{"name":"@react-ssr/express","version":"0.7.29","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.29","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"37684feff02f3d564549db41f65198256f055826","_id":"@react-ssr/express@0.7.29","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-F9ICtNMnWwQKiv7QhEQ+jJl5vRaSJTxDjtT6kuKffNxMhf1GCgnBp2DbBSl/T0Qy/M8MIaNTwNBdtgKWC2//yw==","shasum":"951685bdcb8579b12905cd116574254e2f12c50b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.29.tgz","fileCount":11,"unpackedSize":18822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt1n4CRA9TVsSAnZWagAABJ8QAJMVg7rI3D6WipcOcmX2\n7WRHAiRcvJ+Fsa0LGeIcG9jJeWatW7hXwtxH3h/TwdalunAKrf24tPyO4Iz/\nZNJrX9TGIZ33AlIJyFMddDR9juchpus0K2n/Vb12FLQq3h8AY5JH+3oYYleG\n05++EiVGHWW02+TMsIj6ySCuduxYoez3cSo3OOUDpAXsZ9si4EDVfaaoDrcm\nUKEJaM50c0f+DXRom83tBddSeUq2vw8qbJFDM71ANkfre5p/dJZEzFXK7u3j\noyilJQJYzHpJx4UJ2OTV8SctbIv5ZmUapv+vSwuprhUX8/PS6ZdHRA/vKwPN\nLhVR199pVIhYGJglp4mZI1qO5Gk7gyjlInZRDTImJ+fNt4OmUoPfUI/FhB5n\nOVfCZ3HjC7O0mS7HNOTuyijSNNYXm4HAocCSZQ2bYZ1mm5SV8Iz73qCc8/FJ\niz4S+DsXV5mDTF8l30q1jOKhgtYVNy3/Z+DED5Y7zj5eEIMpV0yNtiONsXL6\nbpYRErMx/J29K4zanHRrGErdRL9MKWqXu+WvoRwBkkG/qXViTufY/gJi6jkA\nkLxA1HZ1RA8MwRkhyJapu2M5wWI+umoa1LCG2blcXKwprm8kHj2EyMhcdhZ3\nBF+XiFm0sfefdEmuUhXOw6G21doYExST4+d0ugdm7DkLbEFqeATzpIXAYfmo\nnC0k\r\n=4Csd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDGJmUrZoNR0g+GaY5TkJ3Rcd8QknzoMCcAgw/3jimVkAIgA8wBcEeNbk3+D8qmZRlmKeDWRqdsN9sVdyEze8rIjDA="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.29_1572297208270_0.4654413093223668"},"_hasShrinkwrap":false},"0.7.30":{"name":"@react-ssr/express","version":"0.7.30","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.30","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"71f4ed0388d6b737809c57d965471971dcc20708","_id":"@react-ssr/express@0.7.30","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-rJqC9MMhs6Oim1sNY1BL5TiBUEjrOjKnzAz+Hote6L+UA6RQJ8jrZkIidyNZNF20w6fHFHpHMP43RcBvJkaC1w==","shasum":"35e0af45f260f5e56b7b5efad44dfdae6db2138f","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.30.tgz","fileCount":11,"unpackedSize":18822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt1rjCRA9TVsSAnZWagAAtc8P/iuUJysXMHEizhN+DE/w\nEiTwxjrILOugaYGDIRR2szTG/t55Y7wBn82slfBUohD8zfarzLv6QPPtfoSm\n1/M01E2Rtas/P5lE5X/kWfynLYg9ZaP1bQlMlctDB4r+ObASnc39D5VQOpN0\n/DFg2PsDSP4s9UYHG6hnGX59DgZxWWVw27rzE1D/O1VZml5rcUEpxHxzr7Bo\n3C10GCcXfCYNoWBgmAtyoOSmmVJZ/zf25+P6zOwUPXDQlx24aruPMKXPUe21\nDWW3LssflmFl2k/QL/q57Z06ffpZUNUUNdsy4u1ToAq10U8Qn0o3ceeRrwwd\njDvxBztNOJiNtPyRqIRM/fAyAcZaI3MT4SlQhmMzI5EycEwUkiioC/G3F7Ac\nJm4qjicqSQgqrAhpjA+kYd9UU8FU+ZK0aecKT2V6+mNxf9k4HUeYd1soUzfq\nq1zPFOsA061SIVB0SQj2vXy6g5jzEQ2X1n4ZRQKkJgW0DSD7NamZpMpdu0nV\nYj+VovuB07U21IDwsmhn3ZnFNMbRb0vidWwLnoU9qJXptZRI4FoZbXUYZk77\nugImKY+AiIx0kZKOgA+xKy1yUP7gqiIffMFTDhGBVCdY//W2Vmoho2pZtxIn\njoeTkDhH+rX2/GeO1Uwxiu3oUfRUqT+iDUL1YZeMxOWR2RExHS30eqfY2J+D\nue9S\r\n=TxAZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCO3ZY+jtcLDRZlSlkRxTl2gkF70Tt9Epl1Rx7EpwpFowIhAJrHHgq7ch38cGu8v3JVeDWtoo7P6vINcTDJhCw228fO"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.30_1572297443124_0.3611585198008247"},"_hasShrinkwrap":false},"0.7.31":{"name":"@react-ssr/express","version":"0.7.31","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.31","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"da8482fa649e367d03b1a5a78933773b0e2dc8e3","_id":"@react-ssr/express@0.7.31","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-+r5F5LOrc2Ew5hPOUFaF7t6yz4C5CfD9XqHGG5n7R16FqCITUb48pRvPZ00XxnjRH3/GLwSFHd9ikrbeuiDMBw==","shasum":"9517a069e93e07f291470fda5cd97d56fc3127fd","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.31.tgz","fileCount":11,"unpackedSize":18822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt1yLCRA9TVsSAnZWagAAsmAQAIQ0HaDWA/UNIG82Suwd\ncVFO8Mu2zFxVkdHwQAolC/048kWI9bd4duHeIlyJfgRpKLEDEPURDpo96Mnq\nn3ilXSaIIIXNuiujR6yM5uMdc1n+T+bUBZENNyqGMQtN3T4twoZZLIX/0JiJ\nx8ft7eIVBKIeW5k3qpQtYCR/WFkkgjOlEE9p1nqNJ0k71z86eeU02lGkFUmB\nbAV3/2jtr/TPkkJq6F1Zv4b46cWzonpGSUbZ4yrWwi6FI/APHFOr6TT/kdJ5\n3Zqt14IJ4Xy5xUjnuLbsic3+tlc+aTuXUudek74re63lSepEqI2mXdUIqVQC\nanbe3JU5qQGdtVWl8gptiNjSnfWXS2jwwneoHHVi9Z4EAxaFDqpDCx95l5+j\nlbKAk/lf4mWoM3HFqgbZFsDpWQbkVnebKtVnwHIOFMcqJ903lDvubwT2IiV/\n48+IpSpBINT2vcQ8axFMOCEyoBcLFmtpY63VoqEf3rsR7Q1sN9/E1xHnatdI\nbAhqy2BIRwL67n5HOusiRxDLjwPPR3XpVfCIkS/CUmZeb0CzNOg8HxueInFp\nQiBA/mebi8GjHDM1JH1ElWPqFGyhrr+ZwzFHRTMG+uBlMH2pLXMdTWQKOL0g\niaqZSjIaIHnV6mxQHfLaxLd5uvYMM3P7RZ1/I94MxnI+406Udhhe8AZ1xvy1\nFTrD\r\n=1JVM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBQm/7gkYLAL/Rjparm/j0jM5+0PnaBAqM1va7PVkpziAiASfQ0r0s70MrccOnD+ETkKgTKulsFyXnOOJBXT8sKZUA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.31_1572297867225_0.8656649801499474"},"_hasShrinkwrap":false},"0.7.32":{"name":"@react-ssr/express","version":"0.7.32","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.32","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"34e13e4cfb84ece1a7d59897b3061bdb1ab30d4f","_id":"@react-ssr/express@0.7.32","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-7PmM1n6sApVR1BYQYy8aDoAemRHllybM5/OSSmnWpdc0vPcByGu3tri1KCjdq02ecHyl7CwkWlCG6SYwSLSPkg==","shasum":"0b3cd1f0095d37df5ff8b8658996382e04173ae6","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.32.tgz","fileCount":11,"unpackedSize":18822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt10WCRA9TVsSAnZWagAADVAP/3629d2lHjhrUUwDoWfx\nPewhx6bdNE7H6MkgOzDkqfxWzQ19Z36N1MfOghCKcO2qIHtLpyfTEq1VJkb4\np2ctPYJt1lnmWJ6hYzpWAFEqn7ZWu0E5hlcveostca85UrMy/xD1+qE9A+aq\n3DQ7FjUrgYSdV5KbXaIJmsP+k8lRO8Y8SddHaY/KaEhbdcZTx0m8llGZArr8\nJL0HGrfv5ZUhzzCSrMM/DZQv4aTdNnRZSHV3D7Z4u/4q+Myr7h4P9FNMFVBG\new4VXPNVAeaVyVgKJP29l0WGQtyQpnUA8J8MFC561kOOG4qGJ+tLJemNV3tN\nISA8Qb+m0dBAEDdsCVgqPkyBTtne2ArKOjOuDtAaKEqUYBNdMkBRTQML6htT\nQzLrAiB7jLtpCVcd2bsyzsEgQin1o/4MOfIdC7mSbGeB+OHruTrURb+etHDz\nk32f2Kv/wd/5RkHdxFeyHZu5xHAtJ0eIuA2BupZMVlL/myvAEUx9rAhMQs7l\n/4WXg18R2gP9ly2goPObXNuXkgwDstCZh73E2eY2EnB1ZP+TvYIvOo6nmQoJ\nNOY43PK5uNEdgi4zTcBEp6sXUN3Lf9oAd8S770/Jly4HBvfkXleOYmMdF9n1\nUxbGxSlpOx1jULf9jG5yt8jD5xnr30VPazbn7UKJvSTffnGbGEHyMnXKIXB7\nVhTP\r\n=cvjv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDCvp0vD/huYXSebSzZA82cAKIMiJKUtmymZZBDmsy8sQIhAI3nCqgh15iig9L8w/IMBmdx/eQFHRiDJO3DiiVHAW7L"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.32_1572298006155_0.7614697407373097"},"_hasShrinkwrap":false},"0.7.33":{"name":"@react-ssr/express","version":"0.7.33","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.33","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"05ed8b6a6f97cbeabd8bd96282ee83efa5046d78","_id":"@react-ssr/express@0.7.33","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-yLP96xdYg5VxWqu93HRNUTNmqebj/okS8E3FBsZVdB5KRGed0wN1nk9twenqnMm+0Aw9r6l70Pht/a6eBAJTYQ==","shasum":"7ffc5ddd53c29d2ac60e9780ded3e9beab77e15e","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.33.tgz","fileCount":11,"unpackedSize":18822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt14oCRA9TVsSAnZWagAA6XsQAJRY9KK+nb5VvX5QHKC5\nCMmjmPdlCMpvNPySi3RMOnXbwd+yOWmMqzWPn3BbjCycORgxP56yag7rN/cI\nE2QAM+Y97u2kuESf2V58rLXtlCNyLnD7MLVKO7jXd5OY/9r5rOx0wjfOKCYN\nEq76O5Eka4GzBmdGQvQZ1c7ZEJvCWwBdij8584wP1QZL58MLJ3zJ+qKxjQQy\nbGA3OPH/65j9wuXDJ1OKsV0qb8Aha3G/gK4hZOAcIs0gP6KrtxzIbPeBEp+v\nnO8C1qIzt5UU8XeYsnlmqeu/LUm2/K0Svl5Tpc8i/LZ0/rXjvz3dZnfTwonx\nEa5xaEChNtq17xpGZrIzh7BC8pmy5g+NYWrERRJhBxSX0/xHrN/QjbAw+PDr\n+BeWlBTo2YzIAw1lgE4jNTPQvlVHtyufmDVBR+YJ4Ghc9fNmRXfPzY+gBjvX\nJ6VnoXVc6UanQ4N+9f4CnYlhsEP3RAoWicHPxQXrjvkIsXypYQgONDYnqnFK\nxFrlpMxCjgm2kdn0sputE/NJceGsR+UxgYh5h7kwI8H2g5BqdVRlKZn0piDA\nM1ZJXtRgkJmA2EA5qBYc9IUzeqxBSx8i0gZGwvrkwlpdFdY8cZ4bKbVTyno9\nynaunRivnxW6d7rWW/cGOiD84jgVT7oGTE6gi0cIPQmiFgBF2GcdZuCZwiu+\nzt+l\r\n=3IGA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCk0Nc493i+zh6kspZrRQAGKsBIvJdCZcke3XPWnhGVsgIhANf1c3KqPCpB0qsZzVsjj9NF/X+eKBc2IPiWHAIiBkTD"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.33_1572298279579_0.5096602672322248"},"_hasShrinkwrap":false},"0.7.34":{"name":"@react-ssr/express","version":"0.7.34","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.34","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"d96aca51627b8d61c093aee09d9a8719912631f3","_id":"@react-ssr/express@0.7.34","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-DEX7D/cdiRNi3mn/bxStV8EC/vCPqN89sbe55U5YKNUXY5OuwCk0MtbLZNmV3X5yRO6nvAVej5DbNjR+BMwk7Q==","shasum":"bcdb7bb254439045cfd3c492a9401f331cda2389","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.34.tgz","fileCount":11,"unpackedSize":18822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt166CRA9TVsSAnZWagAAVZMP/2aIiwuukX8lV/Lt4DEh\nRzNaXaA1tno2pxgzD5hCitg8I3wrtlGyrp0jtqoQpu7mr+kWRfgCiF2//Eog\nlHmYxr7EPAu2Sk1vwWtfxVTa5ZA1AAcUtRTGmBDx2k2asDg0w1WWgq83VN/Q\nt6ZiQvNqKXc/UUP9ttg/fEx3oj4fnGwR6o1/cv6Cq6bLdGlU7/uRPmpG8Eby\nBXP8cfUckhX/gmC4T32CtVMqaCBjq7t5u46OjBvujOHomB4J6Rrvru3KEJWO\nDLA2tCUMXlEaShr6173iEsZUqjSughZj0lp3rAfdcnyiHigeQM6mV98CAaz/\naKWMIibvdESuWocL9KnqHTOd1qCEVVPJLtEi7VGT5FFTovTBcFie6sAIQEWl\netN/Xi/ikA4OSmn85jNaOfFd5C/AOGnh5PyGj7+rKHTRMv3JGN2RQlJmwyFo\nXqF5hBr2N9oq1o/F1BZx1uAeUL1cXnFtbswAf7Q0t5VC0NegOlfFNGqasw3F\nKNU/KeQXNW+5HK0EdYFTI6edm2r8vARKEpAeAIv8PMYU3Lej9+OP6c0TV6oK\nLDcqgHINWlHZqcAGhBxoj2CZIUeK9a0+tQ9NVSmEAvq8TBS7Pw7mFT7Ntuzi\nkfynrFuQKZfR8llRpRjyZvaQdvSGuKoaT6sVwWAOQaILJk+8yt7nhbhj+6KS\nr9B2\r\n=Wqwg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCWMvnHDwo0mEt3tRMR5H5VsJ/56e596Oy9fG/aBpH1CAIgWUcaLWPrwckGFZtNN2l3zVfq1mkmWxb2xpjSkrJ5Fyo="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.34_1572298426043_0.4186480349610091"},"_hasShrinkwrap":false},"0.7.35":{"name":"@react-ssr/express","version":"0.7.35","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.35","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"af0070683f351231760f97ab3215047b0b66c57b","_id":"@react-ssr/express@0.7.35","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-qXyJNyo0+TYXDeAv7VSNo0sNEQyjD58jVtSC+8dv+JH7CHmpUMdVFa6Ng/obcp6mxsf/jOT3WTUxfaE6poMi/w==","shasum":"e85c8b7c37cb64700398a67b53688ade1dce01bd","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.35.tgz","fileCount":11,"unpackedSize":18822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt19UCRA9TVsSAnZWagAAo8cP/At/ZVXuM+6hU3W/jGEP\n+xMGuBFjhlhe02KSKHWzTWASBTPTqw5LnLpmlXAv2nR95r7u1wlsM9PBdLea\n9Yhih8udRNlFeramPvuc2lZFAn/ZhPi23ZvFgXcHKodLozzC1d+bYly8hs6i\ntbrgbacrE7jH9+dU8jBSMS8Ttk8GW31J2Hb8ms8I03yyGRy7UsRzND12RLKF\naEG3ge94tEByqIm/4a2IHhnGhVgQqoeY+OkrUEAZuMozK2OjOdwZLJOc/GeW\nEiUpWKce88xjiBxrGgNhlb6ls/gFD6CpZRzKkfjK3v9AnWn9yWy6s+R8giZB\nrSQJuLVUo0OqSdIGqhdOsrMNliicl2RNzNdo7+yYwRIyJZien1+nhByzl0PH\nxOKvV9ZQqob7NI2Fn5RRvXRXdRQHTuva8kJckgCOhyWLsHyCopDz1vgsq9US\nsqVU6ErihnLTFL/rZb29WrLB022xFjW7qzb/fwj2kJRQ5AxUB3mBXPK4H4X7\nkPoqgrUlE6DtRKgEA0/jACPiDbliMQlYInAtKBUcC/zFXa0hTabrcxolaxiU\nBVby2toXkzOtKT1+p8Bj7pXY2oVyqDgnhvuALYtfTyoyHWgSRCYl1DqVTege\n+IkzlLsVszdsRP0TPy8lVMFPGIdb943ePfol3M28b1OiwXLvnCrSvosvvIcW\nStHL\r\n=8+9u\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICQ9dMyEQYDkvYvqb6IW0X79raeSqCgGViKeKmAq+/XoAiEAkJXxKZ40h8ImZJzCwSQ4GHdRAw79nkN4XHseaQotEg4="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.35_1572298579645_0.44393928135867444"},"_hasShrinkwrap":false},"0.7.36":{"name":"@react-ssr/express","version":"0.7.36","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.36","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"80a93d8ebe9b35eab8560aad033bf1b79abdb0bd","_id":"@react-ssr/express@0.7.36","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-qWnxSA+4G0gGpMgDWS5iC+YzgK71BGxaY3K/K0tSwCR+nVZ9n0sizS1gt1aoz65AkdrSXZI4+lHE2J5NneD4pw==","shasum":"a8f854e179ef0a12eed109744d7a7c9661965b39","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.36.tgz","fileCount":11,"unpackedSize":18822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt1/lCRA9TVsSAnZWagAALeUP/i0K9eiIQUJuevrZjwlj\nxGx/hvzvbscPvh944YLSPKNy7u2jZeLJoYjBsXxxUG1rVzCVeH4BASieiYnL\nDcYPtAkCaJWnrfSjYpZg9r4muwhw97ByVDj6DjjOtQIDQzjzeA9XyN7BDCX+\nQGlJ2MX9C9gjX+s/dGzjn4GffEM9VG2iH0Q1nB1jVgwZiCe69j+T2yI04LrQ\nxApaciT7R0F6wc6OW92TtoIo9A9qCc1+VK4i7boIhSiWOEtc8ToTIusDH0y2\n+V09PbWZ0lFXUvC/hj/XO0YwAfQapnJ9B6zTilcxsR8phxnVM3G20uSWDeaG\nG2lUGc7+0rCTinbEuGeZenrizMPS/+QHPubWw/zbKTrCCJjg+bWzyIX+unVk\ntoLUj3OTSbNKAGhfajpWzN4waZ3b3Ip8Mf7QwUCdXw8B5fhwgKwl/AdYQiB+\nFhNC7lvuW3DTG5iS0eUdulONwf84eoYwTydywlbvQFE+hLP4EVhF92K9Vgys\nsoFZQl7cpKVjqqSi+K9eoA6ZOCAj6vW7x6CFNK7+L3b3aYj0PHrhsKOiuihT\n9npEOHb8Vw/4I20A+Rqu7aLl/QmVfmjcIcJJLinWOHij3aCty33xwcyM+TvF\nEgS8T6KK0NA7KZrTCeko1GzFGRkyixm9+G6w0R6cVklj11wjSknFpQA7dqmZ\nViI/\r\n=rJ7Q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHeRrJWC3SFNDkjCNRwCzueJu5uTlP0aSSNR6d0V5S6CAiAE5Iicw9IWg4WTC6fwR6B53hK+LraoGqa2WEFBwPykfQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.36_1572298725161_0.5269543796623508"},"_hasShrinkwrap":false},"0.7.37":{"name":"@react-ssr/express","version":"0.7.37","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.37","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"15612ed4542dbe0da81c725048fa9d6e71120e5c","_id":"@react-ssr/express@0.7.37","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-l1ggnYq8Ccne9AofUcCHhW/mXDMg0mYUvfJcZGOrcxUGZoo/ZpkrfwdtA+eGfW0l5AOpJr/Yyq3wNl4NoCcfFQ==","shasum":"fc8e13abdedf031a43de706a4bfe1890a97eada8","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.37.tgz","fileCount":11,"unpackedSize":18822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt2CPCRA9TVsSAnZWagAAwI8P/1HNSAJOUhRLjSps0Qp9\nTmAqi0v3OEfujEYteLCILwoFoRdlnR9JF5AhNs9gQ6YJYn1mSB6Ui3KdZCZ9\njDd/FZGZdwQmYvHf2yqshDwmEiRa521TSlxQUO8DuHI6PcEMxUqDYP2PGX0/\nFSENWRk8jk90kVdNj5Bg/bY0R7H8IUHti7y49RLeoEAf6iGr5jkwuoDEDo3x\ngT2TLuNeKeJfXbbrKy+xbwIRPgwrYhCEG43DE3C9z7GuPUBBeXtMsvAxaZsY\naiKRwctTLADYpV3E6evPw9VeOs/hsCCiVpgE57yDiR/M+fcwPemwvycg5v+r\nwgIl9A0TI3x3ZmVv2v+HSCVjIs5Elxg/4qpSLoOw4lQnFBM6dgAA8R4M3MKt\n3EUcKYtoHPOvWwgGvneh3kjyqb+dGoApql5gcBf0bDORdxdupsKKU/MqGk/h\nIG4mbdlro1E6zx2U5XaKXDN1Hp69pDOXz0d0rUWYkXaxUaJyegnJZhfqoZRr\nkKPodz+pUDy2qgQaFB9Tmi3k0elGBvc4iGTAfoIAIHmuUiEH+2aTXOyYNf5W\n44fUSy4T3bS8cRGxpikp2rSECMStZVyDjKPzIpe98NLA/iMhK4mJX3fl/e9E\n+0Pb+pXJ8i8eTJ+qTJrk5GHlO0swNixjcCIB6iMZ0hXTr4X2cOIZ6SU/Lg0S\nvSTY\r\n=SMmo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCkxfPtC7M/WTuBf1ay79HoflE+ebmtFMwcSqFWfUMl5wIhAKBJ5iJMh3YEVRcsh/rruSIDePSiQ5Ocp8e/dJqCpY9k"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.37_1572298894578_0.7461853634944056"},"_hasShrinkwrap":false},"0.7.38":{"name":"@react-ssr/express","version":"0.7.38","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.38","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"e8a38501a1c21eaf84053e1de02677f2524334cf","_id":"@react-ssr/express@0.7.38","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Hbvznv53jK2exL+rgXY+lBnyBg7ct7tHAZu+igzNUkL2yucXECT2wNMiSqTCPJT+L+Fz2q5Z6eWWtQ4NlfaXfw==","shasum":"e4707ed3352d500ef71230b0732d982990f57499","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.38.tgz","fileCount":11,"unpackedSize":18863,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt2F2CRA9TVsSAnZWagAAy0EP/0FuWXOXji06Gc5ptAJO\naOTWMfsSQOX6ucisGp9BIhpFrzoHN68O1LNrINAZxfDIWbOpViKMUngVFBwe\nyul84ayzKp+7wHUCZOsPpQvDHE2bGrQh8FRtGnA6MT5VJkyrAiimEozaQgkQ\nXVQ3OlJ3I4hJbcXfxkB44miwr9NuywDV4OAm6RJTmgiB8mTd0td0XQoPU5TC\nL7PX101TNYxEMmM3QCn5Kx1n+RJWqldUAoUb64QId8tUTbc0MtEmTGCTOp5O\nfRcdQeFpl5sUA0djjmbJxXQNiqsZ3CBY0H26E1pmmH5dw+KcBHw/AfLUknut\n3xgprOm6DEiL1J0HmIEcP8NQT50X2H/L2sGFRMan0h4gkWfuCMPHrP0/flgK\nyr3475uuEL60Ue3KlXlZ6y30/xidqdqiYKpCw3KJlfuEKsoQNVWbpUmPTkGK\n8nTltp+7Yf+C9aTOC+YtJbKIzVaUbmynlKO9mSD/ZZedwL+tedYBBmURrmmj\nkQe4FeQG+R0NvtTFVxajZgzbVz39XhIokWEHs0dDRco4HVeYoPFhTcVoykYO\nZeHg+gnfsG2OmPMnhsTFzVDEbhslX5dF1sizZIwbif0nIEsI03Yd5KIw+8He\n0hBYnzwqF4MaaJb0HWkLOlKp8rqSWl3+gdPsQ2EfxZgXWVDp15GjxdBsv2NK\n7loT\r\n=OWbV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBEDilGlwMDAMsSTm8L3gKJyrdHDNetz+GHSAZpMjhvQAiEAq6VzQnD7gAfs+0CfqNt9mmxGxt2dzKmYUmkcTahUqAQ="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.38_1572299125184_0.9773033324924794"},"_hasShrinkwrap":false},"0.7.39":{"name":"@react-ssr/express","version":"0.7.39","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.39","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"4a1d0f9b16e58f3e4d954102a2422d0106874530","_id":"@react-ssr/express@0.7.39","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-pa+gQrqGvFOTzo76POSQDSqRJW7hxG4Z9W6jAoSZn8U2/inBcmKAFoNK4kIaWc2zATme2Aacbf1esDQJwUS3cA==","shasum":"4a95f2fb5249d2a1315c98549df0342ed625288b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.39.tgz","fileCount":11,"unpackedSize":18863,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt2MfCRA9TVsSAnZWagAAAz0P/j2hXcJ8ALeFzOOQhVGH\nf/MmNnbn4/f9Apj6bnC7c7EWj45FS+jxusEFe44OsE5p4OO0UOktnNlSla7z\noUjGD39XD7q1nbizk5lZNtQEazyzqC+RYeCUyqAWWT/Nv6chUt2PfhAkDGUA\nagYh+Nj8CuBglrXFJi/93YToASCYSeYWOhhVHvw/p0W0SpSgdktgBI99rVeq\nZd0R42+U3mZ2ZYlGsEqCRmozYjcCCpchCGyU4CTXSQkY2POQyAoPOfwA6IzC\nhIG/0PzYuMPdAzEZxRdlu9E4n4W3DCAA3YzD+ORMx714XjGH/BNKzQqu5wQO\n7YlyrAKKLewA+23RITJKJwTAPyfnHiOeYUi+Ed/VadNvOjglpkNOyCRWHSPq\ng+OMxAaiH4NxkfBk4yxxvpLAuSYavICeAQv2S6nDqL4tzz84RgrdBBvVVydH\ndspcvVDIEdlJieT6vMsFhPw1oxmtiYDf81w/mGGfk33vW9M4av2Et671grhv\n+LA4kcZKmf74othCntSP6Ti48UU9poJ3yIIdK7NFEyLgKyWQv3Gg+s4kPHJ0\nC1K6g2rjBqz5rLGAzLfzzFzVsyakF/RcIVWg57abydxSm9BQxYqPPIcmWZX+\ne888yWqVIJhGGWFWdLcUKOOYsR64zAclV8icv/rhPJXE9bzXkURzVU5+XZYt\n5hty\r\n=dYZf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFKHGGn7fRsaF+CiBXLxKen94co23CRuzuNgHXvDbwvvAiEA9nuWvChORA4SfuYI6O5neokmu5Av1LlFR5b1n297864="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.39_1572299550527_0.46209642924304806"},"_hasShrinkwrap":false},"0.7.40":{"name":"@react-ssr/express","version":"0.7.40","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.40","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"f3e40244cff7ae1b5bfefbe51b0aa3dfc6203fa0","_id":"@react-ssr/express@0.7.40","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-qQDQ/L1GC6rS634jvt9KqFFlSKEO7nzlwqOG/UhCoYCkPK813LE4KiD6fJA49eqLfZSHCC7Y4qBryLRGn0cTYw==","shasum":"13f31baa887ebba187829989371fbe96918e7ca1","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.40.tgz","fileCount":11,"unpackedSize":18863,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt2O6CRA9TVsSAnZWagAAnawQAJcvpxXETgDaDfk5k4oI\n875mcUA79TvmrSiNwW68LR5YkXJLL+P6D0hMEjP2/0xvSjRpJ6WyaoJbpWER\nlotWTc/gVfFqk10+lZqMnDxPjKRGpr224+761ivvLNj6ZGXC1yBpf+DrzJ3W\niTQMei548aCFHd7erqUGJ/1OA9wjYeBWiq8w8awV+zh9U32Rx18vF3ZG8U8Y\nLFfS9iXtpmK48JMKxkiDxhD5FLR1t0WGkEGtpoVZKcDL2aIpgTcZWZ+4GN+W\n8leXMSZAOZbth0oORP41MixNShVcZGTidbRUx/nclP872ylpGC0RpqrvS9dA\nj204N+73rcqre3TUDO5WXNTwafY4ymWL6k1TG7T0violbYlghi3GgBLWxHZM\niHMruiwGCK4T3Rd0b90D0fPFQvlC6FnSoUEqJ6YRvToetNcUb7r6fja/dw6p\nvZbkRBWw14Wp3/uC2VEwFc5ZRqA/FMpQVTNcnMSUbwslXxcqHRZcQVUhJYAK\n/oCtTA74ITHBE0lhKK3d1dkLzZIzbxnjVCT4SBN2DjTtpTnLrlZtvfWUWfqh\nOfyBCgMAaei/E84QF8+t3fFznKO7vwLEnZqopDC1iJhEPMW2+p5I4YOyg4WR\nS24OaG6oY1mT+zxfLDY6olSWf5AgQMKkNw1/rzuHrlN9/wW//Kq85urdVAi3\nhhgJ\r\n=Ro0X\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFVTERrj75OF27ibJIm906rWIw9lqpy6V25rbND4Hu/yAiAe/N3Y5gLUeQIWoP8qw9SqJR1sCBe2Eg1ObMGKS9eMZQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.40_1572299705660_0.41907761514007147"},"_hasShrinkwrap":false},"0.7.41":{"name":"@react-ssr/express","version":"0.7.41","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.41","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"6b6e43de78b3e3a1be7f1f57e80038f330c9a64c","_id":"@react-ssr/express@0.7.41","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-H8FSGcvWsQ6flaabyM3AS6E8rJ4ARh2Sl+MCrCA1XbcHEBOqN+8j9k5uFNfJ1mKHP5OarLsL+cI1gnDXUR8lDg==","shasum":"ca6527f3269b0c1018d586271364b5219ba2c505","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.41.tgz","fileCount":11,"unpackedSize":18863,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt2mMCRA9TVsSAnZWagAAPH4QAJ/haGaF4eFuoqj3m3DU\nOsAAGGYcvZc3qBgIhRdZwtR+3U09EPB8LFUrmN8u3kaeZLGStaW8eWhYHSZR\nsQ28UM093QCFvFgOUeVBEVChEPcpRadB3BNfzY2HRlJpedP2WYFNY9JSIRxN\n3S2E5UqrMZNvxR+MSjvebS9NvASt4ZS2yfg2HjEV2hhKKCmcG1vt82s9R4yA\nMYSfJOceSBkHJyGidlthVqRa+NSGhqTprJPD+eC4vgyhoxl2aWf45u8ITy0j\nx91aOVuYmUwHb9r+IGEv2jNASpaOEKGpEpqhm+uFzAlD2BHoLRWLjdll95AW\n0ZzzN8wZ4hzrw9VXulThZoN1xNecRBQVGFxSxWua04OTQTIdM2bXLypq53BG\n5kUtd8XK8sh2CykhOXphT5jCMaVwmge0pixt9UbTiWxesQKkk2Iw54/5Z1yV\ndB+KcfSqDAtvPjpzcsbK1pluUDAqB5OaVhF1QH8LNtdTf5iqCG/86bsIVbLh\nBj3fTioinBbIUax7u4Hjndb6k/8QXXvhBC6ArpG8E6Dfb9IMkcTDbdTf/7AE\nRwd2m3ZWNBCtMEdkdbCkMt60n288t341QaJmX2Ca5m/c02/QVi1JtlGkgNWT\nllzA+M1mupA2vhe8iUjlK5ySMjsVOF5D45tgQeBmYAVqIRrh0GUdv6tMTXzD\nHjv+\r\n=h9Ii\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD8nxPcGhXf2kkhZg0BMhxQvjDpgH+z1gN31dbiyHhNnQIhAO/3D2pnynOfJc+JFUouO75CDxuEAAPQ0PM46M0c0xdX"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.41_1572301196322_0.7649602593495028"},"_hasShrinkwrap":false},"0.7.42":{"name":"@react-ssr/express","version":"0.7.42","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.42","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"07c5fe9ab2b9bec0b030ffcacec506558807c25a","_id":"@react-ssr/express@0.7.42","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Q3uVrajiOJg9aS0heEzFD0UYxtaxD1p2Z+Uqc8ZL97GI72vtD5SGyPDBsp2XO8BCmiMI/eFgH7cuDmawzxsHlQ==","shasum":"7475eb1a75050cb29bda502f0ceec655c0f0fda3","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.42.tgz","fileCount":11,"unpackedSize":18822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt2zPCRA9TVsSAnZWagAAxRIQAJH4g+SD+g1nPEnwbvVX\njoVWwjOPIOLMeDKEiJpOV2K8nOlim5gqqq3a3mdq+a+2l9L34RQ3YdXSKAul\nXclJlcwQGPYU0kXoRRP+FtS04kd5XQHxjJVU1HItRnBtFIAYNPN7wmGK8G2Y\n9ZwLhXwu6QQ4tlmKOFywEYsoRoYtDVvps4ct878StqKNgINCcOtkK36qYVaM\nXymbFpBy1V6QO5hqmjL05VyLtW5msEEwUeij3YuH0FIoLrvey+xjPxiEVx9Q\nwOIjmYpx/qfVvqZIZYuRoPz6CjSTykeeVr8iVAZft6J+6NI/y2CrbYGm8oku\n+JmBQwHUnXDhDNTRIqEfRdjIlnD6Vlk7jwfvqmfiLtqO55VL8xnbI2AZiHiU\n9bdjjCdeFgmsqRgQ4zDdUc9JOC6jCK0Ay2sw31XtVR1ECOkURQYSkuFci2xJ\n7wHkaDNikqjKJSWVB9yFK0a1HUpp6gej9E48PjOk2bJwcakpDYCLB+ypw+9O\nHq5kMTwT9X0rim0kKmhYXgAxPypBiebASPfqKx9gf3uwmDvoccikDp/FXnwq\nf5zJCTrcl4wTlD5bokVBPqkrzlISwDrVC468OpWOQaJjBu5b8xPKO1O/sQsF\nVyKoQ5xDVzQ0teMnf9oAiUWE4SBBiblK5Cg3OCuxRTCkVivTSql18FYyJwAz\n7z4u\r\n=/IRz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHn+OKf14QdXAmX5xKBZDynJTSAvm1KbdBzJmeaWrDPGAiBGvSCED1Vmx1/rA1Urmoyelu/UzVreOLvoySyEwz2POw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.42_1572302031364_0.23317344913425186"},"_hasShrinkwrap":false},"0.7.43":{"name":"@react-ssr/express","version":"0.7.43","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.43","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"ea1834295f269ac692eee43966d3a13d2d4a19b1","_id":"@react-ssr/express@0.7.43","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-YYeCVuh+l92NejxYQeayhix/V40SxLilEtp35296VIAN5HhoSJokBavJlz2gKbGvw2YiaxL5LJzceaZ6Cmk4OQ==","shasum":"af2fbab63c1afa3bb75b1f8f80d6a4664a8b0b1f","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.43.tgz","fileCount":11,"unpackedSize":18822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt26WCRA9TVsSAnZWagAASGQP/3dGdqC7GZ37UsryQc2M\nIwWK+NqDMGBc3+3i9HQPwz/d5PTds6kt2LEYQohacruEi0nPNGCYZhsoms6p\nXysaZfZlp58EZRUtamjig6KRQXPbGR7SbXcqm70FCLR7pO9RhoLfmhvRgmZS\nMr8bCji8RrDVogulP7JM/StbaQQmrjSAEz9202e+ukQUTMFGxcRLGqtg+AD9\nQFyeyzRiBOojqmFjTzFBTnbUFjvijFwAzHlnuGuPXM+bmg7Finhy/fAjdA3S\nP2pEX3qfCA2QBYsZ2Bxoc1kL/FuKj5dZrHlhI6W6U1qqRdOVMX+KtG331oas\nSFee4TnES1TAhvA+P04iih+1WUMZCUQHyk8zQqXxA1NYN7eEpQ50KsQ6AEXN\nhQOK7cPlwT7CbjpZMT6DJ53zySl0LwH6tcimSmN0Hnh92aYVS8okhveR5nIV\nt5oQkODFAsqMzhcSvSn6uHcJMiWpd/d6/hScXVxXKOH4gfrLFUBJ7rFP34rQ\nmA9FnMprkL3mDA1GiCeKb5gZJgK7K4thNhpeM3JoQCP5f6YS6Mdh1t2YXFXl\nOhYFHkms4JxYxoV+ps/YqPKDo1VuaM9eONZX40olW8sU0Rh7guqxAffKKofk\nQTJJ4jpYQBySglbDFU1oMxRWMylHOYmtu2xnrApfgXO0xXNJR4xhtU9va6LV\n92iH\r\n=rTCg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHPbi5CMfgrCw5TVdm1WhNgykAe/LL/mg19958hFYQ4yAiAX3vm+/VSifb1jY0JM9KAd9/k82z9RoakgdbgTYtL9pw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.43_1572302486064_0.5264764245262539"},"_hasShrinkwrap":false},"0.7.44":{"name":"@react-ssr/express","version":"0.7.44","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.44","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"af2cffc65933256152d439959827d4d46ddae2ef","_id":"@react-ssr/express@0.7.44","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-UDYcVcawCFkknp3bzalAUn90T0ijNcRavjZRVLeYd+iu8MlY9454kQBpwhQuyN2ZxAYypVheSs6b4XHJaXlVEA==","shasum":"3abd75fef6e3e179c83cf17894d2b28360b6612c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.44.tgz","fileCount":11,"unpackedSize":18822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt3AACRA9TVsSAnZWagAAeMYP/RXC0f/pomR5pdiQRu+G\nVGDQO8pCFPQixU8AWsZJMZeQcVWAb321wdymglFAmQHgpXvVJzf3EcRVJyFR\nJoBBuZg6Z+oOy3xHRdmz294HGo8EIhyTviyI9tmbV+EWhPu3bSWmVNEAFLG4\ntQxFPEpI4OMjFoiVhQ1DMWzzBaNeUHdFxwqzt4ia0snhA1ZjMKh8n6Qb0msm\nivktUSQSCiiAjm+fKbHodI2ts7SQbmdIT1lhTKMjYrYd7f6/zn2GpzLIAIm5\nOIqqo+m7VGvYAZXjvBBlCtyG/LQpAM5Sfhu98PEc1Gvmi+zU0XQynoXYQiyt\nwV1dgDF7om14LDPsbKvflr+pHoDVAnHjREMtBdWCG4V7tPcL0xzmX/dw56Rn\nj1zkJ6gHCt8u2CnSl29YNK9ogwzkB2OEzGbeGEo9nPR3qgc7ROT0klhZcrf6\ndaS0g7jYQktLudIPmn3rcwRfV3sNDet1BmyXSJmYcxh3N9Z0Vtjh4rL6FeD8\nWmlulChduLI+DNj0AelRw8oPtURdfhBAQbQ/FldvIxct1olcM/aZG7Z/z9Vg\ntgxx01Rzjbg6rJtlKXpH6GWTZ4o5x8NRrcA50dg45OpysxpFT78tPqerRxyI\ndVtxqOIhS9YW9BhoojMPoPmp1dh3nfdrp7FRKwu/itMyENJT3bTby+atMKU+\n4WXf\r\n=aBuC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEHGAO0I3N9z1KdfSLd5nVi5FyKcjxL5WIphSZhu6rgiAiEA7B6w7JsTn3ngqWflZYeQWtwc/s4s1UNVdqm5D5BdwB0="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.44_1572302847793_0.43591602045436706"},"_hasShrinkwrap":false},"0.7.45":{"name":"@react-ssr/express","version":"0.7.45","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.45","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"30928992b43b55621e34aa104486ea79a48de6fc","_id":"@react-ssr/express@0.7.45","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-NgCi4QaeruE79MrwrLf68xeVFCKaweo7x7BD0P0KsjvlQkAVDn/itYqPVqQtttxco+Gv25foRlwcgvUYf37DoQ==","shasum":"230e0e98388086c6eebba65077dbf3b25a52fc3f","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.45.tgz","fileCount":11,"unpackedSize":18822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt3BlCRA9TVsSAnZWagAAV6MP/3hFFMOceO1IV3qbeza+\n/LyV7VNSZrgCbyxtGBuYOYEaGYd4HJL1fGCTviovu4gNLbjZXetgEDbGfKyv\nrGUxLL6mXsRkYJDaIk4EzWuE4rvzcC6F2VVtKGJPjyjb67EC7vyBvZ3OFiq0\ncUPBk3niMz+mq7JpEFo/tNfIztlLphZycKAze16AQpwenBephcaokPWZU5V2\nvF3jGFtFl0RTSM59LdXsdqc+puBNmf/rvASmZrbZJsPw1nk/OHPVDUHaJXpr\netT9WVN+PURrKVjsMtSqg4ip72XIlT9ibsYqIHoo1cXY4sis9+B0Uk4eFvJL\nsojY+pwD4AGGjQDEmz//7LW2gyuYJRlarv8P+SeN50KlXT5GQr7kWHtlrmbf\naNpzHN2gCC9NC8wFFNxxkR1D4EkhG9mYMHLfCkpVSuJMniXcYE06ymVdAsoD\nyiBHoNbiPbuMJxYegKX93gSXZTn0iS9qSf9ij3kw/ChS7FJZ1iYmy6YsJnyQ\n+sWmYDCMeAogwALqZW7xOtRKAB3/CGcdA6ujfm5+Pq5ONqpMKNirmHYOh5F6\nCG442285dsw9ACURSnyK8C/WLopGnZls6gMTVrLNeVoa3r36kp5GbOTqwwDa\nMnxU46dd2uOjNpfI6ly5e/aHpOJ7nFzFB0UIDPT7MNTxWz/DL+/uBHccUBjk\n1JPx\r\n=78N2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCfEQmlqWUH9iLGZuz3ABeTYwDconieGc6rQtS8w5FG+QIgQ12bbbtq7XqZfAiRyGl956rWGtH3kmuR3junrGKYMUk="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.45_1572302949299_0.08724178836494323"},"_hasShrinkwrap":false},"0.7.46":{"name":"@react-ssr/express","version":"0.7.46","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.46","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"f5034bb83d4dd5386cbd3e9dbc6e5468c20714e8","_id":"@react-ssr/express@0.7.46","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-pLbj1zN1M3t0rl2IuaRI1jM3UibcxIsbBXdfqEk+mOrbgsMAiqAWU0cJkxo9yPce1kJA8/6w2xK1DUaAEoUOxA==","shasum":"d67251e2121c3cf9f2be23cca165fdf89e6d90c1","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.46.tgz","fileCount":11,"unpackedSize":18822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt3D1CRA9TVsSAnZWagAAAiIP+gPh/ibhFvd/DktcDNZC\n3wZQoYIVVVB2oe71dpziR5GLqF/VNRqjIClskHNUbkNn/DQZbHdakaNsU5vk\nnoqp2v+1hhNQxDZGrWzetJkkjCkFY0HPwIJPaTSKf1rRwS+Byw6UE1PVF4h6\nKe3ggm/CTGCTu2tvpb4JkMP/fa/cyNOyE/kiFmdTgdkUVNhIzDb/uySfCVGG\ncJ76VYU4byGCiNjVNpoW2IDoo7k96C/gtDWHoScuZg0elM6K4UDu+kUa5fs7\nN+rmAGsXbIB+V6J3Rr+T0bHNTNXb3/HmnaFTz4uiS15piosff6JtleIK7tgo\n7vOaJ4XW8jDCJd6/Y87iWRqXNskxG/6fayrOTpZLjkkhxst7ao0GBVI4Zqgm\n+7KW4avXVhdRinE8M5K+UJkLAkZAdoYOoXOCpWaszQNzF5jGwADNxPUkgB4j\np6NIWGWnPtm8wHjup4jqRMP+YNgUHolH/qnvmiv58kB12XULwU6VoEzCCnuU\nV8XZi4y1feGgIqi9GLi94umu81u97wknxIfZ2B5AuJ8pdEnb20GALZiXGQWp\n4Wny0/6iGpcfrkdpxej/LjPMZlFPjp9d5z7CJq+ZRKV2kVo47t3Zmt5uCoWv\nI81IK+HAvxvz65DkVPLl5B24o/C1TZNMlw7pv1VloWvOyBmgcUv9BNrr+6iD\nNf5R\r\n=H/rx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE+GnC7QfuT8W4OhYFrH6CXQcWULEyJd98lXbkxdYm+oAiAdYRNfCkBCtUqFOsbTrJP3LWl7hZS6f63kPUdEIeAqhQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.46_1572303093185_0.9737724446119653"},"_hasShrinkwrap":false},"0.7.47":{"name":"@react-ssr/express","version":"0.7.47","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.47","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"45404820a449751589848c4d4df48bff67d462cf","_id":"@react-ssr/express@0.7.47","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-9JTzL+Tm/bgUMXDUM35C/Z3fg8sgXyHxznScRD0ufpfx7YWaLg6l38eTc6OaiNEnqqFvy8Q3r3lmhiHS32bFaw==","shasum":"8aa82b0da90a9d3bb2ad7aee65d7c9499c439089","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.47.tgz","fileCount":11,"unpackedSize":18822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt3I/CRA9TVsSAnZWagAA2yAP/iuSHqrIwoA1xg1WDtnI\n/fCRBavXFkOA8rHrwneC3eTPrqxvrsbUFvD/vL3P8byLlAKiLfkLd5xVJIJK\nuCvL9ciSU5gLvxLj/LTrVNLj19Zp40vokVjN24GspYQax62O40KDJaz/kIZx\nhkhDVZLj1YFH9vdKXMgtMfZQSWfu/yAh9iEp7xIMA4lhXsiGed9R48bkCn5C\nsDw4/JsEHPQviVpyYw/SXXDjhdFYXYuUUgpLIZPl2Lf3pQGhVusxALiwZ2dx\nwN/vS9liCCYTcJHQS3YTpAfQY85hAppMt/sb2reyFKEodtotmdSPh/YHCA2p\nIRcTR7Lk7Qta7Ah6GGO1JpYMwMyl8yTXddIxbTdExD+pk9JqOxnBqYOdT12p\nV5PVgqvrOjktP37ehqS5cjkHboV1C7Ov2rrJnyJ0rOroama1Czw7mWvQH+jr\nl1Ibaxo8aICzBAQs/kutQ2SJ5dFf15iOofv2ymXJE74ihG+3VWbNfWaTOF91\n6SIO5mTBfsV+u0WrGU60Gvi65HkRsuzCKJU2+B1rNAeEItBkEc9GKY4Pj/c3\ntw8HMfzTOY+ebwGOEfcZwefOmeOrLc6BM5nA8igYIfd/Sqmt76Z1EQ/UimTL\nZzBDqMzuu/ramyAqx25743gpceEfkC5bBJJ+cj/OQgrcOR5obupZNpADr+Cv\n8xS0\r\n=w1mX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEGw6vdKKG0myhoOSFb7mh/33mHavvwWVGM5Du0c6ZZ5AiEA8g4oVLHVgtUUZ3tUjpCq6cVOS32nwFUlBDICYcQiEqw="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.47_1572303422910_0.9757881424299899"},"_hasShrinkwrap":false},"0.7.48":{"name":"@react-ssr/express","version":"0.7.48","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.48","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"e3a04981cd4c372ba8949a086a9637747fa9ac97","_id":"@react-ssr/express@0.7.48","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-AK93+5/pqBiJJO2Rkxx+o86axDN0vSs1oIQ3HuhLYC0SL5qs9hPkCA2z430XjDjB6lmIiWo2jmXccQZ9HoORpA==","shasum":"8f73b71ad7724681b389ce5eb6072cef91daee7b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.48.tgz","fileCount":11,"unpackedSize":18822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt3OyCRA9TVsSAnZWagAAcaEP/0Gy3cUyhk0P+MCxoVST\nxYFJTWqUWkDStWsSXqL4yrw9X05IAa3Zx3fZiHAtYqHuyftwR+JiSkx0aEDR\nbgYIr8S9MW7Q0fd+l4e0swOfxqEAPEmf8/djQ6vqiBK8hvtZVeEgRN1zcHTf\ndvNmB8fBh6EUMTOq9ADnuxvLzdTpVe28RUj1l16K77OBxrngp3iuseeFb0c7\nP/EgDjr+PlutvFO0OXQWD7JwXkw/cOJEGmMyCPNm8EIpPoTKGZK2Z83mBuqJ\n2y6f5LHvuQLj7k0X/6fwzZIYJXBzIVP4Pte9fLfSpV5+BZJYMJWOl0mYW3jm\nFr5nOp3IohuUlEKOwwl6qVCBBwDGf6B66K52HRGG2gHan0MOHNwCghNH6eht\nctZN9c1uafCmJ1PLGFwRVio36Xc7dsNTQvJ1UYrHcOZgtEtLC3Urwb3g5pe4\nblKKArBfRcjGZ+/wn5z02QdTj7d3zbv/1tVYJnAuqSFf6FlRSeoSTjPOqAjV\nvf3Mnm2LT5OhLaVTtp+r0Aj5ouPLjiucMvHdYRuh9XJYa79x1yrCckC/ScVB\nrGeVsjZs4g5NiyxrlEXC+FjW8cqfZFcUiVczBLLdqvpfEYsAvWIEUIMLuNEp\ndL3USH4gnteGJvlw7la/dKJzferv1vgI2Q+OJ7Sb+QoFta6UuAcPk/UJGi69\nZfha\r\n=eYZK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAtD4AW97Z1/fUeCMxtSIwr2XOWxYzUHO7RFAc1IT5KgAiBOzD2bY6o41+P02TYAOqk6zTwVos+D6bHmZ0qRDLzfrA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.48_1572303794347_0.6616442127415747"},"_hasShrinkwrap":false},"0.7.49":{"name":"@react-ssr/express","version":"0.7.49","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.49","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"d1d463f6edcf14ad55c22f310b0cec2d4878c3d4","_id":"@react-ssr/express@0.7.49","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-WHtJiDqa5BFoE6UqA+/0A1yhEuKCXTTWdAssOLw8FJ2sUIFWwnw1+8vEqIW6jm+7KRgCXzfYmSX1iXyQxUQfCg==","shasum":"b7a6c20342d852f8e2fb022b46c05ecae378c1b2","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.49.tgz","fileCount":11,"unpackedSize":18822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt3SyCRA9TVsSAnZWagAAnRsQAJ3sO7RARGhPyX8ayt4F\nlgfrn3TD4OH9uv+SvGTw/iqeWL0H/WVHm0LeyfDk4Q2AJLB+3mM4Akm6JTzV\nuamP8gHpev1arIhPf5gWZb/9LKCLp0TBFbNnp4u4pT51WxTSLpccv0vLx956\n4f3z2sgES3JVYIcSh3qKnDu/thzYuPCLgpd5osTH0PPjPSjczXw/jIMosaLl\nXeVhQgehXWmAWubtA5OGe+Jw0n82AFkP1SRlOyZfVEbB3KN6a7DpLJsT7ihp\nZQWhCVz40EzMx4bSPU4IidPBH774hiIa6d5K/01op/b0gdB8WuY9oGG8XgGY\nLol9QmQVZxmeP1jcEKUZMrRt6ThaIFLS1hcuAG9ZPkx2d/gRcLykQ3JmmOCl\nq/roJpGi3PylgqdOCa6jUg/gDQm9l9JrxdZ4AL5X2aduk12qzY4PdmhbKocD\nOmjxjUtVAw+JoJQ2c8c834CksV+olraoxvfR9YCeMmPHa971+uzHwcuhtkPM\nAeXzW2Ym9nPsSybcnajNm648MzbB9aRn+CAr3epoeDivNSurk8Roh3sigAhU\n3cj3jajWL7LB52kiZVyB4720Y04QIyFsYf9zg1J+V6336dX3uve50lE2PTvg\nd9X1iq5pt45/FhSvzUOhcoab7qRDoFQsNVxMeT5yyT/z++VNwRJUASL9KDOI\nf9i0\r\n=lbvq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBBcHvkNiDyLFGzZ+SL+Tw8+F4nxEx4tiSsrPDdTq/+8AiEA6cAFf6efPG8YG3SOu2epU4UU2mPCaY/0gc6jwNV8nLo="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.49_1572304049724_0.05834052793155675"},"_hasShrinkwrap":false},"0.7.50":{"name":"@react-ssr/express","version":"0.7.50","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.50","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"e097cc086a7b34a9e77ffa04cdeabd20841190d9","_id":"@react-ssr/express@0.7.50","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-WhAqvdutRY14T/MH3bG5WqIMidk4id2zuqCJtaLOSYNZ48r8/hwri2DrSr4HZtrnJOHEv912b4C087UuA/TN3w==","shasum":"b3419ca593e6e989c60bb07e356ca0cc9a401b09","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.50.tgz","fileCount":11,"unpackedSize":18822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt3XTCRA9TVsSAnZWagAAuP0P/3Zu9hUhTGJHHONdI5vV\nT4C+o6GM29ExeCkHGtXDPlB1KooQomYaxq+zAhDrydJjmSoMPVGFh3SqnBto\nz2otA/jiIFX5TucrWwP5bjTRmH1ugfrtHC+e1u49n9sgtKl5pJlge31IP828\nUHAelh2oejCUQFHQJu0trl3XeTz3kMsH88gqPgiNCIKRWNI1isFaMkvMoOTY\ntZqBXpeGlK5ZdbBRl4phkVYgq/g/Ksq9L+qFzELsePAjG9rQJQid3OL2HYtN\nFW6Zt+6ycBzaNaYBd8aBufsIKSlagkXDnL75+A4QyC9VM0H/ZgWLpGTYkGSP\nut55GOcDXphb7LHk6YI+vwYq2zhC/1ddqjJzFOy4mQKSlKskJFVYNk+JS7/0\n9oWx2Iu2xvcGKxBvHH6oUAYlnuWe46kxV8vHPWGUAKGrzo2xbfimKLRvNfht\neEFtFXzyK4oPkkAYFxcqml53MTesvVpeN5Ws6NMXPYhtbAHY1FPOO4i+hUL+\n+AqPbNfXHzi2g3glzkHPdTuvjTVvyugmKmFRKzEV+dHAG/ZlRWISQ2Sr0clE\nXi1LOzfB0Qlsd4dWIz6hI4I3tzTX3s/Oon3nK7Y63X1LtirMhP7VenTQUaIL\nZaoPCBQYb3iW9RCsDArV7H84M4IY6TfKfroAyvyIWj1iv43cI2HRtWQ6uTzv\nj3wO\r\n=bMbA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD1oMcXmDiRsey36A497sM1NBdrrLfc90OF6MIbpgEmsQIhANystk8+TgDChAVRV3biafz3YOYeNBnzbNrW9pl9tYln"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.50_1572304338894_0.5707377354558496"},"_hasShrinkwrap":false},"0.7.51":{"name":"@react-ssr/express","version":"0.7.51","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.51","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"ad35846eee2d03565619a8639e736c0a7fa020d8","_id":"@react-ssr/express@0.7.51","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-M2HBt0mn8M7ToxlYLU/V5h8FSCRPr9+vR5GivXvTdVn3tDBhB/ftF/8ho3pvL1LeRcbyShJVba9Cjbst1AADzQ==","shasum":"c21cc0c6c005b37a7ee401c133b31d4790b823de","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.51.tgz","fileCount":11,"unpackedSize":18822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt3cBCRA9TVsSAnZWagAAiKoP/j43TIZOqLranGAiYXfM\nABqcIPA02QgSomN9kPggAt27kBUsd43sNcFHB7wI3peDWeiXfOZifcux2Ypv\nZHFCV36+TvdQsddCxn6RFIOP2vBvL+60t9Tu3BkFWlvwt0vxRNi5VeYyH88b\n3MwfVTbk4OkCHgmrcJv9QzBVbDxfD5nfqk+/3WTV0u+PzzZ+02FB3BnVd1AS\nVLc+hg+uCdHFl0FNk5iX/EnQ3xBzeHt16MSivC/wWlPHbytQ39/0eAuZGc7J\nrl8eKNIjpXlZUVRBP+0DH1ryOe/1uBkwll9WAWuTuqdR/ANQ8TBxHaBJKuW3\nFjBY7NEiHfp/2Swrx5JzG2VDf538Ok0Z6H5rNNsp8l1beDeAJdjN32As4P6U\nLkZMvdhSiPKvVpuH2SrxPzk8UFiWrDrHfc2HoAvMUpzsUHZesRIqbA7BFYAL\nMGxgKLDfUPBPApiFLs0robAgCyl16qAJHN47d9SUsIWDPitGcN81TZGjtY62\nQ+TPg06pbMO9U6akpocetDk5vKFmwfqOF3CT3cHQ8uqo7CZV/7uAX5KDziiA\nu9qJqSBupGqFzFKPwL44qAkFR8gT0dh3U4P0atJaBdNdws5y6yKs6OCdDl0K\nRAa7D10Cw9TWwU7/hf88lcFYyUW9pNO0mBKYiZx05RdcqLUMjNUHyGHOvwNk\n+Q+W\r\n=NSKS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDwoLkvzuLQerUWpYO3Voe39nK4Y+rfPtBzmajUqk8XjgIgRPQFj9rYaTQ0WgYRAZ+8DlWDiNMmrFLLh8tpDYCyB1k="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.51_1572304641421_0.8209301993975526"},"_hasShrinkwrap":false},"0.7.52":{"name":"@react-ssr/express","version":"0.7.52","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.52","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"ae6bd378f9dfaead41a4192b121c647c649d0fc6","_id":"@react-ssr/express@0.7.52","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-UvIOsPSau25hf3RiZZUgM9QMYJYExT9TgqXfaGg1/ickx0N8zzqyb8xBYGCULoOGdt9xrNgHZt+o/QfilQUOYA==","shasum":"c65594eaf1fa6e1da4d15b241896627da3c3c40b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.52.tgz","fileCount":11,"unpackedSize":18822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt3dzCRA9TVsSAnZWagAAg64QAKQnLweJ/EDWhIh4Cfu5\nTcwEfbVPuudc5Ae6LeCFSFR+Bx2icxkAPzv6ADRn1tlCmWl3TsfJaap9Qgw0\n/lbx66SHWIn7D+Md0kmE5p5LlZAsZh7lF2JmQNNRD0tSpvWg7iWett4K9GbY\nLE0qcwbwO5U3LF+b49EAEUZ2luEtGZuT86AM5LqwM2cJClrsJJHSmk2OQT+i\n7ADv91ck2c2RPCT5tsSXJnqwxbzOBcVOVVczbhCRVWC9UJPTmVg+0FKQ7PCd\nU4Wsliy0j7hJqvaZKMa8sCAjD0S/PvoZl0Z8sIHWRhnSOUCU55rfaTmL5Lfv\nVF3ZIfR0Ccs5K9Xc+yeTXVnurSrTU+1jcEoTAjex1nTOhM2dIM+O+WVmdtv8\n+OMow02EJaRHhoQizeC1k32AU3PB9PGAQh+VQ8HEb87vUzJicUlnKwudjB+x\nWs+J7tQQX5Hvx78jP2ryGdEyOL+V2HMJrBKmy77RPE1dUjHXkUgrg9E3Idlg\n3juWLlDkDAQSRgmqW/c49FMh82601QSFsk17nG2SnBzrh6cK+/yJe1bb0qzS\nv1bKLmxZ7z7hosDdSi+wA0ZMh1cGrrfJpPblmAADjV3Yps5XKmssCv5CJXuV\nL9Zz5oN4esVVhgWr6FtAB6vUnSf3X2HvuQmdmIXnpRCBu+dP2fY+wRDb4dTq\n4Cxo\r\n=tQBX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCijP7QWo8SsIFDDd1+E2p6s4MzthDNAhjpggWD2pSptgIhAKAbB+saK5niu83zrYDlZJgwQZAIhtIZm++Z1s0MBW7K"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.52_1572304754873_0.5505874461158011"},"_hasShrinkwrap":false},"0.7.53":{"name":"@react-ssr/express","version":"0.7.53","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.53","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"9544d693f9a132417b13009de345d491350eb957","_id":"@react-ssr/express@0.7.53","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-6+wh0eauXTtp7u/1+MIxwZbaQXHG4d0hWHLo9psvMtc64i+/VzWvAev0wGQxQmYzpzDlftfmLbk/cGTszIoR3A==","shasum":"625e036193bee25e7548abe3d8a00bf8dec92295","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.53.tgz","fileCount":11,"unpackedSize":18822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt3frCRA9TVsSAnZWagAA4osP+waS7RXdZTxoioaFW9ln\n1FW7DWzK7pmUNf2yi7UXXTog3U24M5bMj7/cLgYokAO3mdXh419edBXWlBux\nRepgW6E83xgaoo03+zHSO+3F7xMFdOUms5BEpS4lWQVYwzPbDYghz6apyqtH\nnPwaiShsguT8IXCPUdoBAYmaQl+9USlJcpWo4z4gjbCCV9+v9+k0svd5cfT2\nxs3mAsJh90TE7R6t+EGtuWZdUguRkmsOfgtAz9Fw7jToGB10Zq4T1LNKPl61\nBGTjLbsft7UgJCZU4tGGbPMvHkunaEt0zBBVzuUokb7x5NtdMdrvtu+zPn8V\nnv8aBUznEo25lI50GSKsWaB0IWNXHrcnJ3y6X/ILJyuBakbCNutqgQipQrTi\nHTyUJ3uj6ausU9cV4iu15FxrzKNmq4WKyCT6E0uGxMRF8WUWQ06RqDEjdX+v\n9SksG7XkLxxcb6GjpJCFLKFn+wPP0rsl1bIcBlVyPq8Df0wNg4kWJnxIMwnU\n3sYhoCs4pov1fDP9RK/y8mSj0FdlRPYdGBc62KJe9rhkiEEs6xhw0QCyOPzU\nvlGW/kZ5Iez6IulJW5HhScoeDkMKKiaB9Ff3U2LYAg09wkK9WviB2oeKufd4\nUBt6J5k4fF3nMt7UetZXv8PhqwvTQrFqRap+FFxvNeoCvB0xQBPICEkRQrrd\nDMeN\r\n=eG8L\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAide8i0aNZ8YFebTUW1Umo3JWRDUEy/WHHy4exq9F6wAiEAu4zHWZEblwEb3DIdbt/5IjmHEDt+7XJcSxY9Ivp1rgA="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.53_1572304875413_0.21749683218670457"},"_hasShrinkwrap":false},"0.7.54":{"name":"@react-ssr/express","version":"0.7.54","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.54","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"04f10c799d0675fb37bb30c58ed2b18aee600359","_id":"@react-ssr/express@0.7.54","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-/Mf8WoeSIkRZDBMSYcMLiw4XHeXEn8ePRI8vG9OqtXCrIhCuPf0FLMPB46S1FvL9KjSkvdIbX42Kd7bn8fsFeQ==","shasum":"60dc1511233436799d41d2e99b0313e838953b99","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.54.tgz","fileCount":11,"unpackedSize":18822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt3jMCRA9TVsSAnZWagAAvQQP/2v/3yRYD1XAlOWSz524\n8wZeNW9tUxS7PZGcoT4ZLUYNVqoAB5gMQ7DxWg/VbusB0dHo62cZ8mRW7/t6\npNUnL3cGzkwsQ+UYbk7jIWdnj5/SrhAZ27ORvkXcPRyprlht65c0IBTyEK7K\nRIvvUPsqI9OGwqUJin1zMw7ypgTOpXAokXsuC76m74e0y4e6Q/gpaNtfXCWl\nplhCZR+NGdpvlBgonpmAg/OIPVrbYEzkU6NxZIPGx0fXH17VoWCaJZ7cShXx\nBKh8G+KZ1fJHk5fb7Uv44qVpdYPJNQg2gEoEGdaGG3gybnRvZXKACijEpPt4\n11eXZf97rplOyougYbuTBH9z6HsZo/V+BjRhiDMwNxs7OYBFDTvYa+2NLnOy\n5KZ0VQQ2C5NMjM8zy6ZONIt7ALyFvXg4p13hYpVacedB+a9563XGGVUA8qw3\nE5leYUAVpS1gBqTKo2y1/kCqbXyRGSMqz7wNmmuUiDgLoCqS1E7Q4IG3TWaf\nIxRCj6U1Mb1+xNstkhHJ5HkLAtqgD2FjzfFbvDaW7Hm9ZiMRtDKXhfhi8+Jj\nXBHJcJlAZ1heJ7S37q02sgoYVoBBjgH2B4yF4s6t54Tj/fekqmuc6XXg0Hv6\n5ePq1CKXBFtyfJPWz0hUD4Eo/uHCFvMyJabagDmjS0+XivHNd2pUmERKJ60x\np44M\r\n=gPN3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCAJWQSON0/GstSl3DnrlSH+u2XRZ1fNntwWxYoV3Ul9gIhALWGJyVZKFInbEpPTUc7QG2Mi2ZTknQmgA5lvnv6iQUI"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.54_1572305099827_0.3953938931014609"},"_hasShrinkwrap":false},"0.7.55":{"name":"@react-ssr/express","version":"0.7.55","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.55","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"b5f35c16d8d900645569eab060a8e4a7da6c3bfc","_id":"@react-ssr/express@0.7.55","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-lV7OqV2fTjpLxkA49kmRM9E7cPGrxPCDwn/AEewD3AGyI/7ywOEy/+R1j7XoLp1alPASFfK3jvebHs5rT1fI2w==","shasum":"16ebe1bb5c25e313450c3436a647b2b1f3058e25","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.55.tgz","fileCount":11,"unpackedSize":18822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt3mZCRA9TVsSAnZWagAAsQ8P/ipXHaJMzKcpvDT8wG3e\nVnIJ7ss2O+l8tKFMKxcrXXR3BRXLVDZcachYFME2z1ypfUNUMiuvBKE5LsCm\ndS3gXtzgOrkxgS6K1Tnwi6qU/1+qwUsuCO85LyTdsHQJ15qFLRYaCgwHH2/M\nZHaE00afrtBuHiDD0yy07nNSGxYPy1NMl4FHyZVvp+ZQr7/8eRVN+gSTN9hu\nSExvS8q+4/3scRoAiCRVwYKG+mjKD9CpoQoHSk8LWV0c0jhBm8W2h+ddf225\nNutr19adyCOPMTfE+lzMJ0Vctd/prCLdNu/wy63c0IAzJFViqGfQqO7VqZr0\nuqMtu/WWIzjStT1xhSdRX8/EVXCDWXRKVfwWwQHjjmbPB3NbEynvy8d++Us0\nCHyU2rNYhJQPDsR5sun3/lruIx1fs0IQ1gZY3PAiFz0vPHZi3mIL0c0lTVsr\nTIcFY010dcI3gPQxQkjB8DvLgFjOl5KxsHuIctvz+znUkKHMqnbh7GJzgwKi\n/za8jza+o/IzjdoKsQXj18ljNlGcEN+uhFhWpiW7IQ/O8d6/f/odb3dXD8EN\nEaJjiNOFsykG+vmtnlKn4o+lKgygwHjzW7FNyEXJDNprhiVGWF7s1Twg4HbA\nqX8xnohgdwYv/7og3gP+ssgNiFmWeVXRR180+dx521HKBz5m247ESc08Uo3c\nLCPY\r\n=OtYf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDPQr+EDANuMBEC5wj25get8bGHyRbwVNHYvvEa5QsrVAIgUxronPfLBgMkmG25C5YwSoCQJK8TwhSdaUlJfZevraI="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.55_1572305305465_0.8062519907784627"},"_hasShrinkwrap":false},"0.7.56":{"name":"@react-ssr/express","version":"0.7.56","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.56","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"a44043b24b2e59b0f12782bce9211bd1dea985a4","_id":"@react-ssr/express@0.7.56","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-5lYtqs4GUfec3i2Xf9Ft2AsVmJ222AOvh0YUIqrlcAIrs9u0Oi/5N86tU1Ai+2b/Z3Yjf2uETm3dS3lqH33jYw==","shasum":"91f380e68d293283d51f98e322baa27673799859","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.56.tgz","fileCount":11,"unpackedSize":18822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt3osCRA9TVsSAnZWagAAgoUP/inKUF5kpAqCdVG3DLIr\njaj85V6Y9NKPdTTHQ/xDheIV8J52yTqCQamj4GQhES/cMS6If++O8YY9ZLeI\nNmkyt9PoGvGaaHT8BKeECbebgliyvXbUfT46F7u1k5ryl0ZHtn7br9BY097b\nLiXJ9s4f9MCZbtfew3TFcVPWYKLbyibOXBVk/8TPtrdhQs6O70v8G5PV+hks\n+ezf/uJz2cYjKjoJoGKYhz1Jiso2QnShgBMOmGKW84YICI3NXQQLvqz5VKa+\nyPEBF0M+dxSY4Cfze8gmUqNa2jRrSmwyOEiKaZS+l/56qg6IehDxQBt+VwU1\nuyWYqONSECfRNl74jyhF1sXcbkEeTYRW2YvJrddkeFQhtkMhz7bWz8p+BCmg\nuk31o1+lIiAOpsmBCbcLGpUDn43dbF9SfozWpn3SE/1EcWB9bzGajzWGAoYD\ng0EIjYa7+AnDZCtAe2m5256ZNtZQEXE0+NMeAjJY59bfDq959PgS4T8aPTjf\njOzDzimUtI1Skc/Sj17XpFLgXJGTCXvg1lYQWHgQZDqGqgY417yk5rBc36Fn\nNCw18wpBHjns6NJsFwqyULvbgID9utdX+0k+ppLZ8AFM69ot7Ys5zUfhaXzi\nODbGJ9v6nad51UwFqnefollJ4mm8aj03BamOVnYXrRHl07h1lEssMC5J4jXL\nd9sn\r\n=1sLJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA9SFngqkkHRjsZ9gyJXIKxy2whvix46FdZS4YPAHSDmAiEAtEi1dnYSF8f1PXC/OSs+evVnr6IWx5PGeVutRudovxU="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.56_1572305451573_0.9077519890724706"},"_hasShrinkwrap":false},"0.7.57":{"name":"@react-ssr/express","version":"0.7.57","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.57","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"94a1965de8fb035288b14bc9cf87873f71341fb0","_id":"@react-ssr/express@0.7.57","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-8RFhPikMabtG2whu3Ns9JMLxAnpFPFFAMlQZ56E3XTtCH9OLO4KEDdG2J6rFLLntNZqRLNKWNx0Wr+jNVoJv1A==","shasum":"6256435a5d468f6a112e520e065f29d7d5113871","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.57.tgz","fileCount":11,"unpackedSize":18822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt3tICRA9TVsSAnZWagAA2/IP+wYLOpPK5gH6SiefX9Q7\nEQvHQwgvZGuYwhjps1aIVDu/K39Fd9GfuCKjp4NqewhBTrIszFOtCwKpj6AK\n1N04/MvaMT2EE4ihl3czlAg3e9nBZooiphhbl6JnBJ4Yed0SfTG9IVdaTO8d\nh6DVubaXTuAA4lZhMaXHijIRBZduOaNrsR9FWFM9hE5X1EyLNPz3kjf3Sj9/\nSlfea3fIX/oQLcvOsHXLDgIjQYy25/QBsD2rLo3MwjdyQqLbx9qWGz3C9E1A\nhL2mlN4eVA8yd3V+Fao9UyySbspxzvIWuQhd/TFCAzTUf74ULtYSe/+57R0A\n/7dxVTEQvLBxztMuudbwdGvj2wDnxtrrdirEB4vlfYxC1pnnOCaHT561uRim\nnGBoDTXIx28L+kwTKPad5V6FOtyatSpXjf48y0YJAkwdFABAexKtnq3Q5PR2\nSGnsfl3XkOqkBsxSG/WMh67+qOFBPrljjHZ85+fEVS3hRUgPt42sbTTfy/HH\n5FsE0c+DRPcSnRVU8zAxvs/icJ8WA3gXaSrEI08/PvIKYcWLk9aSXWY1fMs2\npeaVRuas8BRXrpxKWzWWTUh/NLQd4ZM8o20Y6aBiiQXGQeoZza05NvxMOClE\n1QiNRBctreZlFUU9Zg5DXYaqQLMGXHO0XfA9yYU6FQRNpmTl9CQgLJGVDlzr\nlkFs\r\n=IOhx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCfwkyybf8xmt/ai84dajqHYT1peJBYpMkKjuJpqYgpGQIgYoUb1fJumIrK5AieUXIj46UFeimNna1xaoGNnlzkKB8="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.57_1572305736160_0.16309255865585426"},"_hasShrinkwrap":false},"0.7.58":{"name":"@react-ssr/express","version":"0.7.58","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.58","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"18b3e172f7c50dc607fc10875a4a21c879dd4a73","_id":"@react-ssr/express@0.7.58","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-DvEx4NQ8a7XTFVDeFSXsNLDhTllngvCCvFYQbyIhg2kOHYZJgLE0oPrhacrSh6VEfqRPdWRxEa9oBP6BIaOE5Q==","shasum":"d1a3afdf13f073e59897708b9b1b52cbb435db22","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.58.tgz","fileCount":11,"unpackedSize":18822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt3z+CRA9TVsSAnZWagAA8LgP/RSx6T9tLNvAEm/lfNo7\n07Fzg9Xhni/WKFFidWNSc8Js2OBFnF523lv2VLaj8UgBo9JTpBSlJqLYX6lh\nikcwY8vmgXSyQZweiiJMcsjRk2Ayi0vonHCe6Lq+VVpTrDN2si86NQkYpRUl\nm60YGGnrqfyleJlUfWPCTW5PKlDvGrqxvijV5ZXj5mBF/LX8Mq94tLAn9T0g\nILXonf3PzqqPfwr36JIHzoiLdE9G6uF5HSlry30/LICXiStSNrG/P/KCzI45\nmhGKGB1xUMvhVWU37QPHe4kRCcV+cfEG4Eqy8czobpHxcaSKlvt26hBCY6rh\n//lPmjKBd7Zs1t0DZXOzjWND7ik58K6wexEHlDRF7qJDkPneK5WXwyCk6wPI\n5UF0UxNrAw684AQ6AzdNRzlhQK9Q0GtGNuvKI0AIiCuIXzUw1Q30QrVa48/K\nu9zKloxzWW3RDzTFgUqYe+7U9zR89GsKVtGsMaq8ERDyZWoG9Ihk2JStSzpi\njHfHa1B30RJS9krQMtFr82qy4FnHkJ4DDG/oovuSMZVopHuEcRqR3XF14knD\nMQBu+G4V6jRj/EuNPS8ECB72aicT02C0XYIQtyHbX/noU7kefSevTnaT3kpQ\nWkTDeqGtUO6f+8ASnfUJif768/7qnS+KrKfZtbVFdo8Kful/+sdN78u/EISk\nlVSj\r\n=p2XC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCQn63yrYGmxHtzbjHHNkvxAYNjDxWwn/Nm3c9EPEVQuAIhAOqGHWM8XXU0345qkRraUalaZgmSgk6KdyBMJUUNDJLx"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.58_1572306174052_0.5690602714899635"},"_hasShrinkwrap":false},"0.7.59":{"name":"@react-ssr/express","version":"0.7.59","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.59","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"de638ff505df35c94aa85f7a22892d2503a5eb5d","_id":"@react-ssr/express@0.7.59","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-fknXN/Qa2JEtWh+Bz5R2ateq2s4/CnCHClzThyF2pEHtDJNqXDsIJTVQXACkMKDu/VkcpX9Ro59/xIjbyOrTUQ==","shasum":"2c7f135d8018a6c8f5a1e42ec8ca3da70e634f5d","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.59.tgz","fileCount":11,"unpackedSize":18822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt36ECRA9TVsSAnZWagAAhtwP/jfXGM/tKgiuTOZ5oSiU\nrkV7e0ua94KKQpeAmOgDoe1LyKyqua9uJ5FrR9Dv8l4X+hgBJEkAcelymwE5\nhvLzMAxEPSXiGenQSr4o/ss6DFv0Lu6km7PqCi2SafFGGnsU6Fazu1dReM++\nfnesUPRI/t9YdttM/8PVmou4cFZw6PgwpQvnbng7Vk4rERM6cIOoguCtl1CS\njG2RE2ydwYPB3KUI45B+ukko3/xBEwL/LYjijAiJXdBGhnVRjBJh9XItHFHg\n1nhnibG6HpOIvdd4QJx0dT+dQLWkMM3u9/7C3HaC2DRBd2BoLqe8TxCovqJN\nPY+DJR4392wZupy2R85fXjIfeAhNdw0L7/MSmk/B5cHJoJxk40HvMFeJEGWl\nnS6Wc7MkbYcKU8yCC4E/FtZdGz0zQZF8JTTCnSMfu/XPPdxaMwop6n0cvGmW\nSQKtl/lWDPjzI3k+OpIvWN8YqdqVLiTwZuI3mrKYwdzoBsuKOsvDjfI1A2bF\nhFnt0uFHVsng2N8aS7Y03RuH/PSeYkiGY9rlB+SNn9+hlbYECDLKVgP5PDtv\nl9HGf7p9mlWKgz6wbGu/KuhkqhM4eVLxeXakTjOJUZP6bHDGPoGTu9emyBlK\nBtmYvrygHIs9pRMn0rHH84+eGK4WpTmvsvxhC+mQvMDJTD7lP7VhXJiYBoSq\nzEyW\r\n=fzaf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCOKVjwTPIzSGyt2fomCN3+aZZ6hagpfE5iHryl8V6+1wIhAIozAzpoF0Gy2Q4NeXgLfhUEFRM6oOlxscGOHP7VxsiH"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.59_1572306564525_0.4511327789273327"},"_hasShrinkwrap":false},"0.7.60":{"name":"@react-ssr/express","version":"0.7.60","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.60","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"4eeea2809b6b7e45a8c6d622b228af61bccab272","_id":"@react-ssr/express@0.7.60","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-zcAH2rdEOCiF+3dG/aJkTJSEi9s0mcw/5MMkuvPVXq1CflPh6Guto+Dg2w58hdfU3w45Ro+6N2POVkDDBY6wXQ==","shasum":"eba7689e36baa17636952aaa1c2683d3758081d9","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.60.tgz","fileCount":11,"unpackedSize":18822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt3+kCRA9TVsSAnZWagAAj8sP/iLnZH1O2VW/vG/8sOmu\ncsgEW8XRrh9A77IR5pls1o7OI8yZpJrspt1mMa+jxX6EuGH20KtGPovx3pSF\npF+wdeipVEBMThXaRQBc3JeSy8mtjSiAtb+m93ED3ie4FJZkqRE2Isv3QvSv\n+PKcxL8tKRkf/dHKJvWl/pPJT8d3MoEp/DSdGaeepCBBwabNXa4ha6JmWQA6\nmMTWE5OLC85GoRvdIn9c4nUJV6imEzdIaF1MraHuKY2cNTamjR8X7OhIvvD+\nDms/cDghaxY8UVo3rb1zuYOCbhY5AAoqzvHm6MSljYL0Yjtd90PzlWs0CgqM\n/8hkDjGsJM+eddhp5C7oSwJIAOwlbP7UH9YG98G7XSl+VPrwoWVxeiSXQkHp\naqS7QquvFWry3Nys7cyw7ogjPKKnRiEE741cg3ic/wyZDPEOrSMh5YgC//fK\nP4RHn2LRjlwqg8RP1wSjp/onxkb46kj6oKBRPesdYW41SomY3fF9L5Ry5JEl\nwpoMFSvroDskQ4BlQhNQSTBib1X7vH0xRhIjyAp8lx2vGTXGCbAXrxLk6IGN\nme6xr4+tFRtXtY6rUDOw/cnkm1sQfbA2vjWBNwGfEtYEJ6mEkHywQOA8/coY\njGo1RCyGrPekgNoTn6rhXsKAv25xxQufQVI8okvcGKdG+K1NuW8znR3fueKU\nF/6N\r\n=IcS5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDIbEk8BWSiSuTlK5aFkdmHU0bYQLLLJttsKs5lFEcNdgIgKXOOemN6CkWF6ybV1diJ6nBOuSjuGstCmb+L/BFrbTI="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.60_1572306852088_0.946831532096845"},"_hasShrinkwrap":false},"0.7.61":{"name":"@react-ssr/express","version":"0.7.61","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.61","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"da2338c8fc749a8da8ccdfb7395b844b89f3fe84","_id":"@react-ssr/express@0.7.61","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-MWXqa6DCQylDA5VYCaQUzhm3NzZzfa+cK/G4A8W9SbKxV7TBPQM9vZPxgD1VGYIGXgrGSzrY4DSBNZjYbYLj/A==","shasum":"0aacd7bc5dc9c1ea4f9733c13b1ba9bd1a3c1ca1","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.61.tgz","fileCount":11,"unpackedSize":18822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt4J3CRA9TVsSAnZWagAALvIP/32tBnEcSO9V2rUGIiE0\ndCy4nTxFy5A8VNN3DEW4JK7q6Wlb7+f83hiie5aI4gQvAlCCrbZBTmyYTqJn\nZthD+4sH5XCTz8XEEgcr8S1C8IEHv+AgOqYKbpy2NTtnHDr0hf6KibSNGpHD\nYUtCLS9875LEuKKwP4u4GQnQgrmW4iLAoyys2Nhg1fhksJhXczgLI2eZFLRT\n2VvIDvFIM3PTh75HNSAC9Xj+nh8DTA+3ShrOBzeYpWuhlT2lDoMX5rmGBQ9Y\nnQXysHgNSqDvp2R2Qa5hTgIcCG5GTj/uBtCM4P9cp3G4I9aniiB1sB0SsG6p\nskG8O2CsOzfItjuwFZlV3ld5b05bQPcZQJ8cGIRP8C7JaPsqSWG+x5pfaeRt\nGe+zfkC4QDFnqXjVQFOV/xeYQXU3sVo+tdwP0O2TnARFxHsv//jfr5j8fzOZ\nmpJt4Omp8GQhKtQ4dFQBvFunIlDbornVKYovfk6AWOtQmcUb3+af7no9p5qv\nUSbR02tRwpp0mZM4WjnCbkECuXGA20XMIfle9O4bRjPvr6/55/bhU+9kixl7\n8mMfCrz5+o3MzmnpGM35LzYWxFBn+x2TG8EAdY54lugEn9N7wbB/bL/Us0rm\nrQZcevD6Qw3wQwM+QYHlNznyonU2naxE/pzNgY94FVoTpbKtQozKnkZayhjY\ngT99\r\n=Y/s1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC9JGo+LQxrktNvaFoyPu41YVS60Cq7/1Xsb5RrRjyDHwIgVJIxl+5f523dl7HZTjwJW1jlJcXw6wpvZ5k7MMiO4r4="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.61_1572307575087_0.28205439254165166"},"_hasShrinkwrap":false},"0.7.62":{"name":"@react-ssr/express","version":"0.7.62","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.62","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"8c792205696a595dcfc95fd2811377c416bc1640","_id":"@react-ssr/express@0.7.62","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-haEiI4i/9BxBKSle1kFwNat0cxm2/Rn+0s8HrJAuROvbxqSErsoK/J8mHr+kkTGGNHh9qMdyCV06FXQe7BfnyQ==","shasum":"37c8cf94af1259b04e4e8750c515a805e93503db","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.62.tgz","fileCount":11,"unpackedSize":18804,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt7wWCRA9TVsSAnZWagAAp1MP/A6fm6z0b37uSzwIgOBp\nTTjM5yZlQg++Mh3GMRLFFmx2Hy43P0XQnPNwTp2Hy1TIa8JNBu93hhs9rAkd\noxlU6HXpsQJGOm8blfuW3FAJir98zPFwydaXQfFzCHgDxxRKT/RUMjFqqvfw\nufTU7n8grlK8AnVrQQCet5YUpumvKrGHwvAZiCTXIoPpZRBKRQfUnWm7TdcY\nOLo/K5yM9y8zi55+0Rvrz2RSinL9MwiiMktyu1ZuJHp0ZUYtr/WGOrbLLfZc\nOx5TUqyYnlCrDSZMBkVhOCMXEL5yJCxZR1Rkw5tAK4LePtRfO88x5OqgbS50\nmnIF5byam8ovMGEdnTea7+RS7p1iiog02p5v+A263YOHcgS8Sp1741Cuxk6V\n9KmbPVwmSCa/GfZR4l1Q9mPb9YaS0ULuD9PtZCXsUQkPQPX0fyOFK9+twLv0\n3un3QNaMVW7zpBYHFs8rS42zXYkRY/bWF4w0IcYn0HlyZEj2vRBcfAEm/ALY\n4est6IIe3R1olVD6GMWKK/HwQmIi9n/3FjpMLhZ546ioZUdFmb/79MHBvsOE\nTNHLBx6ltf0LnK4pmB3Ca9Utd5NWHFKYqNGvK3IBtNnwNblolQ43xmMt7Xeb\n7I863IdcZ8R0XYu6Wc+xcPb4gYFl8T5GWlcYiFAslA4sEtg83TQzog0UxIGE\nrdN6\r\n=iClM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCRGHmQeHcEZXfVJnA/9o3oCk1rIW9FhL/AtIyPB/MoGwIhAJvvGliTnoVEEWB58QawNAm/qUwWh4EH/XYDBWMibIT9"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.62_1572322325714_0.5764398078473192"},"_hasShrinkwrap":false},"0.7.63":{"name":"@react-ssr/express","version":"0.7.63","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.62","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"1c08174db7bac75137403cb5be9e7b44f25f65f4","_id":"@react-ssr/express@0.7.63","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-F6E7zeAb4FR3vNOzG7F6F5H3ymsL8TrbWvBT4xS9hqCoIuDH8SkLtu/7IwcGAsID/krjgy3IIeaB5zrtDDn7tQ==","shasum":"78c8ea96d6ed2b4ec41be3d6429910376f9a1891","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.63.tgz","fileCount":11,"unpackedSize":18847,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt8a5CRA9TVsSAnZWagAAPZYP/3GygUR1vWQVs74a9rdm\nv93mUZt+HBhPwu9huqD8m3vp1eTsjZr3lg5IvKavVsH+v8Q2s69HakovfIRc\nexdC97tyqTqp/+kDWDfBnUCW3vcOtDxXjTqeLmCusAC6Wd0Y3DEEUivDSFSn\niMREbS3/jyJl5T80Px5pTMk7EZ/ZZwQ/WLArlmWTGedi5G53WycT+fuZCE4a\nTw7pxFUEdOghh4F+d3Y80wQmQ8+mYaJLerW4te4RyZFcB7Go8my1EaILpx2E\noDyQtZAai9TipGy1Uqjk+d3Y6Bez9Wgm2Y/XVz14gAC2W1h5mdylKDRsE5Jk\ngn7It5lGB1PqOi053ric4tZWSAwAswOzbchWq0v+bmcpDD+tZOy22/XCduRb\nMZaY0SYxQxNPpFQ7+IisDmQmTyIKfyELPkeYp+D7A0z7r+Bgt3k3gCAzgw5O\nL7oDGz1hqI+M15fnzBUM/FbMpKFzIEFv3hPpHP83u77+XSBFMeXFVZEi+27f\nqnu9Ulcv2/hq6in8EGwU4df56p7pLk1LpshteS4V2WdTqN5b7T55s7WGTpCT\nNspMLVeQnTESVTurXGMEpnjo+j3DIxYHHpp92bBjKV1EIMSJzI0mArnQ25Me\n0fCnDNyZus8JSExOQZ4nnhNM0e7dLrylQ6iOuylgshFYxK0efL42tH5IIjel\nU4I4\r\n=jl/2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA74lr3HV5aoWm6d+Zi/CcqPGLaMLLSz9SojCnGf6IQrAiAd7m/4MStCrI1asnEBP4Be9jlS8KK2Eo/2tZC1s9Mkjw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.63_1572325048498_0.07807341607881813"},"_hasShrinkwrap":false},"0.7.64":{"name":"@react-ssr/express","version":"0.7.64","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.62","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"3d29ccd85d4bcd28cfd5052cf6a2a97389ca9bb0","_id":"@react-ssr/express@0.7.64","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-/6aunynEoxt8HpZr6xnykKDlv71BADtgywVbJUsz/7orsLDcaE60fC2I0LartrONfPFRycA91up2ubgUsjxvWQ==","shasum":"02711e6137c883e2ff245c73cfd8832a7f725094","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.64.tgz","fileCount":11,"unpackedSize":18887,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt8qjCRA9TVsSAnZWagAABJwP/1vNYsvp9+KbH/eM4EYq\nGmz41MjAeudFhDicavsOXutxVETSroX66H9zfouloTb3/qBfIWrzfIui3gto\nsqvFIjxoFNwTY0YOtJkSCsXAT0znG/JfEsYyrbs4+bRXt6ezmU5Vovh8LugG\njiI52dKybunmFR1KEW+G3YwfSLKCc4N3UurOU8bfaBzo04gcsgiTJVi5ZXys\npajPqsjXlXjSZNBYNDu2rdeAB12ZDhwQPtqG15ZHBYQ/LqpEG99W3TZUShQT\nHdAIUVupVbCqQjJ3g3nMqwq4Qs05LL2pF/76Suf4w+azyMcyJlJQpnjAVHJS\nJ0uXDeOe+V621bnE0BpQTKjZI9782du1FCJJ1V9F5lhBuhImdr3H+JI4pB2j\n6UTWXP86i2FRBrgUOSMlNNxKHL8ZwbeJmESVBZJFYTf4SZS0PaUQwCYyqeda\nEmdSKf3xiQhmOuBWv/PTSvaN+TbXJunJ0Jjz29MKfOGNZ4xGfFNeFIM+nles\nNAuvtUP9C1BOqmZ6aKXOGUmTWuV+nIDql3APuEBlLL4qwGiKUSZOtIjA02xg\nxDTkJPEeY1UjBxUmztGazB0DCNRPLFintYE2K2A9qjHVNpuiLUsv+xikySpW\n5An2gaIUCgiZsiBcuQsX7jSNe7I10WgByqJUpNe3iTHgsWL3TZwUUPl7vWXz\nNqyb\r\n=+2fF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD6adCxOwOzFb/X95RLrd94ChwcbuIYYONI2XYgZkXQoAIgPKkoYq/e22IBZUCEAGGMQ2kpnanI9eC7p1VViBmCoYE="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.64_1572326050846_0.4101889013495099"},"_hasShrinkwrap":false},"0.7.65":{"name":"@react-ssr/express","version":"0.7.65","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.62","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"cc197eaff3a99eac2b6b552b0a29368c339550a3","_id":"@react-ssr/express@0.7.65","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-UOWFiEqK4C5sw4cNCipmdyOu3NJIGADaBrcvngyNTrupytpuuduIC6nfil35wxVlPUMy1gHtn5Ws96SaIRgnvw==","shasum":"cf6cea402f61329409a2309e4a4c44d87fdc5e4d","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.65.tgz","fileCount":11,"unpackedSize":18934,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt8tNCRA9TVsSAnZWagAAb5oP+gMTRS2kFsKWxVqRh7W/\nsHRysG3nkaQz8wsgZHRu3z49D4jJ54066sSNGbBTLwTENszeyqcgOkU0rAxu\nm5P7KcJTMfzUjLV+0pzI1e3orbrkQrDSjUASCMSlsEfA9a05MN4MmV+bo9Tm\nzOeJHVTD5UU42AwUhM7azDclYWus4b/v1PygEGO2Mn+b65IC05d+kKrwefQm\n/H6brtz7YwzTmhCAhH9mlKr+KxIDOkFLyThmCLeFGOVC0D3j/zg3GvlNl+6d\nVDjG17DcOCH80iswL3zFQOs5WnWQgtsnJwG/q8/R6ouT9DEkeRGByySDz9nd\nmwsd4vWVpNcForXm5iIPT4fmQubPtRTa+RWH3/22UrXaBBUAwdZRF2CyQRE8\nUdmQ60uvzcb1FMNqiU6PUHc6Kgy09PnvxuhfAnfQ7tKr1b3x0Vf8UClAaMAx\naQSFcXnZGVxFQ/fwDazFi0OTya78rJ/T4qq+oTntGM4Ehb4JOEjWJ0zfM7vC\n7MpKzmHMxU+Ms0dDRQ3HcUeMfO/HfowGb3lZFIjXsISzjdsvgGNPtP5ZNJrQ\ngQAL2LXKBzwQsJGrje6EHgOziKc+G5s66egmxfuq8SEgCYjhIwGnhCaGhDYn\n3ecya+sk42y0FLM/ijPRfXwVp9QYIrRWCkVG/NsCRHCbrDC/S10fjWNULDqJ\nfeHZ\r\n=o8TM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHIj/JSTudT8H6QmYUh97ETZCkwsc/sb/TIYExVjA3vRAiB1yHyv7637z4PzYPIHvLSL6BxBxhm0Qd2vlff+8+gyjw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.65_1572326221205_0.0900086992149638"},"_hasShrinkwrap":false},"0.7.66":{"name":"@react-ssr/express","version":"0.7.66","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.62","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"758eb037b4f07a8e207888524b13ccf354f71b37","_id":"@react-ssr/express@0.7.66","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-FtcbSHl9y343OAa/HhXU/GFpBNLoo+6uV6DQIemvZ8uVy2rpugVvEGWKlkaXMVgoJPLRxrQqAqt5zM+jOMX8lw==","shasum":"0bb5c90b0cfed2755ff9bdece54750fa385709eb","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.66.tgz","fileCount":11,"unpackedSize":18911,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt8vKCRA9TVsSAnZWagAAl3IP/0i3kFqQg2LJazhTTGLT\nMUEQQNebu24vP7AfQmZS/BPtwp2YEX1tTRcgmfh4fHFo+pVAQ+3YN15Q+mP1\nEaPMVfHdvkBt3arQoni0H14B2RgX0aKZTMri3kSHaoNiF9OUt7jmzb3EZh/c\ns5VPAF7LyvNQVUlmIEDABikISe/tIxboBGfN84l7lNwoc2U6m2SgVAEIF3ic\nzg6Td3kDTwAzNE+s+rZN4totu31wGVRvAWGcwZijU+zFpASFdQpTMX9dhdNP\n5c6ehO1U9DzbQBqyBfKUm+EHJhDILacG1iVs6Qer7jn0vegYG96VXTfqk8HD\nhBjp49MpuUIYpNTjsVO2GGjMbmlq95npNmVKRSDWuIxQreKiSnZQGwknGcWo\njBnSVTKU3n4650a2qGo3qPk8SKQz7H9Wh2sT55k2hI8Pre4z1sdyXc3pXyWz\ng++M6YrlkySxS6MM/EHuvW6GUzvRKESh2x4Rxe/teBONpbsYykp8HnTwmH4d\nv+PPe3bQkw/q525bKrkvnHolKFMEO6S3DSPb1pvnAot+UwCTVsmCGqpQ7mub\n//bxwhwk2mnGXI2qdpRQXKDzNhcPXqmnfVV6Kh5FynmqXP2O1cH+CbedqOt7\nnQa/fSdb2Njwok+2DhAOnS0Kg56oehPk8WCQV2g/v5NJQIRZnCUyR3TurUtA\nYG+6\r\n=1y6X\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCN5McMgxf5SkLktd3CXrGmfx1TYI8g9i0RMlIzKiEctwIhAMz7ZghFTKAL9uTPGZxIN5pRbiQTC/W3LVjnvOOa//ss"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.66_1572326346259_0.2659200142591118"},"_hasShrinkwrap":false},"0.7.67":{"name":"@react-ssr/express","version":"0.7.67","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.62","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"09820a29298822170cfdc7a4509320946773f39d","_id":"@react-ssr/express@0.7.67","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-m5Qq8+t8T/3mtb6WtFOCUaP/uppFRPb9UPE3AalejNHH8Y4cy3Rm5OGJEkicuHiF+RVkqatQBSfQVe9nVGO1pA==","shasum":"c2048987a4664d4acf271919c14894dd62de48b8","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.67.tgz","fileCount":11,"unpackedSize":18887,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt8wQCRA9TVsSAnZWagAAUkQP/00mwvDuJLw04+q/mwa/\nD3rmJdG1rMHZ8Igmrs5peTHqbJXra0ec3LrO0Jr4rncX43E94tRl14l/qBSy\n4KdNn4iQis1jUaXy5pKnvPSx0H1JXtuIyRpwPEw/L6R9V31kbtyxN6cWMoyM\nnCcMiN2XOQroAnU8ouQLxkg6jTgBHITxKb16qU7b0khvLZ/cGeuR3Rro+0el\n3UItURGu5H0jeYX2vHyuUGaK2bCOhVTibD7TLBJMnvparKhGEXyiHh0P8R4O\nau9aEc/nYItYvydv732u8GxwqxmC1vrSiJIDOHfm2FGsOp7kY5hLb/xYrfRx\nMppo/HHyA0vwXh+Zhr5l70R3JDvfWJxOrg41GvLuQ+weYafBquUG+hhGEhsa\n9iaO12caBh9NgMHh9cM56o43oel5I4vT3XzJSu4SCZg+Jp2crPEnqOuwIxU3\nL2SR1AQosvWRC46qPJlJTu/qVnOAQIG+FobN66IMHltr4KUFguJmU6YpS+Nb\nL2+o4iBS9xG3hLKZWkMel1kECV03US8EEVrLbkfSh88+wsythd+/DQPiH5au\nzb7iBLvCkhOZSuN8Lufh9olRC+goX0bfGtzy1d/phNYfhkFtw9eC6iVUtnSG\nL97C/lyusm38gpQswD8+D8IcbtUDTAhG/mGbeBdYKqIgC5RNtthXh7i6xDGq\nbFXF\r\n=QtHu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB71Lw/4pneuOlObusj3WqR8JP39dbHujRgd5NzEYL3YAiEA8Lq+Y/HFR9Cn25ub6xH15srmDEqrWsREzND1ctQ3/S4="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.67_1572326415982_0.9990446323006472"},"_hasShrinkwrap":false},"0.7.68":{"name":"@react-ssr/express","version":"0.7.68","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.68","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"8d9640d80e5b848ce1b1677ba81890c1a29f2992","_id":"@react-ssr/express@0.7.68","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-xIEV3mcJ15q+fe5XfvY2Ll53bLhLTEPxbTzIAcLInpCTxuYvPRJwRTPOLihOdMjmRXpRdqJEjwpuPjE257cHpA==","shasum":"f65355f5efd6327595bd413a1363e1a9fb32ca21","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.68.tgz","fileCount":11,"unpackedSize":18887,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt80LCRA9TVsSAnZWagAA1C0P/0JVBcxiy9tJfMxA3XY/\nd/69R0yakh826asJZgPj5Ii1oR/CG5e600qoCccDyC3ekUOAiR3MxGU3rktL\nvzaaJ27zUnLFxRUSOBUvH9PFVl4hYNMORdh63ujMkLnvE+k53Tic8LiDakww\nzAro8/nxpvB+mFPkxJCL9yIwNKyCwmLmQ5sGQmN9OM0QLWm3ogXDgXM296eb\ngdyY5ONJDKDUyHNsNmOWZEsyUnTgyBhFsz43Hr8j5YWn60qDoeT8WOXuL7n1\na3kPbIvJvWmFcReZ8JZXxQcRZZ1A5xOzwoM/Or7YPCODj50H5m4ZstlT0LLo\nk+JwIxmWXmmaEoxShS7+4L83w4CBnD3DFt4ukdumUyZ5iIYGXp0cLHw7hPcw\nDSPTjpUguL3IUAUK2zSyUjbDFukE494RKcPnj3dmgHkZnOHUJNp7z0k8S1+F\nAbY3a8+Js05LmeAFas5YWYgXuADSCWGXpY92d2g5AjJZS8VeytHgKEFuhQBJ\naq3i6EH+hnScgUTzBHI8quuHZR/eni3vSQ7QalPHVZi2Wlh80sCEmq/AZL1l\nFWY8F6xu8wV3wSlrReZPZKuyUQ9iu5d35Bdq2hirUEkO8iLhu1w2V6g+FNeF\nb6MaZMCd+7zbk5yygWtled4Y3tcF3SHMmewU+b/8TzGOHKiAAz+q8J5zLjpr\ncNWD\r\n=EDP1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCGFfrdXf5TOBFoJfgLJeAFiMyM3Z1X0WKU1cuidIZ4uQIhANeF//MJSeYbyJfzCI7/gx5ngHS284QdqvDd+/5U8Lix"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.68_1572326666678_0.6289690020678191"},"_hasShrinkwrap":false},"0.7.69":{"name":"@react-ssr/express","version":"0.7.69","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.7.69","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"cb1228d2f63397f9c05fcd02c83bd7a78fe7b8be","_id":"@react-ssr/express@0.7.69","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-POB43K6PL5cDmYavtL6MqSnBzyL4u7roDIT/a0UDhoZSFCRs6hjbyA+6/dJQxiW2ghOEHjxhkINML5hFB4Uaiw==","shasum":"ca13f6bb40951f28935fb340f7909b28c30723cc","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.7.69.tgz","fileCount":11,"unpackedSize":18887,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt87yCRA9TVsSAnZWagAACooP/33mKCtVy0i3I4vK/buY\nPF7kd+/TMG1da4gURHCXJpyMqc6WJpj25DeH+3r3uJXePKypC+lOWaFTC98F\nki3a1+wm1TYouNITryb4+DwrcM/QjWWn6FsgKtQuvZI+FWqaPNwcuzFnYRIh\nPWq+0cUJnYoeLhvGD9kbUpqgtItCTE1zj07JzHMd3KgAvWrkkNBsgIbDyaHC\nB2QDCvIXdqPwo+cjGjp4zsmAA0K9LQTidYPgzEojARvAfHs6xIaPn+R92wov\naI/B7oe2BIGec66QzZOzeNAVmIbFwdAFqmTQa8hYsm+gzB/ccvKXrodedgbh\n3l9Kn0+7GkLS6YNwYAlsl5s36955S2l/osjNtG2NOwVkpV0zIAyoIw1i3ItS\nDOHcSMC9wBDG9MQPkUDY6ZdV6xdKqx+Qq5RRvX2lf2Ze2bduOUcC/Zq6NxCa\nBQHDlG8djwcqulf0Pwx1y8SoXtqjTFn9FlDeWzzs01gSnAOyQJI+T+tvXVZT\nLiI6Y6m0S/xxjRQ8eM4JcSUQYDAMJVQojkgWjEdJU5gJcIPjqPxzofw7XhHl\nXHlI6tWIByracSGl3Uw8sGii26v1qvlqrVr+7NS4OzUg+bBi0K58ON453Tuj\nqb2YNKdVAPU6Q82O+K6I7ixITOtaVqTznb3XEnJygMXAy2vDG037rFhkXD0v\njNw4\r\n=WkBD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCwd4A5jBBkqdrgnqSypLJn5u26xbhG5oxRcOHj9amIuwIhAOKFTsCOy2R04el5Otq3tBkZqpPeyRG6WvTaK6qyId6T"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.7.69_1572327153647_0.6453989046936586"},"_hasShrinkwrap":false},"0.8.0":{"name":"@react-ssr/express","version":"0.8.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","scripts":{"build":"rimraf dist && rollup -c","prepublishOnly":"cross-env NODE_ENV=production npm run build"},"dependencies":{"@react-ssr/core":"^0.8.0","@types/express":"^4.17.1","chokidar":"^3.2.2","express":"^4.17.1","fs-extra":"^8.1.0","json-url":"^2.4.2","lodash.escaperegexp":"^4.1.2","memory-fs":"^0.5.0","reload":"^3.0.3","unionfs":"^4.2.0","webpack":"^4.41.2"},"devDependencies":{"@babel/core":"^7.6.4","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/preset-typescript":"^7.6.0","@types/fs-extra":"^8.0.1","@types/memory-fs":"^0.3.2","@types/node":"^12.11.6","@types/webpack":"^4.39.5","cross-env":"^6.0.3","react":"^16.11.0","react-dom":"^16.11.0","rimraf":"^3.0.0","rollup":"^1.25.2","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2","typescript":"^3.6.4"},"gitHead":"25ddbbdc5b82a005bd2896073b8b320e83cab3ff","_id":"@react-ssr/express@0.8.0","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Dh/Tawi9JVdEgtAkC6rcQiJVleCtTQf/5pnFfR0e8CXe9WjO5ahChBgwT5ryiMa1SOZ7o4M7y5palYqIdndlNw==","shasum":"869809519fe46ca5c7d17532b8633c18e7351027","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.8.0.tgz","fileCount":11,"unpackedSize":19707,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdt9d/CRA9TVsSAnZWagAAxOgP/26wgffmt0tzCMgYeVdi\n84eUow9pE+VEliWOs2fZiHwBVdlAihMfLtMVa9W7aqcHn8OmaxRQ+UBiGsK6\nym3li0ocNF5cnF4NJZV/lOHCeRih6CQ02HpME/lULoArBp7N5TuY21AzVuzT\np8P0YvByQDTX+Dn8IfNk1cnuR7b8sjkc2YnsD1MovjWjontGPCB08w7jKVEW\n034cPuLPSYcq0lJ6SC7U5TeAowqgkhWCBsgnfMiGjYez11RqA8WyN2r90OH5\n7UG5LKu0U7mHqjEkC8+of2IjqUIdlmyPqDhFeF+M+bwIjAmD11hUraCYXWBI\n0p//rHkZlfmRWmPzeAo/5g+ziAnb8On+CDrEXNjL3H7EE3oOdgLaM0AeanCY\nHoYp2PFvz4qUlvjQwtAHhDpb7QLnrzD5RiTehP+EsufGrkUWDgDcUPn6ekoN\nUYqww+oWkMMiAPZuspUloAdB98MGrZgUkOKUQMb286BVzD7//Q7UUb5fhCWW\nKz8BnYGfWf4Gjq0VIHwb/erJ7CM1+pkBaBHD5l0CBRS+8gsFw5ec5DOxMbaQ\nmKHiiME8sBZQbYqhLnt82q87JgfXdt7/apEbna1namv94nyGq3jGHz0YWALS\nGpdG7rk2bocIrInO04jE3X/ZDToLVuwWhQaqCoR5o+UqCsRl1WOgBk/eaoE4\nuYZS\r\n=lhr9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCcyAeFn8iMi+ifSNzhHe/dfpVOPUjz326zDA3NbJXN2QIgS4T86b3xd1Yl4cwTjS0YT5YQbvUBbAcE7JrkiyzXF6E="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.8.0_1572329343452_0.14361103017573407"},"_hasShrinkwrap":false},"0.8.1-alpha.25":{"name":"@react-ssr/express","version":"0.8.1-alpha.25","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.8.1-alpha.25+935ca1f"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"935ca1feae6c845267d1510589de03f037881372","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`, you'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration: `ssr.config.js`\n\n```js\n// default config\nmodule.exports = {\n  viewsDir: 'views',\n  distDir: '.ssr', // we should ignore this by .gitignore\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` at the bottom of the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout script={props.script}>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.8.1-alpha.25","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-28ptw57mnGmgS2pICIh+GPOun/YRAhd2yWwrTvArb5TkzjZXGpoJ7xy6DtODluot7fkjVzGtw2DqZ0KdRkdsjA==","shasum":"4d475c86ab7040db1f7dc73a173d2f79850b53e0","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.8.1-alpha.25.tgz","fileCount":11,"unpackedSize":12937,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu4X6CRA9TVsSAnZWagAABQMQAJ3bpCcmLKqGYgRSVvvE\n7fL2Oa3cfZw8uq4pT6FKyqKOZgRH2A9THcPXXb/4Ww3SDo4ooOm1uQzb1rfL\ngVnKP5V9LzgQceHEvdYZUCqNqaL2UKmgypsONz+rLEkjGhrAw71xnCJJvdmz\nBwAfp7UhRiRg5NS3QyY/x8P3rG/nZ6t5s5J82/JL5bQvTk/hfoZyOQCPlTTE\n6dLIZzJATHUNMM0f+N41JsrSDX1JIemOhTkHFLBZfGIVHtPpOrPNQmAx2cNU\npCKLxHLaA3KuzFJIGvOkP8BpeUYNqfPfp1gGVA47NWpo+prp6jKNzgQZCO/G\nKE/Fz4GRjnkebkDl3lTCeX9LYcj9Qf4AqdABZX831nqssKzc+YQ2nesSTweI\nMf8PyTTFP0XExbn6ZFtyZEYvjralo6qROjQSShl0pHdPQZ/8vRLabQ4OE0PI\nAFmS3sJQoPGNPrsjQw8B+T0leiI+rhuQ15LrUDIgnX1x9qCL4/BgvpvGBEu+\nvOLJsAw3J1DHNtWUqe/Nvq+/IoduIuSOA/6k48pHe8s5+gfRO1xrEIAfvBlV\nGhAn9AHKkCnH7PWcOopB/43RF/v5qY/a4Nc63nd5Ta4Ci5pqgqMRzPJ4jg1/\n/knDdHnmsS59xUxYnveFenwm1lCGZsHfNGULfdCcREImud0GuizndHHSuEkp\nDy9Q\r\n=NFtC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD6ePWIVUf+H+pXygRUFMjd/RNqy5QGW2/Alf8G3wuMnQIhAPta8Au9iG06+qxC3vO3bTtytcCkgwpXIWLo3AMga5Hp"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.8.1-alpha.25_1572570617730_0.043920715373795716"},"_hasShrinkwrap":false},"0.8.1-alpha.26":{"name":"@react-ssr/express","version":"0.8.1-alpha.26","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.8.1-alpha.26+e4ee4af"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"e4ee4afc8707e4579d822dbe7d69209874d82e52","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`, you'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration: `ssr.config.js`\n\n```js\n// default config\nmodule.exports = {\n  viewsDir: 'views',\n  distDir: '.ssr', // we should ignore this by .gitignore\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` at the bottom of the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout script={props.script}>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.8.1-alpha.26","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-UZB4Q7MWZINsLSdCYfmgclNT/FMvD6b1nt/WioJ39oxcQkay+fNN+9Imgxnwj+VVBx2m7kld+eZrG9oBeGEKng==","shasum":"cb7531fb44cd8215d488242ded11b6e8712b64b1","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.8.1-alpha.26.tgz","fileCount":11,"unpackedSize":12937,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu4d1CRA9TVsSAnZWagAAZwwP/1fF8TZhMBa1A2A2jGi0\n6hSfhLkUeg1AXx6AJwcfS5s5dd5Y++SNGAcjKEd9BkDDPS9eld+VdOrEv7AR\n34O7+H8fpmrYebW4GQmD0CaK/00ckExdSMRrTSxmKbnWyKWTvcJXt5IWIGpb\nwq6du9aZiAAkirjZ+TDy62hZlU86IZDNP4LwmFhPXcd0wmjCe3qe8+2Xe5fP\nTMSV/iqf0+1dvFsKokl5NfAckQIcaom2X9I5ltTCRJfOGUK7ZypqaumEVhD4\nwBAPNu/LTYq5cUcA0pVC+sOUNGDou74QZYT8nwP2whSl3PERRogJ1T26c3vC\niF47Q2b1R+66SyFaJ76o7e7r0FgxY5DcALz8XsTUHsGiHysEFbiwbYvGm5Pw\nJtMqyLWqp9XPX5iXl2OSZexzyUicBBWJGGU0A3OA8zE1UpZyl42eZ3iMtWUo\np8puFQ3bnxvr24pa3RB6kxvGkdGiN4IO5kRD9ewcpCYhyQOezUXwyetbgFJa\nHxYdAVWcii7tr4Eyz8MbSJ5kUwV1e5Lbvlnk6GmD9yT+Z8hprzTn1Np7GJ6V\nKTjxof6+RgjEIKvHxMja7vIcf/X4V4iXxsVjHUOcnUC82M/YsZRXEs91l5og\nHD4OO7M7CJORtzitpMpzdqQfGc9JoACJh4X4oIQJDPDH6VT1/yEarDU69gYK\ntk5r\r\n=qIho\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGAgLvpAjeBxPtfQY0M38JnGGB+7EWkan3FN3H+Ra/4pAiEA7ywp81FTTt7caKsZtJ2wULyhFrhKs4QbEEVBJdF4R+U="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.8.1-alpha.26_1572570997448_0.4483924167056901"},"_hasShrinkwrap":false},"0.8.1-alpha.27":{"name":"@react-ssr/express","version":"0.8.1-alpha.27","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.8.1-alpha.27+69401c3"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"69401c34a7670c6cb9cc411da9ca3255edae6468","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`, you'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration: `ssr.config.js`\n\n```js\n// default config\nmodule.exports = {\n  viewsDir: 'views',\n  distDir: '.ssr', // we should ignore this by .gitignore\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` at the bottom of the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout script={props.script}>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.8.1-alpha.27","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Gz0wKPonQFPDMSyzeyzCaeoC4xHqGyb2SochJDH+P0WIPsEbJbJldU+VHg1hlM6GYzRnS2qpgHBGHOvpo5ClEg==","shasum":"539217e2e2566ae35dee12e864ea4fe4338b185f","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.8.1-alpha.27.tgz","fileCount":11,"unpackedSize":12937,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu4jGCRA9TVsSAnZWagAAWIEP/2qrcWedPrcleBZOELV5\nQrZs1l7hmTq9syl/nOQ/Y35PDfPeSaqeT0hvLfklvXklLuiem3tlQyScHELV\nS8RR+DdtPZzHv+ia2IqFS8O0D8oAPqi2BO6BGWlkoOkrXptNZUcG0pLs17Py\n/bfvoscgkZ1mJUFFzQkQgMA42YGvhALXyDmzo3cdpklGdcF+bMejTyj7na/k\n9nkcgcQ+8SsXisMDuu7C5YqsZeQW6buBsOYrNo8kxIII1HTOheAbMFIaRAk3\n70vC/OtRZpc6AQiF0J4glQxDXOzGGKIrKXr6I00i0FfFT20YiAjMAmZ3h/LL\nXQMj9H1ZkV5O0TIDSpTfxQVylDk9a19YtoYX2Pfp54NhM+NjHV2iCY7Eo7Lu\nGIpqvobnCbWrKn6OIQhV7YkV+IMNaFx6RWfXgwJtW8ERNSbD5+ygJVfWjOd/\nLuSaKoDBWZtU/M5+JO4l47zuRSqwCMLuy39APofkEOoTW1d51cCExE2djF/h\nhCq6d3pCFOBuYiQ1dWbrWuw5T08m4zVgcyJBbmgn3Xu+WgojL6HAsq5m8C4A\nJkyWOaG/w9Ho9OYt4i8PSQIzrMt6BNbB/xv9QIGzX6eghau0mNy3fxaEQ7RB\nRkt5kI9qnfLD1j2e7gb1IDLo55QduMvf9F8HL/5QKW6yx4WCbvodvIM0LBGd\n5Qvr\r\n=DEEH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFq1dBwnMhfe9sMXrrNIdtyLJp9SKLmqcyw39mrrAsqlAiB0TvQr1aVqc3ihWJGq81hKqD+d90s/Nckmrwp9KQl+XQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.8.1-alpha.27_1572571333663_0.08771958602065011"},"_hasShrinkwrap":false},"0.8.1-alpha.28":{"name":"@react-ssr/express","version":"0.8.1-alpha.28","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.8.1-alpha.28+7ab9fb6"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"7ab9fb6a3ba099190bc809d1a49fd5d3c9be1c02","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`, you'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration: `ssr.config.js`\n\n```js\n// default config\nmodule.exports = {\n  viewsDir: 'views',\n  distDir: '.ssr', // we should ignore this by .gitignore\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` at the bottom of the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout script={props.script}>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.8.1-alpha.28","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-C8z0kTAk7UYhlP590H3ayQSXMlYlcj9cnaSE8saRzThlmagav5s9mFevuuGG9SLBP64XMM3LtKfgOXNcKBWBPA==","shasum":"5467b8d700b4e847a752b7ab7689412909f2688a","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.8.1-alpha.28.tgz","fileCount":11,"unpackedSize":12937,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu4l8CRA9TVsSAnZWagAAWHQP/Ra39sBaDRoHa5ZqTV9a\nUUYYkvic8xB/sr1nYHIphLtkL0+ipaRNlUCJOZqyb3UYKCy6X8wfX1FgNHAC\n39uRI8ctoXUE43MCraUIxBcmm1NtUT7TxRWW5IJFIj30IM9+vIQQObdn4yug\nuLP2/eKs3OW8YCwbDCDfUXYH931d6ntjozmk+RCk/K03GpjDCpNMntiYxOZQ\nhJwwALfZ6N2stqYoqSWuexmMBDRkSuEr6vtFHGGsjjT4EJ8r10NhZ5cBc7fL\nkOmdOMdLnVFTWV/nbaqmw5y7Q4eXzeUqTqM5OHZ0SRA7LtuxEepiLH4kS+LS\nBThg3DeTJWAo4IMNFFfVNpth7n7kvAog0u+rdaRzk2B7fueR05veTPxh1vBW\nDLn+nNU1pyflW/Dyn7/3jrDAGq5jItb5QaRauiAYpZbfVqNxgZm2Lx5A6Wmx\njTPN6//B4zFnVGqxUnKQm9lCBmqReq6qX93de7I8HwoxK0HZl6FEYYNNgenC\n2EXRM+tHfsLQRXWrAFmixa7lXzzDAc9G95zefPIfQmCwliuuMcRcp6LJRNB+\nUO/5y8rm3YQK9uflEQlSdZPjRIabXkbo+n3nJE1yCbHGGb95n9nZf0xVKIcz\nE1gyw03LCQt/VfJnOMS39K/m6bpXahhhIs3bb+9ElisP5OIpt6hDItP3/e2q\nP6lK\r\n=EaxQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDPky9X5S86eGPif8kO6GEHKMJUZV/10l4Qo4nzDwqLPgIhALKw+jwTVulX50CqgJMgnkqWIaQSO14jToTp0lfWe5Vy"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.8.1-alpha.28_1572571515713_0.48416773577128436"},"_hasShrinkwrap":false},"0.8.1-alpha.29":{"name":"@react-ssr/express","version":"0.8.1-alpha.29","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.8.1-alpha.29+b72bc43"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"b72bc43b0a0e9d2cd149096bf3cc6dd4320d8844","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`, you'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration: `ssr.config.js`\n\n```js\n// default config\nmodule.exports = {\n  viewsDir: 'views',\n  distDir: '.ssr', // we should ignore this by .gitignore\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` at the bottom of the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout script={props.script}>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.8.1-alpha.29","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-LrgVkB7IotKj9eeuGGrUQNOv5z9v1ZMOV0okjMH8/Z9khDsgpOW0UAsgX7J1UORgOKMJkdGXN8ayC+218CjaSg==","shasum":"aa826964320480b106db205504dfff753a12d4d2","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.8.1-alpha.29.tgz","fileCount":11,"unpackedSize":12937,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu4pkCRA9TVsSAnZWagAAAjUQAJV71pGmKaWDekSXZJZ5\noFn69wh3Pfl7YbVbvGxuxq07RvCkHuY2uY2O5RbSfijjqS/VJxR1g5iItrT4\n/Uaz/ZMUkgEHSyAADcF6pxIKrinIrwD5lDHelZzYZ7eaGipN0vYBvH6k96Vm\nrr73nXoeahq7LfjX+P3paSZNMpn0LKNC+IMEkX75VdYPiMmUiwORaOZgJq+L\nRedjfum9BD1S3Q1Tgruptxte2soma8wxK/wH/jKgaB06MxuWnKvURPfy1FTf\nKAMF6naCrBFlwSA3EaBlqAuQscV2KZEQFV2gpoiq7CmjkzvjAuOWNL+Vs13m\ngtvhcNUyX7b7W83bi6Y8+idIMNcwQxGgl5ERBDejLdpLupy4X3gxO5oGw/HI\nnmF0LVpCKliq6pjEwWKAxyr/in1Z8lJv5p2bKh0fJMJCUylwnX4lmpO0Zt3N\nLlSsGXLT6yt6MU8eT4cCoxWfv3VVmJmkyn/QyGsgNPRoulhDzO4KY7CcxSqS\nuOCFQWUxPCylTPbfN0bx1MI/m8RgbLej+ktNYucSu6aDi0En0DiQsmnEsV4P\nA07pvVGmBxbuuCer7DZtJITwKwr6gSSMcpxS15Y7RloSAeTRnVTGx8nXwq1G\nJ2VmC+NNvVLaZSh5RUkKFOkQC9pXyXBEbVTkRxyGa3roQLBva039Gh0ufsTL\n7OUT\r\n=w3yy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAqOoZSbCtt7DWjaTmknvYzSK9Hr+J94PzSIvFUoqQxfAiEAuWcAGRumZErA+XPOC9BXfhoaf5xub6c+Urn+4mGVxDQ="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.8.1-alpha.29_1572571748226_0.6641108202354198"},"_hasShrinkwrap":false},"0.8.1-alpha.30":{"name":"@react-ssr/express","version":"0.8.1-alpha.30","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.8.1-alpha.30+cccf08a"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"cccf08a80d3dc29f7064d118f2999e74921fde23","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Features\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Hot relaoding when `process.env.NODE_ENV !== 'production'`\n- TypeScript support\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express react react-dom\n```\n\nand add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('@react-ssr/express');\nconst app = express();\n\napp.get('/', (req, res) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nand then just run `npm start` and go to `http://localhost:3000`, you'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration: `ssr.config.js`\n\n```js\n// default config\nmodule.exports = {\n  viewsDir: 'views',\n  distDir: '.ssr', // we should ignore this by .gitignore\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` at the bottom of the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout script={props.script}>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## How it works\n\nWIP\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.8.1-alpha.30","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-EzkpvM5F9/ox4yEYSwGaBxXyT9r1liCJYiPCHhwE3Ihx8cH5goHox9Qf9WszJJbLFIFysVXBvw40pic2m+uDzw==","shasum":"f9bf256d2cf0c3a6f27fbc98ae39d68b5646e3ce","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.8.1-alpha.30.tgz","fileCount":11,"unpackedSize":12937,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu43bCRA9TVsSAnZWagAAuvoP/2hq38CcbmHFjxMeUkJ8\npr/66Imev/J2nPLzLvg9J7GT/MdlwQpvZPnV8RvuAHPc+aWgJNFxfvUK9jsw\n9yRfX9675aezjLjYrf9Y+hWLD2oLHE9J/L8dhwAoGdj7jmYLLkUtt6EvZ0dN\n+r4Hu0RwXIDNdFLpHLBgMRGw0AgYuRZmjU2UOfXktBcaP+7tH6vF6B6q/zw9\nNL7F1CJI3h6gg32fhX6HwJt3p31OZht0qnTmuVVM0WPWtj8NKk09BM7Anf5U\nxNq9Amvom9ZabkL4U5cVwnWBcwvOvYmVZCuIi1ZlcMEj6zz0nX01CTku51nv\nyLrL7GzB45re1wLU1EE6BqMQB7I/FqO23NB4N0notVa5qgFCOshePCyG6m/v\nZi4LCMh97ZNsnGCXyMd2Gm6Ez3DMW4qQbUlO4xT626qW+OAj/ehdFZP80v2v\nxb8pISYK0EGfU8Z/jSlDTXZ+egOFG3zS/2wqFebi9j8oMVBYKJX9vSjkuq5N\nIYHiVcRqsw9etNvL5o+lWqmwFGAlw8LBsv+Wq2C1Mpq8PqB7CBysmc5Wv3S7\noZYf0XSxx8kEw5b5yp55ArI9qSGOqAMQpmnO05YU2b2Oa7wNIqTiehrKAXiC\nxv0RjiHwbMnkVlPNesWa0+cS6mii6f5J2VFJ+gkLxWREbS/zBchV3nEg5FW1\niTmO\r\n=cDv3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDZk8shoX/tFSL2yVYEdkvmQjKpPG0Yo3zmADNUXcb8tAIgNbrlSbcw8Vjcz628odZO2Z7aoqknH0ipPS+q256EFG0="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.8.1-alpha.30_1572572634515_0.05429468439541951"},"_hasShrinkwrap":false},"0.9.0":{"name":"@react-ssr/express","version":"0.9.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.9.0"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"9721ff9c38faf27b24718c360d2dce62821b1df1","_id":"@react-ssr/express@0.9.0","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-uQR8JHaWWcmJBtoRT7eq2IvxrViBA4j9UQkdRd6Kizg24Qunqxdf/1hkrG+Vmx5yh15Z+lA0PrIDSKbgpMzKBw==","shasum":"eb354d87b588bb49c472bcd1bf8609275d258783","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.9.0.tgz","fileCount":11,"unpackedSize":14447,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu5y7CRA9TVsSAnZWagAAXvMP/3V8bIqUv8j/H4kIo/3q\nbjj+R/42dxZ/4WD2WkVI6kaHRwkTWQ7JLWxaqvcT/Z6KmK/L2x5g8BemkGro\nwWR0Ipu80zM7GMh8FwgGl9gG+r0TBYLsIFgOkTowwt9R5l9wM+l+DgmuYkqa\nI6NktXDOpci8gZncVz6caqgazj+xFHGhg0Pqe9LIcwRN3ejE96DeZSbi+usw\nhNIPScoZsaPOtf97ijBRVReAx9xn2d7sXZc0Rt5waWaoekQTR/mXJpZWuVe8\n8X64uyJvpNYo0qtq3H0mzLW/lEpjl4XXFpX0mrtwOh8dX75pYinhFQ27S7ZX\nGufNn2q8Ha8uUWK7nI4vyT2YSHSXXAR0KjVLbm8qYV+FhI9AhbP6UTtHSbKt\n8DIm8eWv6z5fiziTqHsh0EtdWKxdOOzo1eJMOefRIj7iUV0T4ukkU+lkuxQD\n1Ic6wwg0fkoQF06oX8zj9UrftpzT/fZOkerJvTiX2BbUGOCswW6uuZtSoSfk\nKZ8P4Zx6iRZYiD3e16F56H8JMNeXmp4T+UgPpJ70RWkWx3gZ1p2RCXZmDZfF\n/PicQIBAmZ1atl+Djmn1ZdNurQJNnt7EDM/jxYcrV64NeN8ak7QwJKBMsrf9\nAXRhK8hvagzAkXdk+PZHxqJpC6WqkvQyzMPOKJFDRhPD+w/Rugf2QkJYs0Xt\nI4I7\r\n=el6r\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICMBdQnyGySQiSeGfkljZT/x8K5XzDt8VKSxN7O+ehdOAiAEHG2/YOUaw9wSkeQDZ2wO+IVEHCuxs0g/3PqJ2cke3Q=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.9.0_1572576442959_0.9276257216227024"},"_hasShrinkwrap":false},"0.9.1":{"name":"@react-ssr/express","version":"0.9.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.9.1"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"990afe7f70ab4f118e699b508cf22a4c25820120","_id":"@react-ssr/express@0.9.1","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-eG8Y/fq3g8whtGItwu9yeP4AjYps9Zzaz9kMKlGkw5W86QfblYcRgpJw01zEh9a+IKIojIH5gSbIz28cU1O5Qw==","shasum":"9f96c739b161d8305dbf961e43410c5f19853065","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.9.1.tgz","fileCount":11,"unpackedSize":14447,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu52TCRA9TVsSAnZWagAAQYoP/33bWkxubCTaXj7Fp3Oy\nz/zAuAsJhsU+QUzusIDJjmg5XJEn8qJ+Chv/HavFEvdRJ0iZ1UnMuhXUEmhb\nLfEFRzmNt4xA7x0fuOY7KlNxEbth3u7AxlBXmul4FwvSYCIaTGBdd4ayGS9V\nSTEkDNnBguyuqIE72Vo78wHGOjduREn7obw8bwQAE/nCeEkTWHP1eTkHaoa0\nHIsRo8y3zE+4ti3ISvnUrr4Ou1/Idi3RJFd5+H5OqdkhrBip4wl1uTZreYlU\nyydeqKFDcs7l1YwzWGVr0GoFV1tAhdiAY+0pgUo7/40CxnVJGD3kQBXHYKu3\nq5OjY5YE4z2ChoMOHs5CIJIQ6fYEAiwi0CV1+aTgLHhSduH4uypT1cJh+fRZ\ne5eXhsS06/fr1oGsYVtGCEfBjCG05wcz6+qObzCWZX5ngmy9IVbTpY+kSz4O\nwQVGxJ3ReVv68wOLuFmHOVNJgb85mwsCfUtw7G2OSq2OLfOS2KzeeSZAqWXN\nOPdz1BiVkQpCwBKYCI1LyI07NTAIQ27XsMyKF6Qltdiwy7THbpClLLTrigfX\nxeLxd/spgjh5GEXvmKNvKQCzDLeE7RmbEMHzcg0OrCef1ELUiego+wGQfNom\nNneNbWYNcxrLwXSn/yyuh4PAaFjuT73+lCsNcQlZqlO8wLfqGXWa+tYtD7l1\nDWDF\r\n=+OE7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDiJmKtyHyUztoeIkMMazyjl+GoBu+lH0BdJpBz/1RncAIhALINyUlAfC4QCEzwev7H7qz8o6/k/fRRuLav5+St2jkJ"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.9.1_1572576659184_0.8424255157932539"},"_hasShrinkwrap":false},"0.9.2":{"name":"@react-ssr/express","version":"0.9.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.9.2"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"bc65d3ed84938b955b0f228d9dc654a83a025829","_id":"@react-ssr/express@0.9.2","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-KwfLn/WlwB7ydVljAWbhwxLQUPfseK62QlcksrmRguV0fXWvby1BpUJnsCGnTYH4DE2kq0CUR3r8jzMeVEJq5Q==","shasum":"524f5d3c4c353838e505a6c81cfb6827d65a5f19","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.9.2.tgz","fileCount":11,"unpackedSize":14447,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu6GvCRA9TVsSAnZWagAATpUP/RtAzAoACe18aNgKqG+u\nka3x0OyWlPOTc0muVOuVpPNT87mLxXyofVNRH0r5K5FXocrohnUGzZkGd4jU\nSiNqs6VmjrDCRCohT/RzKJSBdx1YAjauk9rK2atwXhA9pV3pBhF+rT1FpHNq\nMrynVld5it/2dTpLQrzVIcnmafHHQjGtwLvtr1Z+riaii1ZuNqKS0mh3ioqA\nE9QQwX0kqufUOqVuqH+Ihdqrzb8OMc7cm+y8TZcd2Y0h2t7DBwaC8m+FWuID\nX1Py8d+qi0/Zsv9atkzU6iBsdGtkIeztBYfQ9CahuboUEfT8+/O0s7/ORCIW\nUbVpsLMkdrHvCJthJsKTXbHzQ5xHe4kf55WvxN9jBFsakB1icQlUTDP5zUXt\nIPEABIzbvhr129EcE6itjxkAL9j9Y9KWaWc4WLPAJVIbYu2wnc4o6oZM+SB/\nlsV4DVwI7G2Lsn+ZlizWbVKQ/skCqgDO7bQKgoI+CO64/wyIcWWHm8KpQwSO\nQpoVWYYX9W142Bx+s6UowMxJK5OK/L0tOfB9Et3dQyUcapjXi44QN2SSXiTg\nu6Zlet/xD79OdGrUV5MHQeuzn2dzNJovW1tYgIZdWWx3jcKAtCDyMurV6wtR\ncUz+Wib2lTy8xwelV4Pt03mo6fbwXOrrQBQ7tfKNBDZzawA9anWIgWai3c/H\ncrX/\r\n=WawH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDFxnXEMC/+Mdd+CJ9TSa8qJa/dXBKel/HOTMmgslKh/wIgc1kMCn8V6Y0AgwLAK8q6p/TWAwcJzGdsw0pCEd7U98Q="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.9.2_1572577710934_0.022155313165111767"},"_hasShrinkwrap":false},"0.9.3":{"name":"@react-ssr/express","version":"0.9.3","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.9.3"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"06a3436a70edf15e608d7fce368e8eb8ae86c6d0","_id":"@react-ssr/express@0.9.3","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-kBqbCATu0z3Qe1MUxsDMMDFEz0I8x+0QwMgf3ncxZgfeONyHGFh4uGUHtWag2V8Lgmbh1DGGe5/XbiTlnm0/Rw==","shasum":"01bb84c07a4994afdb83c7382b6cf395c72a68f4","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.9.3.tgz","fileCount":11,"unpackedSize":14447,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu6QVCRA9TVsSAnZWagAAX8EP/2vv/UDlwRXc1UjqBiGq\nqjh+JWRiC52r7fYPrhKeIpEordsJrWyFM6kgmCv8ikjO7iLQ4kq8ehBcPtIs\n2sogl8mWbkJZIA620kfOsaM5lUCCCU2xhOmiTUshko6kaAEZhvdaCNHLlYaW\nZ4oMsikc+6amKq7uaFYbcr7eW5ZHiFCOuhg6Hcb6ca743P/Bua0YjuNEb0ut\nvQ9TSOD/znNQMq61udyl62fXANF/C8SYbHjJHvSRUAuS0BDaZo3ysQGIK+5o\nvwoLyc1bKjchCLuHRguJ0nsfMbaFvFzE2F0cSd42SJ9GJgMnptJoLFkEWK0l\nd/3cn1ayi1rBWLYQRCwm0eqEEC/f1Gi7iPN6foP8Crd0O2lNy2GZoQd9fJk+\ni1HM/92iktHZTi2KGftkBFA6EhjQaMxaxNyU6uwkCXwKK7ohwoqeKS0hlmRG\nklB/sO0MX0FJu+aB6cNB5iACHAHL+PfT9zPq+5yoZkIjllcAPEmxv06pdGGN\nY5xlLmYzOAEGk9twXHq2L19m3Pa5MkZXf3c52MDLVo/yxrTR62hB34kiwZY2\nhULEOcu6Ca+WXrKsqHw5TAoqpZeyfwVubBxzIm/R4VdGXFP38n3ZJ1RI//l1\nC1vh/9O1l7UCneBifZ5TBqaH/FxKQM6eWBFrZD2TzOtH1LNEoIJkHou7hid9\neMck\r\n=clV8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCpuEaqKJR6pMqg2vxdbnqRNxlYTw/wQCP1lcEOICgjaAIgC+pyjfhrqlxYdzef5H9ja4KA9ge1VQ5D7TDCSi3T3Bg="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.9.3_1572578325076_0.26476231053977917"},"_hasShrinkwrap":false},"0.9.4":{"name":"@react-ssr/express","version":"0.9.4","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.9.4"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"47df35a84043490e405f782baa6b4967d3fe0190","_id":"@react-ssr/express@0.9.4","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-vSDGGK8jfbmt/5A0Y1ReVtDbRQTTmlgcQ3cZY/CKqqiVSxoUrr3bdzkMhqYyVIUniM9wPhi+mFPJDzpXirlLmA==","shasum":"2b3ceb0849c182ea74e87f722f34600f27dda276","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.9.4.tgz","fileCount":11,"unpackedSize":14447,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu6VFCRA9TVsSAnZWagAAaP8P/j6QH/gsqr1nD3sU1tJn\nBOP4LNC80eoXcSfsVqvL9fF1jZEdppB+4nv6IsYUHEGyazEZq9wO6We4A6hP\nsHv8RsSxxjIbCaaGly3XOfj1t8ka60pVvdSsxI7bBoTZAfhZOw0NEp3+5FIE\n6PmsshTCkNnSUrI3queDTJd8uORgEkipInFdIUJ0e06lAJp7ZLBLx1mHmCKv\nqP2uWehcxLmioiOhxz78Od6fitxDn5i7GqAqnyA9TSTbbkZC1yX4fV25+c7o\nMVcjltQag1UDfu10mWj37O2QdJOqOIM3BlBjY5v/veY2bjmTeJG7xIv89jNA\n5+UAliBwB07TT4ELBKTLyvceMG1rROtsJs/IQUJW6uU9reUCf+pnQ2cq8ZI6\njO67D70F/1k3QRgBDAV7SqLrpaX+oS2GWhXti88YPXooiurzpu5hCaen+lgj\npVGnGlqq96iZ8RKow98xhdvdtFOA0IzM5c1TRmRJjsrtZUqwGEqWBTBoqqP4\nNdSUtKbWl7lM6J7mGxfClXdM/rs6dnSLYPjUIfRfLLhl2cx10ueuQSZjolv1\nihHVHTJJ/VQoPogMmrryG1+W9swYeMhWSOZ8ecSnP+Oi4YheebLA/QB/MfeH\nEg76lPa/NnDUHnXMZPNb8MGOuL1R0mOwlCqcKSm2C2iF+jp+tO5S+NCgPmWb\nPCjz\r\n=ms8P\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFCPguqZFXZkmSCnSZb/z/sn+Z6mcD9W7npdCY47uUghAiEA7GTaWQW5zlh04fGlh7uqsI/AzssAmA78SFQRyv3hDy4="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.9.4_1572578628810_0.1370770930226104"},"_hasShrinkwrap":false},"0.9.5":{"name":"@react-ssr/express","version":"0.9.5","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.9.5"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"22e321834d7f60f9a1cd8c8d9fba93657919436e","_id":"@react-ssr/express@0.9.5","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-zHFURy6dTYt5ogs5zl7slNmFmdAUEec6LvveOoe/ZpCk96t40FKQzL44ymLVT63CkdyzLygq4EoGsv2bqy9PBQ==","shasum":"0470b0a043cf4fe763a838562b502a2888f94be2","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.9.5.tgz","fileCount":11,"unpackedSize":14447,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu6XhCRA9TVsSAnZWagAAVOkP/RC7IAiWAoUDoD+ejFqL\nuH0jqsU3RTK6gbwhTH0UrpsrBz6jS27Kdu9rtMtMAzQdjKocWdYdpUJ4UlkW\nUsw2INKi3jHV2qg+TL0BFHtINCbyVUnh/4sgUWfwN1v67E2rRKNbtn0w8fHL\n/lLDq/H42V0lI9xAWmWXaUT2G5nGBW9727lQ87mEpBbVX1lxGoebj70pA4nu\nUoKaR91+ROgngBHr+oBxdwN0Yw8hKud1AM9Zzosufe4JJ8tPkQ5uJzML9kBE\nA45HXR1broPIIekklHr0H6sY+Ry5/9gyRBGtkSa9Cw6c6pXkvngiX3DzNQvZ\nJezARJdkhDOJjPwYhONs/zwnAZ6cWH80e9vLdr5brf9G1TBvvl6/6z1PDqyW\nb1zaK6qNtNuMHAdQlnReXxzgGyT83zN3+B9xpb16btGYa5CfOGwRRfLu7zFR\nETs2IGdIIKsYvuqbghmNBWg0BrzPwED9iOkAfs64n2PIeoWdBiVrvLs+9brF\nNrtugO6+wZMRZOQ0g64BBaGLIAiQa8LtsbIAr4sUotmpuSuiT1YYkESNF4nr\n8MfRnwm6ljs+CHUSF0VnJScyZ7Os1j8lcUMk8Je/AD1fBvQZ0pL82qmgUOLF\ndfqoPjpNuDhHGXyMIPYItkmfP+427cdKfCA4sCYJt/qDm2k7C5xttSMxl9ea\nmx84\r\n=lPdt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC5wc1IsfdwWBrWXkG6J4Tdcbl8FeM5t9IREvSpS3oGrAIgTIFL1q3LdiRg3G9VIQ6KxsDHwHj/m5+mGGBiS07WNQM="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.9.5_1572578784872_0.372264470560538"},"_hasShrinkwrap":false},"0.9.6":{"name":"@react-ssr/express","version":"0.9.6","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.9.6"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"9ef57306f13759c960a6fe954866eda2f4db32b3","_id":"@react-ssr/express@0.9.6","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-QpQktWb4ICn4lcZkIDYHO8AinyQ2zJRS6DgXg75rgkVeIPJUq96Za/OzjF6UiSK7dFPl5BG1dykVAr9BNvod7g==","shasum":"aebec37a0c29524f67c540a8e7c120dbed4a90fb","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.9.6.tgz","fileCount":11,"unpackedSize":14447,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu6g5CRA9TVsSAnZWagAAgH0P/0B93p9ZC+hkH1pFeo1T\nqDiruMvOF0KH7u+wYIiS6rzBWEl7Z4sOwp2fYJfHgY6deOVNZwBRvHzMe7GA\nP/0NKLgFfJyFgb9w1HWXxxye5nkNqnXv9HT60NOqj76WTvWPkczy2d48ZyRI\n5+iYkau+457gWr59wI/pTmOfNWBo8IxlZtqhiMIz/rBZd+sB4p+2gQMa8yXq\nQpmomQ3bOXagHDIldUhOh9w1VsWxYuCweQcJqjSx8KsPOhv0O+ct2porO9Sj\ntfxWYWUoExJN3O6RMH/R+9E/nMVpPa/zg7JgGMjFFOCkt2Ive2LJ23myiNtQ\nNBOPuhrvx9rm+PZnNbeVSyC6VSiiPfXxgjOEHgOWcidPIxi4nWoHti4XNqnv\nP864JjQK1ksnqn3G9Mk7K0I159f5QpeKjNnAsz7zy/CdpouPbt6F6AspMZfI\nDe7GypfLQjSsZa4NgVu2St3Y74q0OahkxmQtfLcc9sFR6FlARdcgWjaTcxFz\nCroZS/OJVLyssDBKQSKAD6YnEbRiqADtaD9tiZf/zcvFZywPvScw3a2bbRBG\nBRl9IbkyVob3e0lHk5CprjrnqPgtvHqIZwabyRdlOswjPMn8sVNBz4igSoNZ\n6vNlsHwXOUxqGdRS661RoK5cGOwaxs0Y79ky/KdF1xrX3+MHKkxeHW3l26OR\nOufS\r\n=fQLu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCJD4jhVrjb8sAUkwQayi0j5JSpAtUn2IlUzFrG7gQ4NgIgIEhkmT+W8fyE8O25EB89WroZmbwkT++zTCg9Fyr7kLc="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.9.6_1572579384734_0.8983387022290397"},"_hasShrinkwrap":false},"0.9.7":{"name":"@react-ssr/express","version":"0.9.7","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.9.7"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"7363afd72f145459214d48c2805ccc2b69c391cb","_id":"@react-ssr/express@0.9.7","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-tD6OmZiSZ7SgrlvL077PduIygH5/Xy5hYWW1ELVNebFSGakP/G7bMf9JYeDcAtORv5Mp9AB7nmDUGCcUpg7uKQ==","shasum":"7c07938b2dab5f298e8777f55d54eb9072a33af6","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.9.7.tgz","fileCount":11,"unpackedSize":14447,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu6jMCRA9TVsSAnZWagAAkWUQAI7IP3SNPwTNBvGLjfFB\nOWO7xKfZTBOQPjITsWOVXrzXlYE2XitZsGjNeh8kAWcstSbPkyvHWkGVgzH2\n2SIvkjIVESnXUUvmjX1WyHMmEK0mCJZrM94UI55T2AQK6JNl7kS14aXTdQg+\nyMZ3oVEme7nchK0aOm1ZNRm0MuNMt8ET27yKAhVxE7hMveaKjg1YUABHFewk\nzOtkE0FsMBXOKKR1maT5fL56LbZH7NI8XchnNPgDo+Q3hXIaU0HTo7hPFFId\nE4hdlkLN5vYphHrxxq5MnOBum2kkkfsieOmbJGIAGP6h0Bi2f0WK+nRvrNjR\n0b/GlQbW0j0SN1PP5zciz+fZzVqZCgaxhC4YKAT+OqW/O+/aMXBGuu/Bh0WW\n7Ho7vw48Zi0pCwEeQlWPY4nXq76qC0PG5Fjce0Bo8SDJjLiCdYI3ilwrodUl\nb23XBLscRzz61kzsKgADYK9ATNYxmzQwJg6gkMtKJrNb8dE2uqXJSfnYCILR\nNlTffqkWYNB1liE8yAPVRj+HfmFa2GI/isb43M0g0Zv6lb8KiH9BOWV6kIWV\n30qR7jshiejju/9++nW6nFWdxaNe3wHfrU7NLrdBXg1hEooMXv3r3QVSMxqK\nhI5nmmZg0Y2cuPRjriqpxrrlk/IHtqav6zsMKZphrWooBBsrzcr0ecafnUVO\nAF8M\r\n=WOma\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDz+pWYdIEhJjEwOp0h+FgeXRxhxnu9uhSKIfYgPM7fLwIhAK6IZ0CLhlBs5TvwmMjuDTlTftWX2fReRp2Pk4933/Ue"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.9.7_1572579532451_0.648797428414543"},"_hasShrinkwrap":false},"0.9.8":{"name":"@react-ssr/express","version":"0.9.8","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.9.8"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"1c9395b1c24f94add136aba8970509c335134387","_id":"@react-ssr/express@0.9.8","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-wLu2sFmFIVf0WLuRbBTQPu2PXULN7XHhbeVEAoiqWKzQDeALONglaPFjaW6f3AQ82KvZUlTMNxnLVfTQYOX2TQ==","shasum":"6c3c0aef1f46cccc8bc6b66397e938ca5b9e875b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.9.8.tgz","fileCount":11,"unpackedSize":14447,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu6oyCRA9TVsSAnZWagAALCoP/Rb43sHJjgPNCJVuzeOd\nY//cUU/ny2qmgveWxT5T5xyoNzK8OthASS3+jPSuDgTFaxJUkw5DSNzEzjp5\n+bThK+xkMVI02m9mFF1foVJ7bYzSb8NcHQywy12dFYQ1RhVWtwobK6beGByi\nLUaL77OlsZrnSPjC3LC8hNR8OGhbAOlIj4HJSz6yK0nZPfAU86rCSunT743+\nr8rUku4BkOOTGsRjl1YnRw8cQ1DszCjzPoioxMuCS5RdP2E2MTEdCVwqC1Y+\nEq4nQp/b0cyawX7eEK0upFviwVb8RfesheZbzhjZMnvMmizy1THmfStZlDhd\njj+xkpInjUGfgL9f6hczQScwxC32CVdlJp21rIUgzhYLy4oQUsTH7ek9Bbwc\nKOR/ay9Quc2fC2Xt0v3G14WwMb2ZlyjyzTnUF1rO2GJ+dTwnRFnngasrynpR\nwQjXzQTg1QFjzM/5vpb/1XHTebw+PYdOvmnEn8gDly9zv0xIx1L6Qo9RcVBZ\n0oS+FvlIPMDtn5gAWOKksBqgyd0ZrF6um4mF73gPhNGUFrf/gkZaziEBOeH8\nC5O61TjGKtVe/6ZMb5d0aODmdIq4FYp78g2URmbA3aDT2ROWySIZQauf9Cwd\nnQwMdJxkkUPqQSW77HeC6lxykyq8wz1AIYZFvtvGGK79vjS+/8+KKZNTyntr\nqPdm\r\n=bpqU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCKlMPxdOVEoU+TsLaddz9Hx7291zsSz4di4dx9ky2IiwIgcq//UZywwKGehEgdnYIP/RWpJmXHzfHg2m/iGC4ta0E="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.9.8_1572579889987_0.1763214258603647"},"_hasShrinkwrap":false},"0.9.9":{"name":"@react-ssr/express","version":"0.9.9","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.9.9"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"ef66d459fd06fd96520425ec00659e6b4134923b","_id":"@react-ssr/express@0.9.9","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-vtvDMiFERgFG5QcEhZLp8RU5B3pn9j8KghhuCU6CAkWg381poZI0wiwSJK82vqjUWQdUyJh8kAd/OCCpFES0MA==","shasum":"cacf6c55033b3fe9015008c0e55e3b43a752acba","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.9.9.tgz","fileCount":11,"unpackedSize":14447,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu6q5CRA9TVsSAnZWagAAyp8QAJe08Z9R1gy/HdtgTLRJ\nA2j7mh751z1DqI/Lur+NWwKT0AocV0Xz15z1l9MlAqaIN5qy+UVN+qfMoUFG\nHNH3CosJpsnLB4w8Sq95/GZHmun8fWVk5nQ50BfAHMRzrHgtHpKcLRjwibpM\ng4P0EOaH2Y6hjvFeWYJ2wxqm4Ng4GvjJgbaPjPlcrizC84pq83ZtPsJQm51R\nVmijhoIAu2M/VoftzB5rDcepxZXYRYtR1vUnMm69Tq36yZF5t9PHwMabkqm3\nMSti5XvwfhOuj+PgJYU8E4e4SAZkc6bOOsleFHwF81HLvQBCXISm/ZPNHoCK\n/tK1LGR0hblKr3OLOeUPkLGF1dXBXIQdP09V4eTU0dllemtBm+u/gu+AtxqU\nF7elG7HuSEkV5D2KSiQL+D9K/uPTduh9PjZ6UeE1WrqO2tuvXFrxHphiyVLz\nkXtSMaJwHnqIbuR3WSzHyVAeg/QmT6ZV++d8ZZU1/g3Eff8q5ulelQ0IPkZW\nB90KY86ljSxBBx90l81T8J4bbo+cvEtRic3GJJJ+lq5rUcdWlSrjMCmv8+Ci\nVHhSurzOk88lg82IpL9UvSgw5BMojBG2XO/SgI5U2V56eOA/3Qh9tDsRfw47\n9w3Wh+1Nx0j9jY7f7rpayoTTHEZ8BApafJlC16too+vQSOLsrJLtpRgPTMjY\noWSX\r\n=gZpp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDzhklIbM2SFJlq4KG1mJebilgMC4k3KlUdZVRKeIxvOAIgJCpFEbVytFzkPeYslFtyxqg8XCZCDaI3mpBBlUxlitA="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.9.9_1572580024670_0.6573985395812987"},"_hasShrinkwrap":false},"0.9.10":{"name":"@react-ssr/express","version":"0.9.10","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.9.10"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"a24d89261f5aa9f1824000158f3e946a0c143b7f","_id":"@react-ssr/express@0.9.10","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-PUdYq3rJgCY89/8eSsPmtioOlsP2Xor/d1oGLa4MgG2ZjZ9KTk/2C1vIXrbS5bwSPCwzs5vIjy2PAuM1hDTofw==","shasum":"401dffebf5ea40f3b80a383fffebc2d911bda17e","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.9.10.tgz","fileCount":11,"unpackedSize":14449,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu6v7CRA9TVsSAnZWagAAeHwQAKSYCKwK5C25FAqw1YrD\n5Qv8fCgrb1b2uk7ieQGA+Ci5PHJEq48r99GsOrT0cB1TuhrPD4oeOWgWMME4\n5xUgGrtiPF/3X2RiZoyAyGsk+BXSG/IKzREEX1oydt5VFehjVjYNSKDJ5vNx\nm1Zv+ajXXag1mWFWQYYtvDw5UvuWIjaTfvXgN8AQGY1K4Zt0ZLkTdgzej8Aw\n8nGiKlwJ6cZEFZyXE6mK9zwGIzo9bvBaEHb6vh9vpwwYzWhjDN28CSjHEPwl\nDqJszg1b+Phz2AtP4mRD9jY00DJlieTMlq0PPvM8bq8MfK9zHn9y+bCFBY6s\nWLyoGKTwLoHqTiRORJfXtdjAsX0e3mVB7a6bPBjHv2TTxAmdsEjd4uvD5Dsx\nbqi7LkSxVKQrqJ3MdIpuWoRQyez0ABodkQUMFMqwqYkSp87E+wedW2OBcQfb\nvE6otlC4aiA7LaC+axIhFtLPRi5W0uRzQUEnUDPBs12dn7n3QdE23s1NbPeN\nEgT2HOlEwJb/1LzgZTpWIy3pR+4zpJsazycOyhsvU8cPlz9Et0DasF4I1+xf\nhWxqeibi7OlQitCN64JWkamqIbk5EQKQgESJhmeuIuujT7LBW3/4Gk3PxIR8\ncjaurkVd6Dip5k5vRpdwcSA/48kkKfLqKQcQCwcvVlrpw+6zYR9XZKdBbfna\n189p\r\n=yPER\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDbJp8oq1lC1qrZPvi/oBD1q02pxgET+tqlYOrynZRq/QIhAMvCh73QERE9s2zwijtZyHtQksmclXmQ7eggj7TC8ENY"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.9.10_1572580347187_0.14818703544746303"},"_hasShrinkwrap":false},"0.9.11":{"name":"@react-ssr/express","version":"0.9.11","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.9.11"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"ed535c1224ad13647688900da2fbd1fbfa1d6f5d","_id":"@react-ssr/express@0.9.11","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-LXifcxVq4eeAVS4HlrgBtv6KUWmXsVnwHN/JMH3kvtuTOpaHGkV5nBrZiFt+NUqi+HhwXMZCM/7rPlMWZCSfnQ==","shasum":"1192224d1fdfa06674274d6d8d45e0a49ae7c50b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.9.11.tgz","fileCount":11,"unpackedSize":14449,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu6xiCRA9TVsSAnZWagAATcgP/0NRUsDFybjUdbEQs38Y\nFvPGvLCypHKh0UlCmfvNTTosZrKE7Z1e91g+MOwgywhnhHBn1TUdUYd1Veph\nyo9iItVH19ekFfK7Js/oUUvgC4v9mC64zA1oggCr6kvtFvdKtQeVfB2p5Q02\nrkb6vALgsKq7Ka2j4gH7N73y9uBRxQgQf+oupxjGs2RwVV4LlpbiBSSGj1aq\nwa1OZFvDmvJI6aahiDInDkNWzWDYBTE0LszMUdK6ELYEiP7Gjp7TO5C4Fn3Q\nQ3R3zJqUk0AtZqqytrWE0Ox+JYFBndlBIM/IHLKxiQeRt4yf6M5eJhcXDYU2\nBKoVAvBKKVLqYyY7zI1ja8fGO9WQF78rVsG+V3twhA1P5fPwE3/YTcmgTe8Y\nSdF/SSEDH9R0bfcSGTnr9DORTz1X4orBULWMKwn/yb3Y9YqNKWqKrOSQxZA0\npUnrat+PKT5bAr74pu90v4cIUbloMH1UInivPU6/3+NJNL/J3plg9RYBFiz/\nXnCbDBJblDYpV26mCHkJhno3xbdj0P1Zq92kU3CTb/wZhYr6WhefWdlSpIAp\n9tBvfpcSB0O7ZInivM2VhAHq+ZpYv4SJq47frQ5UNc6z6raLaXFQM28eqUtn\nywwOvVA88AsTOM6IR93M9L+jIG0hwJ3IVdR8+C5NBpGIX/Chk87tPpiz/zdr\niKYl\r\n=eTS0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCiFmzXNtVda1SC7nzBCEZERkQYX/6LRKSOIapwind8+gIhAPBiXTCvmcpe1RfHU10hQcR2BlRLuAapQdDKldbylkXh"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.9.11_1572580450191_0.07721873725091766"},"_hasShrinkwrap":false},"0.9.12":{"name":"@react-ssr/express","version":"0.9.12","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.9.12"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"b3fe778ac6aa7400fd581916b2d7584cc4c82ce0","_id":"@react-ssr/express@0.9.12","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-wbnLa2qd4YQ/EMMcunYwMpLyO5/x3czJbKVfSMfsTnHPyuj24/OMb3H55jclGqwgHK8CzwYrN70O8TiFC+qaUQ==","shasum":"cbc9a2cf380956f78795642ff62cdf29730e17d2","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.9.12.tgz","fileCount":11,"unpackedSize":14449,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu6z2CRA9TVsSAnZWagAAA14P/RcT6MSyXUPMmVbjPwbE\nC6rSUSld6Mco59n+4YBlIXYilBI4e3Dt9ezaKhTRLSG0l6W3gI8NL22VHHqK\nrAdAjL4B1lnQYSzTpZrCJZLC7en2RVDStbyihJoHV0/5o/IwisTWSaJ7o5HZ\ndy+Wh3LE5X+X1wvTnNXAIXdfEAV8FlrnHZan69rMVVyzMvyATnKZEYAWgB+N\npwTegxzXYlceVNpPe0BVUTsZNi5vIBMB1Cfdh0KTQAjaFXwx9lMaaq0LznGr\ncENIspbQPUmAnvnNMLSVZ+6fD9dWdIfIaDKFvgwev1JRsEQ6wG3ke7sc1GoT\nq1L0N2FR/roGkXnkkOfaD5GXJUNs/LG1VQx27rgvi6S7OWSsxlEDL99y4ThA\nF22sigQ5sSXrdPifP0gVKyusToLcx1pp2r5iMjP9V7pzgV2xxC5eFpsU8XjA\nOZ6/b7HDBMhT7bXACdTLE5NWImrwHQediIMYJdYGOqaZQ+dq6tiJPkWG6Wx0\nJekDkF7KXUbYMqIHeVcGucIvElriBhrLnoaJDaaKU39gB3wNlI2BUWk9Y4/I\n2muqCfwzDZnxNS9Yrw8D2TZXUrAI4Lbz4+jFk6UDkyat7wfDq9bGhI7RATYR\nKcn2SsX7rNPqqr15UVIWDwQzurDDA4QbBlLo7/fHvEKO4K7/ETc+/o6ouFzw\nOYG/\r\n=u1lY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCr6zGRjgEnutl+rQoBZJgw5I0fhNNpJPeWmnHwBIJrDwIgHWw2qUXmVLuMy4AIlcIdlAFHz3a6CfWiE+wXa66ACns="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.9.12_1572580597480_0.6605830617953257"},"_hasShrinkwrap":false},"0.9.13":{"name":"@react-ssr/express","version":"0.9.13","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.9.13"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"e5d40e6fae77dbf070c1c2984861fba9342dbd1a","_id":"@react-ssr/express@0.9.13","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-AWDg/thubDfLm3WjyxCY3FHnZ/miYW/zDXiXrvHF2tdDKHBd7O/xlx8p2Cql/+1u3cQWuGcgxaTpiuPJVU2g9w==","shasum":"11e75c9bafb45c025d8ac440cfbf4508a8d8c61b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.9.13.tgz","fileCount":11,"unpackedSize":14449,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu65pCRA9TVsSAnZWagAAegEP/1ZfcWOSuNfisE0r2qHs\nHsjNvY4MoOJgpQjeuPiQJqtDyI0ua5qV/LGNTVrrCexHpjj48P4El6dEyCbr\nRMM10Tta+OqaWNrdbB1ROoXmYlLU5hgVIlQw6C11smoqaZGnboncyqylEwD1\n1ogWcSVx37hlEWH9Ijy2Rmudk7hidZd9LfYydZiGs05Mav8J9HWwpxj6voOL\nqAUdXX45CVo6JPHudafq+uCXQSBkRY8plyZlg99BBnsIo7qpsprp+Yu5fRbm\nHjTXWx6UR5LUE14KIu0u+GyoX5GVoSjjiejMKvGMJmCpndPxVnO0yOOkZrJw\ngRLDi48Wv+BQ6VbONPG0gOaABXxSUnzD7E/kBFdUibPZFHZV6NAgCPjaDyZM\nOs+UIJV8YedCqdL/8rGMxxNKSwy++RVN/7G5wOXw+aBkEZ3TzJhyz2ngKBAy\n5T1WH17cyQg9MsoLnHMdrnPRZ9yj0qWOJtU7hMUsyh6g98N9eqI2aaG7EXJJ\n4uQI8xuOweNbu64fNOlRlby4LuHiXsmNDp2qoUN5nWM0TYQY0jJ9DEfDGceH\nwbw/N9wGPqs0u/B+nR8w1uwpSXm3LfZ8rWqZKDm2ulzx8mvhXTHQjbYGxisy\nvmroSEKQVf30hIqI01Wck4WXetpCoVr8S6OR7pQssZsHgs6JEasYF8+FqAG+\nFIw8\r\n=4aKH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCng37lEU6qM0Q3EZPmfyYGY+7iEVlhqGfRkripZkNduAIhANSyGT+qHBzyytNAzM8oN21raF8Qv50yEeUFrFFey6I9"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.9.13_1572580969283_0.5428121586345769"},"_hasShrinkwrap":false},"0.9.14":{"name":"@react-ssr/express","version":"0.9.14","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.9.14"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"50895251cb950cfa4ccccf03bff43011b4303e51","_id":"@react-ssr/express@0.9.14","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-ckwOxA120uvXt3EEua0rl2HcAW8Nl1OBlmHZKaddz94eYZLTciEpxOYqOGk4hX2Iu9PC5abDDw9+T2JNjpzc7A==","shasum":"516052aab3d43e5653eff0893f15fac04fb0f03f","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.9.14.tgz","fileCount":11,"unpackedSize":14449,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu6+pCRA9TVsSAnZWagAAqpcP/1EPQLaGYKYYlqFf923e\nVc47XcHyIxb//pr0XQyGKwlYhtquyc/qJ4dxh5oBPjfTq3K2uPIVwXZPCcOx\n7j6unrRhFC40t0ocop5Q2sTnE9zsRYMcPIzf8TVMFdP/X491moyWrvPz5Fmn\nJUyFG24R6C3MvG/EdLLUgMO6Pr+mtqrBhbJinmIr27bWfSZoOb16Hve29W+2\n9YF1whQUDJAWmwAzgK8Fts1ELkVxTr4aDkV0PhOGw00VJ3Eu+1N/+xfyhoJJ\n8cRVT4o12hhqV3KLLlwyIysz5cZBUwEa+p96Crff8UglcRbjMZJGRn909uhN\n807Aq3YqlLS0C//Fq9OfX/HV322ecZyjy/8C3sTTs1lAXbQcqWVzOebfGyZy\nL0nz6yMN7FmiCaophVJXIv90PkSjZbLlL1FTlVhAQBFacPr2I7a35rNgwll0\nsn3q0BI50y39U1QKBQtZoyKSXgz2DAt/jjmCx839l2DVkWUHyU0gye8r7dFT\nw0AySpHIcmnvFJiyJ3+t4OxUDO7Qc1VubIAHW27n02lW08Uwj9gJEmNjOoGL\nIrn4Lw+PDtodGEVER+PcbH3vkLUPIh8SaH7Tmb7jIoD0oafy0zFMnZifOzXr\nLLtJAOwfy8M68gBucOfVM0oYl+bAplAVMf25ReZ3CbG3RDRs55Tk8saHFnnP\nyivP\r\n=FJHh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAbOzi8YhrwOBb2eGbX/yB0zj47+C2eSOPdioB4Ve2UMAiEAuCvucOpYYvgBd7del+AsOB5cq/XqCqw+9Jq4aVZHcEQ="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.9.14_1572581288720_0.2912605190052473"},"_hasShrinkwrap":false},"0.9.15-alpha.3":{"name":"@react-ssr/express","version":"0.9.15-alpha.3","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.9.15-alpha.3+898bdd3"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"898bdd3d06a22412c967a54337bd8b20a62bc6a4","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` at the bottom of the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout script={props.script}>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.9.15-alpha.3","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Wj38hNbd8kE7V6lNoHTBMNkReOjEkyo4B9dMWGDBJNAqSU7SEqQuGB1IXhCMp0KLM6IWI7awP2ntuu0OgLceYg==","shasum":"0d1e765579bc5268c4cef7ff6d3f52ad3496e5c0","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.9.15-alpha.3.tgz","fileCount":9,"unpackedSize":14159,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu8ARCRA9TVsSAnZWagAAbngP/Rgd5AaN2un8+zVWJgpQ\nFk5JvVcLcQd1igmazS+8pCe9fFUq9bcATPSN56DTkC8HuXMueGNLYHdCuHpp\nAXFDud/Csq6ufWiVG7K9g56/i4oAaYaAo8/NmXuLtgVogpcX8Dqr18ZJ+3b3\nSqNrgbazItpZc90g8rJG+7CyOPAyH5s31HFSn3dUZecQ/rDvVpKu05oZrsEZ\nXBhNU7kknWr/1DE+YykFxcg/jj7X2ZtyIGCA8lzimZNksR3AZ1qbZYq+gyZH\n8n/Zc5tQR4xgS30mkWoJ+zrxoK7fQJooyqGIkLPlVhqQ72kwYAEuCbk9vGsn\ndCe68524DtZj96HKAgRbg/3vJsazDQl5599yWX5DVWrTwVFIR9MwL3NuP0pj\nOzxukVKuiOTjB+jcSB2YJGLrTZ02gTEzaetboF/8CgZv+KknSWyNWd2v2/FU\nXjOOOG5kDIOfnxHM5x8gXUjk4O466txAyMj7/8JSAhJ7LX9vD72cixTVX1ss\nD5eu1HAlaQcAO9oUwrRb98MVXj+tG8qaz26/MvDr4cGW33zhj6oh9xpPNf8h\nCIiYl43vWHLc6sRZYOlVmn+N+jfV355pK30Vdb3NSH9KMpKNkgTGexBSEn+o\nDpf2N7WHhPX+OCy9j/YvcRcqNlNPj3TJjVqFHBFIKFqnQGgUFP/pt4eGegT+\nLFld\r\n=bIrP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGnQADa30R5NtiXFfFr7TZbMvUF5lBvZ15QBI2Aqa0gPAiEA0I/7Et0eQU3pjpcRARx5l990ZnAFNLQAgWCyHf4Nt3E="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.9.15-alpha.3_1572585489421_0.4820964803512424"},"_hasShrinkwrap":false},"0.9.15-alpha.5":{"name":"@react-ssr/express","version":"0.9.15-alpha.5","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.9.15-alpha.5+daaff30"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"daaff30d42cf62d1d35e7d1b56a56dcb5ee59ab0","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` at the bottom of the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout script={props.script}>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.9.15-alpha.5","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-wVt5oT0DMBKRfeklsqLDmFrCU530Hq4mac9iHzGjo1TjtGbN4jU61JFQKVIof+JHrTvPlXCod4VBWPkmnK9dgw==","shasum":"f935584ee4ecaf54198f9da0f16ce3787294de6c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.9.15-alpha.5.tgz","fileCount":9,"unpackedSize":14159,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu8D4CRA9TVsSAnZWagAAqTUP/2LdA7MsI98OtBtt0Gb0\nhlHn4RcvCpf27b8qPeOIdqX4nAZ01iJOGhAH/IOWxZngjRbnuwL+twyJGQq8\n2gpfBDnq6DxspQg4P7p5PimB0ZpelsBOHILE3bpYJyNidoAcS/lXS2YRp0Fl\nsI8Uaza0ULM6zi8WjbFV2v9oq8cSEKPFHoC1c5hZ8G4tu0llkZYqLGMLqi7Z\n+Wd6feuL+8K9Yk//i9m/bZAgJozwJKfsIfVWwtu7lkeECJ9KJwcxHW1AoyhT\nSiqQAF6bCkpRVUQM7x4BLdX9VVmaTVPX5KhtgxFQlEAQrvlVRmIM7X8HXZWH\nmP51Oby0kZdveNZY2T0wBbyUTyAaftz9q+Csj6ixoD49LIHhfLV0Y5NXxQ1k\n5tS2lURJ4ctw4Vz+CShR7NpaNlQH9l4KsFX4SY2jdGIFiEayKFORy8yrM0Yg\nLGNUJvYT7GIRqZeRnRiHYaC8kMNwegSopGeKDziVVqXM0v6fpAAufKbMTAmc\ndwt/S5hLa+B4jqjZiZvcT9T5dS2OTP65zrmNXzeTR1Bwt8M2SZczGzpcFIc8\nUJ69aOeZD8Imx00QpHGjxq48qm1Zt3KaKgaUGkemZFqpy8dB5FD9099i+Wdi\nnGbT2p9Tvx5O7LGSTBCg1HQu59/2ZQauDVipr2or7gfYUU4SPM1r8dxm0HzT\nitKY\r\n=MALJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDM48K7rTXwPWNds2UpPIdjUBxiN/tqesm5Niidx/fVjgIhAKOgHq+nBXp9CaoH0mtZVi2RhqBnLSAFAu01pfFRBCBN"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.9.15-alpha.5_1572585720390_0.32222657573009306"},"_hasShrinkwrap":false},"0.9.15-alpha.7":{"name":"@react-ssr/express","version":"0.9.15-alpha.7","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.9.15-alpha.7+98175d3"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"98175d315bf6bccbc383694adbff086332e14d2f","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` at the bottom of the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout script={props.script}>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.9.15-alpha.7","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-3FdDbNxm0b9iqMmivKMiM8hp4NzPIzQOyEHFI0eC5RPIqr5KxJ+p1aMSdJOH+qkp8b1LnQPZrTltl6O+6Wytow==","shasum":"5e2d3f054d15da79bc96a5c6daa825d7c2cedfb5","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.9.15-alpha.7.tgz","fileCount":9,"unpackedSize":14159,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu8KoCRA9TVsSAnZWagAAY38P/iHnsQjqVwRe0BA+OxQv\nGLD1742751/OKUJHiZdc9IwAHoNf1dEX8swEZVjbye0/MNZxTKxsQC+DYuvb\nLlkf0TvdRCopsyqhZr07E+B/OYQm3tPgUnLCCoRdcb1LMpl3KK5p4Y83jN8q\nczydf6O5gP5eFv0LOraoxI1+pdgZBZE5JnAoW/579PNknXMebmjRdbIJuICO\n31t5RUZFygBf3zIAszM4KgNr+8dFpFVjoz4rNGG58keyUdwnGidbkoetavQB\nI9c4DAXznc34TMU7EXY+jV6B1FM2qO9Osvt5shhs/Pef5TwEaYhEsG/29+cf\nwUFrDV6phZdV5r9one2iEf73CWxarp7RjNGRlStsZ9yELes6+fu0M3OOje4M\nrUxJ+hw444kVrGbrpQdLxFvdt5dDho9OfqOM/htiGz4Fk9Alx9rSgFxOR6+w\nM2y0S/c+YFCL+U3ZxZZpdIB4vEWjVn/z56B3+P1mL12fkRj9eicuUwbVNx2V\nJwrHTDGO54fGiWvzb+DGioUCu511JC4xzuMJUgFw4mMlTQKy5IJZf7PRLrLF\np0wel6WGpuimvMNYC59c7ggxVhQTiccbLr1QR/I2W8Ok9hPgb70d1F4bjjmh\nEly6dDczPi4VKP9vJg6an3D7wJ/O0KVT6FE4oaRh+TzeiYOxJLmDZS8W3fmJ\nEvMR\r\n=q5xN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFhBhBnSycuJJ7AutQNKhXxq6PjjLk4mHpkGf00diQI1AiEAqBsTEAvInRffrgKqRmmc0XtH0rqWkWXcT8unjB5NFPo="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.9.15-alpha.7_1572586151984_0.14274063346744748"},"_hasShrinkwrap":false},"0.9.15-alpha.8":{"name":"@react-ssr/express","version":"0.9.15-alpha.8","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.9.15-alpha.8+c52474e"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"c52474e5917dba41ddb0d7cc0489ed275ee38633","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` at the bottom of the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout script={props.script}>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.9.15-alpha.8","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-cdSzrsPCd24WrPbS4lj19gNY4FyofGJT1PmfsBVmh4VnCl8LgjUqy8bBp269l5B0Mza7Xgu50TeLSRzHkWWE5g==","shasum":"8280825e5d4e551ae58f721cb5c934048665ee1b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.9.15-alpha.8.tgz","fileCount":9,"unpackedSize":14159,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu8NPCRA9TVsSAnZWagAA2ZIP/3BvONckIQRntyH05rWR\nk0wto48Q3ifAosTfO38oCcNaJtDrV/7RPEcMClem1iwoLi16ZqQxaIY3aJ9V\nGQ7/0OJgMYI40Sxs5tuQ42Uod8h2LkDCbgfqkt9BgvEYeXi6/TD1ZX+/xS3J\nuvXQOvB347CyigXPHu+CFgN8nPh7z3VyDOnm+iOZBzxXRCE60a5GrwcNhQof\n+WEjcnBXqI94D2aW7NOOd00g4S+SpZkQAafAHEh/kcp9UeSkQsmJOyp99Be6\nDi5xsZCHzdfQy1q8O3s8gcZSK1Kr6QCdtg2NSw4NEIBCzXxqzzKJMJTbWPYs\nG+wszf2t64ShJC5XhrsDTm//aY+6SezgS0kvah0GwcemJVLKtqz+ytCJcCgu\n75cdy7etZbBxJ8XNaSd4XirfSzZp7o7iEH3OOpxyjnOduyKH3nRbmudLV/b1\nlta3YFdgnrAr7jYbQugl8p7KVdJp/UJBHJ3vj1vih4iOojG9yXbRzU5nGmIL\n0wPOgoUTLTRAzDMSpN8de1fLMWXuhXDgp/z8jvtMLHBGkYwKUGS3t7PnKFmn\nPFHCz2tP17n8PlHRQstQYrx3vJVJLE79V+mOZ1d9L5GWS11Kb68VJTD3zVg/\nqBJwn29qpGIMW/acQkx7WF604HtQUWK3oFrmCmepdJKTt4kNuLFlQcntq+i/\ncgs8\r\n=vYbW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHXJDQNz/s7qCwAZIIVvtqxUzPb5duNnUyVXWvPf0T0dAiEA50qol8ktG5nyyrNe/NzpYyOD8bz/aG8jCjHlkP+Ob/A="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.9.15-alpha.8_1572586319469_0.5676652210083617"},"_hasShrinkwrap":false},"0.9.15-alpha.10":{"name":"@react-ssr/express","version":"0.9.15-alpha.10","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.9.15-alpha.10+f5ebc9a"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"f5ebc9ab35da44702898fd0535eb8ac3d08d7904","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` at the bottom of the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout script={props.script}>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.9.15-alpha.10","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-2GyQKqd7/e6bKqmaIvqv8qDKP3KhjRoMKb6ZN/wbjY14gt56yiIfTS2NCw8UGvDsk498Z8Rvcu1h30hjgjxOJQ==","shasum":"5c47f4d2d5c2e84ebec9d52f2934e0f39319f569","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.9.15-alpha.10.tgz","fileCount":9,"unpackedSize":14161,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu8TNCRA9TVsSAnZWagAA7Z0QAITneDtdOtyDTNPVyHXI\nZI5A4nNHwIoFMndko8mAs19No1S/alzafFZ05ak4tVWjipRg5LtjDAlxQ6Bk\nqGVTQB1dZhoi99QVSOMhVqYjQhwlPZ0Vo0qLZP9vgEnYtjQANrTD9pX/JYO1\no6eM8P7BR3ucANYK7VOt4KuNc0XkhbfEi1+50l/CVSiz/hWD4buascHqBtTg\nw9HTLm+l9m+wkWJ7zR6ZcD9WmKayRrDYZqhUigzSubFJpq3pHTWtpnNJ8idO\n2sJdZohDa33nqpe/8D0srIK6x/YW/YcouaHlpOCBxRTjV1HfTYL/rgfWYdqq\n5KEg8ZrwjLpy6fD2oUgDulHE5VB4SOL9WAjEN62Z+M+MOEYWPOPw10PFiCcv\nnDOs28tX2MiNYHiDqmBULLyUNUWr+EqyD7wQJChx2Dz1hPMkAbhDBCk06tv2\nGkWi9eBNs9u6MMVNl+jihBXpAlZqqWj4/UFtKj14LhqtBxW9R/RYi0DxGVc3\nxPipfp7WShu1XP/C4GR+p3FyrbPn8eGaUl4pXjg2dSxbwyQvJ25p30YjCEa6\ndayLfd1mk7Ad4+DSGgVJ9Exxqmosl8G4IsAn9QNH2py0YcX7EOqL2qxC8ktH\n7YmupNMpAX4Ppxx+YiHZvqvFpxsopiCTboYKZUPdvnM+MbD9qJyW1W6kaQBc\naHvt\r\n=NaTf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAkYoIG1SGiu4ncvXNx65Go0HFENVYntN0thiMafgsZPAiBs6RRbVFcKfSdz8t+3W3ig30YLXgsMUxQ5C/dx3k1hvQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.9.15-alpha.10_1572586701180_0.6700406390112981"},"_hasShrinkwrap":false},"0.9.15-alpha.11":{"name":"@react-ssr/express","version":"0.9.15-alpha.11","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.9.15-alpha.11+c33f825"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"c33f825115eb783d20e5bf1b6a107422ff699690","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` at the bottom of the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout script={props.script}>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.9.15-alpha.11","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-saCQmioTCDC//L6qzcRBXhLosislor9yri5t5FhcG+usz4XQdA6KM3fkBWKth7GqTZGutj10hIxKwBpbGIvaoQ==","shasum":"37d0b288f19578a013167992275011adb285b59b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.9.15-alpha.11.tgz","fileCount":9,"unpackedSize":14161,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu8VGCRA9TVsSAnZWagAAUPMP/1z96qtWZBCmwf2m1dHm\nR/zQUwfvu9KNyan59qnJUtjap9fkO9wGryqkGsR0CWd2Ov31phrzkp0nz+lC\n7S6GQueazDQTXItUWDdevYyPoIoJ6shAX4A6ZHRcXBIbvKQu/ftpGfV2mtiI\nrdKLukEX0jgn4TtBOppDbFIO2gM27wsCO+zaRl/Ey+Zb1i0Kx3k6LJHu76oU\nBwJtrZnRtHfTVFbTikV4lTpPlxIvHxbyqJ2VVYz9ScQL/y8N0ja2USGsRV+B\nkbptBPiZdpYbQbYOQkJmewsFsvHiwd7TJe0ir5GspyBMlbbdFTYKmRgHIBS/\n/8v/SV5RkR1RQ68HX6Vz416o25X7XP7PlqRJclO0gF2ZIjZwmXndxdWgbJAs\npfzzNCrYUgCC+bTKIRJlyagWDOxVTrDDskGhXbCkU4HSf9yPO1Uwf92qouBD\nahnicH9WyZQ7KEFPZVI5ZkCInF0aCh9BN5PHepH+XBVyhDYJbKaYOEkapZ+4\nVV5TTGetU7RjaxaeJb0J+eNghDKEXscJFI5zNBW8v5fGrJTwJgSfS0AFnNNK\nU5T89N5JBKFB7Hr85L4PE9GAxF0mo/Izl8F2SMPeTT+ceWoqPbadCeCCvmSZ\n96Eg1wCKhk2OqS7YD6QEIE0MGFJx7UXZmRkVzxkaxrAqh09eEi94BQ4ajIQH\nMd8X\r\n=G5UO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDyw4wIwPfGhqh/Z09A2TEwJpX+yrrUMcgdd9+YMTN6MQIhALG9r57nRFtZngwH6KaH4zfF6UChjcDIIl+AY+pEE3dx"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.9.15-alpha.11_1572586821840_0.7512787922182906"},"_hasShrinkwrap":false},"0.9.15-alpha.13":{"name":"@react-ssr/express","version":"0.9.15-alpha.13","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.9.15-alpha.13+9ed6b6f"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"9ed6b6f3075af7daa91eeee177dd00273971ad90","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` at the bottom of the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout script={props.script}>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.9.15-alpha.13","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-TEmI9l+VjWOPMrDUwghLrxNT/wBJ/eqLd14faX05gEtC+CI1TyZjwL66yV9ABTfwPSDRkJBSD/Sy7ln+PxU1NQ==","shasum":"30fa37bc9ff50c2d2eede884c87e1f66d2f59c19","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.9.15-alpha.13.tgz","fileCount":9,"unpackedSize":14161,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu8gdCRA9TVsSAnZWagAAxQ4P/1W8BzB99oisdr7VoVox\nAs7jB7jbOT4XqsjC2zYmff/G/tsRojjlCHssniUSVfx9gWkbbS6ZA0iNkKAz\nDmeDXNjmO5q7+mWzmGiD7SrWiu1pVc14X5bxDZWfHvvIzTT/qcGhBHE8pCER\nxE0tf7sFipyB9acU2onpvfoNW1K8H2XemxvlFCZxSBLyh7cq3ppn0k3NtG8G\nrq2QW3DCjzIcd0GK0WNV3DEYolyABeXDqoR8GHDKM62MeAPiGYWhCFG9KqGV\niPL+7fU09XXzHSEP+LFazDp5oNp/6NwDM1VvqwxCpXOugoQalgjDK/Z+qzcn\nbfZcomgM3mPUTRzuV1g1QJDLxjrl649H9It8lY9mxA77SgtZW86Gm32ecdgG\nsC6wl+seBNaC3EKYnnZZfc8wh1IgtLtWbln8C7T0g/NtmjYIG7vhJIwIYQDy\nfQ61V1gHpXb17y3ZrMJmMf5PjK2WYWIos0n6UK53Lw6vJHXr3tw1GGSQLsg9\nkHZhw4KIhrfmu52DN1DwfAVQf1nkKZetYeuUp2mFaS+fmuni+olIOC6ZA+Eu\nXPKpjxdxvSZANinZ/e0/voKB1pXS0hqJOo3t72DZn5C7VF6MhstXUvHd6NnN\njErkXSXc8ZLfM/THlV9DcXbi1rmdCOnoXrvRtAjT/o6CamBiim7Sppb6S24F\nXyPv\r\n=DdtB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDE5qjy1ARlndTYgrQoBtIA0Q0IZdKGYl17ZhUTQTRAcQIgXydCLGhvjvBCEP2SCChVZ1YDDfZ8dCwR62m9dsQB19s="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.9.15-alpha.13_1572587548839_0.5968879632676516"},"_hasShrinkwrap":false},"0.9.15-alpha.15":{"name":"@react-ssr/express","version":"0.9.15-alpha.15","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.9.15-alpha.15+e67c6e1"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"e67c6e1ebd90820380504a2a4012e672caac3e71","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` at the bottom of the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout script={props.script}>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.9.15-alpha.15","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-lzTbWd3aivKtEfSgP2k1JW+SlVFbS/Hg0ztEj2kkMLCdTo2A573FI5+fgnAu6wADG/jDE1f6Rm8uaX2pO3o3Ug==","shasum":"740284266f50da8395cfaa23493ff156b7e1861b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.9.15-alpha.15.tgz","fileCount":9,"unpackedSize":14161,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu8i0CRA9TVsSAnZWagAArxwP/3RppiWLv6m9DJrBHCNA\n59nRtvAPpfHs7m1jh2XnyHfqD22yyxZN4nm1WG+cPNY+9Eg9ixqtIgUQkS1H\no+2bIIPSnyoQCHoxim3gziJ3HAbSgQg7vCLOQX10LnuDxGTOKEvcw57kCaZ2\nQaE/byzyzUeEqzYCQvuhZhv5TbiHxz2NGN2l18MgY0cNvsdoJ9eEArkM3SaV\nk68Bpm5OazJI4YZoEvNFr8gkULztOQ/l6WfxCfJhrtxyTl9dipjENj7+7pey\nqyI1/VvDGnz+D1/6WUHnrQy7qi8abonyZwU2spD8p0j2l63oFXKD7OPFgZgO\nrgwTuWjkXLNhd5uxVRr4yExybvGLOo3GioSGW+pNhuZ1jlNGNe8U9moCTBzz\nJc0nJRXtER0NeXKSEPpLOGPaXSWUQl8uVXJ4sKEYWTTISkzsWik2RMUkWop8\n8QrSSU6euridoNfVYbr/IC9MWbL3lyLzFp42yB79YCb9lxtdpieF9Ue7MALy\nJCqzTmtrxusPvLJlDp3n2M/7JYhvgVVk7kF20TicIbY1fyqV1aUtCe12jS5l\nc7/lsdC3+Z6sXwyI43m1NcsJS50angy2hKtILlLc7zWK4WVIjYhlAnib8axf\nZaW7vWveE9zbaWABoD/ZpsboqZFq21DU5u5Uh5B5dpKYolYll3DT9XNHHPJi\nx9bo\r\n=gHUs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFRcXE/URfD4Vju+h4iFBL8wSoh1OTtzkoLJspZ8Dp1GAiBBwIdPs2vVwoRrkJcJi2+seCBPuN4giVAiys7oLRPbsg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.9.15-alpha.15_1572587699639_0.8994183615602065"},"_hasShrinkwrap":false},"0.9.15-alpha.16":{"name":"@react-ssr/express","version":"0.9.15-alpha.16","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.9.15-alpha.16+dc9b114"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"dc9b11413ef423fa70e03e4e2be2ac9ce6138833","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` at the bottom of the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout script={props.script}>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.9.15-alpha.16","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-vFfBPixbcBzz4qBvnKvWu8Q3KTNi8BXcDaqhtgadiiTEOv3+54ZfOB8bEuoDZFuC3kvKfnQ+AROYCY5k34Lwag==","shasum":"4f965bbfdb1b594c88c3388c1d1e51e2ad8bda72","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.9.15-alpha.16.tgz","fileCount":9,"unpackedSize":14161,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu8n7CRA9TVsSAnZWagAA9QYP/jS8ETcTynCFPqGFIZfU\nzIu5LK7yYvrUTdbcitrzQtU9wM0hhHIP0CtajcaOv8h24s+DcJKwE6ASi/wz\noS4X04UIA3z44t1lco9SgTZJK6DNJyX3vY/M7G/n2gO2H78ttAoc+HljN0r2\n+PTNWsMFGs0pfLoz1mIHCgPIYCfMmzG84KUzc6O9qUsqpaFkyQf166G0aL6r\nYkNRdjvuz7zOvzsR/PbYdHinCMoZtkb8BW49TXzqh9FyEA9+jokgp9s+pfxX\nxLBw4Uj3Kv2QAAkZsXsxvtr2eYgkA4X8iy00zwtVftwiJxO1wbSypDziuRRe\n19haXHddCXwUwjKNOY+AsDNxo0d/TH+OKbmMD0TQgRjxQSyULV1tY9piIUg2\nFens/UOVT089AHuJHMOyJmEFb2OB/Vhjp09oXHPNbQDweaK2UUDELTV7vs/v\ne1Zs4e6oKu5+bz8sk9ISQvBBnZDkUQjNW3luuk3ooCSDDlMv932S+NfWVWTV\nwIdiQnPztS5xQDIFRdH1omtjvLh0LV+vRuGurL2wBv8luVHwJxa/8TFylkqF\nUmYrkhcZedhMNq556utYGczBsZIW+kiSBxwNUzqb/wdj+adI8DcOcsasDZo6\n8ENdxUbFAsbdQr0qzClxYAN2YiuNaYLGTyx0vSK2OtkJzF3RzIhEnO0Ap6cO\nFCeC\r\n=+z/v\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDXkwFtmCm+Vo0lEjdyAPYxO855UvMXbGKv+KYADxJKSgIhAO6PN/9qQ2regqA3ZbXFAvA3ZEzo6n8NKElt1tMvZ0gF"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.9.15-alpha.16_1572588027077_0.832329997949"},"_hasShrinkwrap":false},"0.9.15-alpha.17":{"name":"@react-ssr/express","version":"0.9.15-alpha.17","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.9.15-alpha.17+c3bea50"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"c3bea5066e2d10001011f53e6effe927dcb195fa","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` at the bottom of the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout script={props.script}>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.9.15-alpha.17","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-wClpgjCzkNnjUmrb+DjBcK1BwKLlT61MGjJoiHyYAwTwr6jvRHT24DstHT8qMmsW25q/ny4yplNuiIsp/rNrww==","shasum":"a07c5c64a2db487602920804425c6f0bfb900112","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.9.15-alpha.17.tgz","fileCount":9,"unpackedSize":14161,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu8qLCRA9TVsSAnZWagAAhlUP/3FIVZuTaMUd5MjzYyFH\nq2WXpAiSe2T/UtoO1+VyJn4MiTzFS/K8tpqb9Awk3fnnHYX+Cqzy9BljEtLR\nGDG8IW6gyov4/5OLq5YOSEvx4MWAxpduQjeGtBRrc2kvPvhjALf7FRDdit07\nWR1scJjhhnMFW3GH0ptGDt1yQg+aREG6mtJJnxQ4P7sOe4m/FYDIKMsqL7hT\nvg9UMZSCAbrvcxPRiIBVcaAtxCM6X3GpPXLg3yk54l/z1RuhMGimvBwOI3Ri\nuBnoaTsy5ZDiCKU4YvJ3h/JdiSz1515X8TKXs0mu78fhAWJE2Cz5Uv64L+oe\n9qUKT2WpmSMwfMehicFKpDyFoprjMEsBCV895kqnpUUApEG4HS/9ldb3Pd2w\nuLOIJNdzESw6CYGrHJsGGZRB3iC8Pj3Mk8RsldvzUxlch16feiASg7J8ea+X\n0Z8RnaH2lTolwo5MGgLWxeWjzJn+467edqPaHLIOLMJdcz8bE952NCY13UE1\nUC7MBFf6mqz+Q4HctiKrCeUxmEJQcBEbYI0Rztt3vsD3s2VQXbx0LTue/bWd\nIet9zeTXAmCKthXCeA6+tCvcHPl2BJE83yedRDG4ds9c6GVGuIAfP21g/UCh\n0Yv8U457x489tU0QmNS5kMOSY9jWpSZWhHPhyJZvnpY0IsCohRFJgbAazgLq\nHGzx\r\n=qaPB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICtWQTPsgdQypcaT7cDIBxF/i1OCrfoq0RrLpkpuLZNMAiBIAtlSxBr2kNoiAxlTRDzFIBdT671WOvRSOwvIUEziSQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.9.15-alpha.17_1572588171494_0.5133870288600675"},"_hasShrinkwrap":false},"0.9.15-alpha.18":{"name":"@react-ssr/express","version":"0.9.15-alpha.18","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.9.15-alpha.18+cea9604"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"cea96043a157e14c088baa1a778815f8b88b67a4","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` at the bottom of the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout script={props.script}>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.9.15-alpha.18","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-T9KFJ5sHxa0zdS35jgdgzvlLlmoOfDE3Aa97NfyArg0LQdR1x9f/Jbr1r0S1SJcDSI/3Ul0UgkaoFiR/k7h11Q==","shasum":"559ce3c5e642162a6c90d03771400103c6c5de35","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.9.15-alpha.18.tgz","fileCount":9,"unpackedSize":14161,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu8rzCRA9TVsSAnZWagAAUGcP/R9HOocF+Kt1IqwL877V\nhgR0SxuEfUSztd8Rs5yD7ax2aOHKlIt0zK4+Iqc7bwdW+ImQ67sBkCrtc7j6\noO2NCA4hduXOleQtur4sn5hSotZa9FYIj/xD8Rl8mPtASqf8VJ/261T8Wvy8\nwZLjK2MMO9Nz9RYeTvKu3XoBQDXTrmRUEmTjTvKlalHmvJ/ldKIt34E7o8YL\nn/KImwYrIuuS7AqxbjjoJsd9wm6ZWiZoKYBcZZk1vA3eAECTcKfu7KA7Ef0U\nwY/MC9+9bpdHHQgMsj5eHmezbmvB/QejTXKB/YaTsLn040YU67AduFvljWd8\n3w1ryqcRLERMIGR9x+KD6wgVrd966GdJ1labq04W+M1lReYwd/VyXrwZ1l+X\nNErzow6TdeD0xbu4cBquHaHk04tr9XkUbuISMFlexpdjPH0BAsAJHMB131dz\nAzrSHLw0UlcKSYF6tTzUXeAx/FdPXIfs8dg2gNvWGL7pLWkxtGajfMUQrTId\nD5eYTXVWoB2NXzlo/3zltrG6krmUSUdMRAzgDsup36Bgs1pbsfs6VF62EeQI\nNBfiBKM6pmsBjAzsL0kVN4rrKfeEyVi2JkY+qc4qdSBcXHKplxbo3YoV1Gy0\nL/OE/CtxwkTK/76pOSYop8clNC7QUjUsBnjmphWG3AavRnXQ3tzMX5m1zSn6\nf34+\r\n=HHlC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICVC8PMZtuXBAv14zlpUXUcO/2pj7byF6jAbh/g4llrOAiEAh9wapufZ3bMTfHtECjVqLYIfVKCCn9ApVcTwCPg7YlM="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.9.15-alpha.18_1572588274564_0.4365363886395903"},"_hasShrinkwrap":false},"0.9.15-alpha.19":{"name":"@react-ssr/express","version":"0.9.15-alpha.19","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.9.15-alpha.19+b0a3f6e"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"b0a3f6e6d0823e20e4551343edb9ce22f45912b3","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` at the bottom of the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout script={props.script}>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.9.15-alpha.19","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-bTuYYm0rucl2c9r7Wl6RKBlS89rRWA16WjOYZrJyCyvAGYJdTdU96+dsJdSLYF3se8PxiuNkTjPXHcTEWPzjPw==","shasum":"f0147d3f6322413576da53d6d57dd72e8c093b12","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.9.15-alpha.19.tgz","fileCount":9,"unpackedSize":14161,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu8tRCRA9TVsSAnZWagAATXQP/1aCeZvtld2UVubtcVw3\nh6Sq8K7glJh0eBaxmCuO3Nm8mauaUlCvGbZ33cadVnuhycA8XTtw/br18Tuc\nntMp/xMRYoK2EVfFoemVuPoa4aqA7QCq3Qd67jWwWqLCzNdj7i0Hk+csRS48\nb+hXWyDvzRHlbWdBn64BPc+ZkLahQpb+pfAUjocKR4Kl+V2GGj5rVczftOFi\n3jGgo55fYTz5VdRFRtWWaX9IbPLXz8p0gx9k4bayV1d8u5WZFUVmqSLpGco9\nE2OH4ZuO5HdnhEpop6SKZvws22WDlkNbg1Zl+PhHCSL1kluNdNF02wnbhvHK\naDTycTx5o44f+LRQb5fswJgBEUbbWAscnUqITGtFh2yz2e+SHm/0JxwxeA1Z\n0GxqRLx/JAIUBuOUZXCBEvMHIo2odqzDOWeK5i+brFtCrXCogLH1vbMVXFLF\nPuEm9Wi8wIemnecNJt6ftX0lbbGV5mZgGGx/L1E+XlglagGLNzJ+MuefvqIU\n3YaALOWpFmts3Zt02cGQG5i8s6LCF8+do8eqRNtQ56Br8fNpCmXM2ys3MYsI\nrs38bhhI9x522fxKl+pBM+biFs2xbWHNF9hs4L6EHINOZ804Umw0Vztaw1VL\nK5IsJl7KxystWEuAygBfwLCiL8fLLAHl3GONVTPmN40D4Kp8x0laXNk5VqRl\n0vML\r\n=/11C\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBWz8mkBNNvcLvcOoKG9e9AURRinbj/FrEvKlI6kAyDUAiBl/dUrPOa17p+GyYoCL8nlYKpQzGDJUFeBGp0HiwQnvA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.9.15-alpha.19_1572588368600_0.8838435333082664"},"_hasShrinkwrap":false},"0.9.15-alpha.20":{"name":"@react-ssr/express","version":"0.9.15-alpha.20","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.9.15-alpha.20+1c47432"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"1c474321d98836ca80033dfe0208d59e6705f43b","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` at the bottom of the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout script={props.script}>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.9.15-alpha.20","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-/0xe9P1NhxCUBPeG+GGz521qewhIX0bsZFd/APAPe9/WeZJNe4tsUnOOoKaARCHahT0l8JZyGt7OKgkyT23/EA==","shasum":"2c604eeb945974f886f120dd775d582bf3658777","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.9.15-alpha.20.tgz","fileCount":9,"unpackedSize":14161,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu9COCRA9TVsSAnZWagAAkKMP/3p1RNQyrpErpVDDXAt9\nju4JAfVUp7n3GwAyG/axLoVsCnjNQhcQdlS6aG8n4Cf6rLPT7SQ90FHei7iE\nV9cBBdxFG5B/rcvMr+Hk6FwoUS6skBA6EHdve9bRQCBWU58uSEDV6XezBDzQ\nqBLQT1LliAE/Usyxh26t3/4hxvy9QAWCjRSlaNHad3cCs8WgQtT50gU0EUS+\nOQTbyXzfUHxukjQacuA+OY5t45OUdo51CxA+o6e9rb3wcvL+YkGkTG11jPrf\nTdAgRQ21QZ0sA0egQbuSP6qliXKoLdk7VEoXdT7SY04NJ9TJCDmPdRc1yIvW\n3eGb/Pe2nUSqlsqYGGVu05TtEdNKvLaA92hzxO+2cddQHrd98W7RhfC5Tyrd\nntQC/44mmZe2oQjom264D2ydJ/zEWttoap5tdckofdmmCkNKo96TzkGpjRZH\ndBQQUzM7QT5+P7+u0AD9Nq7/gBX2ozFVh/EXy1o21TlY4BukTJqZgGwnknhE\nBLM6VhVhJ8bBVeU5nB1hRzYXI6kYTUbGMeoQhuEiX+EeCm2gvy3iAla0hKOB\n3MJ41Z6ZzHScz1dAehEkeyZOfedNYPB3jDt0ggmjcYdZfDrRtQV7Qu1UG2MG\nO7EkvfL5io+HFX00hw960lQaSv2fhpbOpDhBWQelm7JYdYdZAJ8IRckPMjDV\n534T\r\n=z2Lw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAi7g69Edrnab9SenL9cOQVKeajOpZNOv3T4LWkZrp2hAiBzvVSiCh9eCPQvQevsh7Q4E6S1NmOhNlsZ3fC+YmCyhQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.9.15-alpha.20_1572589710036_0.523915910346189"},"_hasShrinkwrap":false},"0.9.15-alpha.21":{"name":"@react-ssr/express","version":"0.9.15-alpha.21","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.9.15-alpha.21+ba77cfe"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"ba77cfe222da96610729a6a3cf440143db2392b5","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` at the bottom of the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout script={props.script}>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.9.15-alpha.21","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-KxA0Yx90rU1Nh3Pu9DqQzMSVD50PObRg7Ql99QDleROaa1i6jj82Yws34KXWIUdCWpfQEMxmdPpzys+cdQ60bQ==","shasum":"f62417bc5ab390d4a27e90eadd6d11e05392b6b3","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.9.15-alpha.21.tgz","fileCount":9,"unpackedSize":14161,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu9EPCRA9TVsSAnZWagAAPzcQAIJXNmDT+0ZgJR9e4D6I\nGhqV0JOdMkoEy07xNeu3XqHJs+7CJ6sXRUh8Si1HMUidMDHLGXwX1E4qx6GH\nKkKnx0/1gFg6oSQk0+KHZfjROn+Ah52Ugdvnl2uQqzWY9AADa4sQqr/Deq9C\nERS555dA1KnlcWP9ZG5fsy3XE0EH1Izsvl7uAQzmFAP8oHXJxp5ell8wdNUC\nvGiplLFmWt9bPG8aPn9HNL71vAmPIwIjWWpvyOOahbhNqa8yZ2cJix2I6XOL\nCR0YVFmFvZEIQjEZSjF9ykOLa9geoJNn451KGMfBJKW+V0teAEQGKoCNInIj\nmw+yA+5nElsVCglNTEIAdf8hbDuZ6UPipvuX2PTPeuGi7EQFvA80XClYVnqo\nBdeXkJIZ/J4YMogkgoCIn/uLUT0MRC1iVKRIC+QdBMGzkyBU18gNnkFa/B9D\nWGzXJpOecaVeb9P+SVGcy0MVG1OxGQpz1wpVlj8xnwirIgufH/cyq0AEYDPY\nm4HAF8NfFRCmqOUHoFvIpUenH907N9esbOHwZtxmPJfraG8MuySaVrN+TOsM\nJOp/+HuWakKqCMINvr1458EntflSLF2bLzkfpoXq8ug6LkQMePW7rzkSSAGi\nxMLnBXoJkhHMLCAVv2JadhRIEWFIBVmN9T+XqIWBlNv3GU5eeKGfq78n+C8a\nfXKK\r\n=2P+C\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAyvJJB5ej/r9vk8DJP5BW3Gv8CWAdynFnMrzPQgWW3GAiEA6iRpfIjOmUwi0BoF9qFKBXRNyl3UAN33TgadAHJlml8="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.9.15-alpha.21_1572589838983_0.917370426556114"},"_hasShrinkwrap":false},"0.9.15-alpha.22":{"name":"@react-ssr/express","version":"0.9.15-alpha.22","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.9.15-alpha.22+f2cce44"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"f2cce448cfc1722123697a0d666d2370e48af582","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` at the bottom of the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout script={props.script}>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.9.15-alpha.22","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-C8VTjGkXOr9fDBaW9y9nOB/V4wM62vMrWgrC4TwsFr63b8TnTZn/BADsCRLMS2WM3piYtRQeC+Y4RdQWNa5RZQ==","shasum":"da6f6fdf80516bf07d1b160aac041e9b7d633491","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.9.15-alpha.22.tgz","fileCount":9,"unpackedSize":14161,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu9GdCRA9TVsSAnZWagAAVL0P/RtIyKPHc46Dzdirvcwe\nh6m2wAi/XhFYt3yzGt/PwNpONLEXfUVPt+M1P7GkrXclLlmMVJ+sR031DP7O\n7maEfoIEmRdZtJJKkuVmLLv2qZeDmbUTV1lkB+JB0ZYnMGVVU2EjgEJF0dsM\nrw66UhZ5h5jOhc0e7ALg/Drk1dW4SqP0B3WuYrh5zH5dbqz0Co4xDhXb1yig\n9mcJsn5FNABgKj45XNMe0/JrADzuqGcs41V3R6fgmTbreTKXWsSBh2TKCjO1\nLF19HC0Okp2Keh5w6ayiFNShxGous4knFzoF5Lonq7K1WLqqP8rsszhY5rMV\n3kNI6N3t57oDOV/vjF0jMdamKjPWTfeHkFCSINnumNBTUdUdI+N9KaK9CHIx\nN4s2SBFak2ZPWui5+w9H8JdD9YoNzWHVYYOsgSomB/qCrdn0kgbBQ8ewv/07\nYKleEIENzZn1/gHmXjSBA78yZElb/Y+JFc3VrLxNhlIyUrCVL4E4jiPoZqg+\nHFPUETIF6xIIXDqrRyb2fUqZrcL4tPy08LSm3ibs2IuyFPnU8hj8OzOwjRfJ\nvKSUt9gx34xgptoroWWoOQZR35TaBn4E5deDyLNUIwmA1jwS/UIlonnLrVbj\nvzvPd4gtFBZ2r9hxKUhXNn39REcg+Vm+xVqpIM17CsGrRJBBuedR/dAjJmpC\ngt7i\r\n=mqJO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGFYFFLyq/3K6fG9sNWrXPPaibvpF7lJ9X3gs78CItkbAiALb1vQHuVGbFa26ToStzocPoAT/w41p1fgyb54nIIvGw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.9.15-alpha.22_1572589981497_0.5842145157241512"},"_hasShrinkwrap":false},"0.9.15-alpha.23":{"name":"@react-ssr/express","version":"0.9.15-alpha.23","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.9.15-alpha.23+ac339ba"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"ac339ba1a734d7ad4920adee96aa00fea9a9ffd3","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` at the bottom of the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout script={props.script}>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.9.15-alpha.23","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-HS+MO7X9zz5/6FnxE7ROzBGsDbsCLXQEuquvb0xIkLXbk2eXNkYw2kC2EALYrXCvX+/u/Tc5B3m2bLC5K8+c7Q==","shasum":"016381ba48b55109bfd0d81e9af8d889317356bc","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.9.15-alpha.23.tgz","fileCount":9,"unpackedSize":14161,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu9ThCRA9TVsSAnZWagAAcFkP/1tWqBiIbgRU/lVOWams\n7bdtqlxCE2Ljou3B+xx8lopaHV6EgsjJQuYIXhJOYPYAV1pO9UQfHqp84LCJ\ny1W+SfXPDWR5LnfeZGNni7wRJNH18QZBlxiehXLBdduFEdm/jgXg4cMNF3AU\nW2EIjwpv3g8Jgw7G0h87VsrZHK1ByOz8dhw8cyFU07MmQi1dV882Ni4ZZEQE\nK3GoWe3oDVeInndpDscr8t3Wo7fWV+4Wdow0tenQJBjxgXyubzX/SbSMbbPR\nJpu4kqoj+gTJV0/NM8TyXJYw0qUDGK+cm8s0CU+ukcG6Jm4t9/xdBU+i8B3L\nwu27UkXU51MBQnXu0FBAK05B+rui0IHpMPFdTdaN9oiU3lq4jgfPGWeun5jK\n6U5/2T5AMqcRGbcfIyRwpQ+G2QzNZuFKsrOdgHiNdzdjh5hApMLldy8IBUD8\noTRIYf5SjqZEGmhkKoKTMX3J6dpA6TvbwzUkhBPmrVaY10EdEytlxODaFCEC\nlqVoxfiAp0RVohjW0rUjoJy6ZK2W/TorxuTlaOKkNK6UjOnxleBo3c0aKYHa\ng9nD0A6yt0NTCthoXz+92/uXBec5QHoZDPwMqcD9njEZD4X4FQ8xl/T1gm+6\ny6tbI/+VHBRl52hBvOrr9j7uTpeeecrTRH+0y0Bzg5RQPUC0bL0iEDPs5uOt\nO+JI\r\n=msg3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDJ124BspyscK2oap3qQ8UfWeWy+m09N71n4Yx9orRWCAIhAMYUekytPWspm3h2AyIycjV0Ls6k9aNctEbNv5/xCqwx"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.9.15-alpha.23_1572590817102_0.8234418450488721"},"_hasShrinkwrap":false},"0.9.15-alpha.24":{"name":"@react-ssr/express","version":"0.9.15-alpha.24","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.9.15-alpha.24+ee27e57"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"ee27e57d1c91c59e363ec0ead3c25d0870313dde","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` at the bottom of the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout script={props.script}>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.9.15-alpha.24","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-hXXA0/joxiHRXtqKrTgjgtZSDJYlY+And0IXYsIfGMr1hxV6zGU4b6V0wDeksBRbmOBIRSDavD6fa1x50CXfTA==","shasum":"ac2d3e131068a181f04cbcb804bef4826782b1dc","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.9.15-alpha.24.tgz","fileCount":9,"unpackedSize":14161,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu9nPCRA9TVsSAnZWagAA6uYQAJhtKhS5RKPerYJ8waL1\nCv5vpow5zA2O9e3v4wouy8qOroBLKuOlik32fJhPQaKrDuwdGHdk9YcI8J0Y\npGR/FvOLlZAwMCWouz89PHAEVDMZHbQRjcaIMOJB9Dh+DOOW8T6x2ZSfgQ5A\nk8zcaG3YUPJpMO/DHXl4+omumO486iKwModSv2oZsgcl1HPh356iCUSdC527\nC3ZMKWgqE3OmuOqCiBZHGgaQb0EJdoLz8MOZ4VAUYHy4GC44+f2kfL3PaGq5\nW9arTMbBfnf60zbWb98+cV0r2qHbf0ZxkK18ybDwIF5wn0wG/7SjcsRXoC1i\n8Fq+hsM1VXPpsj4m6BkwufBya35eN6hQ2TRbmPzjGqRbQAbKHpXhUC/zNgNq\nFRSs6ODsH0jOWo7zh8LK8IH32fqRqARGYYkFqFhaeG7csdlMc0sZZWwmHLWW\nx/EGJ2JmVEy1pKwNGRQ3EsykJXDrKhkRDEtjFBW5QTQcP48/ucEMJuLhFUt6\n154WcSeRcutw6i3CqLDVoHIjakGkluja1ugIR4la8p0mUe6RGsSR8WJhg51T\naqvoPEISkJSs18Yo2rIenyomAImGIIyDs8MfyDVzcB68nkM1qBy/eGUcw8fT\nUE1lUO23ieJpryo4YVbcSlEd7Dw+FzLE3dq693AD9CQmmJvAsUeuIFJ007dJ\nokKD\r\n=AQFM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIENWuppMDTOMlQZQJjPJAx0rcKtJKgHzqm7ItKF650qsAiAAh69qAIu3eF0pjE3XRgjkVXHUfVCttCxh4YCr8GdUZQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.9.15-alpha.24_1572592079185_0.19402428284601392"},"_hasShrinkwrap":false},"0.9.15-alpha.26":{"name":"@react-ssr/express","version":"0.9.15-alpha.26","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.9.15-alpha.26+4e9724d"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"4e9724dc791d1d9f15a1d0f3e65d070563bb948b","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` at the bottom of the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout script={props.script}>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.9.15-alpha.26","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-nEBmn4Dkb8cF7jSA3K6DWnSeL1VDXwcWNwEJ2MFBPN09/4qBWBGebJoiT/XmYdh6ekIgy34ksClj6f3YHwJLCA==","shasum":"6a42589feabc56e74823de59cf09f7df5755d206","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.9.15-alpha.26.tgz","fileCount":9,"unpackedSize":14161,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu9rZCRA9TVsSAnZWagAA3I8QAJUWqpN1iAPyN0x8uT7N\nyTFxWrI88tQ7WtdkxhSbTutKE3gYDUk25OZ0KCJtI/pAScpDpbyZ6kVI73dh\n+7tVj0RXgTdVGsJVbiTrosQ7CKk9NX5wBBIAWpGmk/hdEfHiZKFx3cmmbEIr\nml22zx/oXuCXOPWcdWx3j/Ff2f1D84994QOx01Botz9ykpPAwTkLW9zofV0Z\nx/VpyFQizNHB9YzVFKB7suRla3bQmJKcC82nQBn9ePs+mRnID//dvgMI4gQz\nfhMGwqz6EA3y8J9P74Lt79e9BvVeBeAVZmbOiPrN4Tgb6qI9NKmGV7LJHBzL\nVBtovJpWZDt1MzMmpE+GvxSl1m+/bMVtN6bn+puXbSAJy0SdOCfGJxPI1qSN\nbENJP+li3A1mN76CK73NUmMePTLi1m2/fjYCqa40lrOcNzxo1CNbYTaU++eq\nElakCfETa/+QpyEzSyEyi6ILeZGd4aPRkr8Rwiw4PW+UD1IQ0CiW9BV473Sx\n7oeusV4ZW7UeWNKD1QqXVBCKFM173qTsl7DpLgHJ2BGM+GV45XOEzEmYbxsC\nLA9VQSprZVaHfmIBWN2ntnAAIbpMQpblyvEPuz3nPX9cJuaGjxoP5StQWnyM\nMmX/rcU9Qc3Peer0Jb0VhAzJI1RbKJQOTME8CIy64FEWBCyLopSaHomCo65x\n1gu6\r\n=A+HO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG6BEFacMMHn+JfbJ7EqANZwr1dr0eqTFxvlg7nS1hLeAiEAigC/EMNqymebcw/lFGFex4ELV2cFN2d/KHbRgNdgIRM="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.9.15-alpha.26_1572592344578_0.06540898093142533"},"_hasShrinkwrap":false},"0.9.15-alpha.27":{"name":"@react-ssr/express","version":"0.9.15-alpha.27","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.9.15-alpha.27+eb01852"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"eb01852348d5611c40a92200e4674d1d4bdae426","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` at the bottom of the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout script={props.script}>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.9.15-alpha.27","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-SMnvlTDFk6XjoAPHKWRlzsLXoXKjwihntSP+0R+vYtDXFodj9PDMpUED5LLkvH4AInAKuNhq2IOBa0Rz5G2ABg==","shasum":"386d8e3f9dabf6b0504549288e6c715691353adf","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.9.15-alpha.27.tgz","fileCount":9,"unpackedSize":14161,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu9seCRA9TVsSAnZWagAAxawP/09B/FqUzU1kbHgU9tJY\n0brORcj7A84S1kZrA9lzFz3MJaBL7sTColbLpLAWcMvJV6KLsqB4AvVYZyZ2\nLHFu1Oh8ItoKxHWC0hFg9NoE6/bn5+dquY4c7B3Y7L4UUldhePN3GjGqLIQm\nF4Sn6gvgweWhdDNEeODtL7tOGFSFVJw172ngZga6A0z5UyG8jTHNaWT4tjy4\n6TED6J6SfocDEMwYRWd44O74AJ8Cncw6qN3gGG0254jcTE1oxUVO6WNFV3dz\nCZ4qnlNNEiJtjm60nq5Fcm8aILMWwcBtRLsSbI3Z3z4ehzudRfSN5keEmpkf\nQVEHPs2ZChqoh18KRzuq9xkgoZkE9fuDFRIimj6+3+nQ9KUMoZkliaMF1JOZ\n3TyEhedzpVSod1kGi7OEZgRRcxN89IMB6u/IHsvKITQfP3ExVYqIB934iUA7\n4Q2pXKTrO8DKJmFbLxHlLzsIHieX/fte3fmawAlzK2R+kzuVI8wD1sqksd8S\nKx4afD9xR2pOzDUHDFv1pOUIT6o6jmUEQEhLMkdJIp4daLXTuCkMq8R9Hjh4\naRomgwGK0m1wnF1fJzaAVWmccgCeDBlXzELWRZnvyzUhcR8KZLzty4JxK1pS\nEMUJNftmFGWnaF4HqAeXX77Bt5cYAkiZDChlyggYdgPneTKLDxTTriGTAB0P\nrcE8\r\n=UTxx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFSQmia1OF8rK1mMopBj8BdZxDRYBmJLz9grYGNFsXTzAiEAsddSfMwYfWMpJh6nSlv1nclmOMoehKkZ+pIn0W3SZIc="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.9.15-alpha.27_1572592413965_0.6009150227789717"},"_hasShrinkwrap":false},"0.9.15-alpha.28":{"name":"@react-ssr/express","version":"0.9.15-alpha.28","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.9.15-alpha.28+281238e"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"281238e2630a408c6e2d6e5c5c3a157395e14630","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` at the bottom of the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout script={props.script}>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.9.15-alpha.28","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-JTfA6UEA16wZ4++4fHHnF+RzuAPFODcXqQtLqnhlltm6mvKgKlVdKAcEwJcAabViA5IhoxuEWT0Kem5uJX3bXg==","shasum":"44e17d3d2d1f307dee4eed494a5249df50ac8ee8","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.9.15-alpha.28.tgz","fileCount":9,"unpackedSize":14161,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu9xfCRA9TVsSAnZWagAAKe0P/jrL2h08WNXy3qV6IE0D\numR/BtOdQ5QEDM3ivRBSzGfTolQFPF82zLyfSLVfOTfFOtYOZtqmo7eDohIp\njSFeNDGlBU7+qj5+C7bVFizxGAr+FO2hSihq5f/fY+i1Ei+kq48j7pF8WUat\n4lm55gLQHx8hiFf/PCVU4Z9ODx8VrCiH8ZhaXwAkUmiz2bpx8drN1KIiZgvc\nHO/BBpuiz5pGFzL+QsuvnsIbzTgpgImMH/TTLfiMB3G4DsRWPyGPYmTrQn8v\nhqkq93jcNIK6LiNB4V9bJ50amn7R5vuUiqOG/4U53lGEbluGZ18FwW6bzEQ9\nXAe4gBOeakX/pGnUvKMTZmC0+gmH/qQhG/Lh2HM+2AdmO1/rhIhmH9fobcRJ\nLtLN5pZMS6wvaATiFEU8hvblo87RLElvyFwsLSrFMDVNdKheMStIEsIPMXLd\nMuRn78gJiGDlmBCiUIYVK3r72XSix8wrplSu91caxXkqyXhHvRqmAw9g4F3D\nYWJglpUgFPA6dC7e07edmp192G7TVrdK8kXKd1dtubn9bKE6x05baAbX6W2f\ngFe2ljpPc1uY5Ik6cotXk5crsLZ0S8/LdVyLhqw31OejARc9ZPHgHg2ye7Yn\niyN0Gut3Hal3/edqDDk+mb28hcNAV+aQZd9BKg7gBGvSvgsu53dmkFwvHhYR\nbJeJ\r\n=MG/u\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF8NruDPIZALnmHuOKUKLCgA49CouHgLVJjbSyI82iXTAiAVvbLUwstCpf+xx4btm3uIHLgf+PXONs1PGc6TzRSsEQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.9.15-alpha.28_1572592734581_0.6709251602585415"},"_hasShrinkwrap":false},"0.9.15-alpha.29":{"name":"@react-ssr/express","version":"0.9.15-alpha.29","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.9.15-alpha.29+f09d8e8"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"f09d8e88a5947611b295d8ffa5ff12549ce0deae","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` at the bottom of the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout script={props.script}>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.9.15-alpha.29","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-uvfdVfVXVoCueuoTBnpgDCnDgrTkhUSPuItTpqHr5qLcBlWnMjSKf0CF++xDlEQ5HVBw/11qXZiOg8ZOLK+Bhg==","shasum":"e01292076c2c3b4c85ecc10bed1ebfba879801ab","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.9.15-alpha.29.tgz","fileCount":9,"unpackedSize":14161,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu+IJCRA9TVsSAnZWagAATO4QAJwArFG80en5obKkX0y+\nGWOaZcpSEdR2ngem25ewqFD7h8Nul0KOIoSCQsnrex/k77QFGII4zrUYNmOd\ngHRSwDUPnU96SrMDIzWFDwhjmIsWDZFaUYReS6u7HZuSnaZLhdnYldrbkPyG\n79GM3C2K71q1L5okFXrv2+iU3Fytqx9jvKj+QkjpGOHNBS9zcH662Y6RzFBl\nhUSUClyPXUCDSRxxmB9Dc+51ZHwLKWqYcUaY+SndLlZp97IH93i5oHZjH/lv\n8ZdAuFaeV+Mrn+R+GlhilkSC6qCN7MPrKSl3mPg3pZr6G4PEcFKnxCEHAjQd\n/Pt2O9vFjzNvtEBKeHKq9SF2BiGH/055b2HpsJfyWE5LvO79l66DsxwiCojC\nhr76ktnN5Hp09BHcX5flYel08YU2dWtjgoA2NhpwalESoMUJBMMMhpZ1B0a0\nENAJ1EiYPoVrqWxGz40d2xlTky/pIrYzZOVZ4dqHkC8CPSL0i4C9j/HGu5oR\n44GbOaLKCGxeNQbMnUO6ITpc6oZdwvXa3suKvjx1IqlZy39NnjXyGA7KFooS\nu50IDZjz3TUiQbyX3cAjddFrU7Rg0PgyJ9QPjafCJ23vVZTumFMC0pSTIabt\nkk8ywYdfUx3Hp9y1hp4qHkiMGc8KBEfdx5Gq7wMLgWcE5dL3To55L/Kp/gmz\ngIm7\r\n=TKHR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCjia19bfZFJpXt//mfJj3vYGm6YFi2SVKdWFbRaqoYigIgaYxLxBS3W4mU1Gw3S5iK1cLt/Un0NMi4kHjqTgnZfdI="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.9.15-alpha.29_1572594185051_0.7709350546749938"},"_hasShrinkwrap":false},"0.9.15-alpha.30":{"name":"@react-ssr/express","version":"0.9.15-alpha.30","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.9.15-alpha.30+9e80aaa"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"9e80aaa36c49113df31336fd1c7128bc7c4d5674","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` at the bottom of the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout script={props.script}>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.9.15-alpha.30","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-pmD0LDljPyoLjzobR5bj6k6MX8ADmgSgmvAMTyZbgdplc+/dZJUOmrE6vBcuODz8+LXvV2GPE0bsJz3bBgOvag==","shasum":"1d00106066a72740c8d8c9dbff803e2cbf4c05a7","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.9.15-alpha.30.tgz","fileCount":9,"unpackedSize":14161,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu+LiCRA9TVsSAnZWagAAmH0P/AjMI5Ow4HqoRxE+owir\n3qMagmZa217O8uKUc7K2gKpFc3Hq9wTdOkLz8V6BMFybzGaVq3amn1DHwiGE\nGF6i/rykJEUbaEzEJUmW5T4ZWd4tFxVHCmTOEWEZCXxvW3/gLfpmnEUKIL+z\n+OEEIGvB3OhpWzI8dQjnlV9HwpCigqDUh2w1sblhHDw2y6UMCx525wR+51Ei\nhe7ujDBjTgp3M30F9D60ZQU7yirsKWtwiWz/8hQX8Rp3RyFlNkAfO/vzNip0\nFsBbG9JbHYZA1GyD7tuzORzBcuhZR/ML7mcyGJOeS2hWLB+wuvNVes5elnRn\nbLmUq4edPzFpUono4uuykfk4yTRhvwguWbSd9HqJvOM109Wmlliuuig6exFv\nt+9II66lcQ9fgAm2XRVwC1cUyX+YrmT+UGSAev/dcJCWOiMiCXmRfPoBk1rg\nmEMpaocFPq8oV5Soxc9+MDUNnuGD0Wd46y043TCb0mqO/D27SD51a/83Wjdl\nM6CvWnxhCYSe0yGSRxSQRuYeqRQWZ9XnHRxT/mWfrx2/ZiuPjw78hVLT4oEX\n1PKhLe1nT5YiuMd+/VmgTmpeQPJhkAeRKo5SR5aFs+ENyrJQ3xucGwf7CLjf\nfWWbkevHIvtXO0ObpKpKSFynYCJBqe5eFCot0RxZpjRSMxNcbNrrdyPkjUOr\nFVW+\r\n=xgdO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH4CwEtdu7rlKFtx4eBFtRiymXNunP5DAcorSpM6NPR/AiEApyH0BSB98hIDHoEOKAhlSBOxAJDeBGxdMi3sjSbCbHE="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.9.15-alpha.30_1572594402391_0.5707436310605538"},"_hasShrinkwrap":false},"0.9.15-alpha.31":{"name":"@react-ssr/express","version":"0.9.15-alpha.31","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.9.15-alpha.31+5c5d9e4"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"5c5d9e47d39ef0497bf51d6da5db3d2f745375cf","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` at the bottom of the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout script={props.script}>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.9.15-alpha.31","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-5zqpEuFNDtitjG8nvOHVy8FvnAXCgT2LxxNk7PSx4TcTRI7afU+S23toNNQn5PSDsj5Q3l6x/o2iO1r7kjlJkg==","shasum":"2832676d8f90ed927538f86de826afd05ff4de74","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.9.15-alpha.31.tgz","fileCount":9,"unpackedSize":14161,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu+PiCRA9TVsSAnZWagAAmp8P/26TeUrCPg8X0L/l5hiI\nOwBRrjKTRZcHvzmVEcP9AObtiTeL5mAQKK2Q04GiKHEgJzZHPvpHsgTmICSA\nSQEyHH8aNk9XXc3Z878pdLL3lGUiJLWBAb4DgqdkimzacZEub6JOuoHjyPfF\neoKc1sCbO+/2wN56L3fIkqIAeaLWn8gvoO/77vGS/JEyl2zzROvH4JGgSLwS\nHavsfrkBC56gMavkBmM1b9PbrnUXUFUu6cPnkY8GCrXJ5jOpfzXfcZ1lx5vO\n/vZXYx8tPhl27Ju3HeORVtMAyHyH+JxMqqcyh/ncihvhNKhj487unMYiHWd9\ne0IM2AnlldEr+Xscw36Glh0bPn2Wrl9ejjRRUtJxOrtQtZBwOypXZ4NiKBCL\nhrmZFa1Y5x3bfH28AjBpT5UVt5N0kaCQxwuhKnYPeNlnjxSw1XwCvocutOXs\ntGmY0IeGaG2nawZ8IQBVBtOAMlhqcs8F1ZpTJ+xCcLAMrQU2zZnQyC5OxEqB\nDXVVbfpg6w6ZRPE011HsHIBRmJ0k+LBl3vsgDWmBausrUmSA24QQrNDHLZB4\nIwa2lm3Zcyk5B8yApfoR4um0b9Yw3aFa49KNuC+uhWQRjrp3XuNqbKLom4/8\nvcslBxEEH+MHW+Vok+3kLr9rKGfqB02InY85X85BrTdPwG7SiLTlK9FP+NMv\nqSre\r\n=Y1w7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA444lhrNrPNBqLmEhsAqY2BVJzPWQ8civMQ6W844FAbAiEAw99Tt1xsTNlX4I+loyvZkwatKyEjAp/XWG5SGLsXYGs="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.9.15-alpha.31_1572594657716_0.5178786815354257"},"_hasShrinkwrap":false},"0.9.15-alpha.32":{"name":"@react-ssr/express","version":"0.9.15-alpha.32","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.9.15-alpha.32+4f35758"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"4f35758e4e2f6238d602f6fe9d8e531810767afd","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` at the bottom of the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout script={props.script}>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.9.15-alpha.32","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-JIbo9q3qNcX/oyoMfQaqxbV1J9/ApI9pK8HQLisZ35x53vTbwiPX9SqNRdWqOV8cHVCmkeXlYQy+jxFq2XPAmQ==","shasum":"af5ff535fac96143aac64353d4527e0836ba379a","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.9.15-alpha.32.tgz","fileCount":9,"unpackedSize":14161,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu+ZnCRA9TVsSAnZWagAAibYQAJf1QxM5WArTyZljYo6m\nTc9/lc3Rz6GcLJsB6XRB/w9dg5JkpVS7mKXzs+ic/gMysVrh8tSWl6QG0RdB\n0K0wxw23NKhRApWImByXRie4zZ8aF0Bjk3rTQoLT2J9fSeo+qvVXcUogU3V9\n5D+reFu3zfg2Tr5uCSWkH6oc3BXLOemrRa7yhrPMaq4QAuujgK7OUXOGPIc8\nbakCNendk/VTBoW1539aksXOtJEeBzW1BxnQ+4lsv/oTaulrh6ypiN1gIuSZ\nK9y0HaPbdbJ+D1h59z2ZcWDMZiFN/NMmt9AOaMMDOQ+lEcK4sH4iQxra1nTT\n58g5cCBos+5Tpri1WzLPU/f0fYZ1DHR0H8As1UbMFqy8FiMviFrV0Q5xbh8I\nWu2J7sK+ISdlO39hsQQqppFYHVh8nLJ+rOpYxKxcxOwoCAqt77VDeB8M6DyG\n2PhxiLanmITBMLxTHwmT0bGfYM1jUeH4UC07lRDnmy5SllsPyw071SW6CvsS\nPf5kpLIEVRm53pyewrZbEWQYubrpoeahE9z9IYiOWHZsg1MPgkRz2TKEY4mU\naj9gCEV+/a53RKIA0sBNYXfmxbMBXMDExtobI19ZUny+pCvwqjcPmsRC6tc8\n5Iw67pC5dgQkbCfnSbja0E0XvQTsDNKKsk/3p1Enez7VyxqHZ4VciB8w8rqi\ndn/1\r\n=HA8k\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEsh0yBHDg2Q4IShenSb037X1mERBfqOIiz1cuYWetaiAiBGwNoRleGnF9UeND/BL4x8+pXhkWxEd2T+gk6FzquQ+w=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.9.15-alpha.32_1572595302666_0.8267820598543001"},"_hasShrinkwrap":false},"0.9.15-alpha.33":{"name":"@react-ssr/express","version":"0.9.15-alpha.33","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.9.15-alpha.33+75d6567"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"75d6567ac9840a103c945b332819c848106a895e","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` at the bottom of the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout script={props.script}>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.9.15-alpha.33","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-nlV4BfjGGhgD0IC4yxA0Gqh6k2O6Otx6r4o+Y038Wuj9ueEffNhTF0OfI6f40a4EIalpDs0BO3Ro7e+hFcdoTQ==","shasum":"454b3f01e7e5763e5a9f7928f91e9747bb18505b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.9.15-alpha.33.tgz","fileCount":9,"unpackedSize":14161,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu+cxCRA9TVsSAnZWagAAqwAP+wXg1laPCrvwcV4dndoR\n2ZOV02birkQJnqbLWHSmHKHqh/zgUvRzTc9JpWqypphT8ODNjT936spGmy0d\ndqi8iKCZTlhkDNqu/2WUCfUt4yK9vqD/YBSwiL02aGKPTI4nbfM9+kv6xsYj\ntED+RbX6ziG9c1HV45GanNZxvT5QefHncFrnJ/FoZ1UBSNvkC31L/qabFMnX\nwuc+V/uDLlP6YiCUSs4r3glBE3z+9lW0mJOdyOKfl27NgBkkbjxFaBBN+YSl\nntE3DmL0y1llyN9iU8gsgrLjLGQgJYcais2msnE8h1poxHbXtT77NBus2wFA\ncmskIWAfSpqsPjZRkDSXEBAxB7pgnqZpmQBc3heAP7JMQC9dlyyCH3vc7S57\nXcOK7Y4h61AGR44JKv8lLHBu6VsSjg13Z28ra5ts+86tkqp0vF5DvgNKpATw\nzfh7CDoES7aDvV0XQ5cJjLhRQ+otJhErv5sy/VlxbBW/B0KstMwp9SBr3GBU\np9d/rw370pAsTbj/tEEanDJ5Jeueu2y9tUDI7mwkDvuqEoMEaqBeixzABivG\nc5dh/QQ1tWYsYSF5IYYQ85QsSL70yoaoBcwHN0g2Ku2kINJywEa7fyFCN9+a\nNMwNJfS/WzwIZAo6n43sThneLW+JqJ6WKJB2SQGRePjK2LKb6XHDRVK2cXVN\nHEOU\r\n=Mp0s\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDBy+xIeNtPb8IvdZ0iwHRDfo63Gg4WXz0NUggjxWMRTwIgVeALyuzG5HeKvEGUXe3OFwvQ295y+MWSomejdfvW+1M="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.9.15-alpha.33_1572595505006_0.5010677349359194"},"_hasShrinkwrap":false},"0.9.15-alpha.34":{"name":"@react-ssr/express","version":"0.9.15-alpha.34","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.9.15-alpha.34+f557939"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"f55793973699000555325208a755770050cae281","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` at the bottom of the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout script={props.script}>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.9.15-alpha.34","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-RLt8Oc30wU4DBNMaMEkiyqRPKLRMb6mxvygu8tEXUxzfof3N+inv/VeRumj+ZS4ZylJbwjRdy90kbg3iFhlTLA==","shasum":"d46d985ddeda777f854ae50110fc11e845f693a2","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.9.15-alpha.34.tgz","fileCount":9,"unpackedSize":14161,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu+siCRA9TVsSAnZWagAAS0gP/3LBhdbSd5CpM1E8S5oX\n3QtukPjfM11xNJfRPP07tMKxZ08lZDUkpb8eGTPKrEfrrM1L6uXT532rR0ET\nTOOVJBEQOekWGsh0mE9N1kcEGasN7VDZcAtyWYe66zcZ2vMt3R0AzkxdjALu\n0fYxd47xa15XnMlBhYQ+bZf/CH+ZQa+WtqAYsDKxTQTHQJxGxNsRPb1oNyk5\npN3bv3r9uLcBEHWbAAQIsHO7GyN+NPPJ5sbvEpwvqfN2qvCnRZCXQ0IvHeBy\nRmDSNfWojwKG64uThN1y2hIe8eYeDVS47fIK04SW7jbDMJPzhEDdD/O+FkCN\n3zcdzwwAQJ/BHFbtiaMtZcMZw7Anj7FAPt6vq6ztAs/8W4A1PvQIzI4reG4B\nrwd+QqTKdC3+4M+KgVRUCO93FJMgoDcRpMBuUT3Zz55PCbtHGMj5HnafQQxx\n0RTONSrlSZHpLWwZnsi/YRZVh/g+etxSiFFeqZyUcTCNWGfmYxnBPl3XPrHa\nyaUWHakYEGFI2/0eyzn6X01fQFg0UsFJgL6+JU1dhMLHWEHt3s9rc8s+/E2t\nUjmFJ+rccoSMV+MmJIsll2ASCwgwUbavbyK7ghmgG40RJbgVcc0A7mKKpGh1\nXERha+wT72P1ydSO+3IOYDFvQmWmfKGNiO/9y8GkGKO7bysnFEb8O9Q1/GbD\n28um\r\n=KkLj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDQMMtkKRgsRbenL2fEZuWKyLBlYxHifXnfxCj+YMG9qwIhALIQpgZ/ojMbm1quF4C1MYKdyFhkP7KP9wdfQm3QO/OP"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.9.15-alpha.34_1572596513739_0.3956610630327353"},"_hasShrinkwrap":false},"0.9.15-alpha.35":{"name":"@react-ssr/express","version":"0.9.15-alpha.35","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.9.15-alpha.35+273ee8d"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"273ee8d883396e2d5bf19a515467a5293119d3fd","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` at the bottom of the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout script={props.script}>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.9.15-alpha.35","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-W2SCbnCpg91J0HJ4nMU3py7skN0uIeqas45f9toBSV08vu7nzcG5StbtzcylQ8M0u965Ye1Jdtgckb/FvJo21g==","shasum":"a316995c3c6b442488afdb096ab536bc39fe5e85","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.9.15-alpha.35.tgz","fileCount":9,"unpackedSize":14161,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu+uNCRA9TVsSAnZWagAASBQP/RFHqA8rQUAbkRf5lBR4\nNAq7X0mS+IviWqHK7bAJqf+z96toFnXlwDztXUZPkxflniXBxHVjzMLris3i\n5diWY+PUOVObiSs5QJgH1g6Z6OnWzZNXk/HdYZ9eSxWPRM7WckP5DHebIGYA\nxEK7wgc9hYux6LPxPmA2owDmE9wisTAnNjtSuwQUwfo/EVRk4oJIWgZnFJ3C\neqgc4EG1iZcq/dd3V5EbR12h2QCFWUqz93Q1OQdfDcnrDj6zEzBrhs3uQU8k\nwO6OV3zQtw3s0nXf7ObR1vabGLF2Yum1RCObLpl7uj5EsMbG3elMz6axR4n+\nv/su3EDQC0az/vHgNxIFmxmd18S9gAn4kWSHJ+bJ8XRfqtt/aVqJWwDx45cO\nqDQgd859tUo+Wo9eRVk1L78sqj9pyFjS3gNo+t+dST47ZI3kOWbMat1+zHQE\nqhfm84BoG8R1JZNG5loVS+XEixl7uxW8Un4HfDtDGlrrkLPUEljcngHD+lXM\n4g9Oa+hsjFQOkuua8krgXWXZzH7Feezak/ik+J/NM1oVZH09PmeWKCqQznHy\npPY0VXFtKhPxrXmvVT5b654eRzC6UKNCd+vCQ7lDLzk3UFuw0MLFCMCHqHOL\npA/Pyqe+69naVUM+/o1glZLAgS0KqtPafx9XxD+l+N0+f8b9C8hQGTqltNgq\npA2O\r\n=op9u\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDWzgM/yxOveCebML7W9Tj9+dxODzhakuq7ZfXEA6v4SwIhAO1bmGKMRNMqjMsIaUjgil+m3WGtodmxU8D7vWq6tS8Y"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.9.15-alpha.35_1572596621134_0.5820013137563946"},"_hasShrinkwrap":false},"0.9.15-alpha.36":{"name":"@react-ssr/express","version":"0.9.15-alpha.36","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.9.15-alpha.36+b9eb26e"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"b9eb26eb8c25423ea84ca85e4621ee85355a0870","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` at the bottom of the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout script={props.script}>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.9.15-alpha.36","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-YfWTPODxNrBuSUibuUy3UcvakFtcnpOoHYx8IXhaFEX9iQmbiatW14ClcHhUHB8l4W6vZX7dVMvGEpLEug9oDw==","shasum":"ac0d56731109631200b28d9eacfcd883f935cdc8","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.9.15-alpha.36.tgz","fileCount":9,"unpackedSize":14161,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu+0/CRA9TVsSAnZWagAAR9IQAIvjgLUJn7q5Gw4VtL1e\nT6UvbretAKtJeA2Z5ujGwk9OkK4kmLNautlkkO8GwI9hzKAp4A/yCY642yaW\ngrfnrd2/tgl9JDsvL9epIwi2+VfVWuby+XUNOqCXdtsPXFt/mINDP7B/SJXq\nXdVVWhHCKHV+2tnKMCgjeouEX76SVxrNn5rzP2zf+M/R6SZdUZwX4lZnOx1a\nFvW1BFjD5xAtcGjzIVjJP8ZZNwGlk4HjfgWn7w932QnEPpx6OQvW4LdZCIbW\nI0Js/uLMiDBhE9SqcE1NIO0Y/EsOa3Swmj+4l2dff5NVPRdhzsy6qNW9ikTK\nO1f3gc92WFevF9V4d7Yg8lgLkOHJJ6DNCRFfo5uLtYG/VJK28r4E89Gu6gAK\nFpCcRKebAu5rE947aDQn3ihOxfDA7C6/gqXjPOXKiknNlWCuC3La3FeuXqLX\nTmUG1feBRXRn6uAZe6ioJUiLPlfWHB4i9GR3s6DHl8rDjyRJJXRRHlqW20q6\nUcLXzq/LzwqJ2UJYamg4LutlXYH+9dBD6woaQdIU3PxkuTgf66//1ABojc54\nWL4lQPgzObWArD3anmOncbnp6KHeRIxD4G3431eYFUz2S+mPgWyCBENKE2iU\n/rK9hxbQ22hhqLtlpcjmg2amH5/D0W3+WJa5EttdfoZ6pXH/cyXNeuVUUSUj\nG3qY\r\n=FmmW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIQDRV8w22c4olQPj1VE3AWFiSw/eTg1U7hwZmVCwvUR6iQIfTDa2jywKwWEcvUtWyWEtKuAhypbkL6xUH+8UgXFGqA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.9.15-alpha.36_1572597055169_0.9339544838953544"},"_hasShrinkwrap":false},"0.9.15-alpha.37":{"name":"@react-ssr/express","version":"0.9.15-alpha.37","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.9.15-alpha.37+8a9d24f"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"8a9d24fa74a970dd252f1f7eab7bb2701c8b5a4e","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` at the bottom of the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout script={props.script}>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.9.15-alpha.37","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-ICYGmpkFmxqtCz5XUNacr59FUOF1ZPZ2k32pNjvd6gOKIvkuXTq3JH/z6pLAaNeqMzfuPL2spEjR+4OdUPeTUQ==","shasum":"01150e154fd9344629f0732b0b2fe870dbc416c9","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.9.15-alpha.37.tgz","fileCount":9,"unpackedSize":14161,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu/ETCRA9TVsSAnZWagAAMUMP/is3vMeFl8E6tDN38Nsc\ngoWZYKhYbsaTPPhtBbk1IQlN21gwR0OrqVdctrYfLJtxb+ZexdF1SUF5N9v3\nMQhCPwviQOPc6G4g2mH+7JsFHQ6PQt38WxyR80hsX/772r7XldG+dBwr0/Cl\nzax09ZUBYhBq9TGdiC5EB65YFiROplnljnLCj4+MRFdzcZPlCR6dsTpvYR6c\n6Fa8B87wwcTKzRAuU12BZyXJg+xpWxwZFs+i0GVuZc1SBtdCs9sjeM22mePV\nuaIVJ50QVhKM2kbwy9sjJsg+COF8odxREwPvfkaGWSG0OjaI2yvlgML7cTga\ncOEyoyJply+SmEn3IoNHooHZiNsjCL+pcjFBGIjj1rUqN/2dUer87CZLJw/2\nXr1AczBBmsXexMPb39WVyHfZEV7v68Ter0Ly6NA47sEd0J8JiqLN0UMvFoG2\n9kbnABHmyxrwL1YuSYsUaPzPyEQy8tLSI1Nsq0Wz2D+oHAvBajpbQHYS9bPy\nlNdULOZAgfkaL03kna1FLDWSTPItw0ZlbEhDV4XnWx6ZYgPYeIghtKvapAo+\nHTzxYYSOgA50EOOMKZXOtRAvR5wDJf6AOR242xq6mza4mU6eo9fIFH22gcr9\ni4XbJBendXrzueDgLTA4KpOrP2QdDpDXsQ0XhqLZl2ejXkDaD7DP9LxJlAlc\nslWJ\r\n=e1yZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICv4EF4vXPeZtPHP2ICGbPrt1jFoXdUHxQZERvt+M+mrAiEAgT5Lmrmbj189VG6oFfuJkbO7i5Lx2rSgXyyyl+2pQCA="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.9.15-alpha.37_1572598035065_0.9608764896944044"},"_hasShrinkwrap":false},"0.9.15-alpha.38":{"name":"@react-ssr/express","version":"0.9.15-alpha.38","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.9.15-alpha.38+65ca758"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"65ca75802c648a649abd5e2103ac26f919ab5b78","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nIn the layout, we must inject `@react-ssr/express/script` at the bottom of the body tag:\n\n**./components/layout.jsx**\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const {\n    children,\n    script, // passed from the entry point (./views/index.jsx)\n  } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Layout</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it like before:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  const { script } = props; // `props.script` is injected by @react-ssr/express automatically\n\n  return (\n    <Layout\n      script={script} // pass it to the layout component for the dynamic SSR\n    >\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout script={props.script}>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello Emotion</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nFinally, with custom layout, inject `@react-ssr/express/script` at the bottom of the body tag:\n\n```jsx\nimport ReactSsrScript from '@react-ssr/express/script';\n\nexport const Layout = (props) => {\n  const { script } = props;\n\n  return (\n    <html>\n      <head>\n        <title>Hello styled-components</title>\n      </head>\n      <body>\n        {children}\n        <ReactSsrScript script={script} />\n      </body>\n    </html>\n  );\n};\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.9.15-alpha.38","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-ZjnJgRMwM8YgdZ4sQZM+pKYbFlDayEpugoYBRnEhAb+dX9mdMvmMLzqdQ+XQqb2RINoyA6eZxLFA1bHm5kuqUQ==","shasum":"1598b968b18634af516ba9c6b57cf732570cdfc3","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.9.15-alpha.38.tgz","fileCount":9,"unpackedSize":14161,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu/MHCRA9TVsSAnZWagAAh6cP/1ytm2/YOOU1j8QZOlCQ\nsfptP/XnOiiT+yLiuGO7H3iAkNkMj65Qr0z0rJUzxNAWWoKrmwPr9QaIQykV\n67TQdJD8g03D8i9miBDNHeZg3WJP3vYNODDRrOzSiQBb6M8pKNhrgUvRBHNx\nZw6Uo3t4akAkHkIZEKDfEisjJ8U+5A+D2zRqQzp+ZGkrOJjejRA1I22fH6Jn\nvedygzVdprr4SAa0hJd0DzsAsUlUjEZgXHIEKE9SVFoHYlLLEZrq2tFAKZZa\nGBOMR1t5jst2IZX6/sdJSONC4qm6mOmulG66f40eM5xNQF0WogFwBnt2Gu1n\nBkMncq8QoTACFWdnCq0Rk5DLdwn/llywoC2WtvA/UOmZKiyIWsruQcKsyHFb\nqp3q33O+A8XYVSEq1OKPc40pCTNJj2IgIBDvewQCK5E3rS1MhAzN8zUjs8T0\n8w5gTDGvzLJV3AY/F8Z32ejOE3LlF90erbyMrgWg3oKP40Bs2H/sW8nrx+Ie\ntafrQqfzoPjswRdLZYnfdXUMSgoSkR4293Gm6mZfVXod28rCsYC1q92jlFcr\n0HtRamcEMj6Tfc2sG+3CopkIWOkRCejAcCCH6MxUxyWcaPCW/RIzTbSe79pK\ncd2U3yyjP6HVFxdYHdmfgNPXmHrSAoN+MX5nWi0Z/W5pr+z7hFit16NYMx5S\nHh2s\r\n=Q3zz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICT+GopvfK6T8LtysVvqq3LcEhXRn7vlmnaAJnwUOcyrAiEAs3RQKpv5rqfnwePODx2+gOdWNRYpsiJV+5CKjhkEDmI="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.9.15-alpha.38_1572598535374_0.13062672571669864"},"_hasShrinkwrap":false},"0.10.0":{"name":"@react-ssr/express","version":"0.10.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.0"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"a69c365141af97c8516a0af0a1180f1f8842a311","_id":"@react-ssr/express@0.10.0","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-FPbUO7G1On/8CNYWAIz64rhurc3TH3XNLBPR9g1LjND8Hku53n3a5jZ4Q+BgCmMTXDbv5vK7METVbc1/n+dqqQ==","shasum":"139dbfe4b6ceedf8f8370bee5463bcb50532ac99","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.0.tgz","fileCount":9,"unpackedSize":12835,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu/itCRA9TVsSAnZWagAA7x8P/1hayBx7IbseKXAfL7Xe\nSwfB6ATsxXYOVHsfCZtt2G63IO70Anuw4J/SlURLK8rFkW8qA1E4nVi/k4/8\nzr7hLI//5pyencNkNBL2GX0ZkkrsAFIkC3KNluxoVZgPRbBYThUJyQd3iDwk\nWS89CS20r0TLARpMK6N9pMVk6uIG2RCy6wE231Ndj3jMEdNsMkeBm7glhUbj\nsrkA0bDJxC3wNiNSx0ns4N8AZmEPQjqZzsJ2mxANdD9n9HqqOBw5n1Dn+E0C\nLVOKgG/t0I3NXT6YWE7D0+ya/dhdidLKvBxu08+7sox9P0irmmos8YrYeQaP\nhNUr+dpONTVPwDoX06ei5YRf9363gQnRYwFnrcLr0M8pypEt6/uUS67In+2o\n/WFGpyl9YIQzDtPHV6ZpdVWdyyD68I4VY2ekZtPdjj2u9L+2iJKPwWkXzhmT\n+U3ZhB3iCp/fC27tHUPLQKYVfesAlqefiosGdA/ZC9icW792oD1CbfS8zsAI\nOGrqavBbBWnBtIDl7Mu5JycQwOStoPFAiKEjUhr5QQIgXvhqxbhozcd+A6kz\nJhoV8NGmT7GrpAxXbN6viiteRzuhdGLool5rXDwDegP9gZhf50qN6lj8xYxr\nkV43ZHzmr2+lW94kTHYjmxLXApNdd0Y/SrnBhvMclnasksPlwXdITewLDi3E\nKhIM\r\n=dgd0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDLxjZySDvYHY1AIjKDrqDsKXiNTdlzrFU6pxmqjpGjVAIgHYA5gQGSMiXLtXLsfdUZfw8TigHjRhEHZ0CHrPyhEqw="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.0_1572599980764_0.5293417960201225"},"_hasShrinkwrap":false},"0.10.1":{"name":"@react-ssr/express","version":"0.10.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.1"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"462637de5dbf036f7aec9e8cbfc842425ff89434","_id":"@react-ssr/express@0.10.1","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-y0m7nmSWzIgRJunJqCphDSKBiELRx18HUBGI5x3AsMNjAfQfkflPD6AGtOyUs5iij9D6o9G2fFPOc51qpf3kuA==","shasum":"ef763063acee27f3d1c0a1bf0192a248e415623e","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.1.tgz","fileCount":9,"unpackedSize":12835,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu/tSCRA9TVsSAnZWagAAwMIQAISrWjsbzFMApUvLJdTb\nZTQ3Myk4DQR8l18927c6NnwpUTk7HsGh/Yj+rIBtyAgo4yBHoymfn6GAL99q\nwA0lphQVBJGro4qtLhWCPL3Nev9kPbk+YkqSQP3mvypsyFThz2tB6w+5QTrX\nZGfCVuTeB5gYlUJsaBGmIr12+qFxIOX9vXsl52C1AvEgyyLUfh4pS3dDmQ3Z\nWZpPQZG3SnqdczsoZgjMni1IoEZDIk/VCGRyQZlmlsv2bKB1Yl1Vq8ekp3ZJ\nF6cNPExpNh2/PvSlIOfzWFwPtDOXGD44etcD8ivgOc27adcPrpuS4V0jzCeL\n/U/SsacdfQn7KE6D39Z4IK9DNIKfpFD2ny/iS+nV5UIKbhQXlTfZ92T2xa0y\n78vo2G0VXsDQrb3y5KfNRt6pCGZ/TZwDXWhREiGSOKkjnNZrqUozNe2w8/0z\nEPzccKF8d/kn+CBe/vq3MwZ+oP6kSQzQh1FYhZ8DwRgOm52HahC1/XIIYZvH\n+dRhpN7Gfuh6rpA79Oz0gYMAIh0vdbsHJ0TXXhX0xvgxX03uGnqLcM4dl2DP\nm43RfHIEQ3XxuFK9a46CSZ25dRnfOtX0KULAWnGLbdnrkQA9cV++peDecFKy\nrLThy44IaBQQ+RmAoe3BQ42G67b5XusHd9P0q++fw3NptTQnBVej28R/V3wY\nlBoq\r\n=13Fj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCjFgRlpkhBjwccY1SXQvx+N4e4zhecgsgI0XnH9Y24ygIgXBLS3ZOJS0CW+qjck5bJraROZ1Qmq/tVc+eoKDf0EAA="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.1_1572600658260_0.5024766424546461"},"_hasShrinkwrap":false},"0.10.2-alpha.0":{"name":"@react-ssr/express","version":"0.10.2-alpha.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.2-alpha.0+b5a235b"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"b5a235b9e1eec103341354d152fc86862912cd41","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.2-alpha.0","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-hegnlv03g9vMLqG0mBgsQ7Q0LpMTm1cxNxzj+/pSmmWkANbH1oQVxxm/hihBQ8boW5unmpkCL6n+OGdCKwgoYw==","shasum":"e9c166107a2072dab525971c223af6717abd3e2d","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.2-alpha.0.tgz","fileCount":9,"unpackedSize":12867,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvBskCRA9TVsSAnZWagAAtjgP/jTB46Esw6kwEBqj2A+p\nlmqOXOLktRJckmzRWSzq15IfLqvnxdJnff3B6OTW8+FlQsHfNfUEdXZe7KQr\nf7IsYuH+nJwzD9N4nsVPOMImbQ/3EgKsKL5JKhSY/Q/A9ebYrLYVl9Iitj43\nIOBikqbsvS4ZtT6OS63J8ZhWUqwIDB3uoLjx+Ra1cu+397m0NVYaUs7voXgA\nNrrxb4iOYfENVW37GB10s9K9M8FttpqN0b9zNErNrvY15o1+h7yqmx9u69r0\n3EZ2l9PLYoczj/TXuFUs07QfvBh6r3C5lH7eN3mGnvMZ/Ba2BAomN57dY9HN\nt5G3K0iSdUEx4WmxBm25XSSl4ie45zYseBDu8f0THyxy8sXKoEfS4e96BfD7\n7cwI+Wow8w7rpfiUaU3aSQblyJrItTDxRU7zi9O2SEcJeV4zlDsoeVXaSSVa\nGGYqPpZoiDlTamehPjXTatC6rmTFIaKsgLZkw9tQOmezV/HjI+goWitarbDd\naBN7yJBMBpMmBDhUvGhsOSJ/HqABI2l9q6otETxXVahnEbFTMjt/s4m2fz6c\nlfCB/OaMAPOxgTTGvkqEWDYJHQBxE7VZC6gmRZ3H6Ps4bdm9P1/S6UK3nAt7\nzpjdE24rHqU+afehR2NQujtzayHmpjL7ulimYlIwKInSOku9zpGU9CT/6LTC\nTEO1\r\n=Nz3+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH1COqMBZwMSGMb33P2b/H/IWSKGBacQ4uFD3XCQQVpyAiEAo8vFc/tYkfC6oAijkPnFA99XHDZ6xXmEuvl9kK53kWE="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.2-alpha.0_1572608804176_0.5216735410213813"},"_hasShrinkwrap":false},"0.10.2-alpha.1":{"name":"@react-ssr/express","version":"0.10.2-alpha.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.2-alpha.1+be74df1"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"be74df1b05b16e41c2946c291ffae3bf2af77371","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.2-alpha.1","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-7xejtAsHWuGtFFr1g0XyapDRCOxlz/GCpU1/iEeDQ9o//144z40DTn29/iY+XTbR/i1en3B1IuFmO2IZHKTtEg==","shasum":"9f721675e7764be710bca3df1dcdaf822c45f0bf","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.2-alpha.1.tgz","fileCount":9,"unpackedSize":12867,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvByoCRA9TVsSAnZWagAAOrYP/iekkH582mOlztUojdRu\nCEUOts5vePm4PlCVcWUo1Rr6FkgkRiPdgW2sC2z7pWuwDLWpfvz3yBR4q8xv\np0tvGzwuF8iC6ooUPr5BwXKeKc0XvOt2vbCtMWlB5IXIXO0mhOF6BMvgzBZv\nXNeg0j5WhK6CXkNkyUNMZnn+13dgprwPaXwVh6QRwBQOTc05VKrn+3zeFgGM\nlZiJJq0+OKZ5X2cVpHCjO1xcPZmzOuLF9rD8pet6YxxaGrdUS3hYO6FIYc8p\n+K6qRuh8C+BsDUtZi0Knf7IILUPqbq/Id51WVR01eMowbeJhGzvl4Ees7G6g\nuGwTi4c7cM8xausjeFWI3gILuGZGztH8tY5Pns8LZNYL6VZeFmFA+0lGKCk7\nH5vNBwgMGJ/bn6qiWdaum2S8bLTd7mogSnpLhxYS54wPkmCsRswZicUHFNQq\nOhTXUyaVd+fFLz2Y+pn04KbbAmGM6ZHaa+JVquCi+FQKLtRYY/0lBmrajxz0\nAFALj5u7fb9KKAIdJo3UDon6lDED4Nw5O6DpKx+hKDFmwdWsVx+boc/zHUDK\nJyZbtBnyfx+90m0PlU8Qpyg83ZtsLHeDKK0lPV7uPl6bdh8wn449j7i8BySr\nRmkClwrU5unpPcM7P/TYqdGrlfGqgeogWKMwSh/NJChpEsULlQQUpKLI0ivX\nfoQb\r\n=6DLf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDOqgWvsM9TjLvWrMEccfU0YP7Qz1joR9nVFVkY6zQkagIgb9DAk/S2xxIqG6liZu/9cLelQnbCZEZlRGTZEC3asq8="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.2-alpha.1_1572609192224_0.4888844000693473"},"_hasShrinkwrap":false},"0.10.2-alpha.2":{"name":"@react-ssr/express","version":"0.10.2-alpha.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.2-alpha.2+b11136a"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"b11136a94f700997aafafe0de24dd54418481470","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.2-alpha.2","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-x8P0qoss7CpGjhrD9bDM9COAYoPeULH4fOslQK5o+awb80EHHL+TewsiApbNuvp4ntduqZAJNrKygAbz17rxsA==","shasum":"0eaca165513cdec1399fde48efeb94262daa9efe","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.2-alpha.2.tgz","fileCount":9,"unpackedSize":12867,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvB1hCRA9TVsSAnZWagAAMLgP/iMwUZdVr84RPYlXT2Pk\nubDmwze5yGkZpm38NLqqts/9W2BM8BOZwe/xx5WP4eyUtLjM0okTfJPNWN0q\nLVIM1S0C+bAla5dHxyiooE0xyKvAW5mDwk4ioiiaY7eIRYZYzkIoOQtyCNow\nVLC+AhUaGToGjCR8W0DxKDk9sKCankiDaQF+hfg22/i1BGgUHeXq8Yhq63Z/\nawTVJarEWtxFpPZdZwlvmdaksUPllHhhO48HZA6rOrkNoADpPCgxohL7rax9\nKBPsnyj4vdTTVpUpP+gkWoUrhP/ZRTFY8YpYqqlBmB9Z0NeA20KNOGlC+vWE\nji3mM350SjNuLZoJzLvDf/ZclOJdToRqhoy4Of5HSKTqxVaW/hTsPR0s0Q+6\nss13dlT1TGBmuPEzfsjGUBkTAFsnbcuc/6pQF/WnDukgQBfNAnMzfaGPlOis\n4q5umC4OsbIY7BLX95wlzUwYIWRKvgrrpdC0tHCFG4t+IQoTllT/CJgV5XIP\nxbYX/SU55pMc6qY9iuIkqP3Q5qvpQJA00Y0uRn+wdj1++xlJ8VhlMJ6jNKgg\nPJnLpoMT/YKsifOzz98rqlh5cC3+O838BTvd6WvQi/YwMcAqYUW6kEc887VO\nUulocf65WAYiaqlnzvUnjBdvm1GTIzXJq8JPTA5Y2yRDHcq85BLHFivGnNDc\nI3Jo\r\n=99Kg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH3HE99EMfxQEKoxSB5j2DjAA/77suCKuz/2IzIRG42DAiAQ7gCif1bAu+Y4FDRnknF1eGTvI8iVktU23sETf4VivQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.2-alpha.2_1572609376735_0.09489809876663235"},"_hasShrinkwrap":false},"0.10.2-alpha.4":{"name":"@react-ssr/express","version":"0.10.2-alpha.4","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.2-alpha.4+60d80d9"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"60d80d9837dcf6a91aa5dc0d5e70b5ab183740c9","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.2-alpha.4","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-LtUGMnGEtl/mCXfguQPWr/N9JvLOtpIbIM7T08iMT2r2rk41bwFheNCHNXxNW4tQcXBCm5VtIggD7ll3mqdIGw==","shasum":"3677ae7a633a2488ba44c4ec50e50b6060b13810","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.2-alpha.4.tgz","fileCount":9,"unpackedSize":12867,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvB6ACRA9TVsSAnZWagAA1ysP/3OR26vaUunYp+MEExES\n4BH8trHlduhZiNqvpHQglnDNuP+NVWvZHIq8tg3CLmF0um1tvZlhSdqtYgri\n3gEmtcKBuxLgiHDHkALRSGhaknUZnzXprlOEacydLucgYz/dXqj8AwpLtDS1\nTK3v6x0SUeQ4Alp2C7a59qwUsVHfqp5tsXl0sm6bgBMKPRE2aytjJ55Y+yZW\nbBBs4BDgal1zFK8GRDL/nMUFqVSR7TRErND5e/cb+VLQZVxy4r3r61j6WTPs\nI8B90Z3Y8OPFOl8aeae/yYyIxA5rSPQjtQrPBH9SNE3gpEhTsoFe2MPfgM7n\n5Y7Zz6Hx+ClTJuwWhgr/1DeDUkcL6nsqXgzwGCxdAI0kPc6ZG16LkqsSFAUx\nHoGKH/k9om/h7+qsoJsDjZO7s2JNeCX5+Thg0hzc+dv0Cat+EcTfs505YYuh\nI0PxNPDpomNR1qtqzBFRSQJWIb3CU6wG6YCrt9TR6arhvhI6hLkxh3LkWe9Z\nysbqyCuqQKPcAGvcZMfdU8352t5u6Vk8OlerOjgIB6GQ0CtzjY+2Kux0vfxZ\nmejyEsmNMmHXFpfiFvLwozmYb/p4Zu9jiOkyyBreLa5Woivgsq+srS/ei48R\neccHBqAO1fkyHmWM2e0vGWyQusojRa2KzChm0HHiEC4R7SJVg8PrgszMwhJP\nFawN\r\n=tyaM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDZz6o9zH90tQ11tUx8McS3Z8fDNcey+pbtOQg7EGdp7AiEAsp2WqFQB574WL0JfnKlQnJb9bQdN9aP7W4PgXm0h6u8="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.2-alpha.4_1572609663987_0.794613980613295"},"_hasShrinkwrap":false},"0.10.2-alpha.5":{"name":"@react-ssr/express","version":"0.10.2-alpha.5","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.2-alpha.5+b993847"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"b99384732aa411b19b6f546ba2c756d6280d0e38","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.2-alpha.5","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-ImosTOVp5GjOR7AgMKrD+nn85jcC3TI92bRQz7yD4yc3kiOM0JekSKw/A01xlRCGOEBzKDK6rRWmpHlW710hJQ==","shasum":"c7fb0e3cf0b9aef8bcfacf26da74e7abce298ca9","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.2-alpha.5.tgz","fileCount":9,"unpackedSize":12867,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvCFHCRA9TVsSAnZWagAAecoQAKJqtG0rLvb5QMpCMjYd\n8ksicmb/q8B/rmXr2HsuCTlnay88YXkVfgwtYAMqsKDAwVsY8geidMTSyab9\nN1+K+rvMPpmQTWA/FRg2XQdGKUtmPAMo0Io5FbKjeFa1k+hx4h/VJJ/j9Daf\nwo5CXuvOvHHCgdF+huxYsbM1AmVtqkSwRv4OkIWKCGzLWqBKudorKLXoyhf/\nJ2S0icP9W/vmhmuoBB6hPFDghAGi94tuMFGeMVBh5XJVv/hcD5hkuNmWgljv\n9TcPPizENEv4eGkfxoOOW2fBBzsElOPMesv4gGlRIdXWJWWxqd7ANssQTCzg\n1Rlc+y1buoE7Bgcsookyw3CLUryyaOriUNOaQN1Z3tNXCdp76SNTG32RfCsK\nk9pWxU9SK6AbFUrfoyHzH87KvaTWIxf0nEu1dhELojVJcsJ77Un84UbkGbCJ\newynHZZ/njTHTcjQ42LlRMkCFL3ktXFs4E8iIxnxWKES/eWFUZiBBnuhFpHJ\nFluntIkH9mQg4dZIsHj30djjgfEsiLL0d80Ehfzngcy/5y8rFyydKFQx2dri\nkaj1cF0uLurgCo5zM6xQ+qc6PfpYEv53e94c6fvX9TOzL4qnb1FAsZQne4Uy\nFQ+smUDV9nrKiQaNqO/C1hwwOPanE8TM8RF+R7iR4xIMt9xfFBLHjSjq8mA4\nsnvg\r\n=pRtE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHgGQBOcYqems2Aywlvz+kt6k2N9x/A24wVjierJJZF5AiEAp/c/9q+w33UoGO2M9irDHCrBCKpOsCTpd6jDDwkqY54="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.2-alpha.5_1572610375426_0.8422419838499364"},"_hasShrinkwrap":false},"0.10.2-alpha.6":{"name":"@react-ssr/express","version":"0.10.2-alpha.6","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.2-alpha.6+8e1d0c7"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"8e1d0c726f10013b7ff662d2d8551ed9fad70b12","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.2-alpha.6","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-B2sEsbr4XyyGnjNmH5Dct7HYAsJKP4KS48GtsBfkrrPTOmfXPaFm+V82gZJL+y0iQ9Fz9GK14vGiGhLVqgozPQ==","shasum":"151049d98a42aa02a7e0ad42233749b0f670e74d","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.2-alpha.6.tgz","fileCount":9,"unpackedSize":12867,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvCGoCRA9TVsSAnZWagAAS9UP/0ktYrwwyAFdb7HnQ2iK\nKlwqtreNWLOIZn+jb3N1a/UuFHtpNKubJzWxSYJZk96KwAJv59hEL5RO/XG1\nKl4DFxAuW8HGiT8mVU/fRehp8vCNKq6LdvO7Akp3rOOW9Z3VzEb8P7uUE1NH\nqwFUz9A0RAsrHQuTor12rwPZjqh3ljyV6+xBs9B3/g4yAqt2hJL5JvHOV+EW\nlLGQaQlv1ckufOn22fa4DZbm8tPWGwFkAV1aBWyH7LLIq/IPwMUE7E+5wc3Y\nKPX11giBkmvfyIjO+ZFzaYnO24qDYybr94XlmnJz33Vnq0sWI6sWt9MUn3bQ\nYGSxQKyI0fxGYZVLBnM7IDNz0o7w0B4nrHrQpmFqhfRf8NzxUgkSP3/npTk7\njwY3Kgbalehc7Vr9eifHOApeStXcgWsHlDGXROqAvzDZoyWCAby0USJ+8lzR\n8tti4b3ftGUZ5T6s6SiDsPzBKD7Jr70gWOH/F3x/XSNHvYxlBIUiN5+AvebB\ncQZkjUNWATycvwGiBjJr5a4IYSPCEZdCxKzTfD8HNxI0PR1NA90QuXwGD8Ox\n9lLcMHde/ja0ppD15eMAvgfmv7sxkQTsrTwHUO3x/17EzMDDytU4MgiEyW6f\nqhFfNzwZ+pWwQ9ayTfGEFOPqe8Vbz8zmSlQtKfgEQI8qxiJ+xZ0YaopXD5s5\nq1lB\r\n=f2xt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC5gk2VlGSh/+n7BSee++yUpDJdcK5CvkJVuwACKeiu4QIgLq4XV7VwAYIjTkruQIgh6in09+sQfUfAKHMgcTCTPpA="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.2-alpha.6_1572610471944_0.6604646832038994"},"_hasShrinkwrap":false},"0.10.2-alpha.7":{"name":"@react-ssr/express","version":"0.10.2-alpha.7","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.2-alpha.7+7b76dff"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"7b76dff0b63b9ccc8169a5c056f0c53dd3345dbf","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.2-alpha.7","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-idhR5V0J0U1R/xBzLDn7hql6YBsGIb6udx5TPbWcQxpF90Tn3nEQQzhrLrCCIh2jV0PHHXYPrtRhWDL510xhUQ==","shasum":"5d797203caf1c76b81fb3fa28fff70930057ed13","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.2-alpha.7.tgz","fileCount":9,"unpackedSize":12867,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvCL/CRA9TVsSAnZWagAAqGcQAIxct+xRL7Qmkzg1fr9V\nH4RhwjP/ionjTbk8+4hD3Fh29lSVT88DmZeLR/GplkW/sidMJvF2e/YbkMO7\nHjznm201GpPA7PSt0+VGwxvSoHcIyXQxpjtdVUhmt9xRBhXDmDb2vI1XraU+\nsBME97/O7+iE+wjqRISJof7RmDVQEufTHm5wQ/DZzAcyUPtggCbQr2AvLhdm\nUUSomYDpUJhFj9SOFkabpfeUIisU3WNeuV72TTpV05xCqchUDZOdjYCTPxl8\nvVyzbxeOcXrcZY+XPSeVRw+6QZRE9V7BvzJbkbhHCNOVANsfeDjuCMY4WuqS\nxl2sYuDbfpfnzI4CuqzFh2TlY47B4LfNWyRV3CvPEtLqQlTBcYmxpXMNz5jP\nGLS7bvlDgoUFWQY7tFHXAIfU3/AkLYs7yYCI3f66CV9cnyCL8OeJrUU2Stqb\nI5Q5jadMhbFyk5PijQRn/dvwBBynGFMFkP94LfmGCNjs75oNJsp4Ni3Dombg\nqb/cNZGZPKjYnvCbky0RGDWhv0U15F3CK2xdueOeddO/dbuK7UxXAH5vwBNA\nq2Xmzj8KNjNlIizTWqQU1oPDrBg8ue8KXUiDjA2J1mjY876IEuSyw8MNtwGu\nutpf9GrpIbX67JAxu9lSjIVQ46INYl93fJGcX7j23lyuCdf/kUEUEGkwrNvu\nCq+f\r\n=hKg5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIED3JNB9V/PZZYwRrQK9fB3wuAbTmwRt5pEg/WouPQKBAiEAsXu0yPtEr6Kqq4ZEk8oVn1bnwdW2bswluw9nxMNmhws="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.2-alpha.7_1572610814637_0.6317106676230295"},"_hasShrinkwrap":false},"0.10.2-alpha.8":{"name":"@react-ssr/express","version":"0.10.2-alpha.8","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.2-alpha.8+f0cbb15"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"f0cbb1593b46d05b530d44766138ecf9aec5005f","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.2-alpha.8","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-lmFSieZfJbqlklZ8QS5b1bWidV2r/6esJu5fGveluth53xbggjrSV2LGO9++C1yiQZJ4lN9tL3zZ/j5uQ/fuYw==","shasum":"59ca613c3f79189d9f6c90543e51dc184e545337","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.2-alpha.8.tgz","fileCount":9,"unpackedSize":12867,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvCTyCRA9TVsSAnZWagAA1OwP/0Z9QO0mhStKvv+5cYwN\n66Obf2V5HIJTmfLacy3kEdiN3LdcV288eYpGqFq6uQRCkIXBkQ1byZnRLtIN\nsYxrM8g+ieGr+lIeY2fM+Tx2UrH/rZmmxqJl96Dy2rhjFlHgcqm9PbBNLRa0\nRw57crBl6P8CRqAkVCmG5wG41JZxmowqJXVAhRZ/K+5QbFS4fEnUuDki0hWJ\noIBwyj0HRjK3CnUyIfuIIndWK3b71Hx7LE6fQD5gPcucO2Z2P70ynbtT7xK9\nND22udKprRlHwJBbvrEMmtrHgb86EZwBPkP743oSlZprHe+xok/eE7RpboWb\n7AbPC16ph2tmVsUeSXVvww1sNmYZ3qbBjp82F5W/ogZ1GrbJDEyfbBjXWDLD\ng70FRD/Oc62fgrAvdrieEnCUe2ZMLo0d0hgZHqCxWoEqSPyLQALyp5tYBaZz\nwoHyxu/9/2mcA/3EsNc2Kh//Aaomg9U1dHv8oeJxHkz/kXkxB8COwpgfMsyA\nivIbEivuPoQu8JlQt9CDsNqUg63ygb0ZxwqHzZ5sgFTPnboA6YSwjj+Aq1y0\nCOQOJef1pip1Lz4wjPO5b7iF0ZSYu6hzyBhjLNu4bDqttsJ/pfYszQ7gCgJr\nkS6oBh4NbjduUhXK05GF0/6fhirHFrdaUILttJGsJFD6GMcNR3EgUNmwd3Od\nRtRr\r\n=pCA6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDn2Gb/J0+YC2tRKWfvQupgCCzEtTfMlSOIeMgilMqdkgIgRDIZCIKOwXdfel1G0UAPjb7Q6zdBFXvgYufaocwSV4c="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.2-alpha.8_1572611313876_0.027429352953232122"},"_hasShrinkwrap":false},"0.10.2-alpha.9":{"name":"@react-ssr/express","version":"0.10.2-alpha.9","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.2-alpha.9+bb9eeff"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"bb9eeffd6fce6c2b94d81308cfad777142e506c0","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.2-alpha.9","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-RPhgYe046EhcQ5Fj8BxcjoNQmz4nSp3nL1FBTfP41fD4pSU78Ns12I4/zQ8RbqSPCaJj0HDLD9PMPFbrmCk5bA==","shasum":"9c405c8b6a82b1de2883f8c77215f4fad14959a9","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.2-alpha.9.tgz","fileCount":9,"unpackedSize":12867,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvCVmCRA9TVsSAnZWagAAX2MP/i09W7erGCIAhGo7/Rx7\nutxl5A9wYgoV3mXfO2GPlv+KVvKGVZwTuv7uiK205Xx31Bg/qhBa7D3Uq5Ga\n6ir7uZlbfuvvxA7aOZOK+AQ6iKWOLUq58/of/5oessLb2zBE6EFxI6XwGkoX\n8ejQ/itTj5odfeuyDhCSHFXy5ClT1w+73WPUnULsduKv1quVYm28hgntsjmY\nVfd0uFPXyMJ++I5ruGDecRQAVS+8mQxaNhV0KqTSFOYH7IzFz73NgYcGBfH9\nnQQzQMviYJiLI9SxWHv6KEbK+kquOc44q8NS79B6z9Xrz5AZnf+ghlBHvwnm\nEqCgriYEsNjikYd2g7BTJy1yYJ/B/whk6HZy89hrWaX8R39zvUkERRsfUVIp\n6yHWlwSgK//obu+NzpRxiFN9K2tmj33H4ervcVbISY01vMErvu/YT1NivqXV\ngT3JRDxggVylIiJXMzXo+FPR1dfnkMN5zJY3xDWjqp7EV0yzF+lBCxyYouV+\ntw53f+5VIKFa17cMLPzeh8wLw02tDbW/c9i5ZQb5YU4iPkfzfe0K840IZfGQ\neELJE1BWirOr/fqaLC8o/6ee+Wjl3IxIjlHEJ0+4komUBIOwkpl+UcWQVsFq\n338mTbEBUBAmurTqTVkX2172jOu4Y3gP2T/EJXmUQXnVAkzhu7glsScKSNKY\ne8io\r\n=mEIU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDMKA8JMjckqIg82F8mVcJjaXqoZtxOlfW7UE/qzAOOaAiBwdBtt02r74atmL86AnhXG54hiEhr1KLsV9HmV4l6rBA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.2-alpha.9_1572611430214_0.3132082460097043"},"_hasShrinkwrap":false},"0.10.2-alpha.10":{"name":"@react-ssr/express","version":"0.10.2-alpha.10","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.2-alpha.10+302f30b"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"302f30b7c943fab1ff43a179a739da66a53ec293","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.2-alpha.10","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-joG+0Wlr0agDHOXqnU5LbJPVj5ydvarLfswMLo1A1EFH8HQ8TfXdIX+H0BxLpo69rXI6uQgvVgf/J8VLt200YQ==","shasum":"4276278d572f3ccce279bae687402f885fcb7856","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.2-alpha.10.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvCXiCRA9TVsSAnZWagAAoXoP/1uFgEV0TQJgXW6AsfNd\ni84pGv2cwsCn97VtG/HXdzeISlSG/9GCrxiSSAHIqgHBMGOP5Ytap7WEcPBm\n7Ig5kRW+tgqH14F1rlVNj68x1Usgg7yaCNmbN66yheVpL0PXWF76jWvwS3/9\nF2ujYKzHmy5JsKJddheW7SFbVvwlmGF4Usp1/niWuwTPgMG7T1CJbMS3fJOc\nlhnEf8yoR/VH5uQSEbr/oh8rm5Z2JXuc2OFEsoG7SDSfLwVI8/7MxFh5H1KS\nT5eYqeRbeUpeUWl/yZSMCtBqssPhhRIQ2xFTufuWxe8M+RRgDpRrzqDWJK6L\nymau3HdcU4SrjGuCRXF40+ekYAkCtdkw95T0+OZS2A6y1jVTAge/fyxTeo73\nAnhBpieIAXif+2Zb2WuXjrn7GJSgEZC+J/OX1DNxasI9ZYsUJkzD2tfJhsTB\nrRNaQGE6lKBVuHlNXk8/EcjkNl7JYsOzyGUHRvue0mjisybeY1wwY4ObwGW/\nlHaWQt8wFl2jUk/BZEUPfT3MPNjjz54CUx5IKcqNErrF0rDEZm9g1Wgn/jsP\ncNGoLEUIByMtGNDKcThOoc5GEuq3Qlpis53etw6c4uozIOxNbQu6o5roAggT\nwC3Itoj4YYdPq9PuAJdL0wKDmdwBtUEMfwtc4ultly8EhYkTUrqkktWkLEFn\nYLyb\r\n=+frA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCIpSSPh+6eYNeY+qvJip2ntHF0WlmMEt4aRtHdyelTswIgRx/6RbFWpFMJ54xH13JiDf+v/lENsNj72jWj5NIbNqQ="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.2-alpha.10_1572611554470_0.8143249638254599"},"_hasShrinkwrap":false},"0.10.2-alpha.11":{"name":"@react-ssr/express","version":"0.10.2-alpha.11","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.2-alpha.11+ccb780c"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"ccb780c15109e74b7858c33fdf7413652ba3a33e","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.2-alpha.11","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-lnOQD0cXScQEMYTdmElGQ00JFMbxX/tfx4jh/73dXQr+X7VVVBIzvwVcz7d7tXRlgVg4YHLw5J/joSwggUINOw==","shasum":"e6475e0659cccb1b28fac1f0db46fb81dabfe74b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.2-alpha.11.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvCYuCRA9TVsSAnZWagAAmZUP/26FEBMr+L+4EdCVXZXh\nTvqyUu1zhdmARTbXGKLdzLWSnzmWWSwfbNNEribhNZ0O6F99IPNnTLmNutHT\nkMbg6LD6bLedsxz7bLToYSOTe1kuO5rGY8t83LxVkn0igwk4e+RR3dUMswtt\nUmAXXSIFfmc0yPDqo0YZww5Akgu5bV11AY541dlcIHsFvGFG1HrcUiP78ENt\nzkRXb5V1LngrnaNXnHVUALqBVwgv7ZHN215buFnD6aMvA9RmCmE5AgJnlgwT\nHd0QxioS4g2s8cgsNup/4Y08lbRt0qP0aiXn4pkBQ2Np2wO2cueuPxWYop/z\n6sRj6nkE3c/P9sPF0JS6KOdRp2oTC7CVnWO7sGx9+C4H1ctbw2gLQSvVgLfe\nCRO5c9vsqdOPordC/e6+NARj/iI2GRLO0gGGuGh39mNLxwwUtbNmTfrbiH7t\nP3V1aRG/9BlGbEtRpB/OHIXYpObk9qrZAW1sZ/NqrjuoPFeNKcHpN/+uElFE\nSFMlG6xf9eziZQlwFHOlb7G7DaHRExCcanCxI6n0WBd/jPVaA49Q0+wrmEFC\nCJpyb3Y60sejPJJTOoCaTNFFnpVHmoG9nW50FJbBFS2a3fOQtIqz0G2UB7eS\nf4rBmu8RkYC9Ff7vrWgExuggTSzJCQpPuUxblU8nFSOGnVg9UgAmeBWbgHM5\nU5D7\r\n=Dnj8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAbs44nWBXsOQXzPbPT+ahK4pn/2DKGTGX9P32UilScEAiEAqAfZwOhSx1vmK33TwX/f7/VHtQ+XFcIu10Y7eoFGpLk="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.2-alpha.11_1572611630408_0.3127759267545611"},"_hasShrinkwrap":false},"0.10.2-alpha.12":{"name":"@react-ssr/express","version":"0.10.2-alpha.12","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.2-alpha.12+470872c"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"470872ccdba8d1355d154d4e6dac0f23e5b8be55","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.2-alpha.12","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-bcoqYljK2Av7iSE5+iTDyoxW3636bKPOyVs3QpwI/cyyIL/MYFlQoL8QXDYpIusngvONikO/aTzK5ZLlNwp8Fw==","shasum":"15cb1382f0edd404abece511b7e7754c08a2d693","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.2-alpha.12.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvCbZCRA9TVsSAnZWagAAwRQP/0NCV/0Ztb6UjzDV4m8g\nsCgx465WW84aYZJNIhJ89FdAxLhiqxpEUFqe8uptfgsCKYn7k80BFeegEr/E\n0iI5NMnS4DhIiWmse7D5hfvrOvleRhuUZh+VnSwbWnvbYgg+FmXBEXPZyjVx\nW443DTmdnTFuLwH3GeLq/cWOiVCm0aCbFEayatCIdtRreOY2Kud8VGU2t/7C\npBC7Ex5q1At+xWezvKhNn0S2OH0yE6VhyptFNnR7Fw+djJZwVC1kOZTSLE4n\nePn8lEe/9ZuOOPlnWKP6ZveTysmfUR1UzZ/0zMtVURb+I44DN+kD9XHg7Ha6\n/KDrFvG8QIsnfto42QDSiMOv5H7wtOYNOcCG9JCRELvroHhvtWXRru71ISie\nXjIWnKZsDaMoUhyI95qvx5J81RoKs+GzdtmUxg6DwBoBXJegsixGPdeHOCAr\nwcSaZFkqj6NHz8ff0lBnVStcayT9ka956BSz+dqqnm+4ty7YnIdCr/hrBQZZ\n1P2isfNGFCtJry3H+qYklXTMY8nWQhrbuGs/dJfiS0eH4mJQ9tKK+HkDJN96\neYLdE7TY/Mdc6XWWx9NOd8+mSOEeXM3+yqJDyIwZQDW1Xwjgn/370ZTaN4vX\nSEvu4oPq3qTdO0qmfqJdnHRbwXFsm/XVs6G4tC1jCRzC0bIg5PBn3ploEJfz\nRDZ+\r\n=WvJp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHXRnkYcjwsiZsf+0PukQ5s10tRJJO1RrhfoQCLFDXUnAiEAiTxLTki1uXhIGhXbnQgS27A39yoo6KpytIy9mxJVI5M="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.2-alpha.12_1572611801149_0.7864269273144515"},"_hasShrinkwrap":false},"0.10.2-alpha.13":{"name":"@react-ssr/express","version":"0.10.2-alpha.13","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.2-alpha.13+49a8ccd"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"49a8ccd0ec0e4de7b9a394c78b452833f404479e","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.2-alpha.13","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-LJZiEFprhtS7ikFAaVnMuTZMbwm1iJLUnjrtY9FPalVW2rTUBD3MSTcX2s6+HizwHZkNBGs5Oj9nW677XUaxDg==","shasum":"ce8ff2820c4ff620f693fd146a3ee677d5bd36e6","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.2-alpha.13.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvChvCRA9TVsSAnZWagAA1SIP/3GTiGNLU98D+br3uWVJ\nKYrAVYIu6q1VDERKtKdepbnV6Jg5DgS2UuhOPJHIhDpLooPmP4NBp6M0Zac4\nrzbE4kmMpRKC6rchwVkBLDP454jPiozyuWGw2hAx84Ge1cUJvDsIZrld/XZa\nYv1rigns5xC/GI7oFWHeaowdPh5IKi3cSKyfJlmQTpf2IxBE0Lr57UH3psqe\nd5QJm37wo11urWD6sMMAZV77E4LV26hw6M5pl4usuVs92UY1kXpDZZkq+cbx\nLnKLQw/3NXtcw60g+eraklNDpn0mu7SRtvsieC29OABHSG9PHaDNufRhSlBd\nXZSU/AnWNyKJPmXaJErFaRb3zWkEfqyjaXvOsj7NtfkMYZmlyJyEK44JJuZy\njGww2LB/f2nAgbQnu381gPpFQZakQuQY5TPcGoDfv1sxfc19iUVEmunIeaqb\nevI5UN1t1K5OAod7gVANYbRY0Zy0DF79RWP4Pm4+BwoNnvjYtenu0M1Eg5Tn\nBL8yeQyStekJqjhPQtyp9FfAAFnVv9y+7c21Nknu3wpU4cEkpzPb5Gu+k/Pw\nV5+P7btmgPH7XlwLbcWaXmVLC82JNuWAjbKXXbXonCS5fLf2YsWyFs5sd/qe\ngsCWFt6e3dNlwCn8HbVA3ycbvdK0MA6rEXAdCC8W6De6z3SFuiSpN5DryjKC\nTVEU\r\n=ajSV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEK+H00UPbPmo1fRvsxdJx5JbMa9ZRJeNrdQe42P+2gcAiEA+VMDOx5NzCJDvQNBCaN1swCDAoTtBViKXIUJbsMcu+8="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.2-alpha.13_1572612206971_0.060643528383067746"},"_hasShrinkwrap":false},"0.10.2-alpha.14":{"name":"@react-ssr/express","version":"0.10.2-alpha.14","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.2-alpha.14+06a4730"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"06a47306aa671f906ecf64c83838953e41850454","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.2-alpha.14","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-BJ0sCfA1z28z0VKy+XVPAY9dX4jHGUlPSQqy1ls4jvLXBuuJs8KX6TG10049RN78m4yybhXcC2TPkwTnM4/OTg==","shasum":"bb41560775182ffff5e68042d0759885e4300882","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.2-alpha.14.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvCp/CRA9TVsSAnZWagAAKFUP/0Py4YKIbOl1EqYt0m+l\ngzrDdncltRtcfMfTv47Vjd9+jxGnvrfEsVdErWpF2iojm/r3olqqJIm383d0\n7dQdfd8eu6sM4ybGOrjsfE8pNxUxry2YiJH/+z4PuvvDYFAXUmC/iuc0iYzI\nyJ17PhobSPtlZ8G5ZQ9zxzn0o08owWDvZ5rcZexm4p00bwJzTCqV2X8H3ARc\nUL3/frSnMX43F3H1Wj2iF+VYRQNSlqekGifMGSGKYlwAldbKhV4kXb7f8TpL\nxhqDRN5oWWNnTmr8Xw8buQ0ficJmJ5kfb9y9N3FcPfzjZmV4qnPsboHy26Se\nXG3/L1aAQksWQ0y5sVjbTnvmdCm2/U7t8dPwc49DkwxkfTRbXTqasUysQpCR\nQbXw36mh4w3aDJbaZKmfnT1l1zck54+AIwbckQizkYBIBUcqjfHFgFh6Rrw4\nvz8WQWte9lQ3LYqmARwUFjxbboLb6frlqS3advuOvDQA/7HwOywU/q2noc88\nPchzyVawGerLvgvYwqZPIP+fGwvDvJH6nMA8AT40uQPnXA94kHTGO9sepLvi\nyXcKtQOWIo/BQI1fpmYdpuyayNxK1Fj4t3nKZEiB+04FRkNhWSlyplbOHxnq\nrVQqog8vBiD9FTBRRUWt163Sy/TJrd35179xv6wgWdAW956oNwLzsiaDVxqJ\nAa0O\r\n=9ZVV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBgMvjy9qfGexxYR03SkEHfaj9IQc43qpIBfN9bdjWo5AiEArJtuBZTnYFLqe3OmGiL+dC13bEPUiYGtV9d5lpUrvQU="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.2-alpha.14_1572612734486_0.9220026493405153"},"_hasShrinkwrap":false},"0.10.2-alpha.15":{"name":"@react-ssr/express","version":"0.10.2-alpha.15","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.2-alpha.15+2d2237c"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"2d2237cd782da32c9c8aed871e8e1d8eb1381520","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.2-alpha.15","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-vH0SAaO5B/4sOyA3CcA/eUWcX3oTstW83+B1fMgdbvD+lyJgkmR3VbwMiq+bYVAj7UrEXtwaOLiCPJ2P9LDJNg==","shasum":"9e502db5c1078d8865e0892361f9c870ef43240b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.2-alpha.15.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvCsaCRA9TVsSAnZWagAAIdYQAJ9ODB4dlUDi/5zSsIjQ\nEqvEtxGzehL9ICL7rmohN6Czzx+FwS5LPciIF0hWHIBNoxHve7lFbHYKFaj7\n6a6PA0UsDukxlLOrYFihZnjpHXESeglAKNJTrgTZzfJBae4sykze44GKsZ/m\nIHnFlCC/WXlk+Asj+Jb5JrzQ3bz4OABXNVXpShKKpxbi2CyzwQU7eWlNI0vW\n4PYSIFF030jEqWw6MrpQmBnZU2bbk32GhO4GrUBetPpAzepoYHYZkRMCCUk7\n7t1KnF6bPf2MRAdYieZENfo6dNLCTYZm4yGbMVaVbYvbgHTORuj4mA+PeHKv\nLbtDuWafSHeqdXcYk87C6Q2ZYA7Mt/djfTUy1GUA6/xutUaP/niKoTuFp0ag\nSLnoOVp/vGcDsSGhOCVjonwYGt/qIa9D02haP2D1tQKeietsEorZbOl7cstx\nnRvUlljVLkO9fOlK8qxutzItOtG2HiGU4v1E9DvSjLTlIUKuLyWceoODcsKt\nKL0U0wyX7qFsXYU5DXjeaqbbtD7JhJA5UNqQXN80o6wVmxHIOk6H9iKpLBRJ\nNT/hTVtKVep+3sValq12q5DQpQ3UkbQUbH2UE8QVPb+H0ORl+1axpGXDSmtI\n45Gnl6gXRKjtHYC2PTBMgwmMMOcPCOjKQIVzDMXIjQqB5t2hcXIob+p9p1kP\nmBXx\r\n=SZwc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEKyoTELvUruM1fW2WR88t9M1ZKKAIvhK2UW/iz9GT9OAiEA4P1mYPaedFwxlL80HjGUpTjy75A8t4u/Ozyd+SxX7o4="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.2-alpha.15_1572612889722_0.4609772290872738"},"_hasShrinkwrap":false},"0.10.2-alpha.16":{"name":"@react-ssr/express","version":"0.10.2-alpha.16","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.2-alpha.16+0f6c46d"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"0f6c46dbe01a48b82a9b8c470b4bf7ae6c65c148","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.2-alpha.16","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-SWBG1FpqG+UN3i12oIgywh6JcZV6F7zdCyDE/MMypKNWnLvK1orMaPCVOQM+4LuxG5H/3np9voG2r0lN2Ds92w==","shasum":"4da8e6f8c1b87b9ce9f030247a8b23527bd40dc6","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.2-alpha.16.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvCv6CRA9TVsSAnZWagAAlVEP/j+6ZwAJz5i7Q2EGDcm9\nlsy9/Eg720F3OzWsGsWx4n6IfOSvyLLNsvhk/2CSlo/4oOgioD+TlhMfXpIX\napWXRWQuSgtlG8XzoaRuoE3G7mXHk4NTOT6gMikTw3sU6ZAn0xG0gQGmdhl5\nrrrPSULO40G3NOLyxeeARMBQTzKLY30FmfyOPpbqeqLHwmwlZD9QfCqykwUd\nEY1HEq02HMNC2IP1un9WiZbViTaU096rMBP8snJeGCc7rJbWs+GaLvKCGwm/\nXf4ULwJyQ+xaWWUnjm8RiqR8qCuiJiu2KOq66+KKJHQwj4g1pIm+x/z79r08\nY4miebfhofmO1h5EoFv3HJinsitwCcwtVMQeVxYbUH4qLQhHQpLx68oFzK+a\nfTUsjXU7exPB22iOQ0Pogzvnhn+sAKLdljriffffu0Hu29bhwkZnkhOSelT5\nXRszP1BF61O5msVVmCivf4vD4fz3b22cUM29mh6tSlw6GlBf5TzAhcx6TQjB\nRSS3A1WKvijJGCUrqfjEjLZer00X5l02XoCYYZh/y/VxAzth5FA4b0/Z5oBS\nyWE4UpDZNl1b5Q0mSPI6XhCx/ASBUPo+F0DPOcLZc08qW2MfyK5luZsJmIhV\nsRRc19zS1Mh0aP2/uIA4g9s9OKHo53nn0IeiAY/b4ZIqfyX0lhbPZt8543MH\nH0np\r\n=oGbs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC9pDrGsXcurKi2NHKUO7WfkLKhRin+pQ/LvMWp973kTAiBNct2h7eOX15IpcvDyWS8T1kNXaHioWF2t/H4nZgFAnA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.2-alpha.16_1572613113533_0.6796789024310568"},"_hasShrinkwrap":false},"0.10.2-alpha.17":{"name":"@react-ssr/express","version":"0.10.2-alpha.17","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.2-alpha.17+0cc6cd4"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"0cc6cd4cc82ff6f032e15c03435323239e3a583b","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.2-alpha.17","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-cJYW8pllbcMbhHIWXE2b6cM90ijaWtP4wCTNr/rYsndg9uUDu5JLTF4pyh3LKY/OfPAdRnpMeSgg7iyU4J3MKA==","shasum":"98b8338321960326aac0d2e9da9c43152795b551","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.2-alpha.17.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvCx2CRA9TVsSAnZWagAAcGIP/RY/7h5ASF74AsqOpnsB\nLT43JifAHSUUl6Jvl4a2+pU9Y7+svoQtBApE+7eRJWGfV5k4YdgyjpUkn76O\nVQSfssWiLkNiQFRlRG5BmpWeQmyBNHw/7I408Kz0Neg01CAP3/8pjS9P0yQJ\nvpScq4SUTjhRMA+zJVZ0f97zaOEhOlPmiMaAg2Z3C4I+8/7xkgfc8LWuiZS7\nkVkw/KJ6X+A0yUaT+5tK/98XPYwo+Jo8vimLe3sG93LH3wUZu1Jy5Pu6sT9M\n6SndMhaG4G1x8K+ytyssIiLCK0lW1z/78+DiXySvuq2FcgbQPliC9VqAtVSf\nqe0BJPIqB12Q9ZGPZ2XJuyxBJ9x9jvFMoAJPJfS10wB5bsZVp93FfHwZm3NP\nOAOGZ3JE26C4Ivl1/Me+KbgfEtVqptb2du1f9vV54hu/g0PzoN+IFTdaynBJ\n19bEYqApWgD1CVF1J0FLTPgsOEeS9BlDz6qPJ8PKS0xN0YbL6/tuVwEskW8G\n4rLwvfi2ECTvR8JEOHZr5nH8a55jKH9OOGHf/0/Ms+NNc83J4HZnjf4KRXb3\nh81dhNbWyTznOG2BPUXjXleNKF1nV6LNiApo2H8Ll7yO8h+s+tRQKchST7n9\nExiAqeKewKG7coW+4ypLdO0srWZfTlnq3UshU/M1VekNghjxUE3Ag4qETl83\na4je\r\n=zV9T\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDY6orTN8J3RsRMVMHzm7PbtCLWkr2tXLqZGIt86k9GjAIgaGzJ85yrHWNNDO5KJz9SZY8oj+mCeReGKCsEcIgxyHs="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.2-alpha.17_1572613238418_0.8349321843914561"},"_hasShrinkwrap":false},"0.10.2-alpha.18":{"name":"@react-ssr/express","version":"0.10.2-alpha.18","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.2-alpha.18+28488e4"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"28488e4706b58ecbccee91ba6912c8aa4699a736","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.2-alpha.18","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-jbkcJGaQpV+Hln4ZFEAU32dn7JoTJ4wuoEvbLtwyW/N8H0c2HdRHOd4NiWX4JnquWhEOuVxZD8FpyVUXrFLHEw==","shasum":"e5332bd7d8afacd59b4ac3af9b8585129ca961bc","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.2-alpha.18.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvCzqCRA9TVsSAnZWagAACqMP/1MDW5FUJokocoDGneNP\nrpl6aJp4GqjWVEje/NUV3qUxmVM+YjbRq0MMbzhiaOcQRdadDr38s6rslXhu\n6YdYBpcTbJ7AIu3I7/hY8J/Lw+xnXOKF3wcrvybryPKrxgmeriQkklptn1E2\nEQls4VfIlpLU/zUdFqD32LaR+5JMK5PMKQBGo9efAi+jmTnT3jf+1hzDlzzi\nmk6Kr/TMTYcHdzjcO4bCniHkZnYPTCfo7AJyqQSQvmjoN0adkml3dzcsb/xb\nc10CY/Vxwt6PM9qLIKZpmIs+Bd7cdXsF1b8pnLxqBVP6NYoGN4jX4yiBR2l5\nJiSlBJuLwn2R7pYO/hXNjLf5W7GI27kTGQ3E4R31J/Uhhy797UxWTmh1buEC\nnU9ELb0qyvFw68j1QIZbJa8stwuWJWY6XM5eeknsrXdgEaoKQYl73VDhjvgd\n3KtBy6fnFJfY5cKtIoqqiEYVbrNs4D9429MwZSAFSueC3BXvOwwgYKyDdF4o\nK9QxDGdKnaqiWoMpu5TowtDjI6zAgTM7WsSiswWPsgJwmjR56Tfjgu8oJhT4\nouwN8Nxoo6PP31RL+W6mgiOze2UfdGj1V8wC0whpek9xTh5sC3VMRzwY8fYl\n+YvlB+20I5E1HNiYRfwYcgrse6eNHJPJC7ClJ+KGLZEFAfKFf4YTt80l4WX0\nsCZe\r\n=KQLG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGJLorVK8g0wOO9jOMCXE/ueMEOSTF8Ai07K8kNp6dEiAiBZPkg1SqIqqhTKw9xnxTzK/LIC3mFhjQdaUIt8attiKA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.2-alpha.18_1572613354351_0.34169934965478377"},"_hasShrinkwrap":false},"0.10.2-alpha.19":{"name":"@react-ssr/express","version":"0.10.2-alpha.19","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.2-alpha.19+dcc02f1"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"dcc02f1918ec96366143cf941b646fa43f193a52","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.2-alpha.19","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Dt9m9QuHIaiNBgBG4WSRGzclwFgjY095dnTQWg/9QdQmsHqUyYM/SmAB3DXjvcEN7gBXkpqIa6qWc+yf/JW7MQ==","shasum":"1cf2e885fc818c78f2c627c917fccd7d7b15dc48","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.2-alpha.19.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvC5WCRA9TVsSAnZWagAA3tEQAKIO94rDDpqo0JVeXM3Z\nAsetf38mNkyUuaHNw0ziBRi0fCCEzJC16oCWGHrHDZ33ZiDlsLkntrAFE/Os\nMzsO8aXHSiEpSY1F9uevo7zipc67hcgxlMsSRJgpkEyIYCGJvVDg7N6sKUB+\nS2sOVe+Vba5en9nPjFxHSaiKYNK65r5/ddoD8CIgmVCuJvL4Ypajtmexopgg\nSJXNghU9HG/Auw2yz2c4eG2RkwlHz4WNq46YGrO5eqTQECvVbBiW1Y4iovYa\nv8XQQRAGFYBcMo7xkbpxyp3qRcg3vXPRHKrnJyCFxRykkasTNvDx0jqa16kC\nFlXsMqVE2QXm7RBoVIf/lEq6GAJNup0wgZqKMdcAJ3MHHgSnpe/u2q8v3kyh\n8Kls/BLjgbK/UXZtiaO6RoLuZ+uQ/DZQVaS+G4cEzn7wi99KpUdXd1VZXn2q\n9Cz4hD/+xLt8ScoaJSgCOjO+e5Wm1A7qlgdU6TOIUdlr9aQIC8NUFWRwKo+o\nqyNxnPvWYIun4N8BYYO1SdOXinSgA31SlvxqmBpebhOdYXEtwAltSrzmx8RI\nAHHwq6HF9VFR4MFLIlo/JCfm29HBugI0ruN9cespdrbJm5z4ymsE2iBYXiqq\n0L1or8aj5HebLKrpYDZrFF7vfpQbacbKu6LwWrAGqScEQriIcjdSAoE5heG+\nZAUc\r\n=CwZd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDhnMN8WX50ArVr00KNSmE+OgUL4Q4X9janr9mkJ/9G6QIgPQ+nkzG/+jy1iF+QeP11T4Ju//jxOrYtOyXLdWfJMqk="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.2-alpha.19_1572613717498_0.632498758454054"},"_hasShrinkwrap":false},"0.10.2-alpha.20":{"name":"@react-ssr/express","version":"0.10.2-alpha.20","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.2-alpha.20+61d405d"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"61d405df7c96e2534d486f8e6a8a38e22865cb47","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.2-alpha.20","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-1QLPUNDnDDi18SAMD2sMUMLJnYmF3LMGVSnij4eHcagnS+VdanaamHMq4qkO2phD4Sirqv9GD2Hs3h4iQK39sw==","shasum":"1a0e2058e1b4fa0c627ad2bddbe6f7306cec52c2","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.2-alpha.20.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvC6XCRA9TVsSAnZWagAAhrgP/3Pxa04sXaPH53n9r3Sk\nMRThG6st5tKCHwhqj9S9YLx3h4dm5mOQEFM7ru+a+HZr73aq9BkQfpcEBoSX\ncSdE9ALAdnIzJHmwEp65Yg9yDqjzeCC9+c/JQTsy7yAslZUJyb1L5dg2BOP9\noxPnUpDhXuAJUHN3AEBM22UNEV2O4RLkpb9vehj0Je9JcF3gwCllrQzDNW6K\nHUREIVbrdZZcrKzcKmeT7F//LFBop3lv0EcnMgTYFmFdHfaGryLBwIgXVJyq\n8Th6fEX4Ja3FueuvgRmz3y0ZryzqQcKbJ0OMuesplg68P1LtJJC/FgdgrSsQ\nFcShRoFWo+9SNQBVgxVmR9FYh/bfOY07qoAy0Ar3D43PqMCvXiREmAEPokg1\n5F4+l58BvceRBPqE3HTarOWjD3RaXxgUxhXKS+OX1KO3tF0J9DKkFIgVq2ow\ne5SBLTUou6oPZx8EeavQDjjwyNfSp+FfcwwzEo8NSxtKnonUhOW9NW/h/4Ut\nrhPbkRh2W6tdaXxseFu3/WmEMfyVa0G+OA1x1RMgKKiO65jku0bjGYAwsTdQ\nrgKVjIFz2ToCK3GO2KCqUGciLyZPZfgEdDHZxtSbdZItNtGBNTA3FN3A7HmS\n+ptwayxUqTc89oftuouLxrpxLVJpCFXbJmNIDARvp8yDi4+1FgQwUkn0hcfh\nTuOD\r\n=sg2U\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCEoxLnRJLmclyaKb8FcAhoTix0vJZR//w60FRxuKKK2wIgNQ5vGMFPE3TlD+B1oJrAsg8g7L1La5PxqK9B2+wEGuo="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.2-alpha.20_1572613782846_0.8440692457212386"},"_hasShrinkwrap":false},"0.10.2-alpha.21":{"name":"@react-ssr/express","version":"0.10.2-alpha.21","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.2-alpha.21+21f5c3a"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"21f5c3a6d7682c61283c05c8fde5f88500e6cdd8","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.2-alpha.21","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-3B1UCgHdkbFSoEYoeF9qukVOPxBavt9xEDFjp+G5uLqft4Nkf33Ft7CrzQIHjK+g0t/WjIqSGjuoFrNPwDKEKQ==","shasum":"b5a51b7a1088fba1f1505a78fa39c7e1692c3578","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.2-alpha.21.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvC9tCRA9TVsSAnZWagAAu3UQAIxxGtHbTWlsm74vUcuL\nHC17UlHFJQFQRGlaM28A303vhFoLxyGlu0+81jZbaboh/rwDt6zAZWJFrDYp\noyy5/SFUTBS7fV3E8Uhykxn/64ybZO7tJ0ecivjtP295oP5XGkFJFSvVL3XA\nL16s9eUJa0dv0tolETXBkDYYV/agvGXNKA3Ofa1MDOTvVbubGDtufmJCxDmT\n/1JQctQ+6dZR/s8pr31T7lExBfRBa4fzip+cpXXglQh0HPa4RlhNWTyqZ6Aw\n1vuo4MP2MIWKv11LMlnFdfMmd25ZnPOO2Hz9b+GOvoN5F1W16UY7wj1zT6Iw\nZPUFWvjiMghAp30wsAJeppj2l7Pgnc2LF/pmGz+hr5VrhQnQTcsM/xImfLNp\nrHzL0dbToj7/6z0mZHS2pbvpes8q3iG5MruGushzVNlTcit0oVVLOt8LRWpf\nXaqjZ85JcSkxtyGSGHhIBS1FtlTeyupzNxqX7H5pCIcO4SpYzQXfDpNGDdFp\nRklPuPSoBkgz1Nc7OZK0587a9ZPFGW5aAkssz5IByQE866QT6omSIfzZcE1b\nJ4GrvUKW39B2vGXOqY2k5rX8CMT03vmZMum8qT007YX3OZBbyOYHFBgN9eCE\ndHhf3UC5rHb7oYWxSQfytoJTJK2PbskRsU3INZTZadBbNWIEOeqt/02eikDZ\n5+zF\r\n=ow+a\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB9c1DNpYV9puOwbnTxqiTqz2v0uhaGAs2dPKPO8MNHrAiAHBefzPCgrNUt2APG6ksVmJq3Z921g/KGOefxEO5TO8g=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.2-alpha.21_1572613997015_0.0677883335443974"},"_hasShrinkwrap":false},"0.10.2-alpha.22":{"name":"@react-ssr/express","version":"0.10.2-alpha.22","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.2-alpha.22+3d8b28e"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"3d8b28e0ed8c751f3b22b3c5fcd63a730e438482","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.2-alpha.22","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-JFN+1dzAOrcX3KGR96g+ebzlPej8i3G+1ZZxcU8SnYIWSP4RXo86gGWQiD2JP5bzuvioxG7i1BDzcoU2wF8Hpw==","shasum":"dc5917138588ecc9fb151917adedabb6fe52cb21","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.2-alpha.22.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvDD9CRA9TVsSAnZWagAARp0QAKCWZh0BoTba+GHZekrB\nS6PE66VAcaAZPrHImBa5ibH8Rb/k7xqiKr9vqNdlPlNaJPIH7uNFmKOjkEwj\nHp5Vc4nBdwTE4uH16s7O8Swmu5GvQQXRQ5OBAHLX9rIYipwRXdvg8/zX21EH\nMwjUsN6mIIUQideMnAJcnFPqe2VG26v6aiktNRXAQx8Z1/4vSrtmL9iUpjG+\nsqZROfi/XANVJZ2cI7QYm5pL3inCE/Oz1aq2sCEl84k/vTvtsA0qveE7zw7g\nao157sRAyo7jvmY2+ueV/94P82AH7D/JG5Ch2ysatZ9Lumc03vp3/9xDo5nX\nQ4+pIqJbTtEwOLCOqs6KtE4pcjOEF9WDcTYnOpbyf3hCH0DLFGXI2i5G6UAo\nzUKz1qcMfdd4UsGn8JkSHVAXGKQ2ajrRLlrFZ6fGVq6Ac3GQeOVPU++eatrB\n5tSWkYYf1zQ7qy2PxzgaudCedSeYCRq99uZ/SH1nc5a+Axqdaecd0CJSkwSZ\n0Y1LGgcxNliORGww6Cl1RJhzk+V4qJ+AfqqDL/BjVemQhkeqqKLjLNyilUUJ\ng1+XVXKDuqAYJT4+eu2DND3hO5oWUjyG3H2lNfUtX/R3pOu8mF7Ex8ripy87\nweNnCT7lF0VAe3Kj4bTSc+IuhysXty0yh1PUYEwyHQsLd7VedSpL5KbaDYWY\nrZTx\r\n=ByqS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGfsEl2z/vtZ90WlAfq+JzmRGmOkFBY9mN5Om7umRReEAiBPQguEYwbYuq4ZO68XAgbSUWZxSCQXEASBturkXqzrSA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.2-alpha.22_1572614396992_0.8923319970598418"},"_hasShrinkwrap":false},"0.10.2-alpha.23":{"name":"@react-ssr/express","version":"0.10.2-alpha.23","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.2-alpha.23+24586e1"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"24586e161763f9a4c8f52a4578f7f93472f7bf6a","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.2-alpha.23","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-/JNe7AGVcIf+KfRl8SgEjuCjflyPNzqlLGgeIBoQDLfhIQcRLn5kfL5vj1WmYpe8zQI4UFInhr/okijNxYjU8w==","shasum":"2bb47298d9e8f861cafec5c3ff52c8174552edf0","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.2-alpha.23.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvDFFCRA9TVsSAnZWagAAhIcP/iggOxJ5wvjmK0w2vwnZ\ntNkHpzs/g9Gvh/BJWZZP+jlprjV0jSZ/TPdfNunvpgJgC2s6+7yRMK67Hc1k\ntutGpzwXIHLzAlbHMncw088HjxezFV2XOwgtQYlv19bzIh0Qf4cpxSrgfQNx\npVPYJ9rQaIVsBG7yn0UGVU5cct8LDfvuifta081c6eVNNBik+Seu4/DEtpiH\npZrnOhoE+XlHVgIRSVdQaxFJq2OslilfQU6nBTDQ7g9oqHJLeQQ0Lht/OxuX\ntH6S6Jrp3leQXaAVxOifSR+B7eeQKuX64rlOobXrhJ0Kr4uzz2KHr9k/Lnka\nBNm6H7OZUJ4lxWn3VoIJrdyaeQZFfZRz3Hxz7kXuzyx3IwRW+3Ss7y16S8xn\nU9Xb6xobPvZbl3kFq5MKZlLYhwy4VTE1nTDuNvu/FCE6KgxL43aHs+TZsBgq\nszl+c6aALwaN2plCoL5PUwBa+A/AZgSnHu7fiWoJkHUHSMGhPSN+hjfGS0Qu\n6CvSxiCUfNr4dBtfRiNUtBxxkNp+vEmuTaZFWTyGPffSdO0o4X8JOR3EGmIa\ngzrTjt8mvygxRaemU8WsfSnNNGA54L6JfMycjmR0NqQkE4ajKfLPOYxciDAV\n6B22BtLDwfOFevV5v517bJ7FVocYTtLfsGl41DXJAedjXBXf9VVdgz2MYAne\nMY1e\r\n=zKDV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDMv5gAE3dyGXiWcQlc+A3YhAmcIK4BUBBuloAZGEN/qwIhAIj6ESo24JXOq9udWwwaTRNUjdycLVF+49ZJGfUGbl+a"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.2-alpha.23_1572614469366_0.520375156869141"},"_hasShrinkwrap":false},"0.10.2-alpha.24":{"name":"@react-ssr/express","version":"0.10.2-alpha.24","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.2-alpha.24+d99efbd"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"d99efbdf2f1b61745679a1d587677b0360ce543d","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.2-alpha.24","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-ipUYSekxGNZw4sJtFExi/DjcjMs5Y98UWUHObdINP+oOzZOAWmt2KjI85O1JLKktt9ZWsjyHqYaWTzb4OLPwPQ==","shasum":"2a453f3848161d168485076e9a253ccb070279d9","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.2-alpha.24.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvDL/CRA9TVsSAnZWagAAMoYP/AmMPmTa+TiHa+7SCRyc\nyPik4AQ8IcNRcX1t6YdbzyfbhSCKqB0BPXptx6dTrsld15YSFVZDxnvBV/Rm\nabkjet0SbxuFkpoahUmDdk3AcHxcRZ42VITPMRV50OYJQaYEmGAxdLZNHFM1\n3kSxqbNDS3w6biiSBy0bR8JrzlAX2g8UPokYi3lK+L6pZzfgz+jSW9UlA9Le\nLjptvb3WsKLTyjd8n1mdxLPR4Ms2EZdBiTlJlLyFljV3o7x4NmOzN+YzWr4t\naMsYsd3tCQTwMKmwbIkNo7ouj+o7YU+5oz9mPxZT5LsyBfxVkDfxF1pbpPRU\nzZ7SqVYY5+H48JM06E5yeiUwsr0wRC+LNHCoqXPW/N2nIWGylId1aipIe27U\nJ5oiSvaB8IlZaK8ddIN4NDopC71suWWew047B1ZXC4c2ZUPj4ICQpMoDu7lS\nnL8hIQLKAtsiqN5LMS1chIvCOb5g66+1pfANnDlpt/J1e+PoVDvsmD8/GLIS\n72s/gGOZq3E3m4liqKAFPfdDnSiiivkq5ax04C4MPCIlxLuIM4BTE7Wylawm\nSJFOqj9rFrYSPHs1jBi9inMVW5zFOi7mNuG6geRSKkEIw20PBrJjIP2ZTnLZ\nXNpScvOJ09f+t3SdmltuoUqjKueLkNom7TIZtosNR8xzpoL6pv5XEXojtYIY\n6Iyh\r\n=TcrK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCQJe4YvIWgjTgeIIqkpGjhSDx5TRkZwMSe652PqK0k9QIgKVmK95blKi+pNqPMwkipvM/ytGggxThnZXk3CbsMX20="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.2-alpha.24_1572614911190_0.2550536271209425"},"_hasShrinkwrap":false},"0.10.2-alpha.25":{"name":"@react-ssr/express","version":"0.10.2-alpha.25","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.2-alpha.25+e148809"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"e1488098fd1e28937ab0d7ba0bd2167f7fe89d29","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.2-alpha.25","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-+TDolfZEhgeQ/KojyySNs+h89lvIWVTvL7XZ9/BF2xIXwSXIWUmwMj1ScQXhhnV7FqHE/UHNiGzALwxOXsRyrg==","shasum":"b7742ae6b518b545f120070b33a3191de673c5ed","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.2-alpha.25.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvDUtCRA9TVsSAnZWagAAzqYQAJ6t2NFL8MaZWbib4DgJ\n4gL6iSlCUinGUWIa4ECvvlcvqlWYRxyxRaobH9gvoprLWGu200/W24i5FVCP\nn92K2uwUBm6+3EyLcd8Z7I9Q6abHyIuQMSgefk3QzicWCZM7/aGmS9O6CvBE\nXE9JbphNLPW7txXiQ1UHbyq8yUaullmhkNbkE9vyxGA10V1SsXNO4CzH/rlE\nPvElT69GAF0+j8mfKQCcOf7kU/hOI9b6XkCc8uIgVYKCk7b9bROixV+GKPTm\nHi9AXMDJKU7aCeG9mZBKfmsMTol8zmDAVVsWZzh9mP4QikmP+0+r8t1n0jng\nYfQq5uXWi+hAj6wEHs1sJzCQKEg916ap9/uz7qjX+TR3KvhWXnQKEQxnPMsc\nk18fc/L+erq2Z13g5XM0hK8vxfZaYQAHPm/ITdqEAsCJ2XMqBxH4x2ES2ccZ\no7Tl/AduDS1JTMpY1PKMBfTkLP6HmgEAtpl/LvMTKUQBZ9HEFhgFAiJ3WAFk\nchLJ1idZtItPbRaoZlIIDkpDiNRhrR2Ru7HKbkcQDl+5RtOT7kIt/BVsuIJh\nkCOrJqAodkAkdcRg9e54rZ1MaMWVsnWQiHdgUaIOuYgtq5zCbBnlXdytb2kF\nyAikFAIB4oSC6ZJ01bxxbkb8RA4mEHsrC1OmDaKJjudoxZ1Urla41Bu+aGKt\n+qpq\r\n=E/Kf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDiuqJaWOUD7FPSnx0foSs+lfOxuWPlpwGWwT7oJW26XQIhAJ45gilw9SgSFPqExYdGyKX4kffnPaYmFLsIlN+bHB8w"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.2-alpha.25_1572615468646_0.3651244971594805"},"_hasShrinkwrap":false},"0.10.2-alpha.26":{"name":"@react-ssr/express","version":"0.10.2-alpha.26","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.2-alpha.26+a8bafd4"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"a8bafd4fd39f0306001545e080d83a4a0f1741a5","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.2-alpha.26","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-zzqVHKguBhYZ4fcuFRf8HpCm0+IwlioALost8TmftiqK21YThS4q9ogzTq5Wz8huU+ek16pKFRHRQQ3DS5tbAA==","shasum":"aa00e1f4ffbfcead609bae414d60f8db035514c6","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.2-alpha.26.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvDXACRA9TVsSAnZWagAAKJoP/0fUIVBVWPnD1A/S+Mq+\nFFSwAC971M12uFEEZFb2c4jFQQMTh1eLFu7AeE/E5AG1iJJoauwaOqLkwT0G\nSHuJeksNgAJwuJNugqMQU5KjpgvFJ3x6ooTqrO7V2IHm6YaJ8nfe5x/OObfA\nowhxEEla6bi5h4QD6/an39USbL3fikY5oUJOwTRsqlj18RshB0Us2aB247r7\n3ggQJidw7qUy8GEtWazVCmpiLSWHTS2R5XWeTWDf4mB/cnB3svq5WinNiARp\nX2S0yCXmeJOH09YLDVKrLgCMquvCZaDYPSxWVjsadRTHh/PSpfz0yTEQ48EI\nxkF5N00aii6su7hZD4xoYdBZONH4bmUnB2gZafoda7Os+N0KkOmIFIK8Hmmt\nOnVqEeFJSiKTp2869+ePK8w9PgkD8ckw+QjnDzqy7K2RDx+DqAcmsRMTOtLK\n8MtlR9XHY9KWgMqPUJGWDQ8OwNk0hAi1AXPZqpM9D8c85P91J5UGoOBKag9Q\nPRq/HyQysRthoeRE3lDseqWvBoPAYM70o8qNbbUVJVHUfmlGeh5qvIBFKWCH\ngB7OyV7uMR6OHVZYLt8d3anVjM4nztdukV656Wo9acLiEn5ikadCLCCaqyZj\nqFuMd26Owc2A0AIMsR6JxDkwCUnSSuPxYWNKZogeiRA4fv66TOulLDW4yqHn\nUzIy\r\n=zgds\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDHfOSvvHmX+dn8iuEVh7vOQMIZxWL5lpOanZWNxXmZJwIhAJFSjYv5HdS/LrV/+/qEwnuynsWvvZ5jA6PyBdkBfUcR"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.2-alpha.26_1572615615824_0.9806934632673323"},"_hasShrinkwrap":false},"0.10.2-alpha.27":{"name":"@react-ssr/express","version":"0.10.2-alpha.27","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.2-alpha.27+d10a13c"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"d10a13c7c946fe29dd0e0df182905fc667f998b6","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.2-alpha.27","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-oigr1LeM6DN2M8FrnPsrINseQWoMchzHBLfpMrE4kTLY+XC4LPrme9l/Fy1YE81EsZrplXTH40GnNfrM91q/9g==","shasum":"0362a4a8271200891ef1f3f1465894568b1396ec","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.2-alpha.27.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvDfuCRA9TVsSAnZWagAA27EP/1JJ8RqPTFD10nH7lV7C\n32z5Kd8ZmStbeV6buKBAcl+WnXP47L7oje6Xx0QyKxaZcVZTK4pTA/TQ+Cip\nL8W5TvyMGFaJ6x+ii4OkMKoV8Qh2TY+GaoYB6rPaUvvwznDWiLmJl+UnPeXk\nznd1vnNBfIJKScQuVr53RQhoRtQ19p1dKeA+U1P5Rndi79qoL9c3HUWgHL0v\nqJbDeMpTdgrFyTc7UJ8H13nugGyIuTny1cOsX8dv24Es9AgTuPPK79UyyZWr\nOWkTWbQ39f7IgdkvG/8FJofp/7lp4ZwJJb48BW2VTOWhmK56fiuf96gPrTPh\ngvXeYdmIzDBbtKAdeY+Kl4CyhyJzUtsdko/lPHDkrIj6qX4x9KZe6gtXxiCf\nZGYLHcEm67gLdPMxj6FlqSNf/jnRMLNEW0zNPjCCagh4EJ8h3SbysDbPzp7C\n0tmeRKKMwVWaiFDhqz8LDRR/HuV20SeBzzbjZBFaT6Nc+ZwM3YZGyKRdWXaR\nKVfu4lVS/x8x2Wva/J1D0J+wEBYxHWWl7WXeltASBhn6eWWQuQV88Qe5nfGM\nbL3zYY6W8JXvrwediN8vF2nlQdLhMRO03uluGP3WH0v6ZBe4VXBWTROQwDTt\ngMXaDKHsR3LqVxcj+hAyEJgsvzhSCtQbMhkZKZiq0Te8wH4hfOpfzTyd5da4\nOqiP\r\n=XhPz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC8Xa/AfCk9bqbEq+pfda3y02T/h5wLff9RqYZyFvBUqwIhAK90nV1+4jgHUkX8ccsFhPST8mGIyfqFg28tAgnUL8MO"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.2-alpha.27_1572616174554_0.13346603490854902"},"_hasShrinkwrap":false},"0.10.2-alpha.28":{"name":"@react-ssr/express","version":"0.10.2-alpha.28","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.2-alpha.28+f320340"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"f3203406179c8cd88510b9bee49f8bc7f8c515e3","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.2-alpha.28","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-zkyHMP5HHTKq1kEXHy2BMqvb3PIhcmqOMSTE9pA/adoW4Vv/7akqqIPi728/k3MPzEaKlmwpcNDYOaUjM/Rh6Q==","shasum":"41f373c85716cc394403ce5819a5d9eb25b8b113","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.2-alpha.28.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvDiLCRA9TVsSAnZWagAAfg4P/RQ5BIKrKpfho7aZ1IZj\n1cVFQBNb494nD4WyCP9+x1f2uX5Xey45CGG6qgRz5c3uaWTiVHQIk/j9mfHa\nNH6TMZyPTs8UsgpvGoDtBVxzS2/pQbG8IdpW9tk4plBX1FEr0cocRujQdsAH\nfaASdWwASp5yCqiqj0rVgmH/Vazey+TV5yp3PbejblmXcfLyr36ryPVIz6+k\nXIMUlx6KGQmuzU8eejsIozIUSDqKK0nkxjEFpQlEWk5WMzVWH5284lBD75nu\nSxscriobThBVBeW49GMTRROmwV7cRJ53HawvDlRf+OIQ0t75lgPKw5iWPO5T\njei+qvuf4D7R2CTyp2Ib/8pOJ1glYVdOWHSfRnNxLZ2s8JnJgAlsENECHE8R\no2TX9tZqa3XE4WJyVxubGv469vFfsN6Z8UwhbIvEJ5ot6OCgEDZu5OKKDiX0\nzoInOpagA+5n1jyxJF+erXMZczI54KfVHXGXB28hDO4rknidV76jAQm6k0i3\nlPdCOp+1o2kh5sytaC5t3NX/7+ujk+nuzqiuUYqRbKjtgAgOu1yxhYkYyYy7\nIWldbP8VPyrcoHrJHq3+xCyO+qwKYLrMy6MI+OXKxjfvYZOgO/oXkF+Qq6i5\nMNkJFw/LZ5+k2b8VuBMgscOSsu5Qhn4alH0Eg/dyoMGEsn07y5Gr277OSmg+\noRvk\r\n=jSA4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCw7n0Sfxy/n2kLKIUlBg6Fv6YbU8AgFztlC+YLxF0QHgIhAKgQnGqgaMWT0DGBfSiXpwmaaUvgXZzpIIKQel7Je9tg"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.2-alpha.28_1572616331169_0.044121339081998334"},"_hasShrinkwrap":false},"0.10.2-alpha.29":{"name":"@react-ssr/express","version":"0.10.2-alpha.29","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.2-alpha.29+da1fc4d"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"da1fc4d7226d5a2a7ad8ecbbdd0d6447b7fe75e8","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.2-alpha.29","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Dx5xfpGwPXiyj6xnZID7IAZLsGBYV/qgjCiEqonPUSPjUzOhjnNAzUJH9lG6whjmFuMKAdavOEbolQMLhOXZFA==","shasum":"791fb4040e7823c40458d0708eb6affde818c728","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.2-alpha.29.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvDjpCRA9TVsSAnZWagAAGEgQAI5xHf0ShMVZuSeq6ltx\nFogwrZujjdyI1eCv/V9jdnPPtuG6G8Q+1lPLVWoECWDfXYXGOgcUpmHNPTYN\nDW9ait5USgSFi2Ausjkpqm19Mowo3M7Vc4CTq3hB2dGyFklFWS7ZBzDvQeoS\n4z6kFDyC5XaSbM+keDza/262H4cFw4FXZ/c/4X27B+gxUiqNl6wFKdDHGbcc\npqF5R0CJD68kaDvEdeaMXxVtGa9QVoClVj1pidNdMleHFxP0WKjefIcm5ED9\ny37g4VNHrON5iknNMnOJDN3/WjahPABYZKwtKn+AmPi1XM0GgwufvKTdwewy\n1p7JIv548Ap6sYjRC4cMRhm8JW4mTuZGXVRTWJ8ftqLnk3xQl0gwE53WjCsg\n6zG2d6ksyLUdRGXrBIQo3PDYPjZGrStojUp3imhXmwpPZLcra3J5fh9cDMkq\nzg9h3DboMbB7uOzgLC+qLZL5wqCZv5pKCNI0sewgJIWT4I4VnHQfkzb/U1VI\n2QGUdI25N5znv835x9dYSZwmW0fuIZA7ZWvjdbhtkYfJnEq05KdG+sTi4cbg\nzzyodBUCfxqoRadWEiuRjdTvg1SmsAvPL5u2ZenNGXAOXrXBEmusDgACd3n8\n0Ac2pyUlz3R9VRiilaykqx8UgzPHufh+jaNXzs7EOodcJnP2kfZ43SOrcjy0\nhUsm\r\n=Mp67\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCCteMoW2EVQG653twSwtfTLV8/xNHCahSBw1E1PbDgTQIgShkPfopD8C3+4UGqSS2BCh791sxac1atfLghHYYG5kc="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.2-alpha.29_1572616425027_0.050060064101996815"},"_hasShrinkwrap":false},"0.10.2-alpha.30":{"name":"@react-ssr/express","version":"0.10.2-alpha.30","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.2-alpha.30+7b538bb"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"7b538bb6b8123542b4f0e475ea10dbaef74ae0b6","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.2-alpha.30","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-BXu5ylvMzj/3Q2WdVJ3h8mmvus5Ju1+ONHKg8p8e47FfDv/+ZHPVVP9maw4JBknfze9cHKpH6avBYbx/E08QXA==","shasum":"f8ec4a6f75157a42071185e065ae9c6a7661f491","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.2-alpha.30.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvDmeCRA9TVsSAnZWagAAIjIP/jrnnPZMbln1tDqESXHs\nK1siHT4YV9DlKMeVOvkv+eZMsB4AhQCZDt389Q5ZI8U4940v7ipo6LHH06dS\nugl/Hxwkqu5cal6kofmKWMQWZxMwojVGp25YlKBqW57TlRuG7uNmuOcSIc32\n2yhgm7Xgph6/eOxaItu/lDBRyCdzxVYiS32/7roAjBABWsY6YAz+cuTRVxcT\nXP6jObjvHwDhQlTFK6+dGygwAuN9FRobRaeJ1GscYYXUvcUD/7K8SRFjZSX+\n3fl1EjTPvzEV0uGM7YAUQlK3hTYAVITUbkPSEzfT0Z6ffFOjMqEiqHzJcTir\ndsxJNOXKuqsgGW1akt/gLqqVipxKEK76q0WmwbEs+2XYraf9SQkpTSjbnKbO\n6KqzOkieKQiXdEdxxM62fBr+K5XywAZQYZJf3X9DlPjeR28Y8jLCiVyocHuE\nxS7J3LkKJYX5DLhYd5TDVtxFJV94hTp6XsHi56DfsIPM8+bvkAGXapVLsHuv\nbJXppw5tOU2pyn+bZSaxXmx9EqBr7ZUVpLELpcafZqSeKFQ6suirBy3FBsPZ\npNF0xcwV1cSoSnv67Of+NuQuDX/y9kHcnv3k62iop3MPu34n5jGXrCB6fF99\nI4krOVuS/rjXU44U+Z2sRYZcz371UIeux9eKDflhL2mwAlTVnFCpyymuM62b\nb7g9\r\n=EUe6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD5BZzwCTEFijXfr2LbsoTrdaDaw23chciSNfTatXiJVwIhALevzArsi1lSthI9M/MVGx/Vm8yESs+78PG6yA63w1e+"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.2-alpha.30_1572616606293_0.9895279917090154"},"_hasShrinkwrap":false},"0.10.2-alpha.31":{"name":"@react-ssr/express","version":"0.10.2-alpha.31","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.2-alpha.31+b5c06cd"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"b5c06cdf51fe7086935cf58816852e61347c3678","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.2-alpha.31","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-acV7Sov8GDy4UwE85yRG4Ah7WdaIL/BPmET+i1BTbyjIgrtgaml6JIb5C9dEUtAUnSH+z9i33BQ7EXdEKgHReg==","shasum":"8dd99d760c99d253941103b79703af97ff49d6ca","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.2-alpha.31.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvDo5CRA9TVsSAnZWagAAHGIP/1af7KS6VHNHEFltREpb\nqWPrlOPBDglmK/xmuMUlFcHiA2PlPXD1E5XcLju+aq6B3yQ2jqDSSvgFOc4I\n+fi06oXQQTCeny+qi3OrXFFAY8GeOP97dzFGiGz/6qIEcRa9rsrTtdeSmexu\n8alIKQ9Elc6mc4bLRADZoD9U5iwuMfPJAf3dAzjYVLVRwsAsDmaRUSJM/Bd8\n5zu3s74tunNNjtrUg12MBwyegHxBh6VZR3So6BHirhWPhy7jA1J/tFbqrdsw\n9AF+dbGE5gQgDwFuuZIZhTybyNkgoeOXK7IW1bdZdyCWCg5r8EpprmusM8JH\nS9TVA+bxlyFIkJP+mHdXG+B16wCkLzHgKR8+SDUvMxrWSLe5lUmGWUOxd/LH\nNqE9R9yGExmeGEPN3roFBTUfd5rHVHsbT7eop91wPZvKJXaUemUH7ViwA/F0\nwtMDRRZIqXVd8rh+vNwsqc6suhbQur2HnopE3C/+6dWs7dTIe5S+iaBbwa+z\nPpjDeohN5jHpRe+te0dA+lSIMDAyKTIFOdijjpiQkRvsrf9PrK+J+vDE+pcD\n3FWuNF+jbLjtiuu1re7H6EhPG4cqg+CJtAo6Jdjk8v7hi/r/mhWUw4xQ0rPm\nYgSJmqfwaHmp6zXKFjAwryR2hdAqGM4LavAJu+tcJmmgq2FxMUkHRtHZpsH9\nRLgJ\r\n=NeX7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHetNTevLx5KpYKsO5NhmHqME9edFrYzgrbf6z9i3LyJAiEAu9/blBR5p7mzlJ5At2hAheYWDPBpdmp6v82aooRY89g="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.2-alpha.31_1572616760805_0.017547596652993214"},"_hasShrinkwrap":false},"0.10.2-alpha.32":{"name":"@react-ssr/express","version":"0.10.2-alpha.32","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.2-alpha.32+bc77acf"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"bc77acfdd72623e1ea1cd7408956906789afbb20","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.2-alpha.32","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-CNSXRGRge7vwpnN/zaQuTTYuBgHKIShsaLrLYKg+4POE9bBUHvryT+wRCb6fj6xu9YrzjAfGVLdM+d1O7YofrA==","shasum":"e48d2eb3e5d9d89b3c2d50f4dcfcb93a5d842755","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.2-alpha.32.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvDq1CRA9TVsSAnZWagAAaNoP/i8pPkotLEuaYv97baqJ\nqC+M18LSIEuGMHIvRmAYITwUfMaKjfvNbSaMsK1+or/gkZha9kAWtZ5Kj7cd\nUOyL4X2DWjr8QBVOjy8MuGg0GRg4EIAm+knVU0U9+JRRICZ2sTnHpsMtWYcQ\nC+Cj5Pp0An8P4YE/F/N+T/+65572VYKVDViy3stVP1lE1EgNb8Bx3xj8rrC2\nqeU50XKhSObHApsoeG79GmPPsRJNni0CKBUhvprP8jWX8xSqF673pnDEvS/G\nx9upwhGRIquDhlmRV+i4yvaBDAkNHJuG89KwX9rPoEQ2XenFqwChsbNION2X\nosVB62VgGZOyuyc2CYynA2apk7HuI1fQ8Qe7docbu1TB1m7lhOGqE09jzdEF\npUZKjUCw0OP6Wpc/asNsVAS0v0ggpCYm/Bcm+eEEG435/xrS8p02tqM/+4LN\nLA5+gVJGw+l+AzKOrV5YJlh/0pQYVJDQEGQJEuTouCOulyhLAx0tUHogqY/n\nZPuYymvQOFmzpU1VjUtMlqn7ZUWcYRtRNsMHb5ycvoArcrxBNdWlO+xBVdU6\nrnRKkfMKLz2DoSYHwdc3q2el0pcstAVHCTBWE8BXgZXx/yJIxQP5NWr83Y8E\n+m5Notqkfh0XDSGWRilV5hNeWKPssRypA0oSiq33Dn7XrIN/Xn/1fGcC7oTy\nYi0Y\r\n=gDqU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDZ27J7Y3jtPSBee5nKCsU6y6MJA+Nc56zSAHXnuxtNHQIhAIzaAgLmEgaOOTKj62F+gW3BtAbfH9xFPUSua3h/MmWU"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.2-alpha.32_1572616885123_0.5022832097371925"},"_hasShrinkwrap":false},"0.10.2-alpha.33":{"name":"@react-ssr/express","version":"0.10.2-alpha.33","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.2-alpha.33+12bf2e0"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"12bf2e05d826a676d9c31cc0eed08be5bbb40458","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.2-alpha.33","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-vEohmeGR6W7aPpCnJRG+ga+G369pxMmaN8aG4uCAIz3xtEwUEe9/YUfrcSMAeX3ISx5YpamkR53+KMUgTi/y6w==","shasum":"55908d08b3b786579cf21081d62c317599a70e7c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.2-alpha.33.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvDtGCRA9TVsSAnZWagAAzm0QAI6IqUJ4w/ctgpfuLw0N\na5TsRCHdrQLHNXgG4i+2lastaiIROMo0BXqr5mSdti+8lbwpKZc7ewzBuLTS\neT4rcyKbAgLnXSB82U3KKEh5iXLLIpx+tL/nuinY4seaqASRm5529T1qmj77\n87ZwCNrY3wz9Y6+WbfSrsh4Vx2tKu9eJISc88/8K/iVAftOZYMGow+Hzw7Rz\nuT1+PmrEwUia903a+aWoTCFCOxq4kwQRf618XdoVlp6KwceO+GyFRx7fYyco\ndo0Mh257hbzuJC0oOYQdcIj7DOIuO17hwqJKXcLdwsnhxLVGRFU/f8iGcRLw\nBkvUEIovj9Z9zYMocEMXOUJ4MElXkoZgjOEb3CmkJEkC7Dwp9WLDrp8joV0V\n0iB5JqD8fC/fetWU8HyzgNKX7OnisUhnT4WejAr3pCyxByhOsp+DhXGg0p5D\nHFeJiT6UnvP0E1qGKmioZZZXnwPcyYvnezPazQHV1iJ/D3HlDTvuRmphuMHY\n4mLYcnZSDRTiHmQynCmpxMeL4rHvyTFo10Aym8RpWtm8VYhNxXeFso+osdUx\nfkpQ/MUWKiCt7B7PYLpKjjKcEYL5EQrRHMSZ8O47Qx6toUghcKRZYXFd/7RG\nXP7Zb3qdXKaskLN4Jddt783APw4yuJ7SJptRWI17dx/zVLVsiDr5Gn8Eco8Z\nxYAe\r\n=gsk8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDt3SaWdQCYI9uBTeQYaXuw8HG/+/6NksA/DcjvwJKGhAiEAwQC9UYiISmExEWvTWPCrKNxugTZyaG1f1RkkIJvgVGA="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.2-alpha.33_1572617029918_0.1304798544695629"},"_hasShrinkwrap":false},"0.10.2-alpha.34":{"name":"@react-ssr/express","version":"0.10.2-alpha.34","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.2-alpha.34+2b40f5d"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"2b40f5d42820a877d0f68975231fe249be66e2bd","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.2-alpha.34","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Xx4oBLtHueZER0+BwC+rnHGRMVk9dEJqh8+JFbZO8q77LtStYaJ5eJKpNnW2TZf0hhsloYchcwkeeKLPPoWOdw==","shasum":"dbbab32a5eb4950f67286b25563e7f292c64e95a","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.2-alpha.34.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvD1oCRA9TVsSAnZWagAAnMQP/3EbmLliL3PGzBWT2YvB\nGh9wsP3X7t9FlWjokcaNU+HYjEFouIYZ9hJlo00A6f8FcW24WOIj6alSNGDx\n5kPkcaw3ejXZx1nO+SPgp0BqzkSrfqLKuwt8zdSHI+6Ug9EozOikXz4ZhkSb\nME6CwNKbcgAWu9RH6TAdEghK2B5Mtj+5PKgv/CTBV4RkfT35Ovl4oclAIEef\n5KDKT0QiMSUoaOKh3PORqboFAiXrnrczrHAaVuOZ/qnf1e4VHcjNz+RuG5UO\nHLwCRsxUhaRFlaOeOkoE+LewpU2JoRJD3oS4Yf5JyC/jp55v7OIuDmWTcWKT\nEEAXAiZLOqQzlXsee9KL+KqxqlYpsRB8T6YMA18b8JHmCEcMMrSLgHBJAyYx\nnEjStYlIviGl993oF0O3BCmoe/Uygp6ZVdf1HvNV0Mg1uXwEt396VTsR0m3G\nWvJsxmSnlMtKH4TlxanK8wGjpOJWxrP/gDIIDueqxAJmQSMeSorzzPEzbJBk\nXbCcxve1RGgpSFErapnO5PwTQ8VPo8Cuj6ckqXuwicmk8eoM8w20YwIimN4v\nIXs+YMKKUVVa8BXonoVDPOEgvKbF7RbxCVtg7NZ3kUFfYn/o/aU1Rl5ii1Z+\n1u2w9yYKL8sMtfhU88S3kERxdhJpJFo2rovIWYsWHG3YB6lIynCoU9Npqu0M\nFg+N\r\n=3hql\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHN6mwZyO+x3UzQCbgj00qtIcj6//qEpZy/uJXBVAzr/AiEA4lHBNYmx0KnE6jQgOEOrTiS7YQEqjtXA+zys80i9Zw8="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.2-alpha.34_1572617576106_0.7585354125043844"},"_hasShrinkwrap":false},"0.10.2-alpha.35":{"name":"@react-ssr/express","version":"0.10.2-alpha.35","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.2-alpha.35+ef5ffa2"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"ef5ffa2f2f20eacb6e5d456c9a6f9ec62dd3319a","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.2-alpha.35","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-432oMKhicDyCOf+B+BeIt0OWH+mB3VQDi18QNmBH/pK5ApKWdpYHp9Uq+gWsgGGSE/LmbziFG4vtd0EM/HNkxQ==","shasum":"b5489d927d445df9ea5551b6c4bfafd50a737cf3","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.2-alpha.35.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvD2/CRA9TVsSAnZWagAAMzQP/jtCGjniX3olPHvZXXfe\nkOdSR0tDTLl3K6LQNdPnuYnxx682ohkxHAJ7kCnR4mpQ1Segq9LpWlMlGO1Y\npLoHmt/IODuskP4R/QO9l4JDBL8Q+uRAz4RpHky1HLqIYqWguje1NZECykTY\n0oGE3N0BGw7xudQwTCipM6BFemspTxb9eg9T3eQHUrzX8WoDnaqgTQ+1umSN\nxn4we+Svi908itR5Ky7ylvBrwfoIsMumTsG5Jxb6YqyhudmDychKSdCJT+0g\n86pnERRAvqkU47spkMkXVOQqfxJ/Dkmio/HAZflpuo9fhDXnOiAYjl8l2IZW\nZx+DJOlXEMbEB2BM1I5o7wF3QbHF1nB4AvFjfKUZJPy35E7Zh0uxRS/Y2Fxr\nAZholEW0aGt/kgQCI8kTIoCTr1AkuPtG9J5DX6LCpuwLqtLzwel8krrRRMmW\n9BaSuYLQqnFjx0KC6o9nqx/UwOLfBS8ZgPh4MDHRBW7bNUY68502DnCRFrkz\nPwQMu/sD+SXRWex5k5FEu9y+KQCfaeogFBU2Lqav9ExODV89Tqa0bD0yEBKY\nt0DvDF1bFeOMHe+lBLzg34qOf/EmFMA1mUlr78p8tmsxfNS+wnSB8ePppjRf\nDwk8xDrbdNOCIoNZ0RwO6jS4u8isIm/BsaVHHvlNGF67+kl8E+wz+j+BtKDN\nGmxZ\r\n=KpZT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCHPuyx3XMNXMHV//lJXQz9hHm9jR6lidJdxaYwsC16PQIgRXRBEo6Y5TMK7aD8IjzifEERbQjUfqfh7j5N/hxngmk="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.2-alpha.35_1572617662954_0.7454726270942469"},"_hasShrinkwrap":false},"0.10.2-alpha.36":{"name":"@react-ssr/express","version":"0.10.2-alpha.36","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.2-alpha.36+df6bbc0"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"df6bbc0938bf9cd1da4190580a2a1eab436720a0","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.2-alpha.36","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-rb7CXVGkizHlaGxlhfegT4bdLpwLJlaafN6kmo25IkjAddD90AZg9uykhpw9XyneuxN60Ighl6FT7947Wx280Q==","shasum":"be408c9f5c4ef77f266a5f485fa1bd57d0a0719c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.2-alpha.36.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvD45CRA9TVsSAnZWagAAgg8P/jOdeTJl2s3DhxKCMVxb\nnRXhwv91uWGsIt0q37JyYD3vWbkjfmRLrcv6zdDJL4LFw37dgJUUcSrkNwjP\nKehpKI3qDdvvRrZb7y7CWqZz5NzTMAYlQwWK9iiO/sVNpmhu2lYjQDanKmvb\nhF2ElVDzLyigvHJreJbMCLf3Uu1fs7VzqaIhpwVVtSTveERUYgXxro+2Emoa\n6ENKg5OuX8GtoySI9GYog38vQbfle5PoCLogOflcKhzil+s0oRSVYloP1pP6\nMnUhp1ATu11+/yxZldozyVT15WmM9lkoSrJ3vWYIjgsYvATnyED2tNM/AfB+\nBwK4TZfS/tI2bnti30fqHNqCuBU7m6xPrsBzbf7+UiFaj+Ye2Bzc01/n4170\nd+Jf1hDJaQ76zltrb9OWq0wuMqbzd3V/I0G+3eSIcSwGqO9GegKNW1sTEXfj\nZr7AvLpTCgbi7rdfzbm92rpI2ZOdWmXLIlG9zD3LgLY891etc2UUEGJDbQZB\nDtxY0tskjwkcns8r95FLhUMeLXXVrRjOxuycIRItJcbEQttlQvBoMIal72J7\n8EhZs513fiiy01yhvJVSRwNMT4n7a3LlxfQfwzhNkniNzJ+eAw1pNUWawFd0\nD82ue+K+NZ6n8GEP0ieWfEcQ5SHmu+OD21079DNNHeDCjB6hpEif1o8BIKqu\nyl75\r\n=jf4g\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC11Fivt7IXBjSpugQTSEQvok135N4IviaMHfnNV8uBhAiByZroZ4+zLTflXeJSaII8wVin09VSyt4eUdgWmS3NUDA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.2-alpha.36_1572617785411_0.105253588692787"},"_hasShrinkwrap":false},"0.10.2-alpha.37":{"name":"@react-ssr/express","version":"0.10.2-alpha.37","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.2-alpha.37+b279888"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"b27988821d14acae12522457b74c1d563988e368","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.2-alpha.37","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-cNWXjj/4+V1XEa6FZsuaML/i4dFmTBxTOCaAnfyxf3bPWXeR3iJEHuxRzfPtT9E2753TOV+udszgR/UjM0dg/w==","shasum":"bbd1ea0b7307b62971754c4939ca6fe41a9e3e1c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.2-alpha.37.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvD7iCRA9TVsSAnZWagAAXdQP/RvBui5dTLbwrNu8gMNa\nUSrR5vssH3VwuVHXZxTUT5mVeyTHOJmv3QdPYjCrtdFPCDzXrs6FO1Af5TUW\nH8pWP0haSSmlLiSuWHFRPRvyyUS5EDUizMsERIuEjn8OQVaW6bWxODoszi+U\nEs8U2RrBpNoY6HgUDUlrnaPo9K8/+C2G4L48RFAPOoYSV1+yU9ldPXxTvVn7\npmSOnmda67yPHvm03KrO4G6nXvwmDLKj3G6zOI3RfiCiMIUhA2S5CpLmLiCr\nVF7QiBBo/pSJ01HU5QZNMn56fVgIyYlADPFlE0W90X3FeBxzdteKQkLQwRK5\nCgCHruiZU2PLF4iwLYIjruL2zJsIq7eMAeboVRXNaaDaPXsBEXGRI33vIPSH\naroztNmHq+NKmymopCHh59Z9bIZrmARe2XbxvWns06Bv+wDQShcPUAU3rUoa\nYjpjDC4K/WLqwIQ4ay7YOwWNzCXNzS6MSZBHKF3J4tu5lcZT4HKMcV7AAq/N\nXK9AuI2Iomoz1kqlePcj94Sc2SjMj08Kf295rRsyqhuBwgHmhV7v5PTxM2NY\nQWFVSnu6sbt+izcZ9n7KYMaAtOoQj+RGYwAIVjuZ8wY+2lG27825ARS71PE6\nj8AKEVby5pw3AzS7fAitRakyhmJ8DgF8Q3wwB/tZzA8lCpGpGgEkvN9b/q+Z\n0Wu5\r\n=/eVo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIASPcJMZwJ+2Ti+WpvY18UdHsfnEV0LESh2WGn4B3IouAiEApuDkase4qmyzTwfrsZZVEA1lE+Lju5+r91wO0iKcKhk="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.2-alpha.37_1572617954487_0.010627959596801517"},"_hasShrinkwrap":false},"0.10.2-alpha.38":{"name":"@react-ssr/express","version":"0.10.2-alpha.38","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.2-alpha.38+5b78d2a"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"5b78d2ab953a797a2a451edf78de9502a89e9e09","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.2-alpha.38","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-TcJCIOlZ2/okGKlKWpm2lknyBUJvBwZNDcUs/IFzQQvBIJqXxGnMdLgLenNtOrTTQqD6imNNdpmIlBiC9Ibyxg==","shasum":"008696f6a227f0d8ddb04555a70f1e913c2aa816","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.2-alpha.38.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvD/eCRA9TVsSAnZWagAAQRQQAIH+m0PBPrzqlByGTa7w\n0u1pnem3kdKWekt8yVx+N1S62yVIE6+vxIu+WjCjYNm4A6dIjYpcOpqXeWVt\n/63i+V0sMGJsFJLODAmzJvjbG7Rcp4bPAkJUvWaBrn42qtWmptMxGf+KHsjs\nzwpIXpYEep3o2NmiahwMYXkr7FFv53jl6sJLFm/s/XPQXhVnIq7WXJY3eRFa\ncZt9UbWC3sGnHZS+TRtqu6IHPh7e3W93NwG4yJDllVxNOPvLIz/kTBdc0Xtm\nkk8pPihihzf/z83m8nE/eLGS08RdoCvBrMBBfYdRniKRNk1wr0u4PAzUEfTM\nrqoLoEd1UPHOzKzqPdJhV7GklICl9UwRN0NdAaKupe4tfi0Y8m1yEPp7w1py\nqeZqrgC2z/ZGlKYPOItNw4EGfdWyPfX5R2vwd0UwZez6DHXm4JUoWOK/Hd1z\nxRhCr0NqWBuBY2ua/eRMwTv3uHQO/xhrNFxQffJH2dZoPoJDBivdPD8m981b\n+BnsNUdzr6zn5UuckrEsdfn558fdOACe4iXFGasTFAK/UdxHNRyK8qojwar6\nO/YyRc2NwIMmpC3BxkUP/tKxbbro8too6CZEEft/ib6pPs03FNTqhCZTS+kE\nEbR+Ytt9pX1hn+teX4TnQZxuXggJqIofmMF1OVL9vX/qnEEypq0gnT1ITMFW\nzm0X\r\n=K87q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBZYBznCTOGp7GcVMD7n31waQBvBG8jPszhGxSIborolAiEAsRWo9Ep1JOCPCKbQUuTjlvzFKI7FYkZgsvf4X+m6Z1E="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.2-alpha.38_1572618205745_0.6317182805983579"},"_hasShrinkwrap":false},"0.10.2":{"name":"@react-ssr/express","version":"0.10.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.2"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"3ef018ad00ad9d166c94682ba554990d6527a344","_id":"@react-ssr/express@0.10.2","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-0GA+VjFsbu+KzHdpAZxi8RGI+j0eVYjxdr8k2D3wGr/2/V1dGtDWzIBx7BnLSc0dufIXwVktw4FS7PBHqjPoCg==","shasum":"09e3c0fc99c7b70b7924a59c59638392c3b780f3","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.2.tgz","fileCount":9,"unpackedSize":12835,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvEDVCRA9TVsSAnZWagAANokP/3rBx0GKuj82iZ/QKz94\nj5hWj5WHgC9gZsRfOmPqdjClcP/1k0Ei5yPuYe8WSM0osPA5DKcNPqYZX6yu\nvJ6jMwV3am9Vl+9DF6vHzCCMyWYk2AQsfCZBUdFdjOgx5teZ5obhS0Cg5+KB\ncdpRDeL+m5zPHSH6YQ9qofmsue6LsmPbYdCMv5oLBSg+mIB17JOKYnL03Er2\nhsnwqBOn/HKnzHPWRud5pQ/NRzUuJ09a6yi4VsAbfy4psLCnN97BDC7S17nA\nHCnPadisxMZZ3ZIHH+P4ieeLCFN1MsQDzj5X8fyatt8B3caquaCi9jyZTZIe\navGcjDynbcKAc7n7SCMkV+2cHsL1BDQ1+9gLkh5PR77bHrDiR54U8JVWbsCc\nqigpHXYArF7gQi3pV+T8OsuVSEFS2c1FtDmH5pGuTILGvGNr6cFm41r23qdR\nYK/Jz/4Ti8jRV6JInjD6sAe3B398l/7e+TGkutXusBoOHv0fO1nHyuaxBsCt\nwmusjgxzS8BFPjn1qmRYdkpIDb3MHM4LvqEf0qdoDYEYUKWeMlYNqgtsPNzU\ngavdPvQihmztkDbmtG2sbLDBqHSCZ1LXM6gpFO4seAoEM52G0iKdTEcRPJNi\ngcYUFMtxmrd1LsN8tvZAMWNeEZmwx4PpB2QaaNSR5xrmEa3xH00/LzQneYqx\nPBvm\r\n=WeOp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBFAP/tNRCx77oP+JDXCcVfnYtKPLxbKKUs9+6hWb9FvAiEA/3pYhntk0iIag2w3VvjvBbjkL7NvbGctx/23PKsr4Jk="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.2_1572618453268_0.8245543935998947"},"_hasShrinkwrap":false},"0.10.3":{"name":"@react-ssr/express","version":"0.10.3","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.3"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"08b3184b7382dcdfd886dbfa4282441ded174ea7","_id":"@react-ssr/express@0.10.3","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-ckIB9vzY7/faMLXhMPT/w/aS8EY2g1s39DrtfJ8fbYfecggSU59W0grs5TkS2oEGlD/RPXoHB2vp61rzey0Q2A==","shasum":"632b024cb4aa4ef7a8063a865af6a26c27dbac02","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.3.tgz","fileCount":9,"unpackedSize":12835,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvOMhCRA9TVsSAnZWagAAwnYP/jtTZg2ZGCKfX39k1KHt\nJw5m5syried5iv4LTkMKX3AT8cWSqglYyx+0CO6lOX6/+L8/xDcUWXFK3cFz\nV+ddkAWPZafehiza3GnjvBqUZmBoBniWSPf2jknQ2LED0kObLyHfukVE1UEe\nlHFzTiC4PNYmZOalw9BSLVVvgWh2JvCm/idETj1v5YVYOl2+ZoEwUWZDPW/H\nuXrgx3psy9yrN4ivLEuwi+lcoAV5KKjWrhtG1cpwV9HqKm+BcdA1wiNi0fHQ\n9sywvqQtwjX/pyH9T+A4xV0Hbhb/mZJv+2zcNLFfqvZvt99mTYOPM4cICBoP\n+F/4aeRrRM6ZZFi7yASCpyIU63c1Dd6+yc4Lza0s+nCwsJ5toyLs+kVKSz9Q\n6wGMpll64In3Dp+Rp4Xbb6YH1UladyV8My8Ep4wyowN7IrysfcMjCN0aHAjr\nIs2+GKHawWRzVMG91Vfh+l5v4PvuI7JO2yODR/Vi1Z/uzH+dvuwyOCXOcG2l\n1Pl1FO3VVuC27PkD1ULrZCOtj6GcVhfGsfA/Pzdo8qwwJIb6cTB4Z+UYXvz0\nkKYXidYiopLEIOG8psLTauWss3fTbE2W5pf++0Vj5/E1RqJq5WrBmTzGHOyq\nfmLgX0E20cV6DaS8143cOatKEDqv5XWfxc7ptDiLRUvYRpMpNkT9T76jWueM\nWDQm\r\n=N1CQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQChkrzIuW10vEkU4UgYD/nGAc9pZlREhGusfRiLUPDOwAIgFbM8SDjwKUUvoFb+G7ErZUowxlBQvaFWeJ10uWfA2Zs="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.3_1572660001010_0.09037822056396938"},"_hasShrinkwrap":false},"0.10.4":{"name":"@react-ssr/express","version":"0.10.4","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.4"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"036834932e760e1b5611aad2d7720728785552fd","_id":"@react-ssr/express@0.10.4","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-d/oqStGi3S3zKx0EkC0tQyQs6kPxn/+1KlumR3joT6qUyyTbiEHBbj9gf5dylnR+XK7QHvRMxaPA6E0HMGiEEw==","shasum":"bf005c5d17d4e87dc26792a4ad9f81f91a434328","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.4.tgz","fileCount":9,"unpackedSize":12835,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvOYaCRA9TVsSAnZWagAAV4UP/3k/Qo29e4FBbqcJ+Pvu\nRZqNgx7cmJ7/I5n15hSZKhLra1OgVb2TA9nqCeCFqUkm5fQveTAZMkCzuWkJ\nWGzxNlbFDbFgTtkoQY5xKZsghK+BxQtxcaYz1R41WDjHpa6XhRItd6ywYIVw\nbUdV/W9B4OOSLrWWoiiuH91etIO21nQEIxPt8TmlWT70a9XqeXF1eYzCVDsA\n/sIcluz3l32xbA5rLcsQxd39i4Vy25OJ496I5HCJuOFP5u8e5FHGsjA+Sq3j\nkqnIJf6rjTnGJu+tH1ZmiNI8gc71KrtEXkpFTfNSx59vk1KQL3nI0rIfny2m\nME0itbpW13o0XJ1s7dyT5nBXPkv/0Q9+FrcpA/JnMTEYeq2XZaViPj9PBWgX\n+ZW93ZCIHHAXdb8ZI5vTvH48hTsV0u9VvuCDGhR6UCifTeoiKsRVmHpBSrWF\n1GqJZBSJACBGktfyTBEOhrNbPQ4vw/7RZmGScmYyN2GRHsD1zaAc7/BbXs7t\n4DTVoQ/PmyQHGWVohYYRgX8+of4nLUY4c+d/UO1SPln/0KHe5KQ9QwkZdZzW\nTtoVVLIm7Rg58r8QlmJo3XGrP4uF/LBRA8qtTzkeoZ2f8jRsXcnAp7zW4PKV\nJ8r0Bgp6l99Vfiz7PYnN+jz+WOeuJ3ED68fbyY1bgtNs3eNdIuzosEnttImm\npqbu\r\n=MMB9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCQuS7unH5lAvaVv8tvQbC6S9dtT3V1RL8RelxNtdnLOwIgYtrTavSqNM/WoRJepnQgQo3sfsoWcSZINIBidfgEzzM="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.4_1572660761642_0.573183659163041"},"_hasShrinkwrap":false},"0.10.5-alpha.1":{"name":"@react-ssr/express","version":"0.10.5-alpha.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.1+c597629"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"c5976299a9a91daff163745bee49b7ea0080a50f","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.1","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-E+rVGSrSzgo6CKL1QhK81L3N2BwO66xW5wz2cBxmGTKv+ogVQSxP84ZkwSQ2bYGq2p9icIAvkd1sOZleMhUT5Q==","shasum":"fa688fdc61effa56012b6a8823daabba7933173a","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.1.tgz","fileCount":9,"unpackedSize":12867,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvVk7CRA9TVsSAnZWagAAu24QAJ2dDXWn61OQkxt41BkW\nz4c9oUsV3Gd66oxb14ySgTRJ+RIT8klMAXrjv9nIdIebsE2O1bHSgyeWGtGm\na3iUgLxOu6Z+BI9kVd+4Z59gcnUM3ePfBszaOW6tS/dGQd7DwBv5Ha34T9sU\nNv/QWyauumJRJhcZWQkXDz2AyCfDkBa+nYg6dgIUAJ26x7rb0COSyxNJy0uC\n4kz9uH/0X7TDVKCZAQXvXnfKAhD9RLcb44X24BzRNkovFw7/xP9hQu88DFBQ\nYCuXA5PxhoNEoy3Br/Ow7ZebGTABlcqCrZHgFXheAUuapsghaivQR1bEm+W5\nn3iOJc/JVx3AEOON1VRlCJLUoGb8dKMkgmO8kMhLslFqzbdzwZa8JMVcC76R\n8hoNpEkeZ7WRYjw5HfY+2AFIPvvpbVV2hGMp3wwMuApGEASZSPmGeoW1ibNO\n4H9NN3iIM3LjO2EhPNY/0k3YINtV1Hkv3uj3Tevkhlp7AldWO78zUnGZu4b/\nePCmoPbEkIbaxWXVy7GGydwLDQC9dREzX1wHuAM9oCG0gcGkNItIbLRVBg/6\n+hjr7UeD7XVkZr0EjM65bJ2lBFacR4vQdlJBuHYPw9j/sXFINlTjojDdOJnc\nqScaeGDm/MDyShC9gEXtevYr7wiIZ/Qid1zESdk6iax5gXPbwlIkUTAJ1x0g\nku78\r\n=FK0E\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCEIp1uk7BSZ8FIacEYkNEtzVQxrxcDdpnFmMwnICa4mQIhAKoCTNzyNljbfFZWGHDKs1BjwjYkSN607Mn0s5A8kF2b"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.1_1572690234765_0.7148420500135839"},"_hasShrinkwrap":false},"0.10.5-alpha.2":{"name":"@react-ssr/express","version":"0.10.5-alpha.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.2+bf75095"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"bf7509582979e168b81966d285de77b57faf0bfe","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.2","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-e7Slss8XkEXyXJQ4BoWKQsgA2Y9D8B5CkO/f+71/Su9oJaUVHRf+dmdBhGJYYoKFCo4611M9NpEhXeRXgu/4aA==","shasum":"4fce9f5b768f2debbe31e50490873ffece807066","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.2.tgz","fileCount":9,"unpackedSize":12867,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvVnUCRA9TVsSAnZWagAAxxEQAJ96kBzNnLNNZj5GwVBt\nqECk/Ju9XDCSbsan6NwI5xX6ooljByVzZ5MBQbL27wTomQPZhu6aRuI/iq6Q\nK43uqZrfIxsVFQ4OQZbN/MesIweWprZh+qgGJIsg9WkW7kC8kDfH/W5DRCWA\nWdZ+RSEIUnkpWabaIrZLhFakGuTpzNWQwDLm2q9IEh0z2pj+Nn13gvBRIMn6\nr6bDa1sHj9ayApXN/j87fryim7Dm5WeEFObElkE5p2QHW51XkxLTztOrgjgc\npOm8BLzeKFTKFJwpuL6bG9G2/G83XjOoif1lGfaNaGhTYAjmEbFz8Sca5bRn\nyVVwnOFCFt4WhRJcHsDtoAnq1SU/hyYOAYVbYM019iX/jChbABxHnAyq3eiB\n1xljhhPd9KjqgP/t0z6VJvufRp8LTNfNDkNj6n8c6jccvihrLRekioTo3fAI\nuntNULsWvaxWAE5pGMl5BOdkKTh3vhixXHjnvn6eMk6HumEFAvzGCs05Yh3D\n+0veqqe+YlREfGlExIE49QHAOVDyz4ee6AWHlXwGBG5i+HCaljyABG2xBXGL\nxl7rW/LWgKdcEzor/FnNNaXRZBsx8u/RNfb1b+CKBLJkqxpBmlVeZfFDm7Kg\ns8ppZbRxrT9pEIzqM/IRcsO6j1jjVa3U7oze2sE+RSDml1epQzNytWaCjSMM\nMGfg\r\n=YbN4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDBXI9hgQyoXlmYh1/+L9RyPE9kbhsDbq3Y+J6pS9HNCgIgYgVWzRNKod2RMx5u+R6QMVVaGnCvW/4g+ICCelybA6A="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.2_1572690388489_0.4079226213963216"},"_hasShrinkwrap":false},"0.10.5-alpha.3":{"name":"@react-ssr/express","version":"0.10.5-alpha.3","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.3+251ac11"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"251ac116eed75f21993f2c4bfbee7eba196b032b","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.3","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-FCDWj/wa8Sll5Tneiy3WNCp+sZfGYkvuJmZX7Ftr8+Lzvxz3Pj3uSpwo06tJu0Q/Hn4brko0qxfidk5xsqn4ng==","shasum":"028e3aa5e8bd5bec39c095307f2c791a1533af6c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.3.tgz","fileCount":9,"unpackedSize":12867,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvVplCRA9TVsSAnZWagAAUmEP/30/Z5DzrjDK9+5hN9A+\njv5l9mKVs5Pe6GRdRJNI9KxjKOjpMs7QgvS8gvGuhI57G9h5rLM3mSbrR5YJ\nH4iE3OPlWXC3inJHBYM6xMbETcFPh4KTFRQnv3SrS7kyQZ5kwkYwA9Sqt5Qj\nDYaC8E8Q7YimOLuJnabYY87rQjqhTYuqTzgD3OTXnwy+8AvxO0yiOnL1H9i4\nzQLwHETWKIQNpdJhGVrrkOOic5YY1rrNimow4suHmX+NuvTltgTQ1/t+3CzR\nsUBnknVbSlS4lP22JSNABFWOwZAKNsshlWgnYiGxODyb3SC/PrLMN7uVl9sR\nGZ1rhHyk98OhijoeOcIjOVe6x45rkRckhQDL0VlTIpnkzo9h0GQTeTgvAmWr\nJqThQa/wBQzuW4QKffXrOjkr9O6431qTNktUPOravGXpCoDqJZP+a1Xn/VnE\nEMbkVLFy34iaowKJhSzWtQNCirFtGojFaiiTpdSQfPzdFT7lF5ei9qbUx2U6\nDKpwijRn+fz/zrAOTBq7eeCXqLS1S5z0V7VHYbiI8Q5JlchpaefY3idDN572\nGhP4vijVf/W7yePx+L7gO3v9BtGUzKlrJrFBw/Po9oKTGz+jdoERMiEHjU3b\nK3TS+F5N4BaTTz9hcgsC3kwryus/kzWaECfn8MMMi4UxtD7/xFERm3CTQm4B\nksQs\r\n=Sygx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDdCkEv8t3MCLd4Bq6w/Od6u26uL2n9A9PtV8++PKbwYwIgFKPM69qvZFH/jwqfWq6RN1qougrNaSA+HEx8BwJGZbM="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.3_1572690532829_0.8287167522917489"},"_hasShrinkwrap":false},"0.10.5-alpha.4":{"name":"@react-ssr/express","version":"0.10.5-alpha.4","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.4+687347e"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"687347ec2fa30900936ab6a20226a0cd4e3162d1","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.4","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-7OErocz8cu9KNeZZUil2gBqN3EMw+/nG2Nq7GBTFCyV5tIRf8TDmJUb+cZknE0SoB7RlYmVsUeZRYQVm9jH3/w==","shasum":"caadd7025e0a531bfc6317055e51dbf27f1ad9ca","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.4.tgz","fileCount":9,"unpackedSize":12867,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvVrTCRA9TVsSAnZWagAAT1gP/2mBB7Lwih4eZroGJCaJ\nh/bRqQWajpJ32WnlxEgxZdo5N+24qVZE6zy/rcjMqp9rySrClwPOGjBCxKXL\nqY6ot8+xPg0BimTUChZ0ldTK0LweVEpQ2lKc5sVdQ/AqApJzuJHDLxdjEx00\nZwuOTakcmKPyG61GmS1ilh7y9ZrICwt/uSwM9x+FSwsNMcR6tM6kSmQ+zm/9\n5SAvwSNvvlBh3Y//G991WLv6PnMXtVcGPXjOS7evHIDPC041Z0BoGk+7iom0\niWseoMTPhiQKyPEvGEajZI0V/5+AdQUh3wQItePL2lcM1ax+3MohJ4rC1Ub2\nfxXHY9DZaT650/hgVT3JYH8yQZyrcFvKkk3ujcvKfXw+/3Xhml5DOlYV/VAf\n4z1/wW+2ZLWwD4dn8+kS7BS6tCxrxWqDv6qtovT6aLdzojt0hA7Lz0GVlqy6\nZEXiJG/UBIWyUCj9ohTBF81qZxsRfKIAzfD72ArB8wc+Zfk3IPP9ACrpLKfa\n+Jqi2DNkjcHa3UMrwa/iKcbU1wl9Y1tk3pDd6O9aE7VA4cU1NoAhW7kIMUqy\nsoD8N28SIh2DyPwfKXv25XFK4ZhSi4pyZZTvnyjgx/+/YUN6J5B+8DxbMJPi\nl2O/5kMUs1Gf2a+EnxEz6jGOqbCXpafprcjI7UvoKqjeQkR90QQQeX22CrkM\nZgB+\r\n=2VxU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDoTjSNmbOJnyBIVj8DXEW1IpT45k9upnBNnNfMNCs1QAiEA7Q/8axHnkhcZ4/Sb1ob8XBJVRl2hzRFWzJdwHQLY87k="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.4_1572690642925_0.046289264626216964"},"_hasShrinkwrap":false},"0.10.5-alpha.5":{"name":"@react-ssr/express","version":"0.10.5-alpha.5","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.5+2e62273"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"2e62273d1ef061bca55b5ab840aa6d760c6c34b4","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.5","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-adAGvkzEIzmfLIiX6zSBrymXGvLDbbHv9QR8H+fh+sj8E+kXc3BFf59xR47egiXtlZ4cvu16ah0kHJf3xt2F1g==","shasum":"4b32f114203a9dad43dadf5a3f35b850a6f6c1b7","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.5.tgz","fileCount":9,"unpackedSize":12867,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvVu6CRA9TVsSAnZWagAA+fkP/0pvo40lY3Q3pVluAdVs\n8Ob00w2KUpRk4EZ+TgJkl/gsp3HgYwWuB6qDV6MQb2fwUqz3ZAnYDwuolZAQ\n/ZzB+kcW6g2jol4FAo1XOuFRhfyg6XeWl/GP5ZlFgSWnbnugxt7lARlTkNp0\ntSfyYUtvMTpEalH/oIY1CUr/rzyWvH5jnoKefOSBCl5gwkMSn8Bw/L+MQy8a\n6SbEErvAWeJFGxwl8OC9briFhPyymHBLmL7hRKjA3S2YHFWGvL8yuB8ag96u\n4WaXDaG34iqPobhnoKtkQzrgLYNELr5dj6Q041bsUYo7sR31x5wcZm5uvQGj\nAYdE1dgEpZQbf8BsIEHnyrb0EYUJQ0hdh1InBwfABFcqSNFmujzUKBxzoXvT\nIC6OUdSQgL/7N9/QMwQBIRoeUgCD+YA5ztK7qZeVolpKX77SQwv5oOpMTLMG\nKh001I14zxO2ysQj2sXVQ1xHzo4yNuQonmLVZcvycW7/g+FcNJAxQlH1+/kv\nEdwS23tz2K0VsEAOvr0nNR1I+VGHAR8Q6fEVjYKAuupDTzuS0s7jN0X/WNHl\nTXE2Ux1QKTZWis0bPPBllQVtgX1idx3hvXTCvuB2BKEX644nbW8/Kb+mtL9R\nP8up7reyNz1UchnJQKQtXK5sUK/1kTPgmlaG6PWc7gNohrOk09pXPPVBtemA\n30w0\r\n=UFyR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDlslx3LDYoHBG+UWpOVldHUIvuREPCqJ6TsnZ+NMGgBAIhAJmd/OO3MCkZD+Tuywz2IqomD1B6N7cqToA3C2XZxGgz"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.5_1572690873644_0.773569301747032"},"_hasShrinkwrap":false},"0.10.5-alpha.6":{"name":"@react-ssr/express","version":"0.10.5-alpha.6","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.6+7dd6b32"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"7dd6b3208c721e5bccebb66bac7013438af817fc","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.6","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-7C9FpnL2LnroWH18/HzA+xG7UAHPMCSvIiK3qKsV3cS6eJg0IuXbDe4Z+PeERBb6DaugSoz4BFIDQ/03XJEi9w==","shasum":"9af2b56538c5a668d29c62bf8fa3f2dc8f761542","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.6.tgz","fileCount":9,"unpackedSize":12867,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvVwLCRA9TVsSAnZWagAAW+QP+gJWX2z2LHi9c0+8f3yu\nNsfMoWKRhrg2ls2NlQcQzQrVZlJmW0GB0HszoCxjRd+CPSN7OxvwL8iP3Ty+\nUMsnJr+93yiNcwpEUyHHfs/lhjWCyaOT6I2XrxO0IWKGh8fqTk6dmzou9wDY\nnbkqeB8ODQWI7yqg2xstmO9+pPnt6H1kfpc1zv2q5XQAlH+IYcBBnhsqnVCP\nYJ4CjxeXTjdUT3Drc4BVfr5qdz0n8bdoh/WTkTz71j6tg+aNTkRPFQSLM3LP\nJZCmEPr+znR7Blu/1NJVmFY4KUAd5dkXzlJmvIwhfgwBiiPAGB4CofxxqpnO\nO0vc94QMCuKMzuz3fpOVUIjkW2EvkIs9iqUkxTx4Mg1KWivyVa1ETo9tcjGw\npHd8b7kMPDvHZRfj7mP/GDCh44F9+TiAZKFn55UF87SWsPO7KHQ+FY/YUBsK\neK2qZxq89bSiGy2/YMzEbe8XblHCvyK9Qn/Xesvx4BQIe1lmbZbnZiUQdNMI\nI8whJHWBm87043v3WfUsY5vTU8EoGuQBbFwerfHAjsAkQyarJc+8heBt2EoZ\nIUPkVr0TlSrXz7xz9PgXDbVMlNK8rgfosx69NpLcs+OMVZ71LV4dAtpyI0Wy\nagXR3l0/ivFa//XyRsG8Os9ZgVZqI7abyp8KNCc20ygHd4/NxL+0bYNgXZK/\nXQql\r\n=vzY1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBG8jPpOtd8jfIvUvkPeemqmcjgE9K1iNcvs1EGH0/lSAiA3IVJiUNa5q7c4ZJX5bkpCjr8GK8auKyXMgm+zt3P5UA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.6_1572690954922_0.13668094927987684"},"_hasShrinkwrap":false},"0.10.5-alpha.7":{"name":"@react-ssr/express","version":"0.10.5-alpha.7","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.7+4afa52a"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"4afa52a9b16a570dce7f1ff79dca981424e034b9","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.7","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-+0BaWMtQHpApgkhAb51vqhuZVlXtee4cXFHpku4SZKj2bYa5Llixoyhw2NQyMHYdwFI7g7mpcaAOe4EGOhXreQ==","shasum":"1558069bb977d646a2812b919caff00cc384ed4f","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.7.tgz","fileCount":9,"unpackedSize":12867,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvVxwCRA9TVsSAnZWagAAgI8P/0VJxPYSODWJ1zg69xII\nZe4b1k+t05mhETEDQQupHlnOZc1/jeopD1B3GQTRQT3JqGYlu7gBd9bG5B7q\noH16ai76hY/xRjH7k7PRcaMMJyfuxl8kFXcOpYZQvE18q66PZKxEaz+rfFJX\nc+up6Q4Ec5wPLqCtfsgCLjZof9AQafJWe+6q0fjrLwn2ccpnqT2EsVcgfLpn\naMK78UOOvrcjZ66G3gWt53dv79YvlcWV8bqVk+vK8oRGeJkSnDUQVMc9WYek\nbf7Y4ylfD8A90jLG9EJTrVojJiNRuvt94jB6W0Lpj+iw9VLSAZ03c2biCnlF\nWp99FWI5uLqjbQJflhvignkQQ4GFoUL2z+qQZP430nIbSSzr3PhNjP36AemK\nOaVO9YrmK9UqECBILWFUQetn6xFcI1sskOchfOxmStxpw4HEn4uRgK94nj3c\nRC1OuQSkAdTc4xkxdw0nj0f1VP61LofT5ciJvCRHjwQdwn/Br5sZp/jbuOK3\nqbMfhXkfLqaLWn2fN+wzcSZSMckqyWwtMMhjZpKI85JH/+GQO5r4RHyJv8GW\n5/YW80MuklabUEDRXUkuVU/Kh3BXQudwpFKiMppYyqDcdAwwwGtpLiu4xLui\nwxTHgWujt9pyPXmUcoD0+IXr5oz5J0rOhexT+d8U5LIQ5WqfhKAbUlvJFbbk\nfB7W\r\n=msDs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCG512VfvQimRw8RjQlDU5hKq+Mr7yslG8ZpySAeddkNQIgVv7vTlf/H2iuNNv2cQLLdnWLhmPeU+X3cQYdZpbA06o="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.7_1572691055887_0.2872571045451129"},"_hasShrinkwrap":false},"0.10.5-alpha.8":{"name":"@react-ssr/express","version":"0.10.5-alpha.8","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.8+6a99828"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"6a99828de3dba9f565d3a5e4df51fcc001dded25","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.8","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-ZfWSAbQIbD94BUrgkONIe9XoKD1YJThgPUKfr6rqVYQxyZogmq350lieebx9JocvmhX4SZ5IQRZfiLioQhWUjg==","shasum":"e2c28bf78288924606289e806b80b2c0526cf1c4","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.8.tgz","fileCount":9,"unpackedSize":12867,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvVzKCRA9TVsSAnZWagAAb9kQAIRGW1tRtFmKixChfC7t\nvo1z3/b00TEXn/GIRyfmBLk+VMA9ONVI4p+J3vXzUTdjh/tYtcaulpmJw8N5\nGkcoTh6bRnpyWZA1YTQpsvF17Z5w2nY7W+U9QWwi/eBKGmUsHnIT+0QPW3BZ\n4qxv1o4CE8/yBbaFFUdyAcwLrKe7jUOJDQQMfYJYujxfBaaIa4NXR85Vt6jM\n+lzMgwV/lbG/ubBCrqYZn9IJM9NP3QrIPXgcxw1DVhoovKpOjEBFrCFt/V33\noXvvlxZ8+D+XFYIEuEM7X54TRKP4p8vss0M5kHXWzX+hJelEyz2C2aA9h/yj\nmpoeQjSnFP1WdDm6ci3GPB4CbXYheTIZ84TzcXkF5/kGl0j0Kd05tj4lmxQL\nrfNLElaDY3uatNQgWFH6tIGbVqoym171QIgp6AnBfGEsHTqmG4G+N0CxYfk1\n9u4DrzrSy3y+nzBztSd3D0Wg7IuNi/jHXr5K7YMa1PK+WLqJUIzB3PawcbUr\nxPVSCco5i3QhqRCQaefsKpL+spkvZX7QRMHVHtKWAQodFtBqADZvty1N73jq\nqo8KnTxYikZcMEYBUvm9BPVG1yF51s6vpcqZ46qKsWlHHjWC5elq+NW9SrbI\nd4i6q5qOy6GFRdsLQAW2rUosKgXWi5KlzmTCaCCLgdePMEnnln2zrG7m52bO\nCPGE\r\n=D7bd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBTj+uz0Pn6e7yHX2NaBKOq3JYhiHCX015zfqpoMVCEKAiAWd/d7FJOtiQscIB7rcqaBVQDLLOsAwUpm47bFNmYbqw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.8_1572691145579_0.9562710993226684"},"_hasShrinkwrap":false},"0.10.5-alpha.9":{"name":"@react-ssr/express","version":"0.10.5-alpha.9","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.9+26d0c98"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"26d0c9895b9587160545da544cb5c99b856faa01","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.9","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-luf1UXXqjHcmn2LyRArmzfwbL1KhThPyUNvdD8PWh+RGklWlDFnz8wqIF7FtWzvQWGtMJ/snVV3CIChK1OE5fA==","shasum":"7189527676c74976c7f550f924c8e2bf327477cc","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.9.tgz","fileCount":9,"unpackedSize":12867,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvV2nCRA9TVsSAnZWagAAVQsQAJ2RA5U54nN1d2v2JyAL\nb+IUFRUeVfPTNOOXPxXqB6Slk+YDbJvXp15MLdosveg1y/78c5645NtBJVMt\n2q0YA2rgVkaJIPJcj0AznPZwbOLZl1KpAKjyZCKgFii+altzHJhpeB47ERiz\nAFFo5luROv1kgnwXA4LKXHy2I3rNCyo4aH6bFSo6WE1dySx5vsHEI29wWncn\nSGzMiPgSyW5p0aUlHNKIP98Z5g3QZ54InMzav6fml/i9Fs9wIIeBEXmNAK5U\nAC0G12H84VlOWdq34y8IiEmMlqh+mR3u71ITycMJ+9jXnNNXbf27naUfqSOA\n426Dn+qZKDB7vgiyil3XwTbyccPUHMz6p9P1T8pNhVUANym+In6RlwZ+2D+a\nhLAlctH9Ph342XzfLI0Q1aOpppIjsBbUbHmtAktY5x4qwjlYt7m7tLtoLWUZ\n4IMaTRu0IhRuR+zN8rmsced7uhiNFgDh1G/2nA5lGpbGWCsW6WfGwSWMg3/X\nlurx3ihrN4ZtiCEH/WoTlE9nCMIhyuYhOGvqR7f645dQAK3vP4nb33t6Gp3Q\nQKl78Ah3zYQonPPTHYgGCt0xps7buXu6A/hENmXExNJak7ZTUiy35hU29PKK\nJI4KMa0L9qEEPiHgmxe1COSpxGIcsKGARqSTs4VmnDaoDwLgMnL+OXf3mHOK\nXDp/\r\n=2p9s\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHsZNCCKQ5On14icQQ5W6hdesgdyMICJDTvXxbOaEEOYAiAOHta3ornwqcQjjQ5be2T5bcwUYY7fYY1vXLVDZK4B+A=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.9_1572691366933_0.009488889332865957"},"_hasShrinkwrap":false},"0.10.5-alpha.11":{"name":"@react-ssr/express","version":"0.10.5-alpha.11","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.11+f794f56"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"f794f5601c4331248d701b35c248fa0b6f3add91","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.11","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-wBzuKHAo+C4ffVJ8jzjPZT6cisuxOK+y+8D6TJ0VCrVK4uLeCxBE8RtfUMuCYir0+yxFqeozuaxgV+b9HhZSXw==","shasum":"a6aa76b8b7aca186572f44265cda00877f3d7039","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.11.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvV/DCRA9TVsSAnZWagAA4tcP/AxGs6HjkTj8DQqN4IlU\nlElTKlRE6mMuyMkSN8Lz4vWYYgRGb+zCLcx8+cb700FrkeleVhCjrf3AY/mo\n4RD8CTtO9/kKYBi/FJfhhjxUiZf4kdTaeyso3EPrmMt0fQQDVnvzpddKETn6\nbrAzlSVIiWlPlt14ZW49rO0VBiqEdknFf2O636Ub8XqhPGOpbNN5VnS9mnV+\n7NoOsa77R4Ea6sl8d2rneB56oXwZrJWe41/1DlJisu1slXgItJQ/toXwoCHQ\nNossCDesYrD4XjDEQG+W1vs3yLjhUhWgZXgLnrnySIj/m5vw3SUgpvMQFuYT\nMCPIihfd9kQsIALI+/1FlVVUgPN2YkUhHN51BCHoCrwUIDGuVhyTeFDRqFXw\ncJG1f7UyML9FL0GMOmAKUM3j1TQsw7UtOxE/S6Hn9WHtp47EbL9Q02gxutRZ\nzBPPybm4NwUui/0YT4QkTpZf8MCFgnC4AcbUpUoF1iSAlpFKDo9IXjZE4THX\nRQn3N73FPFWCs9vWnfbu5+/5/rnWL+cBhImcrDtPdd+Wna/9NE5ITmVOJKpl\nMbvKlXjqegx2cksUSTTTYDm9kmwFMFsF1iHx2qi8l0CfZBQkrErhpc4hVzFP\nAaW7TEdputA43fHSp0+HgCMlEq6mRnq2plcKq0ktaTzH7d1tAiabcY+RxTfo\ngAvd\r\n=k+UK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD7JtLhlDvyPxNmohhRA+vDRrJiEZ3hLnmWKL5uqGWzdAIhAMv4dZ7z9Q/aQbuhDOUQ8OANXSDkMA24PwijpaUC+2Uv"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.11_1572691906450_0.9998370067380473"},"_hasShrinkwrap":false},"0.10.5-alpha.12":{"name":"@react-ssr/express","version":"0.10.5-alpha.12","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.12+4b6f378"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"4b6f3782d021c59273b37577274983cdd8725f0c","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.12","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-AFORLYlLLDWuwg0ZFAPM1E71OKmlJMdWYxPSJ1h0Ta0bpTBMJXqO240ZG7avrtZNCxtN0TFtHuwrxTJz+sYp9A==","shasum":"4505cb5346bdade6e98979c3c53a020536e300a2","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.12.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvWCZCRA9TVsSAnZWagAAzLoP/0rxG3cUc1S/tpXCtz2m\niHYgrssFDdlgfyNAnzuQf/4njoHcEadiyg9docgWD2L4xrHZ28ePdFUWvgzD\natg+UfWE9IYpyqjqPh1f/vtDXsW0+2wOHiD3M3DpJj/niecbkh2VQjpdzSX4\nINPsD/5/s801493XGtsSofjbIV9iSVPUKBx9l/38Vyvx/cxmB/Xu/HSkTXut\nYvdbukzkQmJzphNXXCmM5Wq4vb/OroYUKlnQg3Lhch8vhKfhxCjdJC55EPnZ\nI0JqX6vqlyYcKlhhccRfy+4HbvSOMgdzj/LA5eIsU2mlWwoI0grwAPbBW9cJ\ndHFrGCQlpdwpAHG1+B3vdyl5W0BEM/qFUcCl+d5fEKvjbc5ALa14UpVSNRRO\nIzdhLjF9edsqeW/4TFIea0yucgO9MViWX0VuixANFfnJ/SPNykNa7eh1pd+l\nQSNFAxlhyB7HeLQMdNPNVsOz1gkKEbF5YhEhCuNhaZERqaUQkj3X84zcuTkL\ngsbandh0QhDQQKMjqSNijqgHGqQwBzXm56lNG8QJCIGTQaO7eZd0mg32sNej\niGNkk5NGfGBnXZOp6FiaeKewF9Oi8RN9qozXox0UOLthyrqYrOhZd6iPaaEn\n3yhrAlqUepIWHF+8lU0/aERrSXEm4NktMtXuoyX4viHk3BV7Iw+pu6X2UsKo\nOxhr\r\n=XTJe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDi7gyohi6bT6xBJ5rze1FgeCBmqjdv1qcn3EsZL1W4jQIgXzpTQpCou/wk5Ihm3x8pfnw7Oxv3pINkH4jwhUKnRlw="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.12_1572692120673_0.3227925614331071"},"_hasShrinkwrap":false},"0.10.5-alpha.13":{"name":"@react-ssr/express","version":"0.10.5-alpha.13","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.13+62fa993"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"62fa993f47cc46d346af2ba6b389d4799252ee02","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.13","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-ZCWIf3nq1s4R0TOIcVVz4M6Hc0PQ/pRBO5haT9D5TMMt/bs4mZsy9vEFOM5pIfu5GqPYxIvOBP3rMzZzbGMYhg==","shasum":"709c3319781dc7500230ca0be21fa706645deefe","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.13.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvWEPCRA9TVsSAnZWagAAER0P+wQ+Map+Qr2MHdPd8eOM\nmKuh/WIakL8onFvStNf6WV6kSBHn4Y98h0TzvIHVgSRmPw9blhIWSKTFTiel\npClbvI1I/NSO1EsWncl72XTaAKgnsXbPhbe9NvYAIjkoZNpt5E1I8EY2umCh\nnIdNjvKPcA5kDadTmiwxCkfFSHPipiVBvmbtXZZkTTAsALY22pqftlybjiO+\nHT21ohhazHJHZrA7XHgCVcEq2zLu1kTfGmjmQp3+oJt6yBEzpPRxZ1vW4Fc6\nfXfmITe3aQhBoLcRFKfzA3S8vzPQS2RLqcY3qAVT5XFbydqqElU5ENEs3OqI\nI39gQ5+vhFjyD/h0oMYYJi5doMMgjJGcwC1H825aCxO9ffgWPovKV/tEeNVM\nJmKckjOMLGJkzFfsOVqoDCId6g3Ycj2UzReaiLA5j833JWZO9GpDWIGnfHye\nZv48tpN+Fi83jr43DBt8ltOTx+wpm/b+Ea15NWpOjAkx2O+KMNZyhaV5yo2t\nqBaDsFRy6xrcbL+TNQnzx23DZnk1pjM9qFKkV7SMY6hfexWEK/lZ6YZJ5Myg\nJiCXA19MMrQFmICbUWaT00H1QuBTqsUh/jY2uslbsaJoX95ATMb4iyHKRZAv\njhDs2zTiLKb08LrhvId2G627oiuF1g9Zx7I/vDgovOYmba2IK18O+3bherti\ntamA\r\n=8sqj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG/Bt3M6aQPPe8tSOYf1AcKnSnp5f4Spj1AExGxvQPMjAiB5Te2Ll33Z4TqOrsvLvoS8aT2gEZYtAsXYnzmu0r89Ig=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.13_1572692238561_0.522829744390573"},"_hasShrinkwrap":false},"0.10.5-alpha.14":{"name":"@react-ssr/express","version":"0.10.5-alpha.14","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.14+e14ae36"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"e14ae364f57b243055c5d85a31dc7ab30f926204","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.14","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-DZgCoA9sRgmQFb2IWidpeEZxe4+6OyR0Ptf3x9onSnOw2paGPdQVTs0FgNAjn1tKLuaZrDshQIMzbkKe2rFxIw==","shasum":"1a595911ffe24a3db056c102d24a2cfda3431749","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.14.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvWGzCRA9TVsSAnZWagAAF7EP/iGHZbCY8pVqqTj/vQfZ\nwpvHjX8r5oa38by5kZ/PBOsWxVeUzb873FaDNu1GDKfWY0m259AEYbGu5hIr\nRWsme3V3/jJJFTduLxAKaPwqnwB0tiVJ0vYTuqWw+WVmtFKuxAlK4a/G/V+k\ntjzjDMF2YWtm/jeHq9xeVBRfX7lCUMCRIRLKdpYLakN8/V4Gqhcwu91MXXw2\nmxsJI6jcNPVB2bADeqCgPtwz60CURw7kRle9BQhtEDuoKWdJE61hnBpmvsUl\n9xPFvdQSNGqGVeOOxSj4gu52slfJTY9lbDAapdric1dssQvVGhleKUihqpUQ\njtrruYrBxPWIgrtEFlwSHTt1WeoS0u629yu2PGtT4mh5jNyNTzceX38/iju6\nZWxxHBn//qUcQX/2AZCvfGBmuo69zepjV7o8DSMFQBbtj2oBVczD5KXywXu+\nu9b3iuMm5xfveRhJBBFo3rdJYsUZFdcpY0MVyLqTcFxVXYQJZuhy5ydv/XZ1\ngVrPLllSUaH+bTB6h9ifm117/pIuTFDWZNniUF5Xx9dU7N0qLBH31Xj4Ejdu\nHB0QRbfavKh2GFHbyqjJwd4Ts7vuc0kHnT/CgZKB7JovIkQbyxsiVdm8z9hC\nt7mvoIYZ5SucQciNLL9mqvbRcRUWs+859WNgzW04VYKfBJD4E1N+6eLZP+jk\n6lPC\r\n=bT+a\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAhh4bWZYq3BMiuaG7hQs3i5Iy/TOh8IGZyqjELgg3MgAiAGdnZp71uvYyTZDdzCjgxAk2TEJCnIB7ntM/poi9LF7g=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.14_1572692403448_0.1768096058679416"},"_hasShrinkwrap":false},"0.10.5-alpha.15":{"name":"@react-ssr/express","version":"0.10.5-alpha.15","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.15+485c35f"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"485c35f1d85eef31b6127c10a7f2c214baa31fcb","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.15","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-ICYEEbI3zk8LowESoEHc22frBCKfbTVEFFJkHpq723LCtzrGXf0JNLJYn0Vr2vJZ/eaiNoj4eT2mjigxa+bCSg==","shasum":"9421afff29fd848fe850f4d1e02c5ca52d9679d5","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.15.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvWKlCRA9TVsSAnZWagAADPwQAITtnjkWrq4jTH0AWtRe\nNCe1BiilUqNO5oMy9UundhRibgqHHXNg/po/KVH1I1ho0dK0URxCSoJJO8u6\nHurrlnNrApObnjT236uuq8KVCRBN/DYJyxYAn9x68o4mPCmVEUgkB33lE1u2\n0Z++yvww9GNrgml2MuzSMnmmQr1LLeH39n2VhTmptzMBPpHkxLL6b/bRhEp7\nS5sV34aNa9Fu/GnraTp4ilc5S9fS4yDIx+7h3bPsXJLVVIP1zP/BvZnh9Xe2\nEi6Z+HkIWG0fTp9PzOYycYsb/DGMnXtThI4G2h79n/hLb570YXY7sXkqMFCd\nriwjj4K7npjCoXKViD8GITSonA9lFyikCGRoXQxbtpA7SV8fvI3OGAWRUsa0\n0dLo0X8bBrdFkaql/gskC0/doEwom34UMRDtSe8sRYzA2kY2+5+rx2J9PXV/\n4S6pv/SwIIW0lAN/HVtvEPjbaG3vjlEbISYoapLmsC76Y56ovJeLP/xYwKvi\nyW1E/wC9AV1FcBwIgbUcSSoyXZ9CH9wSn6A+Tqo0zmbclwLkFXK9GwxBwXd8\nMKOfqrrzlnVOHfprx+PCnnEEvtELHAD53qYgCMZgBvIfrNiSAkW1bn/15bLg\nP4pWTqsGoAZ2jPVILkw7WqIcGjLyROOyEA9qKfFf3m9GQIOnoPtJyCcuyVPk\nQBpb\r\n=do3S\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGNS1V7biRr0O65vBSmPJd/YElNsnCXzEcQzvpwYLPLnAiB8Im3QKCsITglYigl59/MJ2nOO2CIAAzF+8y6bxD1nVw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.15_1572692644807_0.02824422198098908"},"_hasShrinkwrap":false},"0.10.5-alpha.16":{"name":"@react-ssr/express","version":"0.10.5-alpha.16","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.16+65af211"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"65af21136cc06dfb88c0caed9d63de7880807891","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.16","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-UmgtTGWfJcqi7UH+k19eEtF/bQyxPfmCRghljfz2Klj6WNsUXVEu2GulWVB2HeaGDQom6RyTNk+MtSoJv2+3Hw==","shasum":"e0824d1323a1f70ace21ba0e19d4c5d952e4b367","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.16.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvWQ9CRA9TVsSAnZWagAADj8QAIgtrXvi4gEIQunObuL7\n9AbnFYtpBoNB20SzlVjDkRmTY19pqgvvOS2z4UpeTTf4J9brZOmyppG9PX07\naUtzv5isCXls3WST7G4GF+wqSI1ZKwka4oWBxg/zpYqMRqr7Uo9uhNI7E1bG\n7i61KRlo9wHChQw9M7nd/p3nM3G4SA+1ck9p5TL9Kp3uURJAPmqvKqE7tuQk\n0ipjl6w9FydekBbSxaR5KQnq8NziNxCtpmYT2MOBaxmMG3ZO6c8W4xbwffBE\n2LE0aH/akXEcxb39Jv5iM+vqZ0ugiHROu+Xa/5b4VOrG8iQqTrkDiZeu4iyF\nWcm5tpFxD1/exJCAgS6/CwKGcKgdbRKAl1TOVem6xDyWklqIuEOkyhwkmPqc\naFRYji6sZGnlX2XiNikrf4cUgFxI4VmFj+QryBBnXuNCAyzY0DJMHmUGdkjF\n1PEAavEHvSIxshnXVBuqfkC5heQyrt7qZ0ZZwuBmRBM6G4J2Am2DuEgcY9qC\nO3jTbMyEiYb2lHoUB6pcjoHd+Fts0V8aYzLdKcFe62SJfBiqy6SH+hBy3zJe\nRtSEX3xdowztdBrix34zrdMAZTKMfdGPaaT5w5MHDSfdJ36oPYNyodGbrehl\nR1nTKWIdXFhMWSEYR8gFePKdY5IfrfXZPQpmX79+VDpTICysRCgPniRynqvA\nMvKZ\r\n=HkW9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEwKl1ymZnzLnFoU2CElHD+JoGFwzZtqI2KVZL9IAuIoAiEA9P1SmrlqRABSDmiIlALJNOkLn8ArqUTLW5EFDruTnN4="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.16_1572693052716_0.14153521715705275"},"_hasShrinkwrap":false},"0.10.5-alpha.17":{"name":"@react-ssr/express","version":"0.10.5-alpha.17","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.17+43c6005"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"43c6005cf08ebc2c69542bc7a95055471f8f550a","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.17","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-unkQVWjRbKE0UYu2xvs9IdiADLRUE7Uze3iD3ccLC8E8b/r1PqcCSoJUMEsKIhCBRnKDusliJsB3qfuND0fYcw==","shasum":"85cfbed3a6f69f2b380dd687befc5eac10e7bd01","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.17.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvWZBCRA9TVsSAnZWagAAWYgP/jAzXDQ9SiXhFb3w/NJY\n88cQ7cqsKNc2F0mXt06ftYLzOTRS+cMz4/JKG+EoZhC0a/OCOQl67eU94ozl\nbQSnbXtAgIxLv87liaoRRmPT9zvzNPwR8FpPERlCigcMpnfE2ctcweyHqwRn\nHZEEFwGGCLApqqG8Q4HGK1kLZxVMP0gMz/KW5RXe5PVOogzxt5I8wpudCK8x\nUq8skiNc7CWyGGjnLeqWYUgShaTL/ROCP5AP0QWWgvsvTrID6sTk+4sgTjpB\nt/ZejOVSfsRjNC2ZGbz5Bn5vtTdZbifq8UzvVn5yQsjjixJQ4xB4N/zjpXAS\nsBHTGriTe1clSZw8+ncHRZZEIrSPGz6goDWKx9ugCI8a/4fAmQbJdgPdqsDf\nYFs2hDQXW4rS2ocEYprchcCkz+vJL8PHb4aVqvsmEyR5ET2Bo8YoDNOqf+WP\nABv0cu/YKW63IL4gwjWaD3n8riyhh3jpjmuCF/ZMfI4ykOOclRZTR8S/WrdE\n5kmLVJL70+zCr7yBCde4fo4CASyEak6BggRU8Kh4YVK1PAiuBJXmblsqoWH5\nYsvuVoStX0e++bXxpR/hQ9sPAbglDYWNp6aqx6DwagikqijKJwDLpwIJsCvg\nYW2Cumd1t2tWnKy9O21rEhmEs1WTsRU4deu+bn/bV08X/7Zwi+XfkxcxJvEU\n+Y2j\r\n=nJ8F\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICcPZkZzhKFelvyCD1YCmmPKAI+mc8ITrw+JsflNR2u9AiEA4ZLe5zBvkPEg+OEzFuzs4fqPVi5jOXTjlBKi0ppIWzE="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.17_1572693569410_0.24944481679523212"},"_hasShrinkwrap":false},"0.10.5-alpha.18":{"name":"@react-ssr/express","version":"0.10.5-alpha.18","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.18+6bd69b2"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"6bd69b2b30c65e690f4a71a8544752c4feb6e038","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.18","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-SKDP57mZhJauVcYyaWvkNIkyqjws3rBBh5ev0G0i5xuMuEwvK/qfoO/eK6ktf09y4v8RlIIiI5MlyzIfD5dOLQ==","shasum":"dd8fe7e597463318f00147b3eb1ecb0b61ba5c3c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.18.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvXA2CRA9TVsSAnZWagAAjtIQAJBqq8BeIECsWhgd24k/\n7yuhgPUJsCifyB2AdVSCC5dIMIZOQ96wvPMM+4+bNeJ0OJlB9HfPKeNxvPmq\nOJoyqhybeNs0KG6dyR/8MT4PMH/IlShRn/iKHgZ5Kr/gFG9637UiFyAFS5N6\nO9iOpHKOVhxyVKxoUOkZ1MF8cOHNZ15Pyxy9GOfXYIgf+xc1Wql2h/TObKG9\n9HC9cP5OsZBf8/MBVhXTnVwZSP28f2/JoEV96JgCGTNE8hjg2dYup9x3cmIB\nye28HCLG0c7alEPbidDQRI/Ru80bc8f4Pp70OKmIcDM8dDlNbmVtg8M5G3xZ\nK1DO3gdK35mFFebs6b5AXE3fg4lVIkxW03+1wyy6mub3serOHK7OotBDp5rr\n1+4UTdd7Hne3e9VslSRfjrifht0OCM9wRqGTXQAlYHNqYUNH5AKe0NtdD5OL\ncZgluDaGVACh+2G+b4TMH6mY2mPPPjBtVY8mBEwV2gZ41q3g5tAcgav57pED\n9xx7VoJtCF/gD7wdjshvK2LjT7frFEj3/t5CH4tXy8q3wNpu24VIyif3nl8v\nz/jEKlpQKKu0teQgjCcZiVLFnW+eG/tmspEIUwJTBiVjMAvu/TJkqaEARLbm\nLCBLam4HQTASWgRUf5JrRCy/3o83udTLDdxd8VN+yCp/TaR29fdJ374dy9CS\nNnz4\r\n=6hCG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEywH07aFC6HtHmWVAxGwspKy/eHSDscMsbJjCRJAXWNAiEAgBqTL4o4QfZA5mwgcVloZ3RGsuErADAuKbrNuwdBdi8="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.18_1572696117861_0.20375224457580376"},"_hasShrinkwrap":false},"0.10.5-alpha.19":{"name":"@react-ssr/express","version":"0.10.5-alpha.19","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.19+51317de"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"51317de17a57d2a56dd0d171002e57c81381fe54","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.19","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Qye6EhEst9nwr0GDbrir7JnYiCxmy/z5uMPWm3JMZoIzymRnfVrdSSvuOv7OtL+Ky8PTcqcZtvkHFiorMroDwg==","shasum":"2a39d29f3bcb615fde2ee8892f2362effe20675c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.19.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvXGSCRA9TVsSAnZWagAAc8cP/2E1oFU8mX8FMrd3kSnG\nf6JiuDoMTgleO5QKKZg3iSRd4FqlFM2dqQKtBxxoVZJhWibUOiu19Nl9XWaj\nD/SRUmwRbWNYDWBnoVTYRqi9GwPcACXfGebMVSwW5Wnj+1GfJWmTVNRvMNqu\nA10B0J7t6b11MzDczM5HOXmllzH6OizgkGt5EM8364Vo5QKpory+jIT+moY7\nfUoclpZKnpwV/wR1ssCo2bxm6P2bKXNHEoo1o2lH/xEe72vJSFnNdbr4wPPI\njVNY/s9YFDrHU33n3Jh3bnu2Bytur1UigVzJzKcvlyD4QW5Q3FUTejwDaOTi\no9GgLkvFMek2Vl6G8TZSGB+vgpbtOYEZsbycQhz9g5p5rp/1K3/pXFlPFY7z\n3I1Uh54l90bxVlnnpNg3fTccRCrcctr62xtGoXxb0QpSPyiHnmphy6Lae6m7\n7hiTEOM8ZLpSsLs8juYbDoHVSnAucmkkmjmNlDtfUNMKKZlwAfTaIhSzt3bV\nn4X1eQ2FTL+GLy0+oQwG9GeUVt//OOAgsRykGbqkccQ3T8BqFuxxuQ7zVUwS\nvE0YxkHjoz7oFdvEQ400wsTyqr8cHBnOsiww+7jRVOlM5L6xLntvKc+Daz+T\ngswR028quWJtRGP3ZvGHBe7zMV+TlOrIuJ5fZwn/U3ruQeg6O4bWLcyZLlTv\nQXBP\r\n=8Gk7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCG13xMIsJFVKqy/EYIcEoTwkrp7m1Z0XL+ptyc7FixBwIgMWqvKPh4V2sHc4ff9bIzb8A5pNOi3LsYr3SgyFv8fBA="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.19_1572696465806_0.8069189514304647"},"_hasShrinkwrap":false},"0.10.5-alpha.20":{"name":"@react-ssr/express","version":"0.10.5-alpha.20","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.20+5d70f64"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"5d70f647b036a20eb7739147bae3779c1076f36c","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.20","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-h+vJ4u4ovDpHU7TFGFzrIvnkGnPFtn2MvyFRHnymxaC2q8xuDAs3DIRSgroFPOKXygC/ROfDwOn8mYf44dFZwQ==","shasum":"ed44156d80575f084e45108863cf747b02ab36d1","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.20.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvXJzCRA9TVsSAnZWagAAwssQAIG28seF5GbYbjm/x3my\ncGUUcYKNAA0873hGi6bLdhCpVpgpaai6p/PnNRE95gq36s/jL84IcUtchOQa\njjAi1fCpl3YkbVodW6wCRm22+shzU/MH1IXnMAlhkG5oM1PeiJPh0a+qUcuo\nuDXxqaZ4RmE9KC+I7qUPvfVKrmELjgOW6/juObDgjV/G8e55ijnVSJCOOMNi\nZK4bAngg/j0thSrKdquKcrc/Ft33HN4CsIzInLGqtV9BYOy+gipI9hJlwugw\nZ1aVR0Fn9P6OyjJeaqXpr4b2X5djG+PU9Rl5hH0vq5uibUTLEOnaHQiCitcP\n11LP/JKd/AQtmBh6x9u1dk5oFnnYPFCeWzaVDm0P99xT4iesDho6WZ1AfE9x\nW+NN5UP1chRpe6/9xTIz24ZH1Jg0JOmcj55Kq/jEd0yg3aBfsBCs8gsZXD/o\nU+PI5mONw+5tVPfDUfQsMustaeyfCKR1bjTJrGfAeaaGURaqAYSqfQHl5wvO\nLqMVcI+xauO3lycu+dnLAIyVncClrir+Tdk4VWLpI1/JYdgH90uCfvG7TsyO\nrSKrEa85cV9FngNJGHMoHAGXKrFqUuSuO7Y/Nnj2lGxbo3ORPGiFyzaytISs\nT7GEXgaBKEgicQD6v93Q3ZPs8CJ43kfTlQhjjREoSrsBZZKSrQyp8f5q0FmO\nnGXF\r\n=gpHF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDRGGPYNzBPJ2DrRYhpq3pxgOheXZKtMhui4Pxzdddi0gIgJAcslxK0+gYqwkoE0zxbw4d0XTKDvj2BgSuPUhzjM1M="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.20_1572696690561_0.07220499419004978"},"_hasShrinkwrap":false},"0.10.5-alpha.21":{"name":"@react-ssr/express","version":"0.10.5-alpha.21","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.21+1ff7848"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"1ff78480b8bc8af3fd56c254e964ac42af39c380","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.21","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-B07rHH0EhJ3RN+tzVxm1t34czAX//kej0uwXdhVDMx7Irz3INwYUBk4tqmvNXJpMMoXsaNWfUmR10lhFaAnB/w==","shasum":"1dd2cc11c5913a95ca224a91add75a44669a2e4d","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.21.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvXMiCRA9TVsSAnZWagAAhPoQAIh1lyGG+g7qhS0LgbfP\nvFJzzxgjLCcnRRptHtpPju5hx8ixmeqf2lGeD/wh2nZB4CJV09BuXsZp0a5e\noqojOLF/eL6tkIEAC9AFjqLIiAKCgN0g3jDssI5KIORUi9a3E4Tj7FvYWOIA\n+GfmjlVCkRbYn1G8uOaiOIEY87sPbNHLdY4XjHOKwrNbD/f4JDHvFcSVBqPf\n42sYXHPBHfZXascCPBFuNafC3xmnQbYRNnUuwCEdCik4s8B94DW/c2qsfXc6\nexUrOO7oBDp+4y3+SivWJcFLtvvcWZ9/wAmyTnj+/1hE9RmFvGDeZWAAYYTW\nVXNp2TN4dGE9U/FRt2AiHh4fps8Hpg6amHFyVKCSc2CPfvW9ahcMMThIdzq8\ntuqUkE+TgqEXbXaQYvEvpPRWIkGGvN2/VLG99RZN8PZbrnt1/cqcxYiZyP6/\nCnrfrYaIUw3UuPpBaA2xcN3qHiV1Ol8+AERLk5WLBNDcxjsw196U9RIS4w66\nadukUZ442UT7H0rSclnQTyqnZzuLcIBUy+LizjMKGy+In2mi6JuGYzkzOD9S\n3T+oddCND5BgYvLvdCn9Sd4lhLJlmbLXGcEL+VZ7Ft1KV2LSP/vn2V3dcs45\n0zP6MtsjobHYi8Q/9CpjmO3VQIWLtFxKQyRcfi1r4gSVYIhntk4Q1/F9FS3t\nksFM\r\n=UJJ6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD4Q+9ftw2vPgafldj7gooz7eqCjHKhxfaIF0IjgTMJHgIgTVqBfxzosDnV3/Fw7T8yeFVd0wS9X6ydgSr3rYYXeZQ="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.21_1572696866080_0.9183550015273407"},"_hasShrinkwrap":false},"0.10.5-alpha.22":{"name":"@react-ssr/express","version":"0.10.5-alpha.22","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.22+29b882a"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"29b882aa73c00a2060b7c15a7c560f55b03c8e2e","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.22","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-S45k0OjeUjw5KjCztJyOmEYESZzn7AUEdWllF8u7KHROTrgGB7X2Bh/RE/AMwqjWTnG8HdtI6dXBbA4BbTAnkA==","shasum":"febe5ed0c20c22d8b075b70c9b5d8dc4fcac2aca","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.22.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvXOZCRA9TVsSAnZWagAAwKQQAKLoGjCLZMIbS0XaY5js\n6AAmwzixxJ0BD1OFLOJp0FaOapRi7QtPfyf53y5e8wT+ratkWQKPKkdZnp3e\nskya9HFYFqvL4C+sRYshXaaW5L3t1BYE68w+ckigwjP8avoyxdB339S5omTX\nHPl4scy7VrVd1XEiOOBj7g2DGAYx45rIp8smF0dHPz3nCsUnfOUU+oFlHEdx\nN1QV9KiQ/zS7HByJq6rs5P4ptuUlHcB/6PdEaAgBHWl9elnNyY06gi4pPRZY\n4J/AiRZC9QGFeWc0JqT+hS4bq/HiVi9XSZYQZQ8E/ml5QHt0h4QWR295+TBY\n+1kONNZ2N6U26lAyErqPwjXZk+akg++ViNXDAOX9c8/FmvTaWHJ59fvndo6D\ner4aqcX/rjCwXuU4O0g7KmkMMDl8EiGLCmdRUksuWk2E9vI9vLsRa0luolJn\nH6sJE8yhJj9/OLYMS7t2laDYSb49latRjPgJgVx/02V/M1FgtcHAHdm6UtF8\nYQrgJu7fliKNoDv0+0AFwT2GZ+uIowuF4jGMqwlIfGKQQq2qD1ynH4bLlsTb\nF+PTqTDhDfrTIa58TuHaelt/wQ6JNy+fE6jc5ZwRRFxi63dliJ8biyO+EREf\nlSnsOVSk5vvccpw2jR25UDY/Ds49deBBWUfeqnq/74GlGb7ITb9MvcNi328v\nJ6Cb\r\n=rSN3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCpC+bWuwjhMjTvO2c5VDPi52MZLDN3c3nrTBr/SYNE1AIgESIPGR5Mxjd6gq+9L8M0A8Db2TWYkLdMetDQ1iDrQQk="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.22_1572696984692_0.9412658250962616"},"_hasShrinkwrap":false},"0.10.5-alpha.23":{"name":"@react-ssr/express","version":"0.10.5-alpha.23","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.23+d21a925"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"d21a9254cab9a9d358bda7fb14af1406c3f53ac3","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.23","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-LE4ENa0+CdWcLBYMp4FmSlgF8LGjfKsFKIEybEX8hpoLIVxJT1Ec+yTKFneCZEmXwelVB9dEro4x6upFCSyC+A==","shasum":"4b798b59f930270102d593157b7c0de602d8e965","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.23.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvXXbCRA9TVsSAnZWagAARJQP/A7kNdWVQGOXXgsqhwPi\njelby0mEvszsc6gZLBaqamgzbn7Or6zZgTkBOVVknwxzyy6i+bCvi6MJEu8J\npi3k/mYeFcRstQBVDeVaIeP33gxLzEEo0W/mw2iCIo6SGQSxVpMiQo4E3oSZ\n1ZMlOJShegvee9ssxaAOaZNjaacGRjqZBc1u1LzdZBCNnYJ++uFbC3fnlpE4\nHAsgBlCnVkpjUiRj6UHPelkJ0XJtO1NGElnmfxkvUgITNDaThAKbmFGrnqIk\ncup+ZRgoNyUAW/4fnibwxY9GhOoYJjkxDhOCeAThJZiEaJL4DZkr1fXhm59a\nRuxESYWdTylFq70cqr//jXPOJ5z052LfAH3eWFDrmGELp66J5zoR5r36ZmjC\n+LAOFubsDFMRFGRRPbnn48DjSZbgKZMQfPS610OfkaZqKf1qgRKg8aweJPHl\nOVByynNOWwP7xLnjUvdsncwPq/ZYip4C71bz/FLIvhpepwCaPnUUKhbJLoRl\njU6liiD9pKNrC0r+RQsOZDXIzyEiygUnL5bfLBos8a2QKJvY7cWkqTYcN0Rt\nJTgl+3VhNpCLTLPpSRX86NXNWrQtCSriEEqTfW4pfgLG3FzhEgSCtiVhemCp\nd2Ori6vFL5pLKFRH0VlpAtvEmiQFj1EVrvt3DOO8SeunM7ilQARNmqzimsyy\nhhPR\r\n=edt1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD2+82AoIhGbW7ZDD3STZmibHV3Ksgiqw24xm+/Pt0kEwIgEPSXHNQ0nB1Zk0iOeq0nT0S/Y0D9+8LeB8jY0QfFt7A="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.23_1572697562775_0.149067888990998"},"_hasShrinkwrap":false},"0.10.5-alpha.24":{"name":"@react-ssr/express","version":"0.10.5-alpha.24","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.24+86f3e75"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"86f3e755a2f4ee4a3aaa87651bf43ebcc940dc80","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.24","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-OGpg3o34rNdNl1UWA0UxgGSGR3meDibhwt6LRWMt1ao6cj62sS03D0qUpV2BQ0WOVuAlqhIQVzgu+6unaNNYmg==","shasum":"77257195cb764e024929a5ce61e2c7002fa79b0a","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.24.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvXc/CRA9TVsSAnZWagAAY8AQAJvYujleK9ln1feBEle/\n0nwET1zb2vPZpLAJleqwEgrCd1EVI2JeXFxYCYWksEne8wY07YJHbeuVVS4V\nFoAuOrOp1Hk6ZkbaGggGewkz+QIwsDqnjWybk9pv8lgL9hFGRalHoZWOFboA\nU+ggt5RHj5km3qLxl9poL0O07IyIKaMT3/VO7AGt/3U+rPooT6MF50/9k2S1\nXGkXMOeW9RD/o+3NpYzF1pmvND0uLa3HMhqTgu8D06jVe0dzzXWU+SWnmCUt\nd8N3HW/jeM0GRrm2vyxbIr1a5I47j/SJerIrMo2NKkNpINVn75uLqDJn06+m\nbjdiZO6Qmt2yAx5BAUYwQQ0ns+ZzoDXHS8NK5oQ95xYJFT5ZHzJJhYF9VW1/\nzC2sb+ahvIuO+mhh8lSqOAjLwU32hqJ8EQKIrD9NAQ6gvJfsP1FHUeCgv50i\ngNM6mYo1fIJiZuBuHw175GDsPgSzvknJ7ZCcD+LPM1kZd0jS9x4hldTXNu8d\nmQXwoAsRZzTpaLGLNNTPzkBfg/pqE1C6T3lGYEQoiYZY7RDcfVBV7japHIK7\n7sm2R+XRk3EjQFwzori+T/x3CLnBUWXZggG9LqsWXKnpw2oKTtfJSfG4AU97\n1yhGdUA4rHDAV0A9CE60PjHBBa2i/Ff2d4EWDnk7eDOKiacPIu1gVT/lToCz\n0rN7\r\n=g8rJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB6EdtnUPiz5oKAFcuH8kVgjJRCEeRXqgwCJRvRxILdSAiEA6EsgaevJUBwtZ1BOafybqAQjXds3OD3OFoeNSVRtAKg="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.24_1572697919102_0.9247534156037689"},"_hasShrinkwrap":false},"0.10.5-alpha.25":{"name":"@react-ssr/express","version":"0.10.5-alpha.25","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.25+12ecf0b"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"12ecf0bc7ca3cbe009cadcf8d5ee268c7bc9d554","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.25","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-c6pNRtknSlPfCBQI1fCDJSgh2GQ3qVSoKRSCHjY0QD+s23LNmle7fp5iCzlM/j1S/2O/vThVHP77wrJZhU3hog==","shasum":"988901d25e14bf2957a98513d77fea5979f5829b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.25.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvYCyCRA9TVsSAnZWagAAyrwQAIAXLaCENXEsGFm6KV+B\n3qOWMERVsWuiyuBnKo31pFGHEkeKKB09bkP5cEMG0UCmra4nFxp2fV8qStDq\nr41Xt5Q5/3eqkeOQxqKNYqwrfcCiKlmMONgFzo4Qxuo1WEboEl/q+iUfHemk\nITJsi3yU+Q8Q+x72TwEiUXwG9uYKOyYnBntERBEzmUCYIZtPVFbYKBNG8hZA\nl8ugy5guYAUAcuQTw6S5z+XfNE4IVZpYtwStVZlhphMDmZN8Mpffct9PUWvY\nfH+vAR0VaV7pPvnC41nn6RRofwsazFqACRiSHpNEtDui/+RX2Kfz/Lbt3dYC\nsKsxiU1PGYVyGKYzoBlVUIiQT+xDfEHNYvcOuwLyzXgWVd7y1Bx189qiVUwU\nTuNK/usbq+HvTenD1GbnDzW9eloYuURxw35b7wkLvm7f0DgzDhqpXIGQrx6y\ns/zoszmhQIXcbZgQ8UTRPMnW4KoxdP4OX8nHXv9AOtKtoBrTuE2N+xxIkJyj\nm4bKEzVyWFZRCQK16Q0MD4dyry56xz89zfuZqW00ehIHkOA4OG4WTEN5RdPL\n2ShzB3nsAXFTsfmJ7PBhmDldNRk6V+hSdSFVa+Gvhk1DSU/5QAHe2UtyXuMV\n+TuZJNCDfR0vO5hS7y3kOp9Zrj65KLbC2hhyVE3CtApFfKqLFTpO023fzJpf\nNvhc\r\n=zwvv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC0gnuzGIasR23Q7RyI6g2VdK2NUCuHeKqK+a3c5UQ+XAiBrYxFxqs0bELtFzz2PKHGOsakIPur8CDDsiqK4UCDJEg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.25_1572700338226_0.8172994696758968"},"_hasShrinkwrap":false},"0.10.5-alpha.26":{"name":"@react-ssr/express","version":"0.10.5-alpha.26","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.26+837cfef"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"837cfefbdf82efc62d164fa61f78452c00debb90","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.26","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-xQ1Ed9daaKNaX2HMs25CgaI583mUS4X+HHCMEAsFB8LfsXM+C25byNGYxWECyZkCSY5BTc+QpTxWXULNP7nTgw==","shasum":"b6bf7fd92bd7d2ff025fe9ad49fd1c87bfebd477","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.26.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvYIZCRA9TVsSAnZWagAAbm8P/2PR8bZpOxDY5IEM6e9a\nX5hsMSisc+WFtcqUCT87k+ZfG+7G3RZpoGeWGFJlaLG8pXB2d7bGTFgUdEEt\nIySd1ahRaSw/EuDlFR+jSpNuvEV9NHDOYOEhpLUUAf+izEy9Mkb5gcMK6WCb\nm72B9mS9zkwbwAK886gopwZP49xnq4g/tOOMndNK+UyAKnBvCTihiT9ZuaTG\nzx8WVDcayRIgIEEwJVAfiMfrBymIcCqij9zjOya6lZ8HxP4yEXHNyyMHdw+9\nmC8Kzurb7hTkdoXeqn6W37kmorD1bShiSTLIsDyAdHHXwmY8wnaWCB/ywROq\n695mr0f+T9v9zb58oz9Hno8126I9DWXFYvM69s45yoqNcrry/LN73v487bgq\n0hdIRwQcQz5QrBN+5QL91ugyUeKPzoHMfk15tKdqgHB00MuqaARK6qmeLkVu\nybdwBpfNPRQCeOL/dPhtvHYRAknOpXmOKlT4QqOiE8wR0YLvI5o3aK+xn9oQ\nfD6LZ7pAwsbTlRaMseca97D+qSohy3hGlJfD4P7ZVomdLsvtpgIRRYEg1iN4\nip5t414ITQXR8XqcmPFoLq8CF2T9VCO4ihS3o6yFyJrI6h7ptF69KlwVeRTD\nRQcIMGwyK7m7DdVMnw4jJ+gDQNFJHtInS1pp/agQSH8YAtyOyk+vkmJZOfn/\n5lns\r\n=IcE/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQChLgGHCKJ5DNEQ1gI8Kpz0IJ3WVV7Kq2nw/JwleP6pLwIhAPbgjWO0DOdxFSJdCPKBL8cHv09zd/WyZ2HAWnr4K37Q"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.26_1572700696783_0.10915369931699415"},"_hasShrinkwrap":false},"0.10.5-alpha.27":{"name":"@react-ssr/express","version":"0.10.5-alpha.27","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.27+2c940fb"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"2c940fb430573b37bd3e306fe8f8ecf81b0269d0","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.27","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-fGs8djxfAriS8RJds7q8W6YGU8hwkiHkDa33rZyGoCxocvhC2QDc/yCa9SSujJhpEk0Ovj6J5DkE+eK8ovxHZQ==","shasum":"082e9da4ecc50429bb9f4039b7d10a0bd75e9c5b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.27.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvYKGCRA9TVsSAnZWagAAbSoP/jAeJjJizk/kR3+c6KWZ\n5LZjD94wDe9OeBEikh3lcOA/wGb2KMHlD8sy9Pwh8Hk+JE1MFF7a5EN7+BEC\n8VNRvHYpYAFIS9l0c1/8C2+DCvs6KwuQR9Fo+QEldQs86ksxrcKk+VlrKHzq\nG4Kqjv8ls1JgSOXB0hFEJfLvxSpTg/oMZCZt+RmObSG9SDHseY21iTll+mWm\nOghp3y92kAKZTyOEsbKEiWkrKBO+MXA9/knRnthec9kpEl+cL5NAnHWIOH6U\nCkzP9CuSLPEbV3G0PATODGSayxrkwBA/+lmhRSXX6WcFHJ09AHypaSmRqOPj\nrZBda4SEz5bDbxFO3gb8wUv43DLeAzXHldksPIEMZHLYs1AGNLWCCwKzEQo/\ntqs7xOOtZI6AyvpNkgKW4wV5wQGxQkX/kbS3/MmL74anLlQ0CtXFDvq/Nb0t\ngGSa8TerFGOEidNKPYZbEVyTWwnNT4I0kfbCvf8qMae31wYW0AC/3JKisUCi\n57qL+UIY+8HtUa1Rxv9GjNiJkyb0X5xWmbsfBx9KoGFizkLIUVoOpJ3p5y4V\n+g4+59FLI7fx0zGDLP0Bq0tJCFP3NWBt87zKfl3W175zAgkMsLRmH+zV1wW6\nCFEQZfHtaps3bUSOIz5i6FM8WnFS9W7ZN51j7YgzG1+sjWKC8p+80ryky9lI\n5LMl\r\n=Cc+W\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDb+A736wx7yLNggUwSML7fbE9IOtc/TO1kCwu3/zuBjAIgVZctp4OwLA2tFAvMNu7SzsvoQ4H0ID4GLL6Ccif19XA="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.27_1572700806414_0.7900643082979453"},"_hasShrinkwrap":false},"0.10.5-alpha.28":{"name":"@react-ssr/express","version":"0.10.5-alpha.28","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.28+49ae53e"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"49ae53e4f57fcb7837d7aabce405bc44618925d3","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.28","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-kMWTecn1JDMcgK8W6JCHa2Wgg7jtxwiLtkJyGL49OeiBbXdfzgE4TvzkbSXNsHcLXXWYsdzAH5zEEHJAfLgTzg==","shasum":"4c3789ba61d46059adcfb25f6c646811fca3a246","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.28.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvYMACRA9TVsSAnZWagAAbbkQAIa4agKNcQmt66yhKGo3\nsYzRUMV0PScn5DUoQkWoAh2ehl1U+NKGfK0rfzKxOeRYnet8PtjRclhRrL1K\nKjrNuL69bwsJYt+zQJ4VKJZzLvFGD4vTY15xFHtQZn/7xB04gKw/bVCx+iVP\nH/VjvUo92P+vr5lHsAMTcGfYh3exS1nz8jIs0MD+jKoQfFbud9Sal6sENiwZ\nn5tQN6AD29cbaCS02XGUhCshE/RGebobgb3z70fdKC3vkdvSTB6PB5jj1TUS\nTNYUjtgnz/nCpFEhotCGTD1tW7eHmEYV3X3zYCY4cb3s31DiXSYbe14Db4ru\n7LFGQBElHKKqmMNgey25K+RqSFR27TMVIS8pHlGzo1OJ6t6xOACiL2ttuq6o\nyOmPyd5RG3LVgAYjla0JEN3Q4dFx6v66UyG0HjYqoBap0S8fz5tpwN8wfsku\nfzIKx9eThoTzQxuz4A8+kYl10N9mObEqKs9s2VLZyOkd8SnINdHXlPZtv2bf\na3X2fsiETLUBK5kFg9t1MnfpqEVFpRO3wa7acfAYLkAv1XvyfiQ+iXjNqcYd\niA5LM4bShE6rWiNPfaokWKYdpDL4krVEJct0XoqtWoB6wV08+snbYxdP9j0u\n5XxQO2AxuCMDl4R2YNJkX0CeZhcY6MWq33gOcU8nxF0QcB/QQA3LwjeFEZ45\nOvZh\r\n=OqJ3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBzsNUu8cEWj4vAoqa+jEqoVIC+JNEZZ1PPZnBWub7cyAiEA4v1uQaEwy2jBNe7VhDs+hjZ/QUOFKS9vTo/Q9j4cDfI="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.28_1572700928040_0.2978082655946268"},"_hasShrinkwrap":false},"0.10.5-alpha.29":{"name":"@react-ssr/express","version":"0.10.5-alpha.29","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.29+36082b2"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"36082b20665532879f182c2e433e6d7b7ce9f963","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.29","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-S8M4bS6funI0HrE6aCbRLv6CmyY/mn4tAPUCLoq9YwO5vxMjxaAW+C27Mhn0poBHuB+w8/XlqQ65ctvM+FlXCQ==","shasum":"cd3814357d425e2d0bd0fa0cfac838a8579a32ec","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.29.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvYakCRA9TVsSAnZWagAAu68P/2zllRKQUC5n5+u2pAga\nth8Vxycv4vVStNTP5+17GZBQJ6uJRBEvZVm2siDV1QJqAGwRFdufjvDt0xIB\nC3prkqe6Jejx32MSGQResfXhLtXNm00KPVDgIv39zYflNSR9OSx0s87hqr4g\nkh6MCxN4aQ/Ia8AjuS/kAz3kDUFfWR9F8OMZ5puo4CeUtAt265xVYY8Pz101\nbNVvneaomNOWfebFzu140IJq4tngwshIvgoOITBWu5xR9qoy5DuYZyDVB7on\nv8tbB+haqX5lohgU+gojEKcxejIgQJXlAz9+r1WXK+hYssmrOMioPEyEJG1p\n+7UxZIDkwWbZUxDJmjCKSWlRDDBaFigLPVbu1/6no+X/ed0wFOajU/ro9lRK\nhCYDA2RhCIC8GE9ZhgfCed8WoFa+ya2Drc/CMeJLfWULXSdkznPRZgbAggAa\n2v8xUAv8ECwJUhWZTa+DeoVFGZxPSNsO7j86et6f6mBCDJuaq2WClbA4Uwe1\n8toCuLz4G32wJSiEyDm2KUhH1uypZK2i0XqJePaZHm6kXJMBM4gNhRqZ+Rpd\n8CjXawcLhgkyr2Uzfzx7lOj+TSKezfUS8WX6hIycMNGOXMpgAe5Cgn3vZxoq\nkBocKIrB04fFf4l/O/X+3uB4sBzRAUqWCWTP4YDnHQAMSDAjivREgJkkrTXe\nKb7h\r\n=yJXz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHxGerU72XcvLz0cyP351avooE8Pw0EfncczFFmnxP98AiBNeHLl5omPno7SKGBt73M6VoSL+7iJ8DaweOV6BVZitQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.29_1572701860470_0.45373101019957063"},"_hasShrinkwrap":false},"0.10.5-alpha.30":{"name":"@react-ssr/express","version":"0.10.5-alpha.30","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.30+3ef6c2e"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"3ef6c2e5535e17433d7495898de5b57e52d7efc8","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.30","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-+F2kuBQOO3L9zsT2duWfTOFBlSFERFWdEwmWv2tHJSx0FEozXhc099x2bM8E5jTTQiOKsXrQfMQEzONugQJ11g==","shasum":"6568a6007323a8626096b808492f9d399a8413b2","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.30.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvYdrCRA9TVsSAnZWagAA+R4P/0iXNM8NiEWZSwH0q9Ym\nB0QeRRAVbOAh8sQiWSj56pRwqU28u4JmrT+G3sJQZIGKHe9+kfGES3+iDzZd\nUDnBcjNdOEbUHkJNB+dFFiamrdbOWripuOibORu981+DJ7v3WCSSVqAmp2jj\nf0W1zYwLL1UP09qTD4jZriuEWccIvo7q81TCPdSaRFv8DtcVBI/RWuhOocun\nTPFqO2cXA1QO9ApSAmeyDLLemND9ImjtmoH7w4imsl3mUc66YMIP13PAU3dx\nbh3JYRhh15BezKbFvPEOsOClFctllNP3FXZs99ljepF9FmgQKgIamvfTpj/i\nCZrwx0xfu/gT5r2ZcSvcuTuojllF9dLvGuyBF7oYe5QxPJ2A7oJQvGvATiDy\n5AuklNdDs4GC07l0faY0OEitbjmPLxgV4RwNIoovm2u2tz6jiK18HrsF3Kj7\nsSYQKeEWv9mxYFmjWPm7nFDatw458B9Q583nHnTqd9JFQQGqubvkb47ASvlf\niMf2MWshs+fwzC9UJwdHFu+I3NoEmisDSox1obPF+Vj/bnlZFHjJslhWGWP6\nqOU+gzg2BcRj/9FfB1c2rmgFOyP1co8YS06I8VRiMeCpaOe7tjgQe4502Zno\nfotKwqPqaVnvvlSXfdBcAEmi8eC+mIqgl+pUt22xAqDT5u4s6rzn9R5/3gYc\nIYws\r\n=1CAm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCzJ0PT4OPJEHP7+OfTZ/p9bXSgsLPqqLk68yr3yMRnKwIhAIZms/qbmd3NOntQlt+sNrIMidL+ugM4VqSEkM8pkqnh"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.30_1572702058619_0.6659145858694953"},"_hasShrinkwrap":false},"0.10.5-alpha.31":{"name":"@react-ssr/express","version":"0.10.5-alpha.31","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.31+626b734"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"626b734a706717f7f98c71daa66f464a35d8c946","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.31","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-zUD4kfHCRvTVYgtivxsyZnDFak48idOFHzrNe9802QiYxd6ZzMuAh2vQjhN9vZVq51WGbt8RVzuW7iTo5FPN1w==","shasum":"8dbeb8905944878cc8526f539f03adf0746e34b9","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.31.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvYf+CRA9TVsSAnZWagAAcmgP/ieJ3MoDWJYtfE/sAcg3\n6Vz5r9xpWQ71pvYjUjDJ4u5gsbasZFQI3WNGzDd+1z17S3Pk+naAgCXiU0N2\nMzOwgFd1pGjgepcYFtUmFbDelgLLvcJGYThYMaikn3W9KZIYa4uU/vkLhWVG\nDokAsIP1SHkf0cEyi9mtvbad5nsRDvpbMstY1bRZoocsGroEl4CXQcgJwvPW\n8TZ2mCz8y2FSWzrl9shPyl4k78s3d4RI4gNm8LM8O7YwOONZ6n1S4rg5TvxY\nuhkQ7w8gwwUCapKxFyP3Y1/FW/so5UjXOFKDsRFl7pvHSBS/6P5sYf6ENEr1\nEircXfNTCcOdR8sMX3/dxqBg7hRNBjiLT/fNHx7mrk3beHv4bWqaal6CIMzI\nknbKu9QGnZjCR7eY2y7+6E4Ddobt2i+fmCVV2MpOeCLVAcjJRpOTzfRmw0zZ\npq/kMF7+Vx6bE7ZMWw9JbPBsTyFxmSolvivAf07vKEw1qqja/lnfhTdlNMjF\nQhai4uYkMZeUGFprKRRfiG77XZ7lB6N4tIEtCveallJgyrNRGJYQ2nSIU9KH\noTh/i6fkXMotlUs8q5S0WkVbqA62IhahpSMu//0QBaHbTEbjgHIi7dEFA0rs\nR6xdcoohuP4qTmzkJQFu5l0FnUYTQ8C6ArtjjFqUkivqDn3XL7q4xlNLOO5F\n7NpM\r\n=51n8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD9JkKo99ONO5XfPjKSVHtlbQSskAsdhzJuYwCdwDJx1gIhAM+ajJ4mDseS/uCZSXNik1jFaVVIwb7sDhFqo52U1A3X"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.31_1572702205651_0.8967454682724179"},"_hasShrinkwrap":false},"0.10.5-alpha.32":{"name":"@react-ssr/express","version":"0.10.5-alpha.32","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.32+d088e09"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"d088e097be89e8d4c8b0b03d8571c53d98738e4e","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.32","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-8xgulUcTsXo3oW75hNY0VamYUaUYDlBruOsKgqmY1RRSvwRrj+L466rbl3jXBtTK8DVf4aPtnQjkaxX8JTdFMg==","shasum":"e0ac35d3518a2d0d5f105124688a3a16cfacfdf3","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.32.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvYivCRA9TVsSAnZWagAArq4P/R89i/EUAqr0hIcVsOFo\nQ5FQz0jUM6/tei45jy5NAkqkrKvQ5C9WMN7N8pHxVa2V0+YvqsMor5eoI3Uk\nhEouTB3ujsP8Hw25IV3RqeXr1s9I7YOlcRH2h7pkXlfo+QwREtemG7U+cg8p\nAERH82MiM9cpwWukuUbd/WFtK9BJY3yBBURPPhO2NBftWUjhiwNjt1GKaK6+\nUbo+QXbETyv7HuKEfw004o9kQmYsu8snpt+IecgmEN8BTrJJ6rTK2IOwx4eO\niEqdcfbdDTO3hvj7h13P9daj4ii0QM7v18HXEnXL112Kk0uJroPd6wNzOn5q\n4Pr6ItMFuIWd+VS2mVEA3vsGo9fJ9vseAF9VAmKF2qKiMATFtbeg7plgYq9d\nMkDf7JIdY6++uxW62vUxCyqrupdVogDOczFR1tqA/1luOoVd14z7IvcmpxLs\nFN0p6e1iKyQ2jtDsSGyofYSXgm0F52wewwSOdjwn/B2u2N2EybxJkTrQORLt\ncSyXUNlbqUiY1ifEyWXErZvp088EAW62BxyBmOT7de91hHk+7a8nYrT8QHyR\n0wvivGbv4+PfjwhymqdloCd/DJr9gsTLRAlKjQ2LyIaTiQ2jHCtQAu/hoUdD\nSFiIfcxE44JgXcvw8t5fMD2QVEA0PLsGj6qalmXrhShNnc79b9AWAB0UYKSG\nxf2N\r\n=5rAJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDXzXFFVxLaz4VCsX7yfY+nKZVr5T2xUPNTom9/R4FOQAIgNAGE3U4luMsDLGyowTeHky7b6dX4rbVehi3yutkMGrM="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.32_1572702382997_0.0031541429076160643"},"_hasShrinkwrap":false},"0.10.5-alpha.33":{"name":"@react-ssr/express","version":"0.10.5-alpha.33","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.33+5a4e40c"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"5a4e40c95c3b0c0a5e90af66444d47dc71b570ad","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.33","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-ZmOboItShn0urKCi6Ae4Ul1p45yq95szIzXSvMK74Zvxs5VsfYtgZEQ9bHOueEUlopUttzczEXg0xPbXRf6XVg==","shasum":"d7c08962c2013f541dbbc877b387f9bd12d1a4de","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.33.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvYmbCRA9TVsSAnZWagAAjqUP/0xv6xX1afkoLrBDcfzK\nBKFYXMDvnSWSC4CIdCsqsxH8gZmRtvmlR8f/3TtdC1sodJXtqMX6w1lOPEI1\n8FBsw2JNXtKA25WGKMKx+Lh4ZAgFn2hV4AQ6jjik1tZjsq/3Oda1QvH/p3BD\nOSP0+XwX+AXXmz6Rg2/umiue2fkdroyqfqxVqC7iCEzCQLrvPxHwLgmsIvJA\nTQ4M+O+f5k6OB38Oh/hcyrwS8MNPQ56n91/ea9lZdPRyjFWmTpITwm5YvVSl\nY6RAlP2qrTcVY1hciIoB/FO4CN8WW6e/zrUkt3qSIixoDSIicqRBIyrbrqTc\nDQKSED6f3LpyyGH2pSaSTC5Ct2ScbOLRLIAF29AWVQhP+I9L8MYWYcRa5ric\n6wIupr1MDaKUCnaF8ZfXLiFUNFX0aexCnmieb03kVIoD3t34Qf/Fe+5Npckl\ns+l69fRUX4MkNqok+cVcNC2tnaLnk6Ci4WiesH7H0IOS2Gxb5rk//1RRVq4k\nX0wthYX0MW2xrMzV3nKNL09pl+wUcSmyFFMa3FDxRmh8//mkZIl7AAUbrK3x\nm2bJp8sOl63syyqEJpiCSmfM9EhqUeQUaHTdihAJEmNJE0FpvY61N+IymgUq\nI8QZbtroxu+gjKuahjawy6iYzeg6jNUUbXjrRH5TRSkm0Isloa7/j/KQh1Qs\n100l\r\n=vvke\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDG/ftR15DYK3YZ6w8grn39zF3jkXB4OCadLkSpt+1bMAIhAO80yBca6fvaVcauL7ZWVh3ObCGQEVFJ6w1CaAvt85K5"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.33_1572702619271_0.030296448679490995"},"_hasShrinkwrap":false},"0.10.5-alpha.34":{"name":"@react-ssr/express","version":"0.10.5-alpha.34","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.34+2d6ef77"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"2d6ef776b24c9bd322d04fe65ee608257d4e0cb8","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.34","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-yHUO3vl3KkaKp7o+H6fc/Qbf6Jm1UoLyDe6mPw+Pj6iAy44ZfcrJv4xQkrYjshh9YWBJl5t8iJ9p3vEaZ+Nkhg==","shasum":"5063bb95f7632c682543ab780a7378f5d7e4e8c3","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.34.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvYoiCRA9TVsSAnZWagAA6isQAJDvaW6MLcDe1v2sNQcN\nmDQKOLy8JuaWWz2TareiJR5wcQWpcRqsQpAyX0eVBz7WGUeX1uFOtRljJapy\nib9JoPq0XQWzoYZHV1nrQ6szO5LY2vGgNOlX3tTVfnyJqwTLL8Z9VUZy+X0t\nKN5YB81mIlSTfynW2zQujBLRJi8UTvtMenkHamfaj6E9HpeNYqVpOCfnwnbN\nErQF8Pj7qWhtshMbl8OaOmpPpEnAjDxa3UDiXlhQP/xPYopCHNyvTVxP8E1t\nu5bNHbDtJnv1mFpNPHgD7eLB9u+wDqdqP+CNcwmNQ+5KwxP8SUkgT9he3+vi\nexZq4lADdO4iB6eRdVUo9ySisctU7xL9T6/CIW/f/RzPJU/s6EJ3u2gLiEjb\n9+I+SJF1+OMlmZUG18u86Mg2SNwrEROgLe9wvweijX+EzlDl022SuXocDChm\ntUT9ptKLcadXCIx5iYi3d7rn1VICMfDapveJu91Q7gUk87zdV+/iDce6HjYi\n8Ts0kcNE9VZTQ7KHDEX0aEHZgBCczAr8qfwo3A04bkKPgXH2wuvDzDa9PxIt\nMBLTFLsGsLYlJzW6kFPGW0y1xbLT4GOn9UeFrPJiSvsza2ZfAc2LXn0TO2D4\nSvotQFG7XvyuZ8scDY3Wr7cbFPNE7ZXuoAK4v+UEN/Avuw9M6BTtOQtEH5ta\npJKT\r\n=1ej+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFbWd0RkoKpB/wvXI8l4BOuRK/NEbFWxPTjAwRMVESxcAiEAupxixM4aR4otS3owH9a5U6YwlN67zpS8r2gSzTBUyZo="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.34_1572702753786_0.28961526659992254"},"_hasShrinkwrap":false},"0.10.5-alpha.35":{"name":"@react-ssr/express","version":"0.10.5-alpha.35","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.35+a163208"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"a16320839fc2a20aeecf1cf851d7c33aebd7b8f6","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.35","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-ciiaIVvMBwOACL6V/3auVzF63XFabW2JIueoPB9LP4/Xb6XWsAvy4LuosqUNkL0f4aHq3kpZJx95L1tF+9+slg==","shasum":"5cada7fce9406b1d332fa995419b8652d8908290","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.35.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvYvhCRA9TVsSAnZWagAAbcsP/AjMAbK+do61ZYdQyXRB\niKJ+bMrDRc2EoByrMY9J8kdPi8HdeJjW1gtPNet5TLKqRar7PkdFIUkCE0pK\n6gmXJ1xJzwtwXDGKHjiq5Wy8FvBd0zec8P1U/W4JLcNolGmvMcsLgKLU1JXM\n4/Aq8qA3SIDrHNqJa7lY7BkKIp8ycSrhwo2/uIYybg9PXsSQONop5ovPXoOo\nr2bMWNnLtnBU/hX21nwuaGQM6FDm36cOoCFiEHPTaVf8w+/6KTba11ulkfQT\nR1PrpHDbranYuSM0KzRe8yroUZ+edxGqGzj2FwDHFVlk7h3tuRWhVDVryi0v\n0Pqp/1lVsZPPzHvrLTTcP2gtxFvT1CJ2NXLU/soDE/80O6GKyfX8oPUTjaHk\n0AlgfBchc6nE0mkU7ACiGdgaxrn4ajMT4vSjwd02zHJAeeOTme6kjqhsb2CG\nossxioNV8z+zzigoHBfNJQTZa2hLLURQfUWj26JgaZ8OBdEWlbqyB4HnrLR6\nnbL4s2MReNiftjA1J24QkxcC1N2XHrwgIMTRB0GveD/Q2ZuY0HquOJWZDrqU\nfJyV888588TS6ypU+qO3svToklJfmwnOlKenHQz7pm4oDO5BUPJZtbrsnUml\ndr7jfXWhpU2yTJx42HVGahpXEPWrjDGdroFp20ZtFQKeyTyd0XSGkcuBw/lJ\n18kt\r\n=uXG1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDg22eaLo+Gos2u3BSnBRnO0soIB1B4UU2aDAXj1AUgbQIge2b/aueC8it99o3LliNZKZZVFbHRrVhVNeEJwlWbuHA="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.35_1572703200870_0.920673977271246"},"_hasShrinkwrap":false},"0.10.5-alpha.36":{"name":"@react-ssr/express","version":"0.10.5-alpha.36","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.36+fd4e7a0"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"fd4e7a09948107c550e07d76e1b8cb8d8fad01ce","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.36","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-yVgptBpDdyREJYwfJKYjwIFV3xQNjNCtwcfsA8sGlL1WQMkyaB6HZMZbZkeKDoql0x5a0AVYtTHx2NLtylR+3A==","shasum":"f369f4e45189222bcbb73eb18f168d98a8d3c31c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.36.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvYyDCRA9TVsSAnZWagAARb0P/iZyV38r5SqHJ+Zl6lx7\nF75Hbx7OWRdWfxreKiHsIm7I4CHY897x1DyjRJL/gqQ/pauq4HZfYOq3Uthj\ns/RsuVfsnDmaDx3hutD5bpLxKDrUTOv1PvmZAUQH5RuDc/tzbWqC/eAQnTYu\nxTrn/t1A+kNr4uccLMR7PmUeXGjfkteRNO8+5CC9dNLhhMmMkQum8dPuh31k\nbwyLnsmOgjorQZE9EtT6ngVlYlsDs5bR34tllQjompwankzFq4yKxiZCq5fI\nvkBO/SsM9rSCQU8pAuRi8wM+bUnTEH3EZGdcoDxhVbnudoCI6wNeLuKQjTNp\neQW5Rp5hTQDhoM2d6j2ur5Hg477JgFxOYZVZv0H2UQgzf966oK1P5/uGvafV\nOPdn9ZQ3+dTUE5lIt38g4lc9XogJbcuKnJ48C4xKjDYWeVhEwCEEdx3wkwc0\nWv5+ftMuzTbX9yO4gdQtW+iw7/tCVylkLGlZiyWg9dDxC5TTWj7HLzq8ylmn\n/+tmOpmUdM35DEDSkUawVN1uL3MeNVK3OT6hZXrHTFgW0MYkw/2NZk2LK/h7\nhT86XmSXR3DkEWvvQP7oJ5SzZe/Wm0h/ot28P81zAIsTuWALlJiq3H/Pmq17\nry8Oov1S95UtkdQdRbtDNiBHVwl7+DfGeZF9S0iQOzfOmskDVLJ2e6VVULkd\njH+e\r\n=64uV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCwplKwz8oAoF/vZ9Zjv56KP9WUUJ0lYMNk2TDDUOeqlQIgcnI5+eXW7sqSKweALb07z1vNOoAD6tI7maH3EOhc7Dg="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.36_1572703362725_0.3342096913717689"},"_hasShrinkwrap":false},"0.10.5-alpha.37":{"name":"@react-ssr/express","version":"0.10.5-alpha.37","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.37+a244092"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"a2440929d0b1b61a762df6d43b25c674d18d1df1","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.37","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-u4cWnWTMLsxLRiA/a2AT1Tz+k/MCLjyDXjECG4ySH/5u16SlBZluoguxxaly4ed0272uyxKmjuMawa6Q0JK8zA==","shasum":"cc341d32c4a01e26fff4250c814158d1e01080c8","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.37.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvYz+CRA9TVsSAnZWagAAGuYQAJaBOgjbnZIpY1XwBoKd\n5915uQeNcFwxdJfWLvlvIhMJKadQ/Ls4VZsuEpOreo35BovIigULHSv/joRy\nBIONCh8weMheL/RfsFfMgLBz4sYggAn8P+CKJFcASPLuzqcwkXkdRxY4J6Sv\nao6DqaUzfQ9A0XsJT59rxPe6p9Vv0TFScx44E+AhWhYdkIEs0cs/k+i1IcSV\nRsX+rJANUwKRq1ZVUpCSPKJX3lBK/5dpQDXE0t9MfCA4TXnf0LDuZRHS3lXl\nYd8cW3xpzIHzE+tck73vqF0hLSo45v/E/ApRWV6CMXtDXgxbVomJxxjhEVHR\nead/DGrXbD07dVWDXBhSSlWsogDSjipIScqIU2rHz6WNeF8I29Ur32UL/3Ev\nSNOF+UGG4rcGI5pziAucDWqp7bjKWJkG6aN+L32Fa66ZmGeF09Sjl81OKCOt\n6gUJ3rdBMJf00I6TY1L0ik6927uhqY1p5wky3ECfExRHRBVpqiX/7mn5MWqM\nfh/kKQI/7khlHD/6E1ZkGaBsjAskJB8H5XIZ2DJ1dAakY4Bxi276f+/oJLHV\nXfrJaJfUT0M+xTkC3Ju3M49oQJMXsjGA8ji99VTsyniwlqfw9knfEkhJBb+G\nDOLhHdobS4nhJkxQ3hakNVEI8spxLhttfNK5KTCjhSbYkbSTrj6ooS5PrAdF\nKmss\r\n=fkzm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDVc96w8DExs8Ts9bI1zGDuq1XOqsQBtoYGNwaSBHnV6QIhAOIs8MRVKdMbK3vHhIH8kJe4Kf+CWkZKlT17VfDW/8w9"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.37_1572703486486_0.7802626650324289"},"_hasShrinkwrap":false},"0.10.5-alpha.38":{"name":"@react-ssr/express","version":"0.10.5-alpha.38","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.38+8a38898"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"8a388987c26742ca669d2b32d2daf9bb6ff931ef","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.38","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-mtnkDOBn9iGHel55IiliSawC3L31qUBCf+tUIXSqbTvUrDhVu+KBB1Zv+4KwFvzfrU8pM1fT/n9NTwligbp1JQ==","shasum":"8cc5cf741bfeb7e08d702f66300eee9a80e37959","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.38.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvY8mCRA9TVsSAnZWagAAyS4P/0PvINWkxHJtgzWSnv/7\nfoVZNLp9nuakCSU8PtbzvZ+PP5/Nr+kFr0dBRX+Kwzob7++M3MEo8mlYEgwL\nZVEZPcQrj9JGBUqq9blSmTP3lND7fcgK+k2n8JXaQC2XFLciW+pyFwDAmdne\n9iPbtbGBd02aI0tIbfB3e9ePKVfjkyDw0gZGepaoNH1j34y+O94lZU2KJlNT\nKZNJmySOvprFJLuYsdX/m5762Fe4urQj0J/P+rpsO6FREXwrtIYHzeMM5qW7\nlQ9BW/NZqMsxgpq9aMV7Y62H5tfU8+nnnw3LeYxX4uxbhSVBXKH0aJmswAb3\n5TnYun3zqTgb+dlnXBDKvrtjhmrU7MOeUtJ00AJuNypcP+2aod/POJJUAM+2\nlsp8HMISoq1FUJdDYrL03qiP5VQ8xJPIWpBeemLHz6a1kRe6rEtdadWb/h7V\nrRH7sUuH2dr5qATjGvGdJq/yGWHWJ2nE1JEYFzBk3lum9FXAMbA9aV377OHj\nBLWvuvWXQkLTMzPj016VHo50ku0WMU+7HHo1i/lXiV6VDGA1PdTnH8AdRyNU\nxz97XOqAortj3OQVxAtVjmPDpUyASv2zo8hYOQMmIuqzipXKo9xPtVJ7R7j6\nevAuKjAKTEQbz8TQJ5oCz1tt62b+GZoiGPwk2TsmueNnbq1R+Wv/7zqJN/ys\nD9QB\r\n=cNGh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCRdgSix/GU3eCoSUmBOzUGgswAo0NpsTko9wmC1eIMmwIgXnqyjWK/QvHc4/RD3+VV5tVm3tyokDfEsXHlcnxyTqI="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.38_1572704038140_0.28090344038177695"},"_hasShrinkwrap":false},"0.10.5-alpha.39":{"name":"@react-ssr/express","version":"0.10.5-alpha.39","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.39+feefc92"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"feefc92ed4564c406fabd168e97376ad54f34c48","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.39","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-alkZqGim6WvVFVxbySGB3bcIufZ6H+tvAzE2OkGYOPy4oppzKMLkQQ+VqaVQ0rzi4c+hTSsZ4n1U8yIRcXEPtA==","shasum":"a693f557873baf9f8817b1fddec05f87ffbd45fc","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.39.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvZiVCRA9TVsSAnZWagAAFUIP/3XOdO9tdpDwahDJ4kFJ\nnPTNLwCgx0sK44nEbm9M6h3DQUQ0Vz0J/aKcYJep5Y4pfIrCKKyrT/djDt/1\n4szKF5yQECXSDln0ojBC4fwsQeQvwW961ZUn+FMsaOjqAUS1qE/rH5V4oFmO\n9QDJ1q6Cw2PzWVAksq+quGZUxqGoIzQ7a/g06wb3+Z66wbizOXI7rjTbR0Yz\nu7v4QvrcordO+Ua7/Puzyct5RFZ/+tr9doSTNbppYsNMRwfRM+PWf2wzuHxu\neXrHyuuKHoX89Vgq27P4ntbjaBL829naqNGc17+mWRwEziAMS86DHh1lbX1N\nt+6pH622pIwMQ/farriaiXq3As5G7KuvWBWugAuFCpJB+IT1fkqf90RR4iah\nc+Pvqizz7EW/DkqDzpuDmUkXk95lNWKglLebQX6kvX/1mhjGfW0RAScVv613\nASuP7rDPAJiKPtaHM9JSNK+DAURrQBWmzHeQVqVTAcxNuIPUjna6TuYzJ2VP\nuZLs5rFmRPlcw6mdlCaAgidbExtFYnrIRa5xn7C8xKn8ivHlOSHGhtA68ANW\nAjwxm4TrBcu+cIILO2+8SnB3U/Wca+BzWD0zSopG2uqR1lWzXJp6VR0tdNnq\nT3KgfcUeMZ4uEtckLFxCsQcXWtFb9Xih/5Xx9vnqTqSEiPQk3YPId5n95GgM\nGR/f\r\n=ofWd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDIpL/2Y1JdujwWvJ5pjI7SL5Hr/w8jKLFISJbbCld36wIhAJUzNP47vwS9LkDcrdgiDHaS6Jx4JnLBJ5DqLRrCabFl"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.39_1572706453372_0.6227115333785744"},"_hasShrinkwrap":false},"0.10.5-alpha.41":{"name":"@react-ssr/express","version":"0.10.5-alpha.41","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.41+1ec76ec"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"1ec76ec0e6e1d17ebdc90ef204f4167549e3feb7","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.41","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-/+sDmXrbDQWQQL95T5/ixPLSMjWpX7Kx9zxv1ucy65aRoqNP5srFArlZeEP9hoSM3KAXzGXzbYxkQdvf82j4UQ==","shasum":"b2dc88c835ee82c1dde65a6e995adc28c4009c29","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.41.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvZkJCRA9TVsSAnZWagAAaK8P/Ro/ei2KsvinIh0Pkfpl\nQatkDrmUFP6UHF5midRqvZ26L5li/UeoDACTEDjYhZ1euaT4Y8fTlgecSuLh\nWVfMpVE/XZ4RetPx0I1oxX1J7/soRfLfd8XvXEucLVdoYFPanE+TVb1BI55c\n39p9xkvYLQ9H0ABrEhb5YDD2kRPeFbgRpvFii/No2hhjY16LTnh2kQ7igSus\nnF76g6DN2d6J7jbqOU8RAhwO2nucdelOrkfDtkM5Q45f+mA9PfBglPGfdtGk\nMY2rxNmwnFTCP0h6WqpvZwHjYwUAtM9d6AhJ7nKBHW+gpxRUucDNru8oC0bJ\n5j5iWy52I/QNeNbPGd1iCyX1Enco/bxWsKejlk6xvYBRs47cVWB2PTrX3zSv\nXWPjVmeTFBOmQ6Lpji8VEfAAzA5GugwXq7cALwPeDPVSyq1i3oc5QZL3co78\ng4pVh3ZyyN4ajp7dUNdaIsgE06zggK79DzY+IN2oVWuVPwwPkhd45JeEn8wF\nXbBcAD+IBSRgFouOeWaucfKhTFou1Kee9Lwx4K99FNF0FMPE+8xRj1kIYrjl\n7LVsgRzFln52oFsPMj7sxLtMv1JNqim6Efw4LnCg3NZ1/w76wfL/vAkrq43n\ntV+eVRixez3Bl/sd6kJzwwaV16Cn/frFfLw6uO6ZeIHi8lV3zt3pBoEl2SyN\naZxc\r\n=GIn2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFD2fnazJzD2y5+MgxVNeJ7Dl67IESgobaUB7y8EeEnFAiBbenLLckTckFV8cUJqQHoi9QE+qtFcjtGYSu1HIv00lQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.41_1572706569226_0.9722901444212009"},"_hasShrinkwrap":false},"0.10.5-alpha.43":{"name":"@react-ssr/express","version":"0.10.5-alpha.43","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.43+be260e9"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"be260e92d50ece39eeed6f971c75a57252739879","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.43","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-gfvPMzJS3jZKBBjRLyYj7+MT7mtSANxNX2HCgl0qdgV/DZuDEW6VhheIs+Lz8Pkpbgy1+5pbu5pwSYRi3j1H2w==","shasum":"c62928ba08e1771f45549201c757d05b04108f47","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.43.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvZs2CRA9TVsSAnZWagAAsGkP/RxAX0WoQcRRRein5svY\nY6eOpXCI2iac9RwMXM5/DHO5CFwhDv6bih/J4vCLLeYHpZuWD2A+QPQod5g+\nAZ/1CYQ09psStqEwPfH7Xnl7qD4T5X7gJelDyR20CrxPhHs9BW2aP+1NXEen\nft9ysODwEvJvmbXIIfAdGmMWi2Fg0/IINBoNsx2G6AoCIhld1kxSZBtnLtNB\nKf9w3VJWPDxidWiBQ36gQ2DKrDykm9xkH7POY+WFunQXERA+zH5ORPPzwq28\nme2K9I6PeG6BbDo/xdT6VZx1HqR+GjudCU77/nXNgA2NnSoVFD7fu/9FJvK6\nq3B0ezYu+X9t7dhWXddpqyG1qZvQDU5kiOzzfH7HT2PqMUx3NmUee7nGxbEq\nFcd9GoeORJRlSgrBIjfK35FT1Kzq6rrBGOKXgoaSv+c99i3aCEeBqhOVfvI6\nKn6XkU4yKUDuF5JoVqHpFCXJcT7Lf9Ki4WjsgvuHdDBbW5h9ISgp1uw0KdsP\nm/sZ6CHm7Ao3ty3rJcdemd+kSUt6FJSR2FFBm05/ZjQuU6MOfgwJDQKjYPSK\nikQWnyPtiW4TDtsSodCZM3wmFldgZ8XQ48x3fePxfRE11TqmlKoDTgiyeE4D\nipn9n63GjGV7YgRL9CPHL4Nyo7drEWJ8fS/mjUpkuxLHSOlpBsEdCfXOwZtW\nbiP7\r\n=JXXe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDl5ATK95Drjh7KkN982nqdhoXBg1mSaXzEVjnkkEPhdgIhAOY06AIfnOlLP/rZw2JafCkMbUHZo4je9Qk1CFIPjDUE"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.43_1572707126223_0.632104567434199"},"_hasShrinkwrap":false},"0.10.5-alpha.44":{"name":"@react-ssr/express","version":"0.10.5-alpha.44","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.44+fe3546c"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"fe3546cb934f5da9d0e61fe67b59343f0cb52912","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.44","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-XNQYWoCRwdmoDMGN8so2CBbHvEvzZ2HHO/oGKmcwUJo2urQFMx/aG4IQKMEGFsnbcgm+IX3amrqSf0zfFk2pXw==","shasum":"dc6796395d7b392ee79ed87bcca794e3965e0be7","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.44.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvZy9CRA9TVsSAnZWagAAi14P/34DSRaoi0ZZ8KTaHA4b\nNECPwaDJzHG0N+I8P69Kcq5m9dRb1TBXwSk0Hn3Ppfu+8hdE7zCpCBJc12PN\nY/kgNY4zILCocht3rF+/FlhSGDjT4aY9qr39AnV0CvODAG0qHlkLwIXBVSQW\nofBe8+BrWsJrNAkWHnSdjkm+hdx2CQ27ltMJMsLQ7PvDba4z+X7Bft0EfHt7\n2xs+ni3Qtm2E0InQYQBWum3QzWTDyGowG9R8py5I6yD7DdAQF1MqNFFP0EZ8\nJcZcFj70lZfid/mti9+LaNjCncA9oQjkqt+9i5wo18ZcrRkey+C+nbKVY/4R\ni4cwSmoT4gZ2r2oBKhDMZABkwk2O8rhQopUUGlDZXFlJ8KimEyXzj4KLU5WW\npXHi+b0Kytm30Y+0f9b3youIaFGe9eBNJu2AwDmwlR2rBMCT0M3uR/iS00vf\nuyuqIedt5YPiTG49q1694tuZozzdh3TNFXzx6e3kBzfzojCYzhqeNSOSB/f1\nw7CMBkZ6OYpJikIPmPqCq62wghGFZUxMTaLk+8vIv3Nd01809lIh2QufXQcm\nebHu2gQ+Q8N3LtJhWmLHFMayzFNemSVsBqml5nO20ReuPw6LobcNT2jAysgE\nZGJQo0qOXVDrzWFuNWB5qtDeZQ9HjtUFmxXH/N/kb88oScK8lUxhyKW3u91V\nUb33\r\n=kPLq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGCizYJFthhb73y/iNBBY6bo+VLm6jbQY+e0A3NkC2l+AiAbJZRyOTlhXDpTBOa9U2qX0TVQtSjcjPCByqi957uasQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.44_1572707516671_0.8620404634727694"},"_hasShrinkwrap":false},"0.10.5-alpha.45":{"name":"@react-ssr/express","version":"0.10.5-alpha.45","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.45+a45099d"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"a45099de693db5833ee3d5b15c0b3c6ce9377dce","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.45","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-hWV3IvF8FplJtA/b2gRp9wxKJrC8FXq2jUlRVGmskVkvPdgWdMKhPSslNHEvztmlZuDHkO1CM5O9CaFQCxlBNw==","shasum":"1ba3bf4410044265d284437619c2d0479a1c4c88","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.45.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvZ2hCRA9TVsSAnZWagAA0MYP/08D/TN9yss9ZSdy8DfJ\nDFMs0yrmpes7y8ySMsD7ri4GxVVZXkP4g2EGDnCaO1oPt2dkc8sfhZ3IDHj0\nfokOGu5fl1rUztzOEh3x2w6BCy1Is0UfgTsSvAtRRDZ63nBdAOD3AUEOC8Cw\nsXz4uir029t/PGbKoqwfBfdrjzAQ4Bh+LF/+l4Vi7jRsZZEyEs76UhPSjbhy\nzHlcvjGuyvNrM/xswWGl16UzBbVXgP8s56NH/EWZr5k+bezUaXUJpGp88O3v\nJXOky1WK2U+DvDdSt1LAyMnXbP+VwgXUDF1xf8Wqh7xEFnFDueuNrpPmHRwU\n2CPdnwhfYzYcFHqOXhvanCispLlanlVMAS58M9QqQ5r2twRncTnmTbO2k9U9\nbyzxHydJKdQbkhACGNim8R4VWkWQ/sNm2aUsiI35uPJ62ECGvghenEiXUU9H\nwcPLUb1+NGZ5jiEOgD0iO+u+rpxit2RMv/havnGcJ0Ud0VuGNLq/vU7xAFhW\nr9IAmz0PW5V6NnJrq5jv9SDtzOv26KAKWArLD54ZzpZ/kKuI4yPJQqhYl8VF\nKZb6EmmU9ZyVfBz+VvlWTQb0rWA5G7PU5BUApKUn4rzI1bW/hmDN+zTmz5T5\nVGR0hLpBjAqdl4s3aKr6BQOAMvU8dvrvaUkffMHCF4HY5pWtx5Jrq1u7b2MG\n6X+H\r\n=Z1g1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAVeAQ360x25UrXQjxlngXHBDtRwMl9gasm2x7ag9kjJAiASt5vl33gEut0AuXIl0KZF9RA/+7G2ItuJzotmfqq3oQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.45_1572707744670_0.27772259945687905"},"_hasShrinkwrap":false},"0.10.5-alpha.46":{"name":"@react-ssr/express","version":"0.10.5-alpha.46","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.46+527d87e"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"527d87e1ae97ea480db3c5269fdac2a17dc420bc","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.46","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-YyOF9vQFY1eJbTR42vUj0SVNzBI84WtHR0ZImXUCnRnWo3PEixuQMXQOEQbIY706ftSmnNz8AaktrohDUQ83rw==","shasum":"b25230421cc6fb728e7f8563650dd7dff5f7585e","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.46.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvZ44CRA9TVsSAnZWagAACAcQAJPbGXVAaqkgkKg0h+r7\nYX1KgbVkX9imjpXhnheFvd6NHXLk9uMyImDvCpRFWXeot/DvxTjlt7AcJF37\nie9QJ4EMxbJ0szzh01NEM+sA3DvmEwZ14yqECo7WEln+081ynkwa9ua2BOdP\njJKDhZi/hXdZJlZy/atTAbSaa0mDxK7bGgMV8GkaSMGEoL7xDhUAMr/do2C4\naYuMPBtIsmtnEuK7VEGMiAqsBdWOslrbfO7fLuQgFKIKvp8owZEm+PlcP4A1\nG156j8rQdCvq8mSNQtztBgojphbyT17JRYpQLbEtABgEWn9LJpHStjYIDROE\nlwqMfkIWEQhS660HxW9E53eLG+qocQTjCurg0euZRDfaePr1qZuDx7W5TiIW\nJ1WeftLCARcs9vjvMXyrZETK/5Cu32KC6QsEg401tWmU+SRmd/d7Uzmi6PL5\nPZPERnMulr6gEC1QQO4aWc41EnX2F4G6CfrfbW7rP1kndY9AaL/T3ySd6lav\n1+7KbHW4zRpqBdBZ6EjcFlYIZKb6Awi1/dq1zKi58hsAMWeTy8rKDLrqc7UA\nMf337jzLiM80ZCMMbgf79xzEDzY5wh3hffzT9nMmiTFWjKi81BGh0l8L9Gu9\n9tWqbv0W28D3xBQWVpv5PPT6P4+Sup6qHO7tzd5xzPNgd73WVlXiXU2S9W8R\n3Blo\r\n=j9Ai\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH/cwZoJ1dd5VokobkR6NCDl0FheHF7ndOEWhSK/7PaDAiBNq0irBAJ22h9hqxIcJTASL8/JC8QP8r4Itfj7EUS1BA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.46_1572707895844_0.24858834306833888"},"_hasShrinkwrap":false},"0.10.5-alpha.47":{"name":"@react-ssr/express","version":"0.10.5-alpha.47","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.47+3a6dc97"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"3a6dc97ff470db13c2f66b770fff297e089ce5aa","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.47","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-6qlVo0o7GYtJV564czIdnbDmy0lZ9zI+OzeRoNAWSUBU1/mgddEzmHm+TyRLJ9Tb6h1/V17pYU5YPk7ZVONWYQ==","shasum":"32b78811129dba3d3e33af501ecce3cc32f6e814","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.47.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvZ8fCRA9TVsSAnZWagAAtxsP/0p0+EaAh9xRzbybDrnV\nx0YDYx4rXuAvXrO7t8ISM2HD2Rd+82NqoStuY8LCKPA+N5kwR8W7eIrYKORx\nUpJEx4u0GZneg8Kvr215SsN6iMLxADeGigR1sQuZLBhZ0/lGagss2q/XjYeJ\nnORz+NsuT2W+hHKCL6z7NxnRlYSIy80NF824yI5WzLRbJNYc9dY9aRa0551N\nRI5xhFqKbpaW/du8Yn7K/jgEhyZWw4x94lvwz/L/hEtIwzfQokG0AoOJOBvE\ntJba9/A5ODHFtQttaEBR3VtCVC0OmnBhRw2qZ9G2RGmEYUeFrD3ZiBB7qrSx\nxNOmNz1gvTxFXJFoFgOKrJJS7kBSBKaFvVgZOzPg7F1zGys1PmW3iB9NvGh3\nNUGw2RIsEJQhvOdK5t87x/3q5bXhlkGwLx+OWneNVScFjQI0Fy9mi1pkSG0c\nm7jm4nMVBZzI6bovePFV3Ix+Q50yepQXqHAmY5zg+7jRyCII06juS78TeA26\nfhoQ7Ey+p/nLl+uOgvX8mK5jD8tO+HAXS4/rR0aaVFOBeu5BF7FFxnVDJhx8\nmkvZlKF6erPSdQKQqJtgGEWwX4sUQTavEf/ffWxRPnU95ita9djq+7xjJyeK\nGJJ64WtRF9EySaFjWF/1GL074o/WP3XqNQOCpx90LiMBQkCIORc6ekD397zr\nHL/a\r\n=iJ+y\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIApAOM57soxHcL7bZWrsbcCFaSwtBuYF/UY0aQ/RpCkrAiEArb4Ga5MvPnhlTCvcc47VSfZb9Wh7rCw5Cb0ID42fQjo="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.47_1572708125823_0.019881720489723476"},"_hasShrinkwrap":false},"0.10.5-alpha.48":{"name":"@react-ssr/express","version":"0.10.5-alpha.48","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.48+e929dbc"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"e929dbca78c4a2b654ded05234ae3337eee9311a","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.48","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-IPKdmUtkCEJeMla5hNduMdDsdZUPiSo7SDzO8RqZeX4jk1AYIcRDi+X2HJ3+by6ShCVlqDgwk052xQAMUFcNPA==","shasum":"9b6b707d1f26b324c6abf7fdb61815e67af5f881","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.48.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvZ+rCRA9TVsSAnZWagAAGqQP/A9m7s8+miJ1qJb3KaPZ\njplXGCRwyx0KUoBCJNEbgjAIevYHu2z550jzHZE/yUgCTLUYTPWHUe4sEU9y\noFffWSHlj1nnYwybYDC02u/lnimwa34Q5/N05HNVGogr+BV5s6DBHeSlQRzN\niIkXBWKuSSRhl4UTVfCNkTvbglqz7fUJwymZx+86NEKsJqBWiZXdUVciTAA8\n/4NHDUHQtBSfxd7WGJ+YXRX9rhZiXdRanELMI8fmUukJg6Rwgkwhc2gEufDO\npisQV6wxthiyMpduDIXMRjqycI8CWYmnSLzifp96gvz+LnTupznsjXDW+ERT\n4OQy0CNkRmk3nnvKrFmzvRW+y1zpHvopfuWuTmhgCi9RLgQipSh4p6klTJIg\nX/Nh8nAAJg7P+Y8LcoDT46pMiYFmtln1ZdVA+BiK4BcOy7JzvfZ3rQYt5RRD\nP5YJ/dAnsDljW1NDJ63J8crlHqnZ1RCq/sRiES5NE+Fi0JXtHU5RjggtVRdz\nKIDRVLmRKdcRLv8iyuKo+134gDd1lbopCUiVTgijh0fBMWZYhhcOJR7J6xiD\nYjPmiKuXQA/+MN7rVrFCmMh6NmAswOMJtAo6JToc2wzBn4jC1PCCrTZ2todx\nJjYvBsusfbOb49jivLBU0RYHGq5T1d87zGC6YXI8TUoJBt6nR0ZHV9OcGJg2\n7nV0\r\n=Ie9z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAhlZS3eZvfXa8wP9I4M7LHUQtlh7ghY6+cLc9vGjiixAiEAyZq0XCV5buJcgNngMNb0zjMwZjGJC9Ha6CZVSyU9Nuk="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.48_1572708267238_0.3540947181211247"},"_hasShrinkwrap":false},"0.10.5-alpha.49":{"name":"@react-ssr/express","version":"0.10.5-alpha.49","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.49+c1e4533"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"c1e4533ec0c31dbfe7772f1a243f0b7bf640ff5c","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.49","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-v1RSpbRVUmWnqvfsHqF2xSZV2b745TyoWrhK6FP1OB/41+18ONu+np1mrF74a7sSMaF3v+ojOS/16kVbyppyLw==","shasum":"dcf292f5aab8da0c1a7352fea00ee1f8fb872e1c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.49.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvaA1CRA9TVsSAnZWagAAzhgP/0ApZ0d9A+0U1k6sBVQA\nySLhmkHbmVuYVwfJJrIrWa2Wx7pBndsxEwSJcKVNi5fC5ROgWB1CLUzWjA6J\nPDtAxypMTcg+qEgGl0fLlhmil3eQhNOZMEYHQ7gZKbVncAgbqu/t1CPcd9bn\nxHalJjX6ZiqzTImp9oXkL5UNslVoXSSXmevUeWvgAvpISTIhL7EVtKNFJ2cQ\n+FbWqTgLXVuXk5iBeHSgBdGuDBkYUPes/kKXVDZsoR3teLye2k3BU4DucIIK\nsbkrULIJTyBJcHhGzpW3HUxVw5uSpBiyCIBHyQaFoVyi/66vWTF5agSvTpbO\nKsYdxQ7E3f4KomlXeS9o+cs1UEEhGvoOk8HMyJ6Bw0Uoey9t9SrSi+YX8e+9\nvSJAdI6T/+eVUu02+suASk01RUF6QDQhCVbOn45YfTF9Zjjlt3Qj3xD2vBh8\nhl8AhaCg+DaaNIRYHjzyRF4XxxDtiSet6qNjKQNPkC0g+jbP0kVpd7CikFEa\nPDxjsHJCb7GoDYIL0M0c0eNrR6wgz5y5zoFx368kZqhRfKpC1U0E3Dyt6yol\nj4kLgzUrKhMT+HtODMKrpx+eKUZKwaC/O+VajXzLmPmXwGHNwckaHU8HoEE8\nC2tOn4X8fukRQP15J9tuA549jXlxd7AfzS2CsGnzNYfep3GAVnJOOCcZa1h2\niILl\r\n=B6s+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCtJ6aeqte7nX2Ps6gq5EWoR3z1hniumAmpwZZA20b7SgIgCJvaNtLMqh43sYb5IW+/Wf6rr8M5mCRwTtfrZKAttxM="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.49_1572708405228_0.9469468914802683"},"_hasShrinkwrap":false},"0.10.5-alpha.50":{"name":"@react-ssr/express","version":"0.10.5-alpha.50","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.50+e5f4bec"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"e5f4bec1c7cd1c1d0e0567384e8e0736afb3b7bb","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.50","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-C2rIIbdW3VyDRKKnK4QCcTwUbaxr8toOrcXl9atN3b5mJCIu3AcUPPQmzudYFRLdlTBZ50Uiy8hpxDfPW8ESHQ==","shasum":"c88dd67e01f2bce0663c2d8d3362c0a9c950724c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.50.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvaCzCRA9TVsSAnZWagAA0pEP/2rf4PtmBugmaxoqGYXJ\nCMYtQj/u1LtvSeQjEJmQH+FbmQ2jP+qeSvYe/uzz+EHb/J69knMLStIangAT\noiFIInqhWN9n6QCC4uRnaGPHAl/1HHxXWEUu4Wd1b01uTAtGxLwZgapOrMJT\n1a9Bc8JXRMvk9YGXDhs9TMmqS/RWtpNrZM9qQBdr94VyTct31jniAL4XLXpC\nXKLdXA4FslnevVEDaTOjDBwPU+zY3ypMuV4CP7KHraG5umvU3bSXo6u52KFI\nkmaNMoC1FHrGXlhocLDFnlJSjmgqhf446IEFG4i0U4enDl1TI7CBehUIVFSN\n2PXezbfk7evxSC541ClZFDLZi1YT+lwmPFxvt6XT3Ly5C6eowqykQ4HBQ+ob\nidCovJD1X+2nacgJMsCcmEJlroGrUgQ6w/E8PSalPkdD+LVvc7yNDeHSkRt1\nBcU/EMldT+JCkc45B664tJVSJ4/hjHPPJ91cldlITjkyaF00kMUcaYPe1zy2\nAl4M7aXTvukst2FB31W6fskxI8/pI2eSstoHBXDEThBS7reHfYJU1uOtSaCT\n7UyuLfYf0yLCvtCcekkdWM77+kfXsMmya84lAD48RmIeVIRvFHoq/xzIt4RM\nVrH1ejLj7tXTsXDIH3iLncmzTxbr5mxVxaK8DYHnTxVIUaTPATzokt2HIy4M\nAO7K\r\n=hiSj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAG5CfepqJAFfdiJbWRKyPyZ1y6q+6RYwOoILmm/4/t6AiEAmAeIgh+bzsDc9/VwY+d9qjPRXzIwfC5NZf6aM32zBX4="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.50_1572708530571_0.05828742790349062"},"_hasShrinkwrap":false},"0.10.5-alpha.51":{"name":"@react-ssr/express","version":"0.10.5-alpha.51","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.51+6ab3de7"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"6ab3de7d4779b8994a6e10610e70b786effda7ca","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.51","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-QtrzSigNwwQdK/IBTBTYHieUClridceROSAwfLEqeQYCAaGapwUDb94vlBuBG8MGWFfQ4v1FlpaJOoBVh7gHdg==","shasum":"5926bc49adc07cab4651783ce61c82a228b60d1f","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.51.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvaFZCRA9TVsSAnZWagAAPykP/2Nyf8ybiR7x6avpHoKA\nDTVmgQ6E4z71X2MuYHepa6ZiC40iR1YjGeP2JSJtw50fOg3/8lRlXiZM5IRf\nrOSV22Bi+RtNqaBz4Q1/7mFR6rVIqdZDV9boSlnEFRTJM1ZuVl9QM+YdU8HH\nOmJFthscb2f4622DA02Bu62TQ8VN0YqXpdh0IQfTTWqRndHPHtaooUufUcm4\nFZH3o7wBiZtm5IUTio+jZ1OuBzrSuJZ1CYSxa6aL94p3hbpw8Nv/uXdRX/83\nNAtp1pdqU+mdKGOiQHEsSQssHD7hEikdmRbiaOKkGdK07W2hIVwplRHNPQhS\nKxBbfJHUrEw/VsYKG6HnBAc/KbugoRJ6oZ5y5hMr9T1WzY0/kRZ9ZZlxOTNV\nsmRJyOVrl9hz1n8seF6PBGGvGLnHATtCl1tbQ6oHyqvI8MNX571ZPAplPcWh\nXhPFo8SxPHhjNE4xnpHObeeZ/M1csmjHAs+l93whJQbODmTuHVR7IuoDGFnQ\nMLHBp3qtZ9wjPN/g459PnUNtcyhHMJtPdUQv5yLTkkmjj4EDTYhBKDD1T6zT\nZVgtyVmspZD49hDAyQRYJaqjeIVmMnHoXNs+2OTvXAn3KTHilH/NxJrH7EUh\nBc71RSjwjQ1lP5YIfNmkqAYqz5QkIflWuXV+PjroewX3Tokx+jP++wBRPmIn\nteYu\r\n=grRI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCdrvHFsqT1HqnueaeKkcXtOdVsXVatYx1mRwClDPTKhAIgALbPvu5vn6CqHxSYSI2LZALCLa6l8S6o/bRTJgUYRAw="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.51_1572708696559_0.55587471524844"},"_hasShrinkwrap":false},"0.10.5-alpha.52":{"name":"@react-ssr/express","version":"0.10.5-alpha.52","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.52+587658c"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"587658ca4e0ade781d10137853d7e41a6d3c3b0d","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.52","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-WkC2Cr/p83i66LLN9JlcBXtSr9MsVr0M22Jk140wdUQIW4z5F9CfTR6ORajdg4JMnwBptiMCs+sIyQYy+8F9rA==","shasum":"62ebee29b70df5a8fd1089b0c10d6d2496931266","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.52.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvaIsCRA9TVsSAnZWagAAqrYQAIpN0C5BRKU+fwAlzFvl\niO5tE+Q9s6Be9JJtYXVG5LeO1EL0V+O3CUgo7HsKjsMgAIHTI6lwWrLppWrm\nY77IgveMSPXQlUisiAw8c7KcpMtt3ToaXNUrS/xBI9R1WXf6EaHqLIT6Jt5a\nh1xPpxs4aK8rtF+1DVSFElymqf7n1YEN6tKiU1NL/IDE2+ydiwh1oHheXopn\nwI508w99f6lJY8VBJ66gOjurTiOYtW0D32OXHEGNU1G+WbdePUijKHeqlv34\nbZOuvIHxDaEck17e/wZtT9KzMp33ylU/QVFCapFG0G3DdSLQUB4yXePcab/D\n+1cnJg3CEnKgIpiyYiJED7HkctEOfVU3VZuGWIr2u2AjcEASYjyHQBw8QBTe\nKp70xmiFNvkDL5HApnoLYBxNBxOmyx/Vksugdq+Vt5q+l7SuwpE/05OyzfG0\nJH6m/XhPgz+tAQCbTpCjwvYpJVkCsE0+lxLuqslF8z0yP+yB37GyJbTJV8VB\ndqs0CiKZ2rb8/A1dTtmkG32H5Ug48CHzO+nShghZ4CWAld3X6D6M4vVaS1N+\nmjOiT4Pog6M/o8xJGgiIuPUvvIxkntn9v1ldt4gNPHgNL4+Vhv6dgRefU32v\nahHBD8niCDYXSPvS2SAGHsSA/zFpA+B3z9AcfSUOkgTUpLKBlB4FysiFy3O6\nScUl\r\n=DxCo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCOsWBb+liI8KrEm5hYzBkHZNoFfKCWFD9f8EeUNcaf1wIgBiz+sW2lei2cse96kMojiQr7LLMyjOmBO8pRu5QuDJY="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.52_1572708907830_0.9999355470708571"},"_hasShrinkwrap":false},"0.10.5-alpha.53":{"name":"@react-ssr/express","version":"0.10.5-alpha.53","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.53+9fddfdd"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"9fddfdd16291c2311112bcae85ed2d55aec6d4bf","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.53","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-gC25YqC8j23TuinMs9Tm9/VIb1n7R8O85iBiyuLgbTXgr/QCtq6jB7StxUuASQyr+Vfxfd4WDbT50w1c9i4wgw==","shasum":"cd7c078acc567f79f606bb983478c89f5ab6db1a","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.53.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvaKhCRA9TVsSAnZWagAA+9UP/iVlEw8AGb5kxN4RtCAA\nI8eqXChyC+VRBmKfEEVRT9CRib+UIK95yufaFtx4Yh0PnmI8iXqeQ+cYQrvd\n/Wa45UBSq+UbuKaWrQnunW52xmDf8n5VuI4PR93CkLCFpJQGPJtSSsv2Y7A7\n21vt0ZuKJcWy6xOkBZbtb/YSYX20edIRjATOjUwoEqu0YhjYxUCaS+llIpKU\ng0PRe2bSGIF+s2l56YCXZA4JJAr76VmyNxV/h2zjdoq/CIaJ3EKmykklLmvK\n42dX1Kf8WEIFmTxTlESn/c5QsB6oDQp/9L68Y8WIph5ewJuzXb/LerF9Jezz\noV9N3eECiOnLmFem/hG/TWcv2Lu1yD7qWcf4nvBgo//LhzcoHu1PhiOz8VNl\nZwIyvEdhlWl7nZDuJKjBYueuC6TBKUHyR22ZsJmzOcTaqdHkxNPhbamIfs0k\ncjxkxH9/za2xnI9Anw1q8cwbpfNJ3Bl+od5twd74+FGaj0VXA1mOmDit+WcF\nf1EN7emieF/6VXWyaVK43vbeikhlKt7yuCo3VFGchzzpnKyntju4USW/rGeD\nnrah+m6quYVLjsrQ2W783YcO0uAhvlixZ/OH3iyZlzWQTsQ7xdslJ8+0f6mx\ng+lO6ueO8Sk83NXvE3+eDpQOLcvsTZsvU3psFyd1KPnsB8FByDKqdP5MO0+p\ndoF0\r\n=QfwG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC/H9UiFGtEOUBr5xrUBknk5IiM9bnRs+vAYT4dTAa2MAiEAhalAUYfxEOO24aJh+3IrryLUoN9t0LlhICtMLca/pw4="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.53_1572709024711_0.9468536889682446"},"_hasShrinkwrap":false},"0.10.5-alpha.54":{"name":"@react-ssr/express","version":"0.10.5-alpha.54","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.54+f2a4505"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"f2a4505849a6be417bcb79e38530b27d0845bde5","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.54","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-HoxY8Pz4Lt66c4rsYmvXEFo0eODTyw24eunFN7KkDxbqCerdIwticzIStiJ+nJQ+vLZD0HhOvo4ozEllqs4cOA==","shasum":"b1515de4b99df359896b6e0af042bca4c1a55d65","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.54.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvaMDCRA9TVsSAnZWagAAVl8P/iBBdsQz9WEvmPwduYNH\nsV1Hn1MERJXW2BnydOIMx8S0NQFJbJzVC88+U71SV3TjAbta9qMs3DgepwH9\nyj2XiLoGRXD6EJ1EWgUY4DaQILRUAVR19MGYPaVLe4gm6cCOuKkzzbGQAgAw\n2uushc1sPsKCFhSg7ia1W8GWANSPnrsgAo8C6vGnbcy7zpkEM4W7STTzgr3u\nxrnCLfhqirtLzLopVQunH2S8ZoHjGW2Y1SQL5G+STutzGW067ATwDFy9uWF7\n5gKI7Sei5vUDbhFctZ7KX5UqylhPmXSh6ZhbmbyOhvdviwseWwM9iGcMhzEy\nvzvkwDJKb/S+XTnXB2Mm03Uy4lwmIAeO9C6BhllqeIomQ8Fzaz3C4TbrN9C5\n6ADUukRYkps2ENN0cJ2ukTSd/y0nFWbmJPsm00/ZMhCpJNXEp1owfslvLprU\nsLiz3SzgXF5gzWYFqKAU7+i/7YIknXTEkMG4CDZd5pqX+nXmp5hYNbmCfQ0I\nZY4iYAgbFhQiwHoCYBLDG6Zo/vjqrNUgt/52NdbYkk+qKZuJMOgQQqurZhhV\nY5IQM1hSB7Yof4xz25zA2iiaMzgYUEFLSMgeMln8r4IlTWVeOoVnoDj2L5Xc\nlfs/SoL47iG+3j7LnJJzLMspA6CPfv8nKy5CadF5UGeKvupRa/V5KkeBoenX\nQmAN\r\n=yZby\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCJtLWrzHdMsPqs9DH3CEQJPZBMJUiADOMis32+UriIowIhAKQacKPdtkQ0il0GFYWHqyayDHjwecl3Npg7AC02DT31"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.54_1572709122928_0.3119132925561672"},"_hasShrinkwrap":false},"0.10.5-alpha.55":{"name":"@react-ssr/express","version":"0.10.5-alpha.55","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.55+3167573"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"31675738bb39c25bd5e5d986516b46847de27057","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.55","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-UCdOWNHN2e+ic40aEpmxjEoETzjT+wZlVLPErE77a+6J/EASkRiciIAil3yi/yLmD87KCW0ePREhbTzRt6CAsA==","shasum":"3360faa454d690b888d00e2cad6236552c77ce85","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.55.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvaNbCRA9TVsSAnZWagAA4KkQAIoEohEahXl0GbpS4SJX\ngxr0i8A83gXQ08AF7939LkS9khOQnzYKwJW0aVsuLYkDC/VgU40GIrwOIhfM\nX5e1QDM3jSK8smVZMO2TfiNJ/skBmZri3lx4tcuUAxVwfQeLIG48dclqc5aX\n06+eTpKlqgUFP/OeUMogUyVj+RSPmpWXpBfE85lSioeJAKPTGZjqXWDXoA43\n58OeM4kIjU9DBLd8uqoQqgLIcxHpqCNKTMwCidRAnPzciUCfJsrlWEpo6ebU\nQLbuFtRKPH1sViOTtMp1o6uFNo8NdsQnPg6zo2VO/qDOwpHBam/ZIKzh+INO\nh5F+YedF6f7XLPxEuzpk+M7JiYE0pp4Uqsf2LD4Nsljfi2U1baUox1cQi2LV\nXphR2b2FMl2n4gEvywMGzNU9SQTRV3yGd7LyRFV8lazDJq2h+IGHtUXcCYyN\n4ZHDCqTRqg1xVuF07F7YoqMt55aJKhrDwAgZgCLE2VYNaMu6y8Du4C6aE0sh\nPSJrXCSqpTnXaNiWM1yl+n48WPceRJwJzY5cTVFx7h0NqOyTXQPGEhzZM74p\nu/QIQp/ha7PNlebUJl4owEQIt3UhuqJnPOVnNqIR31V+uIZpbmrZObixGvQ0\n2kPtdTUIgOlQCxVbZ+iurcxkSYpJ5Zhc5j++KxEmhcgpWofAMZMTM1hO5dOv\nTF6a\r\n=7xu7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDG7SiD2H0Zpz8ke9qmYL13g+YUddHtrJQ/9O6p9bvn2wIgSacJcDUG+ANrLAB4LMCRlOPyURlWexZa8CvddQoLVcw="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.55_1572709211318_0.28071886845241556"},"_hasShrinkwrap":false},"0.10.5-alpha.56":{"name":"@react-ssr/express","version":"0.10.5-alpha.56","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.56+5419b11"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"5419b1102678f8a1fb42c5f8b90acb24888b6d0c","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.56","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-UJgNeLRqL4lG72Oo4oLOnL499DiJy7PvORe5pGyS1Ti9Vp1UAoT0kS/Gw5cwjVUFoqDnMsKdFNrAaZIhvz+PtQ==","shasum":"14412fa1e79071c37fff4688d62a1c26c71c8761","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.56.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvaPFCRA9TVsSAnZWagAApKYQAJXpVJu2v4/Z6GLufYn5\naEUiCedmrg+xrq9UtiaWwVUY2HP+6buZb8MTns+LkFLHk9WvCOAQWGbwevnw\nxWCnc3bm5bYU5ID418utZxH+P+CMaVVBsAcoITwGV8P7E/Cq8+o/lRSKxLyG\n5XbruYzJ6AENfGUwZuRX660Nq/3jAEMip3cxZB5Dx6frpOIM/+pOZU3X+ies\nc2uhZnx0GBQGWmnS7RFTpDH1aKkr/qYbOsDwhVaRCavcSzq1RFRmLMQnUpaY\nM/mjK7NFXIDJtxYgyQKBGyx17UfFRb3Mga2Xzer3pxokSUbzXPlYHyhhBfat\nJfViXzOZ0VWZBLhcBlfgTG8+dBUprONmv9IN7TOH1MSrRdIiJPTzA8jW2UD2\n3CLHbMI198VylmEeV+PdKiGKyCsiV+NOnO9cyEjG2X0nc83iQlez1o0x25Yg\nayYcI52ycFww41adweAfPnuAE28JzDfD5xNeM67VM79c0uZ2cRNh4Rgjx2rQ\njJG6w1nNSM2rCbjSmHYJRWH+Sw/cmBsQA9na5knIkJHoFINvuzdPQQsbINlr\nVGKvkZpddj0g5KHrGx1RI3d6u40C2pr/CV4oLUVgUrBT/cCPk0kE2hayJ0oQ\n8fKcNUCw4vieQZFWWN+am6W3l3XSqJpZ8MeDYj1AI+e874lP5LwRpnhgEwcj\nqyd6\r\n=1GAG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFonNaCHFTUfddXKnQI0Qz86VbFNejTXTK1vbHq2TQ9uAiBuX8CoEnMPKgjcSK8oPpEh3vi1P2YlPUEZZvQOp+bqvQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.56_1572709317254_0.32556809002992027"},"_hasShrinkwrap":false},"0.10.5-alpha.57":{"name":"@react-ssr/express","version":"0.10.5-alpha.57","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.57+83f7d78"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"83f7d78469c471ec209cbbe02100820c4de2bc0b","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.57","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-tptkVrI4KAiLPHo/1P5bIuVi9Mo2OjUtBaAaZmZEDOaoRRo+jccywiD/r5nZGx3wNDYyXY+/iF1aTqKDPDC+rA==","shasum":"e394ed0e8ce92728c09f29155eb9218c6b637375","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.57.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvaT6CRA9TVsSAnZWagAAeCgQAJYyWEAXuo+BeAh4sBb/\nnNQ8DxXwP/bB6eZCkeEFFk8KHW1cRvF1lESj8qE1fJTQwn/ehUQkORzipE98\neKOCLSjONlYnczZfLYDYeM8tQ6U2JIkF4IXLoxffRQSIBoTm6s7V+SJacQs8\n9ELmNMkAH0qYcAXDvIZL8tOJywAjztkMKkmLnKAo0M48Vcf+GYoiBYiy4eOs\noafvoJq7Kc+kGafyNosz3YX9ClEmKCzenN4QXezsR2X7dBzuCACL/hFh1Hdq\njxgFdzCOvZFyDiR0Jwu0YzxPxGBxn+UGiF+6g+Q8SKLGu10ipBseyxN/bc9U\ndsD/GK0m2+s5JyQynieDEwVFwp75xv32ztthWyua+TII8zbITgAtHtEJgN+A\nG0nZo0lp62SIrOwepNcYhADIzJeoJhll8ZrFKm0Wr4r5Gu7hJlhUgJNquUvc\nLyqR21MKuy3ihqnAUqnkkU9J99Ln4p7q6LXNh9U3RcYurLWJ8wX0UcBptBR8\nUA8/v62M6AbpQdVAI5/DZZ2ROYFEZKkvh07xTi+vdUI0DJBS18gk9sHqxvpQ\nT/AbOifQLKiNNE56G8BgYnbsP6umVBYyK2u3gMzzqqqErMMwkgILmaYCKgr4\nWnzBHj2njJ9/vZn0+LzVbpb7qLdsLf4qMxvsbKyQ1Y6jWfL6cmshJhPhRFPa\nGT4g\r\n=SyhA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBkL5qj6esTPc/RDTM8V86Z7NB+fesCPW1iYVN6PN7nYAiEAyggRS0plNHRqecppijniW2PGUOK+2LQAPQap5DhgjYc="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.57_1572709626446_0.018457869851724595"},"_hasShrinkwrap":false},"0.10.5-alpha.58":{"name":"@react-ssr/express","version":"0.10.5-alpha.58","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.58+343ef22"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"343ef222a2e157285fd28472987c05f0905df467","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.58","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-2zqBvcd6A/wntdEgqJqN/mhHCzJYNdyUhNfaxhENXca5GYjrxAqtnZH+H1+nZXwH4f7TFWdN7uRsYMEgW1Wv3g==","shasum":"628f81fa02ef412ca0e1404de2ee631263497e7f","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.58.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvaWRCRA9TVsSAnZWagAAWIEP/RZHLFZNZO7Da3mQL+ax\nxNc1lDzsrazVbtfYFgBbzyoEV2B1T9Ly3lZu7YUgeVMvjiI3hIxQ25LeGc18\ni2/FhQLU+n5cE1igckyV0JOQJRiKDE7iCfNLyuEc4Vg15vlQoX70gaH9lUK0\nlLW1w+/1tiscor/y4DMvtHGR72HSbhnxFTMK0d+ZpI+nG4UY0R4skdkPgELQ\nmAk9sQybjCU2ru4Issr2frcBqyovEpwb6PHIcM35AS5/QQdRihIWLGyUbWkL\nOG7+Kob71eKaxw1E9WnIxWxIreG4MfGtSrV1VviK2H/B+CscJpH+bKHTn1NY\nrqsscCoXkJc1ZDTU4ZrgsGFI3rRUF61zGM5EkEewkwfbFHmiTs8IXD+BuyJG\notGJxbx/2zRTmkRpEsDyo7qru3PdW2fDojMeWTYtiuSUkX4j9H4I4c8ce58L\nqhmELGV0F2H82va5fW5t/XAPsyyUnQV+J3Umhb+CrxFUWP8QNwAqDY9gxFKM\nT1PAJvKf+goCoEVLRuHSm/ZZbzKJsC4sbGCAPwW156oN7+gFVgCyPNmVKxUz\nOWKuosaNvbcNn8JKtIFVTws2iNUyUmUOP95muww16lcVO/BC5VQnwm9e+lwo\nH6G17EqmrSSclfpHjsbO93gL62jLBdEpEbIknGCPFn42b5QYqVUu7QBiAxW7\nylPl\r\n=gWtO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFfev/y9onspewb63K89POiMOxGLc6j06bGkmBs6EYyDAiBIvi1GYFmyemFO9yFpyi2MLvKIaODoZ08YmSyJn2DpPA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.58_1572709777446_0.8711942855137691"},"_hasShrinkwrap":false},"0.10.5-alpha.59":{"name":"@react-ssr/express","version":"0.10.5-alpha.59","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.59+651dade"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"651dadec17b1a70a6c37a3f67697dc492df83f8f","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.59","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Yc7XabxjhYLkHy++PU5AbPaGpckJr/cNFtFGqv85XT+C80pxD1J6JGrJhANfsNGGn8ohxXzJoaXTDJVD2YzW5Q==","shasum":"9588fc0294e916fc7735ea5480298db6a39432ec","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.59.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvaY0CRA9TVsSAnZWagAAYAMP/iQITGf8M1hX0Lxq5xqV\noQrKB7/D8udxPGSZbJN0zKZs3YUoqpnce8k036/ZvTO8AsjhyrHs6b2d8QWX\nMw1SXF6eV6LCmWxE9WqhvEtkymZLTW7mn3Ij0n/In3F3QMGMJol94JmahCNV\nLK/nWTSiNbT4CcDKy5plgc7yWObMObh4kreQ61s1+eK1xYjsmZ81w5nrspVl\nqm1dQjcuw0xihIxla2Am+NaCQv9c+yEc5Vhh85VE7pWfjfppI8tWgHC9R9No\nUgdgi3ygiuUOYFdRa2QWXCT1tYMtlpXnGqtADYw8O9El93asNj5CpM9EuAXZ\ngIaZzn5rDub3B7sVWJmHf1BWKNaVN5VS49lTB/3ZEs7Tn8M+DRcaRlikyKi/\nqDB7XksNvSksI1C8cdm9thyUxA/Nl6gBktwxFpJQ5PCCyke3+xj75EYEyO9y\n2q15SjaF+WcC/4mWcGE9MIHv+YtcRz6KMg11yMvkO5DhsrlhmpiD6goY2Oh6\nMJXjzeDH3iV1TXx7tQgJhoeuCv3deClQdkr9BcT2nV5p/ovjqQKtVOEmtopg\np8inxFxnIE97ZBqKqJTfjFQ8tPUeBxF+9aUzoPnrNhKWXOSckAGfPankieEP\nv4N2bk/QgcnVBc3CDGjqkNyNaPWhnNausca0Sb7JntUrgumdYUjV2Ugp3L+1\nBcyw\r\n=Nm6+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCoTU7wGDqgRQUtP34PI2NTak+EJb0jzbd7OLko500U3wIhAM87oqnjRXPKK8jB5Qspq0Y8+DdWaHS29TtNFSZoTkox"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.59_1572709940376_0.8907536689725766"},"_hasShrinkwrap":false},"0.10.5-alpha.60":{"name":"@react-ssr/express","version":"0.10.5-alpha.60","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.60+be4995e"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"be4995eed735db315f670c9bfab83f4d022ef466","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.60","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-8MeTkMTN1oVyUD6Un2gbwY7AfRwFc5tJSDDZ3dBp/LGz6lQzrZ+JyeCkFRjEpH/JEdTgJyl8h7+vXlbgi0r+Eg==","shasum":"64abf81548698b873affdb71bbffe9cc71678722","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.60.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvadiCRA9TVsSAnZWagAAByoQAI56aYqNHhZ0gcIl8kva\nrvCe9PqFaA0Vz+SpvaHcO+XxJ9NUwcUpBE8vWcIQVmBlX/UD8IklxJCStyKk\nGrvEf5U8EdyhM8ZXR+MHPl6HLIYVTJtdqbr/P2ZIDWhcjuSDb3uOJElJ3OHK\na3jgLIvuySeE7PY4Mt2wdAO6dhtNzKcGDnAmt+pUMGmb8CTfSMGfF9h+G585\n05qX0kU+DdxRC2GOBNPKQidsOa8AaycR471SsA+cF94V+BXPkOPffG52Sgxp\nxkVTymkf8aw50yrfGFc7VIKyM2+7LROsT/lPJehsYu1d5NRJndCCUHwmaBjP\nef8PCTz6eWNBgdxQMupeJ9G/la7zAyNClfyV9aXM/wwdii1l9XIbhv9imI8v\nR4cuhBKk61q0w/7G7kt/wcVRSr4cD7lHoN/tzHGReCSdvacCMPj/6wLp8YJn\nZFrMMZ86J0ib0qxf7LgNyHLQvfNaSZTzfAXV3Lw0mFX918RHMxQI8vsk5ALG\ng5Gz57vwD8Ne64/ZExCj9iBDRx9syqFpvKJrJ5WLtCTP3+DW6QGhsjr1oy0g\nSUkPtqfR9mrQe/ob+TRgrgbCEycLgBgbIR9UpMc7owxVxONbwWoeIQZyCmWP\nBns3McWx5lLUNgmoYqOmUtn9Dy0RomrSgDuFJA/g3SfdFCF6HoNwT1UhVsVY\nfP6y\r\n=BS/3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFqG87OJ3wA8K2fsZh6NHEecvYw957RWw2HKZu+rc39nAiAIQeozV5+eDYYg4O4VRyoUGLQVkY6IRQtShxfozvNVKQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.60_1572710242227_0.2609150159977749"},"_hasShrinkwrap":false},"0.10.5-alpha.61":{"name":"@react-ssr/express","version":"0.10.5-alpha.61","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.61+210f1f0"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"210f1f09195591ff5ad5b4e6072767ac945a73d9","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.61","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-IPZSG/IiCyF/6SRUdKLIJDbTRIzgBRB+fGMYY1ZHRETWNF9VBg9ySeNY1xxvlQqpijtoaDbUNzYWiEOnN5+UMw==","shasum":"c851151d19993c46eb361abb5f248abe933cf38f","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.61.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvaykCRA9TVsSAnZWagAAB18QAJ84jggLNjK6+FhG5TMD\nP6VSGXZ0iX/LjGfp2jzayfNjAcjEzhILHUnWxDSqZ+NUkVLR19QL/Ks+WpWb\nLXRM/EgdK6OtLkq9VebUMdfgr7aIst0ss6fbVgMs+3R5wLVAx/xy2AYny5+S\n2btiv/HJu+IMTTdOb3ON+kPfPYkgigvuPK1jZGEoB9Ar2kxyqwSp+qwP4W+5\nHpBqanNnvxWXNwBc+esCDvCMRm/dlwv3tJGj6Aol/IfkXfn+uywmncC5t/46\nrMWYzPJBc3wUEy2d5JcXKpVUYKAHxKUh/DaP2ElbhPpul0UxYXJqtsm/6vpR\nekpHZ9hqX6p/CkIl8yzIhXLWSQ6jB+ri35VSoRUUBjWP911Q/d8HzCz8JYyh\nM/0xUt2GBcMEoUergBm4Ig0TqKTcOaEVUS0xIjPT9c1yG/wxs52nVUtpaLRC\n3JNGQ/IT6RHfwttzS9UOAgOY33+1aUj2tr7lefMinry0tHk8ib1bqei/IQf9\noI1MMWY5MzTy+wMicrTzGtngMPNGLSzqzBCznqXtdst1OEp5fYPbYMgwv6QE\n9XGkdLqRP+WENZk0PzUoVIvnyFzLsQ8R6kOakeHkbMTuFAV1V8ichm79w8ij\nncQSTrPU7310VKuFR6dooUyppi9KhFiIAMHVN+k+VdkCigkVENywPMhgzQbg\nXGDE\r\n=0B3H\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDpQpIawMf/L2Iw1htHUkgki/5l1R6TblRs189gfE9szgIgbVQ/dLImlCBOMpY98ddV3PbXLLl7CGfsPbdLDrrNrOA="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.61_1572711588107_0.540789710875361"},"_hasShrinkwrap":false},"0.10.5-alpha.62":{"name":"@react-ssr/express","version":"0.10.5-alpha.62","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.62+f2224f5"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"f2224f5293161be8a862907557046b09d6dfde1f","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.62","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-l/xcNfDoFt/Y7xqNuWMX386WevFtbW3XS0nUy0c3VZwAKgl7pILJZEGAH/lIV3t8HrSTgE9SWEpnSN4Bs9j1YQ==","shasum":"a4def6ebac4e223b05348902824810aeac20babe","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.62.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdva0kCRA9TVsSAnZWagAA7qYQAItUCJOQqOhV8GkO3bpt\nbxd1nwvN1Jc44guk+wk1ZBAvS4p/SrE9olWrVi7VGWeYqFy3vcsl/juFzkwz\nEBsAYQszBmfht6eZ1eyYxLpdyjgYzpOLWaz9YA7o1WbfCLucNtIF9l5DTUfw\nzK2mkhEfXarhjlbaFEWN7Wd5FfjuiFQJDVOsQWMjopIcUDDgqP6md+bleu90\n5Ay9J/jiJZfPXh+HQYESV+Yz0/Mnh4IgF9zTg1lb+moDdyIke2l7xr166NJ2\nOpfVXokdYK7yTDF2So7fBr+Ko5ScsGS+2A5Yh0wbX4HXiMxobBkEpAUtVGXo\n9/mQRor3XwJV+L+Ukvx8K0V7Buu6ThyP+n4j4+PBGOGYfJM67yp8cyE0jCUx\nIRFgs38vIaJ69h1MohOhYe4sGv+EOx8ToRj3kOc4+WVbXgs2uT81FlM5t5Ii\n/C7T4QKXNO40Bc5IDiywuk29+mOl9fHO+WzRwrXbdHCxMcXpk/LuJmyr4HJy\nJzSuRAAQoSdlHfO37SwGdz8mvq3CnMSAzbZIpmZYWWDujUjycu8KTLrbw32J\nfatptYiBoLr5HapGzOpXREE2rVsKZImDFnFWeMRUghU+D7YxdgVa9BjgEY6U\niN2GL3r9iQ6zbrl48vmFfh09luLNUMpzbehdY//aNePV9BUIhWuJkpu7pbQa\nm4t3\r\n=QEDV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE+KccloMoNso//YlBnTiRqQoei7Q33/Lcr4MNf9Ro2hAiEAzUnEJh1mt/GPb2FgsP2IHTXraIMk9H644doWzeghOUI="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.62_1572711715882_0.013544896205033075"},"_hasShrinkwrap":false},"0.10.5-alpha.63":{"name":"@react-ssr/express","version":"0.10.5-alpha.63","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.63+ed7fe77"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"ed7fe77426f93a8066b2f0812046d539a97ccbc1","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.63","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Jv5MJlLXFFeE5wLVt8aDOns9+NpZXnsKXVw9qoWggu9ybsf/64+w88hPJLhgl4YZsAxK2rJ4smYWY7wWi36WRA==","shasum":"238473194ba9834937ef9c453bfddca29db64c04","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.63.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdva5DCRA9TVsSAnZWagAAWugP/RpbLMA8vX3lHu/2Yc4U\n5WOqpYbfTt7N0FI4N++dHRa4XLGe71JBe7flCs7MRqQlMGV/BmZz3xQqKegY\nFm3hla9sTjdz/eqVAlbfHJlCnMHwZ7l4k0tNF076mcWdFGY7CgayDePSpeRh\n2JfeOaemX1YDYbU0dZEy/KpntPPrxbsu5SIT2/fV3morms3ZueN/OkxyCmVo\nqCAIwXHVBpht8gyspQfJtJpWWYRCFt8lzhLfcDI57JXy4zT4VTK4qWgaLxLx\n2gQuCvPuNMJivpal2WkrtZJJwdT3zD3VikN7pD2ElyTbcu2ZwnIjqWFZzpx8\njzvVwHL6xnw9pL9ydI4VaQhcnALS50VFewWAwtNwCsoGltLed9oz13dCQxvQ\naWrusB1dMTl48XHEsv+36e67zobpvNXinxg6RIBLQXiiK9YCQO2FZsUAN0dI\njUZwDcgsLvWBkmHq1sMrxuL/YloysmJYTGEAlbotrhSCcV9JXZAusr1IjsJp\nb54esU5Ig4n96nbKCAB4M7+hdQmSGYXQhduEI8m9a0LAWeCUT8l3fPXaRgPi\neja0r59NYHXflg8V2FdYY8tCs523PbdVGcQtI8uw8Zpd83zrTQbQfBzgMisW\nivfaChIT30gaftu3DPUJWUdGG5ChSRKxys6Fa9igZQUS9DVta3XCWQgHVpjk\nisRA\r\n=h3P1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAHKTuToBcHu/msFoEQNOABC5/vi0ExXJ/bDxGSkngRWAiEAp8SXP2gx8+k7OTB1NBzTCbhG/JOVQN2hDhlyEdXnz10="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.63_1572712002942_0.7885765957319626"},"_hasShrinkwrap":false},"0.10.5-alpha.64":{"name":"@react-ssr/express","version":"0.10.5-alpha.64","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.64+ffc6523"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"ffc6523cdba9dbcff2d50b5a0c3b4799d1397d8a","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.64","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-xnFDdNZKBFFS0DxGOiG/fjsrPwv22umvnswYVSf3L2I7B9UvNqp+MRgAwSlOYV8yFvf4hk6ayKygaKpDFEcOGA==","shasum":"8bd188f4d9aa4553b14e2253d08fdbf90d0871d5","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.64.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdva8MCRA9TVsSAnZWagAAZpsP/i1HTYHr55mDdYrPdntV\nwfkoZC9m0AA/DPjuw3+4CeN28zSBhqE4orV4M9naYcibYVaf8wxVVLf/HYNr\n/0ZKcq+RqUpkWlf7vghAXbvdYI89yiIjv1lkEHO24SPxQX//Zi20v9wlAq8m\nsabImo8NSgfyzrW+pDVEq89CdLH8mWhywYJo7bq8ZFNnbq5tzTRUI9E/d0a0\nsUb+lkpOdFzVqBhHm/b5YO/OPj0rrBf8y+emXLoaOKrymifVrA9bkIh9fiZQ\nUGMl1hAfsx5vcLCuhVLvQ92t7SosbpWnUj23G6IR2NuX/3q/qgdmbjjvkFuK\nzNeXZV7xkefERAQa9X5VZcx0L3VT76nwPWAEdSnXtjokszGhjBrrK3QCl7jw\nEDmMkkYKyd5Ye31o2jAu/uPFc66kbXjbIkMWzy+MQlEQA6zYs1LQpOD9W+b/\n0RKfmWbtN/rOzlsjldufFO+4LhnZ8G8M+15ARRxmykctrIPb/8OqBWzu9q0M\n9LyIIkVwMw2rNsZ0WqJnIjur4OyaDs2vsOq23BTrXqDCUk/ukiarh2fqAZrn\nCzNnSnda1q3w7rOebGj0vm00HvryfyI6BpRKM8+6zOQYie5a+DThuzeQpXlY\nPvbJBJN7ZSYNv2kG61ecs6o387RK5/X9cmk24qFGYqf4GnzWWLsSqtFe2zJM\nmfOd\r\n=vFox\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCjoFl52IJDq3OiFLQvamPsZMxa5mG1DY93R6rwaSKBCwIhANsDHKwQCHLbTNRYVSshYBow8FgbGB/Gw209TN8OMUDg"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.64_1572712203521_0.32204415495436645"},"_hasShrinkwrap":false},"0.10.5-alpha.65":{"name":"@react-ssr/express","version":"0.10.5-alpha.65","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5-alpha.65+26b7bb7"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"26b7bb7d3994001ccaeca515e747147b74e07944","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.5-alpha.65","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-2sLsN36W+okTDS1LIN99I91fpF4Dwq5wzvjGA9MBZJLFnX1dzQfkYR+SpRjkIXputsFSrlEhDgtd8Y4FMLmUCQ==","shasum":"0f9afd5a6198e1fde15e0360ec721da31947706d","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5-alpha.65.tgz","fileCount":9,"unpackedSize":12869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvbERCRA9TVsSAnZWagAAngMP+wUnUuBeYIgxIgX4l5++\nc87NVTmOAdPI4PIuVKiGSGgemebWNzazq7MEgzS90qUMiSArgoXSThXopchb\nRSMMSdZHSkVyDy0cFwGHTundh9mDpVDO0O+wPdRnEfttITDcovZT0ZHFCc16\nHxJiGmrmm1u8oZdxcSOJcx7pE9KdYCMN7e9TrSSjhfya+MW8d7xRjN7R6T9m\nAV5sP59tNYFkw+NrU2IUCyGzO++Qh8EozAghw50vVBlZPY5hs5Uz/OD1bK6m\nROua95YoF82trdR8d2n8B9TVXk1yRhG2/1dkgItUd5IwsfregUY1iDwdHlEr\nOXTZasM9MX5qksFhCnVAB3Fr66HeFFSaNIz01cuIGs5sq8KbxllTBaKrLBFe\nc/S2PqbC9FSldjtbnRbXwJIWRSYsZDcdBzrb+cjblttSpKLo+M6HGDxH5c5+\n8p+8gSkct1EwYoZbGqtYw9C7k2/2rzPLLsDZYTfM3Lvwdudf2zeF1hYDOCya\nya21DoaCuhluzHNWbPmG9JIv21J0Z5SFTxNyjMZtUEVtFK/u592WBcnT8vOz\njZerjS7epnH0/Ma4KtWsI5yhiNJWLmv5OgVo4s0ucGqOfEeEgXlgdrQRsx0j\nJV+iQovaGzQynkfRpjM6KjTWu4xALykBkeNORfdgJKWSKjXe56GkXoXcQK55\nqgaN\r\n=i+d/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCWr/PEU9MW9tNF8tUMUAN+YR0BfTHomZydRCd8ju1XagIhAKJjdjGejR1V2aqeqFVlM7MUaJfP3H3Kk6n4YlE4/mhm"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5-alpha.65_1572712720765_0.28075516667349953"},"_hasShrinkwrap":false},"0.10.5":{"name":"@react-ssr/express","version":"0.10.5","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.5"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"c3ba91abb626e9abf60477fa6046691076956d32","_id":"@react-ssr/express@0.10.5","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-0Hmbk7MMKoTQpO38dT593DdOoAo54o3gHsYCY8QWrQQHuhOUXNP8FS8X+iAa4YUVNLbSorvV13MpjWmVGtDNWg==","shasum":"320858c7609525e1b4dbf50c730ca96ffa588d54","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.5.tgz","fileCount":9,"unpackedSize":12835,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvbHYCRA9TVsSAnZWagAABasP/1uD7lHrmtH0n2zVoI9k\nQmpdPH8PKF/9a9TCn33cRCkellOhZnCcQZFUB7jv7xjmzuqK95snmyKjSz1l\niTsMHfOZIj+xp45U2PNOAwtgRHJkiVs7Qmbeh20ncGVmSKFe9ssqzTqOFvDN\nepGzR1LU9LE7lzcykxB09hCzfEJUUcOy6pXexQ+N06dQk/BHVtXmv9SF33tk\n4SsjYJHpB+HGWzyA7aIMC1WMFHegtIXqPIVgl+OL5ejaes0rr7DfVC4ny2bT\n2GRR2zh29kPT5VUoLZsXzMzgtCCK+fGP4+cYYE5cGfzxtRqcOrIVCmZGKAB1\nsCyiDcQi65O/8VXHR6W6Ll4+tjbHVYD+l9a9IGyUIwAs+jyUb7PC2c576V0C\ni9OSUBJjk+raR4JQmhcsHoxsQszbpJC8PIGKC1gG8/e1TBcDs6ZHlNfAHtR5\nzu6FA5o6b1+9rJHtboTls3fmz/27YN3zftH/TPYVJyWHBz9/gHyAOdtmrRl8\n8w0B0EwOeJwf69addN+PBSbcLeA+15Umm5rvP5cFhe76jh5pM7QrxnWcmidG\n8gCqBPQ6LTSBUE8x6sa5qH7oyux65yAIhrd+IXWc5y/IXY602rNRDI/mzIto\ncxeYs3T8eE6Ybh36AOBv9judZfhYe12NjV0+7SSFxmXSPdw29lmMsEbPjaNq\nLRG6\r\n=uJTl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDGHNuGyvA/ZosMNhOTFCpoy2bRWFXCL5xymPdRLKmJVAiAe0wjSgPLJX34iaCSCHSA3OgODiqJZlmstatoeTf+N4w=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.5_1572712919809_0.2112943784789596"},"_hasShrinkwrap":false},"0.10.6-alpha.1":{"name":"@react-ssr/express","version":"0.10.6-alpha.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.6-alpha.1+ecde816"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"ecde816a127cee1387473919666fc368bce5646d","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.6-alpha.1","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-/06LPJcA4DKivNWngpTnw+DJYNGpgl+tKijuj8t2WwHwBS9X58YNtUrUIhZe/ce0p3JKluOWJunbPUYJTRgTJA==","shasum":"e5f03dcd233953143df5745564816ed0d06f8220","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.6-alpha.1.tgz","fileCount":9,"unpackedSize":12867,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdwTtCCRA9TVsSAnZWagAAhusQAJ8Esj9O6DuIRMBw1UR0\nJkFUbtz+hB+0gEgXOLAhYSrreNbFsPa3OZkEaLbUi34TIKYzkXsljLB/l1+V\nZ7utQpouWRhf9ENFXqdEaYQBpN9la9oQhthLE+/85UMh6XdC0n+LbmX0ZB5Q\nfAQTVTLvtdF/KXfLwtCbVhBDXCGeWR3xhiHSQ6zsAoEU9Lx71P8sGdQpXaZC\nr+ZG/MJwcCRd4ld5a5r1DUvQEJ9golW8ceU0yFm+AV9PyF8nc6f06SBkzRn8\nUOBhtja/Htz5Fk5WU6zcEMU6BjcEJhMalkhd+jITUUcwA0IJ4uNCwPJJMG7x\nULbZt13Qdv7XYz7Vr/NtKIk/VH+uJ0lb0b4VSFzDRyVphL/8ayuohtW6li9L\nhgsLhSLaM++QAPOQfUvKXgFHweZRxyntkI51r8M35Qe/BiuJOevsNJOMEUZO\ngLGXsXv9ue9RsEMTW/JHeHDqXHIGZuvmwTMDCF6N+op153Or83hSlPouN0M1\nUKpVc31yJiDMgcQlPHfWqStRh/KaBr5kTzhM50oHwGk/JApBrK0gy729aXyr\ngb+QzgqNVSXrKKMj3Gr3f2LYPb0RiijQEQs/BxXDSbN77O7LGsqzQ4aS90Zt\n+znmlsOUVE9l5DVvHjR1C5OQVA5dhQu2hzlA+nBkiFDoVDpoSrzVplFjFBxB\nfG+d\r\n=fBgN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBZV/vQja21JmXNr1nv3Zsz4V4C5ezgrckp+TOmfA5eTAiEAvenVbB/T5FR/gc7Uao9F1azUacAKaySdrS9HChopZfE="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.6-alpha.1_1572944698308_0.05645551924573344"},"_hasShrinkwrap":false},"0.10.6-alpha.2":{"name":"@react-ssr/express","version":"0.10.6-alpha.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.6-alpha.2+50fd939"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"50fd9395236d1910a843733d88d7460e52a1d684","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.6-alpha.2","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-O80UteVP1IMNAhkp/gOKBer5/D1CkKrzCSvxTSu0Rc+qIP31K6xcU7OUasctnNZyFbmtjPNOdDeBNvoRoQNToA==","shasum":"8453929e541011c6231968af878aec001f6fa9de","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.6-alpha.2.tgz","fileCount":9,"unpackedSize":12867,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdwTwyCRA9TVsSAnZWagAA2gwP/3yzJU15Je5wx934M2sD\nkdfcMps6wX7bfcCwcl15was65lUHnVmPoYimi0gDFz+HmHU0vaNcGyH+Ctz6\n/TRtE8Fxh1i7m1YJKkPt1KFjBkY7/bB2f6v4p2//iKOinwBR2N/mVG+3iC9l\nG5M33kF95hRHcGO4DjKAVMp83yYXPUkGjzZgs24UrHMatHymVKOw4igLQ4PZ\nbVOOV86dDsuzcfb/0hXaxzQ4qgmEA+XG0g3f6zkBjj5AfiWR5CfJERIglHtu\ny7SP/qo8Obo27valGR1ZVF1Uz1d67KuKoI9USl52mT6WqUaatuJtZnDFDv46\nYg6u8R2RFsxKS5r+/ZRlj8/Uoqc3Zy+CPybJj8aNMO/P05WufsExhp+n5+Tm\nLorDBz6zY+GuLI5sOEbqxOBO+xITEPUn40jtTSLvpYLwZ+zWBaPgPqSyBgPe\nsLHjRARTHHqXFW/RSPH/EqUCKUvmwLXL3KIGg2kj6H/rVTbzGXh1CwlXS8Gl\nhAhDhejgStZ1v1h4tKhmm6VDyls43kHweThfAN7lTcuhmhy4znetIX68w2/G\nHV1PZ3JCAuX9J/rNkDQTR5Kg722Q5Y29eQAa8NVUM720vKpdnMYLjvmEoXRi\nWo2h3YcrGn5IgB885qt8QrcnDoT/6D0YY1vUNZ0JeTP3dJTE1TAUxgTR1+yL\nEIAG\r\n=SvQv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAK8eZyrQvooDJVC6Y0ndk/leexcxCfpFJVLO3qCiNlTAiEAw1quaKJPhdUuerYd2V+cxUdms0pOTyyAyvhXFlHlIP4="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.6-alpha.2_1572944946005_0.6513515909706296"},"_hasShrinkwrap":false},"0.10.6-alpha.4":{"name":"@react-ssr/express","version":"0.10.6-alpha.4","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.6-alpha.4+0706214"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"0706214fa00fe92ff9e092cf46a15b17f992a7cc","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Rules\n\n- The each view must be a single entry point\n  - Don't create other components in the views directory\n- The each view's extension must be either `.jsx` or `.tsx`\n  - We can decide freely with other components' extension\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder is ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these dependencies:\n\n- `babel-plugin-emotion` (devDependencies)\n- `emotion` (dependencies)\n- `emotion-server` (dependencies)\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.6-alpha.4","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-zBaWT3i8p3I2IfDVAEM4gFcFO/ojiyB2ReuzduTgnDVOyfVttOj/YhW2Fg0LZi1AmuN5WjwkiZrTHPn8SMsyRQ==","shasum":"771e665948aaa4ffa13dcbb89791f6dfaff8d150","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.6-alpha.4.tgz","fileCount":9,"unpackedSize":12861,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdwT3DCRA9TVsSAnZWagAAg+AP/2LzjhQ4370G9/nkpSbp\nPdHMJHcF2zTl1fUeJuWazrMVhCAzcJuXjiWH6gc2+6bYiAxr4hlZZSq3ibHq\n7m7hLJtMOkHkNZR0CBwj2x0ZTF+Qw+PhTz4G54scI/oHPOKwEqrVDIiX0Y0S\niSyeSV+lgoZu3gf4mjjsK+3jukFV/dmV+u1VRCwRa4MMCrGc+rGw2qjeidBc\n8mQ7IxtZSmO04BN8vbrfTgDerywOf61qZrXWxCo0vtvvmPvOqa4C18QGvNyY\ntdparUVSRyqnOvTdcS65xXc/twUGj6pZSiNX4zDn+uEAQbElffMFuQLYqv3J\nmyZwVH0xo+WhQUuLot2eaxDfyaxgU4Ar4r9Ioaw4gFiKIZFYO1tvAnrq8s9L\nmJrF0rwS51XNGDEJGrTZ5cuySz4I9H5YEu8TIDzPjgDM91Sbcoa9QalcyPgL\nQlA1yiXT9jdyIs7BOOSLApMr9F1IKVcf6n8YLItzDCGH9V6LzCZuKaKOaF//\n/IkbfW4hIrk4o1VDIgnk5RUD+buWhhBGCBjr1el40165cDbcpgGQ1DUHy1C9\nDMXqYmu/QUETLXorK237gF7eZtCyJQDvMSaCAFqg8jXHCIXlyp0wQJ9D3OAX\nybbycviO3iCQvjjrodwwBCZJeay4uV8A7omM8l69Bpv5Gko4CH4x8l7EbQQy\nmuHw\r\n=XgXu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDbey021STRxjFVplUqUm42UQCDD5ax08RBCyysVhyFfwIgatOcxYQVjVRU3aCFzOSHI+B7HBu4AKhtr9KSj4S2ciY="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.6-alpha.4_1572945347413_0.635666969003482"},"_hasShrinkwrap":false},"0.10.6":{"name":"@react-ssr/express","version":"0.10.6","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.6"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"7e4ed73fed22eebf2fce25cb3f91f5d3658c8c62","_id":"@react-ssr/express@0.10.6","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-kkOm2zJnINyUO0jGlezLkR3dat2NqDP5huy3nRg7S2C07P7tV3fHAcaHyNEUF7BxQ6ho2YgPTsNp0f3vvK7MCg==","shasum":"42e703939846bfdb7c432af1c9a5269368ae17e2","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.6.tgz","fileCount":9,"unpackedSize":12829,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdwUOuCRA9TVsSAnZWagAAksIP/3o2bfLsmr9jxKal5Nc/\nKqWINAH6GPa1pxSYfDBNT5Q7w6ScfmnDAsPFKvN9XqU7xY1pE+ZSm/RoqXCK\n8ibPB9LizwBdGsl0loL3GHmtVy3v5ncG4KOm41uIXAwVesrTPBaJxJkkdByZ\n3r1VDkSPRf/Z+zMmIRJXSS+FOCE61e17OFsAwTFT1ehxBp2SGMaMbmmxo9x3\nGXeHME3qHb/WJ7FEFG5khDoskxObay+SZ1S/seCj2sL60EbfB5R1FcvaAtjv\nvH40sjKkHxqsxIOfWyyTV+ZwqAxMyr9BzIbpqvrC5pPWdvBpCvO4VCTSJARB\nE9q1jf4b+3sRC9reG0b/4+kvDkBIGoK29gnP56+uxSx3t9HfEs+Cutc9ZOLV\nphkxDqVCBhs3rTHzXdiPrLteWE5UB8jbB2Gd9aL/DKUACwFEQC7PSLuqRPfw\nB8yBN9lYk/eYw+9opOH+fQwjDyxln9mWPe9kOuNohJ0FHkeuIgPboVBk6TU4\nwlv7BEE70GPvgqA4esywMBndI7PS9tr2s0UcffUpkBm8gnikzxNRjhrGeHK5\nLMS2j4dkpLjimUQpv9d5iWurBVQbIhi+9MiHc/KeB0xvwlrAYg+6Yrc88AFP\nc36zvnm+chVM4cth5tvyTN0uOZzs5NcUZGQhPHAY2Fea3J7hvtgcZHJsaIN0\nmdc0\r\n=jHe8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB/DfYSpcoiafqifK/33XuUtYdiJ3w/Ch8NcZGv0R2F4AiEAoGnKFs+6oD+xj4Z2BZ4FWfQyuYhWRSoS3Sz38zcgnkk="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.6_1572946862266_0.592828054521296"},"_hasShrinkwrap":false},"0.10.7":{"name":"@react-ssr/express","version":"0.10.7","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.7"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"54c7c6acc74e0f9df176ce89515877b7c685f1e5","_id":"@react-ssr/express@0.10.7","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-ir0R0mH0+x9CojSkW+ebjIVReV6wYLbuHzF992swy5yyZdpe04y4rH++vZZLlGDZS4bY38gNNcy90u7cGj/vFg==","shasum":"7141b5b85d5600771d25cc25ce09662929aa11fd","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.7.tgz","fileCount":9,"unpackedSize":12598,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdwZN1CRA9TVsSAnZWagAATZUQAKQZIcHU7Srg41Y7OtAr\nc9qTp1Z61KFL9TqIiKgGk5Z4ts/Zv/RO4G9YNi61xHx4j4cpRu3QksJJ1Z1t\nqas3+K8CbO2Ho7xFpBl04NJohK2cNNZ56UR+INEU4Zo1W5esNvG29zXM2FvU\nkEpgTVlyqjnvP0v+ddgBhs6G8Ej8kcgubb5fmPvfnnPyR+nXq0aH/E1V7cnS\ndcVo1VePzOf0DmRo+A7/a2ON414c2IPDTMIxOY2meNvr3VS/PHSaKEXHwtYR\nDucC0zklSwKgq5U5hj9KMZMMqp6cH07SODqCUynesI9CBP1nWWVGc8MPeR2x\n/J0pXWKgxIhm21XfscKIqs/ob0vzcHiKt0bW1OjtmTMajtlCaPaOzKPyYIi1\nlgXz/WbqG6/fK1cg/13Qrprv5DnpHLlGOGcz+Z9MpBN9a1RNhIgfV4uipBiY\nwFAVy0cVGM6KM9bMEMmVlR13C7Us+iywUEszrTaaRvk4P8ESTUqsPg96464n\nu7QZL5xTDsu/uNC+nsQXEHzyWrYeAw18eqwl2fzHuguhdehMt9rJs5dxMSaf\n/3qJXHy1DvssXMugba7yVGp9D8/zVTeUDHoK05q9/YbV6aTRIm9ztmRmRemn\nO9+7vv8GmKCWr0JhELZpXA6EVdHBYjcxVsBtS5j0+pRL+CGfIBQARIzRsp4Y\nsem5\r\n=um9b\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDRzSOk+MP21dXgcC4k/WaI72zn5Ofw9muhrVR6TczpcwIhAKpK1+ORscPkKogS1JwrpU6Q7VsPTu1XUG41ntqFZgIY"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.7_1572967285216_0.29854625152003655"},"_hasShrinkwrap":false},"0.10.8":{"name":"@react-ssr/express","version":"0.10.8","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.7"},"devDependencies":{"@types/express":"^4.17.1","@types/react":"^16.9.11","express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"5bb8dead996a3067a4a98074f69ad5b1168b3bec","_id":"@react-ssr/express@0.10.8","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-kQkDsbx5/rex2lUxsni0qDeWGUcz+5yMI5jyOY7a1w/msuzgpWHNDo2RbQaJ7pToDhlor6hE3luLSoXK23NqHg==","shasum":"ec52aef761b1c77ffefcdc64136e28333634e649","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.8.tgz","fileCount":9,"unpackedSize":12523,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdwnNkCRA9TVsSAnZWagAApQcP/i6LEDzdauuGhdXe+FbK\nXGq6XnNvmCM0n3UDW3r/xYVbhElj/LcB0Zs85qABp8aRKH6gQNnS9vGlI85N\nEpU659CUGDie0iHGbFryuIddEdvu0NCmObZbi/dHsB2XPMgXKKv4VOAUvSFG\n74COOK9wLRWu8Gqyd2NceP9bpvR0LLUhvk3xDkYNaSQ4LSHUGVMwzbK0woez\nygieUByCM4whC5sw4WnIFmQPePe2IsozkNZ53rl3x/AjGC25CQAwlBF1y3Vi\nGT2kLqHUk2L9ky9wypeyAiLj55mh+VKsmkQ4x3M1RErCff5RcZukCT5dUodH\nHj5dSQeSeN6R+kkw9f4Dyz3L2h/tasDx1EypX5jWKFBR1b9JzF/5b/OJ3GEr\n9n9gG5RsalS2+DanXqZj/9mmB4XpmdFG3aYwx6n/sEmNsJDsgoYzy5SqjJiu\nk6CiMu7eBIcnFCVNNfTG72sD/Yw8L7d6E03OdAGleMWQeHTc/kShOeR+cekc\nJAJNQLuY/6DAzKnIvmAxaVjapJt3uSFk4sf/vLB253/gL7QiqgmsqvB8cwtI\nsqfA4d1F2Wa53z6/6V4OeGWfDDoUK7xph+ESgpdlHrAJDO7/pldzJoqmWw6T\nRYjPuECq4EOe8elSxqB9zHHZ0hJ6A0yWyvMsSbBXhO9g7t4n15LWsX3K6Dng\nzac6\r\n=xA1w\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCzN1g3QA6GwLYklwK1U4TNuJ/92dDJ/v5ryzlkfG3bMAIgIUfCKbTfsfWN+Yu7xEoJ5lRpR+TwQ3PNgBvW5SlPQv0="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.8_1573024611988_0.5502929547555087"},"_hasShrinkwrap":false},"0.10.9-alpha.5":{"name":"@react-ssr/express","version":"0.10.9-alpha.5","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.7"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"d09d4099be6f2c144c09df8b9a8d02447a033edd","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.9-alpha.5","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-055rSWWfPtDTDUQKo8/RgRtHPjJ+ryCUrmW6NCUUej1lH1EwLoe1QSUznuK6bcpkpc2eXIrvybPqZCa4WbNkFw==","shasum":"bb9483cc496e1836f65ca126a12f2c745c0b10d2","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.9-alpha.5.tgz","fileCount":9,"unpackedSize":12474,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyENXCRA9TVsSAnZWagAA288P/jigBoY5P96c2WyyC1Tp\njr2FGzOiztt3an5sh7kK+PKLZkSIWD5aSO7v8AgyXcoW5OTqHre39FcYWtbu\nC5Eyn6XbW3PuvrrKMu+z9RsGc+6AnzXM4tjv7Gql2E4z3hCJdivJx4XRl09i\nx1C8Al4zhmj1ElX9ku3aRpAqIqMF8mdaBZFdOv5o2qA/bGLRPwE08Ma6x3Qf\ne7OiD4Z0jMCkswurIaqb5EUdpFlxSDN98/yft8GD30Pl2G6qfH5eVHUYLb1+\nuXus+MQOIRfMLaAa/xsVQTLv2YdIUchxyk2F3HtH4gbda4LPsOkbizcidDfH\nKUjj7fMS8vEbqeVcZhtTen2jvAfE9nXzpvouqOrlrZBKPnHChowHpaLx227h\nvJFgphUMFf/ACuPPILvI6wY5lT1/hVef0YXbTeZnOT6LxnfqQ8dX8z8mYkf9\ng91QKSMJ0A+OuGtvGe5ghTA0zWcYrEQW+EMZes83wK9yZzCnn0sHcKpieEey\nI/7dU6QhIfGDqK/+6J/ACHT0MlAjVVQ7p6yKC5SjLDB8GF61V5OnQkCn8S//\nFYosWEQvPQQoCaDRXxOfkXo1dCxrIesOESeVtAOfGf46iHgv8xTxcN9s861X\nPK1Y77CbrItFIpg3b+8nLwmpvyehjlHeVwV6SQzDqBHFv7o1Ne+6EojVMaKp\nsgGs\r\n=KTkM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA2qZNYYeF3EIqoPMqzbg182hde14SfAbbFv6tDjes39AiAJ+IMAd7bvevxaBrRI9iqkn5OrUXaxkSWe2u79hb+pow=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.9-alpha.5_1573405526895_0.7740018837180784"},"_hasShrinkwrap":false},"0.10.9-alpha.6":{"name":"@react-ssr/express","version":"0.10.9-alpha.6","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.9-alpha.6+e426a65"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"e426a65412a07c9f288546b6054fe33d00ac2233","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.9-alpha.6","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-q2INKC1+3XrcqJ8nrwB2sVTDEz5NOYn5xJfStiGIrIdUo+kAnFo6IBJTO0m5MDCoZsRoAsrbDS2oMZjpeXOPyQ==","shasum":"ae6b04a0ad27cd8d1e3d3e2d25daa0dc9387bfea","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.9-alpha.6.tgz","fileCount":9,"unpackedSize":12490,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyERcCRA9TVsSAnZWagAAqGkP+gN0ki9/1n74bfHOXEJU\n6wCmZg6+/59BuGyVFWaOsp0MTJKK85voGbvQjhXIIWUGX4CC2HgO1PpSg7Bt\nbuObc/2bXYP1RZeYcmP5pkc4WgXOsbPDMI1IqR4eiJ5z6pjMEg1ANxx4svDC\nZdhoN/AEL/6ZSEajpaCaad0vGOBCN56pbRVaU17UtFuzTLOpz/TChjlSmQFN\nlVknbIhPbHlVmy14mLYdRGKjd63b6ybq4qwFgekaZdR0p2c0GutzHT2nheKD\nwmWSjgSMqyqz2/LPEKGYvWPNacdHA4COHl8eaxN7Pwjf6G7/gn3MGr3kjV0X\ndsr2A51YXJ5ydFkFMhlVU/R7/ep4BwfjA6/HNZdasNBzPraGrhQHVfUleT5b\nPXX1Lnffl7zf78mq0AKwJsx9mXdubEfBylIPhYmZaqWtJ+Nisuafmig5FLb1\nl0fypN2L3bFOsUISpWrYFvUqM6nuacXDiVVuREyZm/su22V8kTePHmqd/mg9\nv7A+MD7PkIprbOM7vhTDG4YTU758VYgcYf+xktuoykOaeKtDA6odmIxJ0HBP\nuwsOHohqHRZ/tZ2j7xdq9M+IlFygNM0t11SFq6Q8Gqb41S1CNdre+O5s/xE7\n1pBDGkYS9WGLPESnJ12OBpCWYiGzrcbQO9lyjOuIPmnI+uM/KH4MBa6y2tWS\ncgFj\r\n=kR6o\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCJW5Qr+erB97/V4dqPpHlEklxLZLrnElY3KU+EgXqEdAIgR8CLraHmcbgmOTdBlJHFnUVdpnyibmC79nXMXEVmyXc="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.9-alpha.6_1573405788461_0.0784804948218436"},"_hasShrinkwrap":false},"0.10.9":{"name":"@react-ssr/express","version":"0.10.9","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.9"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"7e38e8560dfc94442af114bf81ecd1ad1456dee8","_id":"@react-ssr/express@0.10.9","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-HqH+IoUMcj+yynPg/JmBw/JaI4uFyh0vxJ+miQbcCUYciP7q7E6EIH6y8qdq6hg35qEOPY5EcU5qZhIRn9t9kg==","shasum":"dbb774b1dc1cb9d511093b2e4058d5632d12437c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.9.tgz","fileCount":9,"unpackedSize":12458,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyEXSCRA9TVsSAnZWagAAPIUP/Rw8MYF+Hz+63kEmTfel\nYpOedb4f4nl4UI+FG11zpE3m/MV+xHw3PvFrqeQZ8VcK7Mqn9VPHDhL2Zygy\nru+jOBr3uspiqWkJsQMuaFr0+jqXFFdUtIFRye/BxRFX0oyVKnpcP7vROtGF\nQcPze5VzsLJldUpN7okh9f6IDZn3MYwJjYVzcjv8udJa/In5fh0cnw/pU+c9\nbdRo+WrgMLtjAVbNSUoXPnQ8pGWyiywluLRi7q0+0AmDd64QbV8fuhKMTeLn\nGqIX0Z9f1RqsaDRZD4V0AcgQZpTd+GK2RVR9hpctjMUxu7c1Bfxn9S/Pzx2p\ncRy8EfQEvXvffl8SNmOHz12KL2qZ8Nd4bBH2JldzF5nJ8PBfYnFTYC5PBqvr\nbTfzog1fkssA0LeL93S+MO0tN3Lv1Y5N6KaKwxH6OpaXT85Yc9Te+7hlNzJO\nWhDNtJT1AA4KYW3/fzeqStBtQGsoSSq5nJpssGhfoJhBcAqBxgagoqGbh5LM\nBgHhgxv7RTx+86bfJznJiwpWspdtyz7HknAlSXv5QTSEP2h+nZsS16FIpqqg\n1eXcuvV6Sph34ueByciqtklUA0auOIvwwl5naV3cH666rIoRP6Qxyy4hIHpP\nndcw2CAHO+K+PolsYUymReUYMiJs4cbYlAqkktfTVvFxC4W4g977gpD1XGnL\ns0oj\r\n=g1oT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICr3b0E+DuKhvGO4nFhLLHQ+Jyyg2eUu4nZQrAGFVsj+AiEAm6ZhMVUCFXM1ndGoY7RRSZQRskqy0rMYyZxyq3FYen0="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.9_1573406161500_0.06370878371099042"},"_hasShrinkwrap":false},"0.10.10-alpha.0":{"name":"@react-ssr/express","version":"0.10.10-alpha.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.10-alpha.0+1b18e28"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"1b18e2826d3af7e44092dbe2b760c914680f445c","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.0","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-vawqvYKWWxRjngprVuuqGrvpfIdqMFxBRQ8hqgx/PkilOO5/96ZPIxILHwKUOI/ctYRz7fWt8k/wXiPiudOrTw==","shasum":"699ecb847971db31b6adc77d2962bbb2f42d0f81","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.0.tgz","fileCount":9,"unpackedSize":12492,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyFe6CRA9TVsSAnZWagAA/dAP/1dytr+w/FHqrT/yOq3H\n/wz43YzVV5DKI3evFjuCCXosQXn6FTxAnUq4RXNmP2jHoPH4+IvQWEOQ3Onb\no5sAk2HbXKgThc2BWrL6t/sZDKAgwyQY2dYaABGaRq+k14MvDNrRAT3eRN/L\nrS96XzBvlw/s2Vg+HTT6WlHFQBxF5MpYnqU+KO5Wrf8A8un5jF/OchVd/u0p\nNFuzjNXmdFDQMwVKwbI5BM23B5DzAEapxu1jfW8A+XemPYc1zgHNR/a8kvr/\n0hKDQ+hiWzkPl4eBVMtDUJGwL8LNzZ3vA+IMaOxdg/FGpTzPx04wH+mG4mKY\n83b2T95YzWnEVdXtsUZO/mfdIAwVDEHbhjZXCNcwTMCMaQa+KYM/Z4jop3YV\ndR9J7TPItQjJKua2qNceFq8v/50+1Xx2jp1VpGj42swGKnsZlENugFWNqj9P\nxQ1MvShDleKot4Joc1HKtnRV/QXBZphH9730E+cVMIsufA3HXlgzdxXepcd6\nWPJ4HnB0YRXg8/oR1Kvgw+k0A1Nk88YN4v9ESsEY54dnK7bjCViFin1yRj80\nJzbhYLxtJGB+b6tvrm94VU8jYSw385Ck8iFNb2PI3s9svGEUjwcAdne5knCG\nHoWNvruoZxyI+x1RRwgygtgQ6UnH3LLnoerOK/7w3HhjcgBUBlSu//T8BuDE\n/UzV\r\n=Ko6K\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDssmRTNt1svzSrKu4V1q9Qk6X1CEVAxXv5imW6PAHK/QIhAJaQzqeM0vU5SkUqY2azLz8hkecAPYIsy3fwkoBfNAaW"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.0_1573410746126_0.5597268363156493"},"_hasShrinkwrap":false},"0.10.10-alpha.1":{"name":"@react-ssr/express","version":"0.10.10-alpha.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.10-alpha.1+ff9638a"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"ff9638acec52c39a02401d77f4cf1281d00880c4","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.1","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-hZIbqAAWgiB9HXWZznJQjJrx1ELhH0ovZ9ZY77aSGhHSgI8dISFtQAQZaX/fPjx91d6uDm9NpPguvoAlUPutIw==","shasum":"8a7de5bbcdd053ea131f589994eb8b47de5067e9","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.1.tgz","fileCount":9,"unpackedSize":12492,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyFhRCRA9TVsSAnZWagAAUjsP/iqhJNzLcGqoWUTbhNoi\nah2fIlgQiGTzKQ2Q0bn3ko04JWsZl/6m0tZZZ0uXFobmg6O6dMabX0D9JSzn\nHx2lXtds+Vwfj2qif5TG2Sab/s83w1GQC4Oh6C9gcAnaH8o07mUMGKfKm6pS\nliPR2WHKFYYOmt3NDdGMG2hwOrmDvVDUkhFqHsu7zB+tpDpP/H7gelrbhq7N\nhczMSv0GPMJ4TapU3hbazbOqeWR9Lcq7dgRglGxtUdJIIX0wcf6PdtyRGR6m\nVLy5fuj3rtBZBEyBA/pK2TstPHueEOvSXW1dnlYp0mIRNkXF8CSe85/zpTmz\n8rRlzYx21Voqfn9U7AfXtY0g2YGH8IEg2Y1QTYda1fWkyk8IY2obysj6bkTd\nZOrsDaikPy0wf8KSLgmuhfs90EiUN+Nh6gMOoY6jeMx2ghDSvac++oxqbzBN\nSeq+YPqrAzyEzW4U1rfbQeFRDoIsoesvnjW2LectHN4EDKhPRwmQglyK3Bv5\n331oSjKB1RVNdPQOZrCU8WRzSBwV8PQtYSHC7Nx74XBnwCkcR+5UGzbevXHE\nJAKaB/bgLY2afJ5euxGoyD+bCEUUhLXevgtSJUrohAeig/O2TwC1hNP/TNaQ\n7U/yPH8mTOeYN1cGdVT7RfHNFAxOL5PQLw6g5g7SM0IoTBQLjvLbv5Vqbb2J\n18Sf\r\n=oTOu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAhOZ4aIlzyk+wH9eeQ/9ay3qqYeYTPhS2T8WL1QI7HxAiAl0Z7zGzvnRgl1c3G0aRYlf4LXxW/ylsXygAEmsCFxNQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.1_1573410897265_0.8857814344209627"},"_hasShrinkwrap":false},"0.10.10-alpha.2":{"name":"@react-ssr/express","version":"0.10.10-alpha.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.10-alpha.2+5c96ba7"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"5c96ba73c120f5d149cf7255a50cd0e5e9f77970","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.2","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-35p3APJTxuGOapS8lKEKuutZ162mn5QzilRMc1Dlww+Da/b9YQjaBPlLaH/ByUuFcqCP0gzbQASkQ49KZ4TkzQ==","shasum":"053021cff4cdab3cadc82d764da9d5254fefddb2","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.2.tgz","fileCount":9,"unpackedSize":12492,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyFkyCRA9TVsSAnZWagAA7ngP/1020ajksvXiWqU6eD9S\n0bKgRjkRTmE7nRMCD5I25v0klkES9XgKYqSTJZ/MONTfNMV8IqPWLoWf2L5G\nXoN2V4FPZ7hW92pY9o76/UyY3fc19xk8omDuWoboSfTcg+rGi67ylfN0pkW/\nBz90IjhIk/tkXvtmM0G5GFX+Bp8pAFz8xZf5PU2FlFZK+2JVlXJ6/WaHU7JX\nvRrebdDqAQqWsk2kWT8/ceb/ou2+1LhpwtPNfWWauOv6pbjAuEgYyyih74IC\nOlNm88wfzqpdT7MG6llorUYP0tz7CHj3IojT7SoJ1kXEOI0sfrcNOg5EAbmy\nJS9YOcFi+KdB4XWMb/KVz82u3IDGZ0sZg6jKGeRnYCl4pGdu5Ve/9rj4pzB4\nQdnnpw9Q2oTjDMpE9lBjk+/O4sMeh1+S1LCQW49AuNc4jNQW4bSJZVIvMMsN\ngdBsMBws0LKYdb2HV49x/qC7akxXzCbale6dXhgVjUem2Z+xGlDSImk5Ip+H\nxc3PxCED+hEJnI+7JNIKBAwMr+I9vtAmlIY0Q3k8k6PZ2tZTh+dQsFBHsmwP\neP7I1opZvriKDEjGJ9422oVMehd4wNItugqrpiWC32hWUNaisPaIlwjDcXAY\nM2BdUpDvptx181zPVpcMeJ9/r/bCwYEgjifY3nYisT2vwqNq9b1HjDztClLN\nDhiI\r\n=DJSe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEQBSNKhGVU2kPc8zL4A8A7PTV7naQa/sDNmUO1noewdAiAtUNckL0/IVHS3IYZXptrzXsNi4ImSyTwYnYSUfhoYag=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.2_1573411122503_0.5791825855959123"},"_hasShrinkwrap":false},"0.10.10-alpha.3":{"name":"@react-ssr/express","version":"0.10.10-alpha.3","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.10-alpha.3+41cecc0"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"41cecc0cfb20b762126c809dee9b8522feb16d6d","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.3","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-s/qQCdydGZn1AHRl+GDE1YG88Vv/ze4X2ywspaFmODk8oZ5RvaH4W411Fm2k2THHnW7XboZoKuoZpOeSgjInTQ==","shasum":"dec8f2459ba0e43706d7b4407fb1e3e60c8f7ee4","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.3.tgz","fileCount":9,"unpackedSize":12492,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyFloCRA9TVsSAnZWagAAo30P/2aq5Qxx/BO4gH1w1Ce8\nonEu2whjxt+kZ/iZsOunK2k4fejcnJeOKsL+5RDXvGFEp87VYwgh2gdZpaOp\n2Lv3SECLaDsUpUGQ0l2H9KePBTYG9Z5QkWzKp2UHiS6UEtendyGX1OtKnC35\nLUJdoyLXiWNqUwTwoMcgqjEliVNzCqrBEcA78pQsVtcPPrIV4wbuCePJljdX\nP44IXkEEoH9bIlWKz1aQ3TUhoGo43r1uuupe6nEXTY/N9qOqHG2pcHHMkEUK\n2O9Ul5EgnGBWVozAygUL6xdfFjnHNqPAkT7WQSy7bT1vEoR+NQmJj6jaOo+t\n7il3vv/YfJQhBAjxPk/P7diAVwCJYf2aQWA0EtATPWdlY2cq+ZpHX2COfhOX\njPt3ITdVeDoaZeMhnYxQ396MNH4+RPqatkf5UxNU8EY1CmNgi0NHb/2wtSG5\nSeu1U84apDnvvgt+gxV6i/VjHAgXzhM1lkINtsiJjNGCmONdbZcDg/QaIbeQ\nm4Mbf5FagKd3PCLPJ/bxjrXMYTvW4k3PJGNXH2XfZQb7aTYZD16w7iX00a0g\nNaqAMcAHwUuhQ/aAzLkCjzFTgYcEB6sdVhKDsDZL8csFoT/pxVU9KVhe856x\nkeDaCEJ3uFsRpb+Bfvr8/qAH1p76PXPiWO91O87onNKJW6ZHjHg3JhHGKy5b\nMckN\r\n=083J\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCki/PE4x54zP4Lid/Q5ooIMjlGd74lNtb3xq8brbJ5gQIhAO0iGJc2P6460u1VNxcS4VVXmSrVU9P0xyV3hDIAFIdZ"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.3_1573411176108_0.9054565271416042"},"_hasShrinkwrap":false},"0.10.10-alpha.4":{"name":"@react-ssr/express","version":"0.10.10-alpha.4","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.10-alpha.4+a9362eb"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"a9362eb4ffac25774a4e250a0d1d3d45446f1821","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.4","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Q/X13PSTxMhflP+ztJbMnD/+Dru7Y2VmMf/nxLfWQnghVD1uxp8GARGcbD8pr8YJv88El51GA/mnPZavfAXG4w==","shasum":"b12f1a2f6492e57b9e01cef44bf8979491500996","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.4.tgz","fileCount":9,"unpackedSize":12492,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyFwWCRA9TVsSAnZWagAAwvwP/31ZOfF1DfpAdRjW6lcC\nS0K43KQNwEqIbxIbz5H3cOhY6Xn3fyNkgkRPIa7Q8Fn8MF/AJNWv0CeOJC5q\nbAfSch0fPAG0xIH3IHpX2GiffdiKz2eRl97YhB0UbAmC9wOjV5oJ7Hh/V/Pk\n404Fnj00QBwE/5GUr0db68SmhTSAtCE7shYaHWUaBQsKMOdol1CdaQj8Dru4\nJoSN12OG7TqBip1OCt9G1QynnqEOMFecRYvDsb8Cn6bONgIlEYE6mfOJOpKx\n9hIA/ttOFI4afayboSvw2u2lYKmxOJkqn3ogYnA0EWzdnFowL5g9kq0arE8q\nQ07T4nB0cslomdrNH87YfdWf5/0dpNDcrFCGE5f5LFViMbhtaAJvqkRPBG5n\nmoq9y7cceYLMLQROAhY0R60yjFrskhruTLmuuJG933g0+PfH1IJYpUQvpJR9\nSdVM2FVGpjiJNbH6uVOb8Gz6sIkSuNhWmLrXT4snjEHqxwe46ocUyf1aOKzA\n3Acc8RzRYJ/MWvE0srcljwM/OU5Ozt308SpvVjnmx61WQcAc14hOP7p17iL9\nS5EIznU42K4IWBf/MkkNTC4MvWaN2RejdsnC+9H/nKm+XQg9Nje4FPCBeWVY\nKQj4vc90SsqVslYnadB6fOLE6PA/GGRYshho1uU9awOllD0dSKdbiWBXaLFs\nzpDz\r\n=lYJR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC/s0uQYxu+LDOAzOhN50dSu77weK2Ld64EvLFW1USq1QIgLh8h9X74acx5Nuu+cSmnR4SMgDG3QnFbwmp4FWPbDbo="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.4_1573411861721_0.17637227135418376"},"_hasShrinkwrap":false},"0.10.10-alpha.5":{"name":"@react-ssr/express","version":"0.10.10-alpha.5","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.10-alpha.5+a379df1"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"a379df1ad38fa2bd3bbc683984c852dd069839a0","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.5","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-7PX10mziqjjgqhACqsb474LQQfuRS1DtiJz8fqSbyqsbnM7ko0suI4pqJO4gWb1y6TT7IUciwfkItma6Vpdk3A==","shasum":"3969ef8ae589b10b274b9cfd5c59f2b4832fc926","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.5.tgz","fileCount":9,"unpackedSize":12492,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyGUTCRA9TVsSAnZWagAABiAP/iAYUYMqYP6BSQ6+XCqq\n2MPH5IeyQHiGPQBEkuIXdCh7Q7hZ8FEZnAAzYFohCzId+DRtrea3b19fqfWy\ny31xf8PiXVeyeG9PgRL7l+fY2lcII2MWFubN4w7Z8XEuApkk5R4GiRUYk8Yt\n1eRaTykFvCHIKzRi9W8K2yAMhSESdSGdoKlzDrGzao61b2np6qq94Y5VQA8v\n1fMj0A0UPXS9ALVdbjUj1isT4VMDW7MtY70L2ePP4OlJ4i3HaVIcXLaoX86l\nCdtE/9yt10Lal1qfkN2Lf5L6Pi1p+cXm7pJ0GWWQuc9Kl3bBvd5XXvfZrRzT\nQYfqR9Q+Zlch4V32PsT650/RYPxjBIew1bfSdz8C7JQT4+Sfun3fW+i0owfn\n7e547LZVZvZMgQzCGEPhKMcTxCtLXp4rRb/q/WWwZWNY68Q+GuNr1VFvO/GB\nPkm/f5FhQjMXR3JV9OQh5IXELYWHuYrcFFA0hnGL94DPYc+RrxL1srl7CpbC\nPcDBMKX+z4cn0r4tKb5e8KP+gH60vOsPl2jH0z/nqj3LNhCjI6UnwSBMVHvS\nS6RFg2JnQ7kKhiNQ7BHY2xdR1jFwnvvDOMqmM5Wv2v9VzhYbPJQL9VKcuilx\nbtLtk2Cp+iE3ZJ6djoqaGjtaF7v6Q6Mq//iL3bDABqT1DZGzDIpRPfNlwf5d\nYXcw\r\n=0nnD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD5krPI8JeCij1Gm1p6Bf2oraXN58L6PCVmOdIBZEnQAwIgFnG7eZlGyZnORiHaSAkWjhxOY0amr9roYmKcimk4b7U="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.5_1573414163194_0.14567193487840502"},"_hasShrinkwrap":false},"0.10.10-alpha.6":{"name":"@react-ssr/express","version":"0.10.10-alpha.6","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.10-alpha.6+30779aa"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"30779aa24ff0ff945ff7fcf13b6020b06f067b8b","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.6","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-6EmRcKBEBwkV3YgpmSequwr1S/ayVZ5BoRbwYEJzja9FWfnGBLr85Vi439s+oQ4VXxx4vtQ97zXE+6cLfdFqfA==","shasum":"370755ce2694182cbf1c8b798711d369bb46d7d5","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.6.tgz","fileCount":9,"unpackedSize":12492,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyGXzCRA9TVsSAnZWagAADzwP/2pn8zv7D/Z8f5lWYTRj\nCSjcXx2H5PsXtlERLFvgLtuXVthkAG2T/8lACRmtUKmEx/EzNEjCZczbszBW\n6IZTCQkrv35l8+F9bpuMv9+k30C7ZhHI2m5ewxgUtPK1wIx6kqpHKV731IxO\nsRayboJZJCg+WOOXCt/ei9uiSRPkxrBb7oghQ7NSn/vrsS9NPeRJpeyJ1ypJ\n25SAQHWaNzOj5IO+NtrNYZm6+hiHPkw3l4XQOyjKaPl0cCEo7OG4sYIr5Xho\n0kKK2sYs3AoCJ0vAVO7SHPCUTYzwEMwMxHv35AyJmPDM9uYEHVQdoL9O4zLD\nJujZV/SbmkQ50KjTtq4+uA6BohS4HamORAmOuBQcX/4sj7FB1LEt8lwPvJRV\ncu88nnRXKoyMEib36q3fBr0ZFosQyrfL5JmLstUZmTSrpkwoECrx8zMdcmxf\nG+MlI9bZB0BgSp50Ay9btiCZDw4uCZd0ZFs8B8kIkPohrjDfI/7vKf85twcD\nuoIQ0yfRlzZRjr3OXbGeKgL1chNIThjyt1Q6DjxFcjC2RSJwioOYGvyIUDqQ\nJ3D+tdEK2T/iZnINDBokhJMtVuvu1vZHpRWw4arSZsh6hYShehUO6kCzDQNL\nGOYjvhRBupol1GsPMRaJnXxi+536i/6f6wjiddmoOmfk122p0xmQRexM9S46\nDtub\r\n=/r4V\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICSu2+u98jemEkov//pVfdQUSwsCpNJPoLmAZmLpC6xCAiEAzQ4X4HxTut1WWDbvADfTEZGN9jl4nvBZMmi3njvud6w="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.6_1573414386861_0.8347311680184331"},"_hasShrinkwrap":false},"0.10.10-alpha.7":{"name":"@react-ssr/express","version":"0.10.10-alpha.7","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.10-alpha.7+7115c11"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"7115c11982436e850e4097f3947c068016378ad1","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.7","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-hHk7EtvyxofnabRcrQXuq0hjWnpEWxylgnaB0xlyBkvVq3rqp6qEZiOQ/xRJpo8RVOZpdoRZ2f/3cJwrIq8CEQ==","shasum":"be1fec092e9b0eb41540dbc30ad63c6575e9a9e8","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.7.tgz","fileCount":9,"unpackedSize":12492,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyGbvCRA9TVsSAnZWagAAgosQAKP/uKXh5o+UbSX2I9pF\nUl2as8hjdHL1Ud5lCU9BKnaYgsmDyqbDAhVU+/pHayqCTjwaTUbEpXplK7+y\nmi1m83S84gx5cVKjFSwxLvHyt/dncT7dkJCAcelRRg6AcI5Cj/vMoiDigehi\n0QPsd8ix6A6reTeQvjggmrd6ew2zKtAVzYoNGVIbV1VaN71fQIZSX2Y8uVDn\n9kk+gy6hOXzV1z23ufTlIeGj+Fz5JHOm72/NQ9iRORr8pu6Nto5opDDNi67q\nuMwRb2g2VA6aN+nZXO3ngFq4mQWGjp6kgGCkPqlv4wrQlgYbCIFqpMrWEpRb\nch1ApIGudm+PA4/g8Blf3RbmwEFLdwtoFPzgxT2f+VEsMRqIp8HIYJHmmOPx\nF5gQXqwbhVqzUvU93vpsSw2jpvnutI5fHGmfnJl9MvmruMX72ZERHkb/F9/k\nMtEZhEiObXx7Bg2z4obk7qvyxb5aA9e2VnJ0gGjFTaxqfAFoYx5gfWtKZLTH\nPzMGuDVzt9AIqj0pbmFogJk3VDdIesw+LUerSf2N4smUgGCWHEoKlqurY3UK\nPcUziijVaCvpsFYJTq1HPpJpQnWIwomPgeZRLaRK2ZlEXUkEfILL/D7rdCp0\n4RdMDV9DqEtnAmUFPQZ2hhUQGlMRl9UCmGaAnB33Zm/GF936GraSCoS5kud4\nbDcs\r\n=RDs9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCa5e1NymuI+PTKSIemPztZg8KDet+wBsILX8BsgiinmgIhAKNpmAvfuF6DLIoWgcxhCyXzl7oSsYq+KlJjflvLgihu"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.7_1573414639322_0.12227259767326437"},"_hasShrinkwrap":false},"0.10.10-alpha.8":{"name":"@react-ssr/express","version":"0.10.10-alpha.8","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.10-alpha.8+e6837ce"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"e6837ce3b8ead8f70c322b36bbf63bcedde877c7","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.8","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-ZaHCGzekqZKIgtr5jUOgRDKbFpyce+n5xDus5MtmMJSpkfGcav23WgsI+EWTaT0wgpaWOSUHxPGenW8Ln6iP9A==","shasum":"b63139842353ec7460335310350010df392c58b8","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.8.tgz","fileCount":9,"unpackedSize":12492,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyGfyCRA9TVsSAnZWagAACUUP/1yNr4Wb2NW6pj48iZ79\ndNacl+5a3gHF+j9Zww8EvFT6wTM6jyBo0rt4ZiY4zWySfzN82BMCcuPM8j16\n+U+ZPGFrKbZtrss4RsmEZA2znbuo1GTMXcs4AjD1Z470RbspvpVHsbPxzDwd\nEyE0U9qTmkGBmCkZZk3PD0Cb+egedLqIuRkma9gcdGp4UzopmfZXMxRTnh1g\nMhhyPURONiakWKxTddxAg25/jYTxfakQumY7oqJT76AsWjOSnGIQAmGPJUbP\npmpg29FblQ5NUfAGt2v7SEZUWojpJVw+cWOW7iTcLimLTxeGKYIzUL9Og3b7\ntJiKTuZg5Kp4Ym38WrH8gm5aXMr5n9tQn00xj2sxY6RoAnE8xFGQWFQcSkrw\ngVlzNe2mFoeBY7aGBQIzXLdGqYpcbeRxKmnS7K6KYYY8V/7imIwlnBS3TosJ\n+FswcxdijsoJ2VA0KhWq6kyWVSAi/jNDeK7/nieMGOO8g+1g6IWzcL5qN0Io\nANCOie+pR9hFwno1+jxXq6aY1cJ4pFAWoL0dz8c8c5/SnIPVFeDNZ5abztst\nBRA/TC9Sbvf6omaX3noMQe79S1pnIxrwcXDjAvPN9Eal7dl5+urQF6kaF8cE\nXtWySfQ7/xr3M/9yvpr3fPrTGcCCxDfy3fDtL+sY9p2k2hXbpdXn8vbq/wE4\nEBEy\r\n=392P\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEqcyR32hYcX969uHfKKsw2QuuBBVBQKuSXLxfROX/3dAiBhBtbOF2FUIlwEwNH+RJqEAxJyYIoXc+5AJpd7F1steQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.8_1573414898296_0.38696927635241485"},"_hasShrinkwrap":false},"0.10.10-alpha.9":{"name":"@react-ssr/express","version":"0.10.10-alpha.9","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.10-alpha.9+62ff11f"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"62ff11f82b76cea95a0ee3b65bae277726dd0da9","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.9","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-uh0KoVizvUTvQ33eDERaCk60fJduCAYpPxbRlll3m12gSy3++cxwJln01EZGny3/byN8JhGzMHJNYR3Uu6nRmw==","shasum":"aa295eaa8e1398dba351a26604106e12967b70a0","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.9.tgz","fileCount":9,"unpackedSize":12492,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyGhwCRA9TVsSAnZWagAAPsUP/1nnzmDQpyQ5xVyJ1aEv\npBiK2yPLmgie27A1VOFfXmgqSf/7kuMoiZbgUNJX+UiR+fXlYdLRas6BajMV\nfD8V+SMcZ0aeuwCAAwToV09+cuG54PksKWxuK12TDAnT4Hr/4CKF6DwtTEDk\nzcnjneGveVCXOiRlJP/sdzWvZmyU0dbLQkcLhUhKS0uhy3NcYuetyKn1wLfr\nJI+NM7fLn5gouhs6um4TvIdlj/bgsH1aj7o5VtoylxU4/93NAKKfGFY8HOOf\nb5toZF6TxzgIMbsb8ibr25sW6hPktura2tKUl5jVyW6hXUtIjh6tuGpbj3yh\nuM6KM21CAevT2otHo2hKZyjLouT8SFV8ONW1PoHjwDoW458AQkPR+ipaVMeD\nL6CimdhiHrPcu6cEq3vgGriaCrz0opNDot6ZuS6ZpCyK7YDCR8Gi+Ike8HXL\nqbmLyIWu9qfAue04FZmYZ+Aa+Okg6awhDf6gy+aYiTtlbvzeQ8VxNtflr7+2\npTrTRb5+mfAVG8CmOFySC4IZw3gFYR0myU4Hae55UP6GkBD7hDgDuj5uKQHV\n8dRCkLGMztbqu3dmws1UNKRzqF+4HHdZPZQWVTLq6xOTMKiHLcCiNvMrs6ZH\nI3eDYU00hnzk47WR6kEoLYcJXoEbDT27e/RREptElEsfwBAWDy2Y0ZaXyGzd\nSphA\r\n=DspL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDx3ec2Pz9EJg7zSh0l7Rzs42TFvOjwe+PDUu4YJyoswQIhAIm0RmA7XCvcoBV/dkd6Dvm5CCMaQODCNPYnX+VkbWhO"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.9_1573415023897_0.3014098548535984"},"_hasShrinkwrap":false},"0.10.10-alpha.10":{"name":"@react-ssr/express","version":"0.10.10-alpha.10","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.10-alpha.10+ac065e4"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"ac065e4eab05274cfc5cc1737a761c46d9823e3c","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.10","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-FDc18SZvKKGtqLDXYm0zc6ac+MFRqMg2z+2xyCi1csMYTcGvwU2cXUt1JkrFidDXUSvFnm6jXKe28eZTHIJ6kQ==","shasum":"2b7f073b7116a04b590ca9a026d46a354d8f5fa1","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.10.tgz","fileCount":9,"unpackedSize":12494,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyGk8CRA9TVsSAnZWagAARWoP/0TgVx+jzZfk4tiOJjgr\nHib7NOr+OYiwB0SPhGzDi6qXSGTZ2MW/FItEib9ocqeQ4vhTu1MilijvRXcl\nsXmHi6M+u5hUgW9WTGJi9IhzhSy7iNki+hm9+0NWptqTYoImHh5BN1tb98MA\ni99hKQ7dYSXiwyftksEt9j2ggBmzNzZ6pofCOki9Xu64o9S0LUHYEOoJ93H9\n4ywZ3ksYJ8ROuqLXBL4R+XKU8zkFKQEvHwpIBHiuJYOKT5vWEtAaO7KZcZLd\nuU/lLB1K52unSc6KR1cMxXqkby7nwU+FNxmrzv/XQHhYaugQ943HWLLKr0gu\nPmLDhXFu8tVSIstk55IITMUDJU/m0481ManOpOer59vLlj7xB1Zj96tbpjHv\nNcLzSeWVuSiB331fkXp5dDbvLizLq1BhzDhDy2OzgWFP4VzMEmxl5jsZ+oy1\nYQ4lEDZGqaqtBTGCSniMOGjWWSW5lR/C2REtHhKnal+yQT4sfOXhQkDbJvfk\nuhYDEytJLJ07OUS+9f1pzEktxzKVrc+fHO78FlJ10LWg/ztgD4yLMyH0ez1/\n0C/+LYw/nnVWj9+fA5h9s+oBdAz2fizpVuJ2YZDP6Hsc4tK2wNpIT6Em8zP3\n9q2IzwehW/xU4J7wxnNwa7oe4Yfc1XFiescVRqL4f4URjsG8u2Id/0CN1Psf\nkJ9r\r\n=Ry/8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD67f1+aieVpB9j/4ruSoTE4x7d0QFB7Eewh1vctGR50QIhAJoLmqCeBYOo9ySwGnh4lHjELKWqN/eHUV11nDs4OeXc"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.10_1573415227765_0.22491144097035898"},"_hasShrinkwrap":false},"0.10.10-alpha.11":{"name":"@react-ssr/express","version":"0.10.10-alpha.11","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.10-alpha.11+a2ccf6e"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"a2ccf6ef0ab82fff4b2f0b4c9839012f1226fe2a","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.11","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-elxpxkqBJ2ZoUQoVN0mJdFj1jHHcFeqtwPZU1PnPuPLT62Tera1x2WQj1irHRxXtEatMeS6yoP9TqdRkiEX5sQ==","shasum":"5b6be44517f21e7e2ba3ec853451c726c116b779","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.11.tgz","fileCount":9,"unpackedSize":12494,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyGnZCRA9TVsSAnZWagAAUloP/3LhYj/c47jLQkctBptd\nUosn/WWt44XYPo69w+0dRbh2H49quaSr79OZ92IDNW7HVNEDnY0tb4YDw00W\nJW90E7f020Sz7rpd4GHru7GGeNuRal33tNZ7Y2sFv/trWoe4olCtAP5n5tWx\nVkNqZIKu6IrVPGZ7Uv0j9wgwZLGU9cOjCQM8e+oamdsoHtA6cSV3OYQ60exm\n2qYs7YDonlH13rQ8b/w7q6NdFPY993oQKgOzaDQNXVGTzkrdXlDZh5YVAInV\nRTBKUjzwXZ33VPhcAuv232mwClhMW0NOO05TvsbHlpBS1wf8nmjsXfIZjyZr\nyR58FetSqYF9pJfr8GH5R5ixEJpEd8f7yuGInynQVKcnmGNw2kjvh+lzJ4KV\nCdg1c0O9MSRpEreu0Njk9df2uS29FFguUoxfgTxOT75V0SOzIpHuIpKqqvUR\nCgrwXocRY6pfapxTo/vxWtf6AmwznnBcUJ0RL2VPjdkEibEsdORbnmoKFHzP\nwQgPAa8Zub+mttO0dg5fl/HJB6zBPA15U4i7zMARXCOGjDv7zx59aid+Ku9O\nUGdf2DZPJz8zGMZ/jk2yOoycIQYo0O4PNR154leF7EpAKyiEe6j6jaJMQxp9\nngAoNbgCbCOI/EZsh+BQ3m/oCbhMwSBtgLB+hQRhnn6rKBOyR59MP3rp+Ro8\nO0Ce\r\n=f8mB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDXFXbrHm7mxScYx+WRSfoIiRzhIG57BOO0xgzLz+2q3AiA0z8x0arOzXCFeWYKnF+fduJwJwPyN1T+TuTyy/URbLQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.11_1573415385375_0.723254889777265"},"_hasShrinkwrap":false},"0.10.10-alpha.12":{"name":"@react-ssr/express","version":"0.10.10-alpha.12","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.10-alpha.12+b9e2e91"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"b9e2e9165cd84fb4c442bb728fa302849767190c","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.12","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-wdL3n+D6yGSXQoWQpXa5VRfqRQIhhdbHmYUVZbyQq90Cht0WEWbtEn0dSfGhjFNNDuIfh1ZgQhuI/pb78U7cKg==","shasum":"41a9d048be7344924c02b2a641d3f6fc34c91e95","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.12.tgz","fileCount":9,"unpackedSize":12494,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyGrnCRA9TVsSAnZWagAAR8oQAJwp88/HLCNlvsQq8mz1\nLyEEi/9Bfyw0Szxr1LOMhNCMTtIxRUp2Fy/Y7KGrf9mmgtgkeemxegLvdHGS\ntlGQhVX5z/4P4ofE/xdHpErxgh9TsGuofA3UVIQnsHBZRhFVm6zc2ipsrYEL\nxClhv3CypONdH1VLuR1AXrMe0cSbzNPeQOtA8z6fnpXTiMdy1NrWtAei8vxO\nJvLx3wSRCY77xoRJxtYsroG2VvWfJ2bUiaSWV6LPUGxAkywtm1cPTeMVvwzb\nNi0yT8OjcFe8fR1H2rB6FtPdp+nlCwu5Lh9Z5TKoSSaKMTXl6UusKGImap3m\n8V8L39MzoBIafSibd8FXC4dWEZZp09AVAjlR299OFAaQNS91NDhfYH64/r2k\ncKZnea6sjQz1VYC4SCy9w3Mbg4STzfdN5GBSprlqX4Pit1elFNKsB5aSQQgz\nC38ACBRWK3B1yQMnPMVn44GsGR3ovkvbRXhp3o9iLA7F+hryILkGIY0HuOPR\nQ0WLKD/iTySdckNRgEubl3GJ9W72GdoVbjwRAKhApROKIwURsH0RlQnS9SzW\nUhhdNvpqUDYCtqeqSgA7IfhfmihB0D5s1pWcgcJn48vgyB2QvbO3WhqExfDv\nkMY5jBXnXmDHGCIHD2Ai6KVZ+AJt1r/pV2OKZCmNvwWLnMPTZXIzqa+U/q2D\nJ6ul\r\n=YesS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGJtA+JSoln49ck5fM65jJ3FoMHb69TsP60Mi7hRfwIJAiBe9ltmMql46Xw8IHxDlWDH2jc7ObjfnR1n7QArlL/ADQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.12_1573415654691_0.9149448767313533"},"_hasShrinkwrap":false},"0.10.10-alpha.13":{"name":"@react-ssr/express","version":"0.10.10-alpha.13","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.10-alpha.13+09ff908"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"09ff908f9c2635cc9a5db73c4dc6f65f7b07662a","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.13","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-j7P/yHJ21rnQzhjIrJYAANyJpnQHbJudtIHN2mHNwglrYa9lev5FZaCww9IiXzAHaxly/4gF8YzJhLp7fRzKwg==","shasum":"88c43a4b42f6aae0010e167be3ea8796c35ed609","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.13.tgz","fileCount":9,"unpackedSize":12494,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyGwiCRA9TVsSAnZWagAA5lUQAIU1MijO7iJbg+8fHunN\nVHxYMWPH1vQvkcyIdL7MsbPpoR3DvK82do31v7mCGyuAmqKqnq4RCjco5Ljh\n2VIiAxca3Aj5mvVJAfcn1JiIPzeBPrc8UCFXY6hKRck1x8zRqO3hMGKAnj5e\na4MWCVezD1kCiK0HSzbHZ7Ee6bnCAdWuRdMJRboWNhQoyg1VkQlr7NiWVkIt\n6maB99CNKNwp1CAHKnAEzp6qYYwSq2Lq76l3BDzL1Yuniymm9BFnb7BgLXYt\ngPlRKDHrlHOpPGpMcLXiXpnoqY54Ths4GDSClPnm89E0TdJo/hkTWXnxlpBz\nYyUjl9GVPD6yXzSdsIf3n2OEvDmXOqeiHmmgXSb6mrLGf1jP8VWgr9OwE5Z8\nr1SqYaBIAN3i/xtY230OuTthN94mEKZTFBsu4rZV2tgNfYvBDS+SWg59fml4\nz3HOif6XFmW/7b6Fb1WT4pwVcmpgvWJnXMPrNlRScrxuUAdV+VrL53jK5aHS\nVah3D5GiXmPtsOvRg680vEgEQoODfCFlr9p3mAlUA/fCXdhYtyLq7+mjsTYY\n/XL8TRaJqMOJHMATAXyWTN7NuCdh2/nYUssQbZrJ2JyV+iY+zNF0lTXpu6Qy\nVOJ8k0N60HybhXnL5Olc5Clh4a0v2s8Ui3pbh6Duh6UTUnmaKvEAXMGEaAsK\nxPxG\r\n=SBJO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHMyxDQVyVf3iYKGrhoz85+lGWYTZOmOoLsutMWVze64AiEAxv442x/UJ/Efkyb8jCyXeXG90evS7mKbph/Kwh1+6Ig="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.13_1573415970316_0.06067419014099751"},"_hasShrinkwrap":false},"0.10.10-alpha.14":{"name":"@react-ssr/express","version":"0.10.10-alpha.14","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.10-alpha.14+a5a684a"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"a5a684a13b716227afd7d8487c17846fadf5f909","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.14","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-dmXFfFiM7m1iOVzV3ZVlzc6KKbYxoFQ0We5DDhAepGGK/3q/5u8IXAAQFX34CrOye1PBYqgEPNy1y76AIJrJZQ==","shasum":"0b73a23f698929933e7c25ba788f820a1f0355ea","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.14.tgz","fileCount":9,"unpackedSize":12494,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyG2GCRA9TVsSAnZWagAA6DUP/AlspCCiVJFUKjjpsv4G\n4V439s7VKb8riule+iubvM6rs8ZZIpGFnKgbTGUueG70rQE6UQjdw3eXiBaW\nuCIj3n/F/AxMSKp4sGYkK1dHzHxz088LigcKi7MBajMGB7TaxtDCc+Ar7ONF\nTVf10whckOLAJN13cPfyoNpUlkxEDeNgneuXtgRaUG3JhCVXlS9902RSde5z\nGFQWBuj9n5rDDDRElmmKXd6QhO7IOsrofMjWR10IO5GsGZpS5YYx7YkZjLzL\nlWklxno2IwEwqepT4kZ9IOspd8h8vk9VDf+bv5V/+HP8KPF8SB15S+sWvOvN\nbnefKzRAkSZeTDj02696vuNuRbY4JBm38///jzG0fnnfJdnlyZPFKbsSFaBO\nbNY3jeSkeqMayKmIFv2eEMvwvzx43zN7ljT7O0/bF34zkvO3v5tu5qNoJyF6\nZEgcg67aNQh+W6ez1KUvTT5LS71bQd6bx6CQZUlU1Ee3gQGw28bPfyqV81rH\nw/d+mZCIPM24GNBEaRfOB6zpJbv/p2KDGqfoTBRQMLjKu5VrynYA2YT0cvLn\nS8/hKwd91JJlQBMnHte9A+VHo1uQidUzRUzmKNA4zm6VmmRR5LD6QRZFy9ZI\ni1c7zNW/o2hMmWk63FcGjsfxXFXwjSwj7T8PHyKlyll+4Ww59SiovRpFUz+x\nfr2c\r\n=UHDT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD1DROFxTEH45gMDhF/dNCdA+K5qLu6aJYtH9j5wYqUowIgNL1Als53fRpuQ5e1rJro6ENiOO/0uFnCgz66D3rpNIE="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.14_1573416326505_0.45300348672128754"},"_hasShrinkwrap":false},"0.10.10-alpha.15":{"name":"@react-ssr/express","version":"0.10.10-alpha.15","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.10-alpha.15+ed59bb6"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"ed59bb6c10e3422e03169200060e7a78cab991ac","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.15","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-S1S55hdHkz3PzVC+EYxgfZ1G2UaeYGJD31PpOItwvbtkDkWTl8NeuzyZ5hBFHmIlnCqZK3rzR18zS5uOakWeOg==","shasum":"3e829f390d5e13e030f3c53914f18ec37dc366db","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.15.tgz","fileCount":9,"unpackedSize":12494,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyG3+CRA9TVsSAnZWagAAnyUP/iTY9QZg6X/LHwK9EHu0\nMZYucdMHmygGX/DsKmYT93tgI2c/arhd4dB4Xb5VTNt0jaLoL4nvA8RBCwnP\nsYxhfGVVzBzdvDagFylXMHYocfVrgpk33xmJtWmlZ7rz+HQANqXPwW2986Bf\nM5ZIZDprkPI/azM7Ak9pJFoHOtogmdAl/MyC0kbC2U/G54NfyL6YBg/DmIvH\n3LmSLHR5nnu2hMdj4xLrtOTi185XwyI864P2McAygFMb+GMJ5xoT7L4TJ/Pd\n1l6kEAWdVsJY12uEkyKc0sMwMZnymBuUXrvvim9PouIotWQ/SeoqTG0T5OQD\n8EOWaTbSKW1VRLItFzVVr3RO1CoK/CLW7uTOVqfd61pbIYsofgsyB+XbFtnQ\nNOao0mjWkyWUHLpfnSa9D+RLQL0lRi8BtGTIwVJcenZ68WhW7UWu2eOH08G7\nKz6OCcg1PnP+wV6Stz+vCFET/+vRpaYuIqsW2rHiIPe6lfq8c/qzxwkUHBbM\nKJ/MfzrZ2qcOnQxv4Gyc5YYNo6a5HoQwPP23efSgopv5Xa8CAIQ91IVvkKod\nUzow/Aj8EcggbH76kd4hGiDdc0W83uaQgdn4vV2uvMr3pt7qx1Tcai7bpzH5\njN9U3kgsf3ogjD6AfS2gWwYmNVxAxmL5yCm4hoOumK4WaThxtWNPbza8bBte\njWbq\r\n=CaYm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCoV3JYcSY+ndJNvYmwBtGtXAky0ZsWd3R5AILKdVdF5AIhAPgqKDkfqaziOIjs8acJCFxvWNMhGYbuLW3+yQKRh6Iu"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.15_1573416446026_0.5780916844714223"},"_hasShrinkwrap":false},"0.10.10-alpha.16":{"name":"@react-ssr/express","version":"0.10.10-alpha.16","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.10-alpha.16+a3f5deb"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"a3f5deb1cbe9b5ce88801fbbb78311dc24c6a384","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.16","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-H9s2/23BRptOCXmGxobMXxhwi16tL18hua720tEbpwIfx3RwqhuKZBTd53R7SaZVzz/QwoaY17mOTlFabCCZ3g==","shasum":"a0b4e9d91cea886a66eac31c1efbf27676595a70","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.16.tgz","fileCount":9,"unpackedSize":12494,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyG75CRA9TVsSAnZWagAAFyoP/2CeTWNN6p7mM0uUYH77\nub+o0uvWNnk7CFuDD5hacyAX7Axj93BfefQKrSiuxsNr56l+yWGr++wRJtlM\nK5kwMxrT/Sgs1HvDsMCJ9bmXgGVYqe2fZjJlIbXeHXIAiS4KrRE2WGeQD/qQ\nEcMb3ZKj/nzoT7XJvx0vqD3teh1pppn/FeGZw4w7pTW8B1Cop5c4CJZPlZxZ\nudbnTugpqGgK1fy+bDuiRBbMIONp3sbVHjxaKWwrPmRNLNq4HB74DRX0ERNt\nDmxqbJaGoz+yxrjc0G2XvF1MCaz3z40JtTImS0M6G4G3eypt1yi1Ck6jBQGN\nlLRVxtf77qK6P/FCwA7JxPgvDyeHb0CNap7ykGu++KNo7/+Ef+b9XWY9q1aS\nntqc20wPp6AdUEy1d8HsgPe+QFVEG8/fn2WIbeHwkXGK17O6nzdkE0CtmAQv\nOYUHkZgRNkG1f3CmPeWigEtbZ3SAMwt9fNwIeV7wDRQ9L/UeW4ii3h5DUdFB\n/rbD38y8nwpmnj7w+kqfm+GNZdgVAK08USjidoIa54UOai6IFtyh9f/6S5B1\nvvbXf1sxmhs/GKSwCvSwckLbf/sr3U70ANk5DQFkgdsAshnH0QiT3DTYtX+9\nNL+VtEfvO38XhodhRSt7NYPn+HulgWRyHL1xrjpHAwmG6K07Y5B5Wv12PzxV\n6enc\r\n=X+Tt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFWqb9R4GR7egQvN8TbUA+sXIfsxTy8YTM2K4lcyPdYBAiABZCeX7I5M+T3LvZovPZYuZyGZcwBDD3F0GXdGQ2OlOA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.16_1573416696621_0.7406121401761641"},"_hasShrinkwrap":false},"0.10.10-alpha.17":{"name":"@react-ssr/express","version":"0.10.10-alpha.17","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.10-alpha.17+79d244d"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"79d244dbb739316c960a9eda1cf126f4100c0de9","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.17","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-GcMLDl8wanaXLcZKVigoOzJSLWFyLpu8i8e+q2OCGVZSflKleSyD4SZaDjp7e6CK6+r4XgbPEMvyWMgaWnKGaQ==","shasum":"1b13b9857eaa26f4fb35f197f6970b74676f125b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.17.tgz","fileCount":9,"unpackedSize":12494,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyG9fCRA9TVsSAnZWagAAw00P/Re71Dd3ezIMFGsGi86L\n3xmjLigT35SQaySEh3xhzjNjljRMVNOwmVFz8Mc5U4bEf1kBvahyAeK6RC9p\n6LEX2Ye7q9D/3lvXN7RA6hjtLgRwSHvLoH1r8dQioPL4MW7aJk6SFwJYpodr\n6Tq0mEEtRBDXm7FOv0bk7QYhwRVXvZSAClnADqMKJdGxx8UKnX7wV+fxTmJ7\n8GEV5c5SMTPDKc6mY73M5+OU7hRD4v6sXCP20M6+kL+HW4uBOj+HrjnVlQZX\n7BiuC2Hl49TvDhjT8dlhMB3sbbbKlbPuLr55wF8dfVlB3ll9NUqZM4J3pqr/\ne6JiTFbAfQHV0GVChP/qO30ZYHBrlp++P22deEOp5NGJpdETnM76rLL3dInY\nnYNR+uXIez7AtGeHpiM7CiSx5a4uveTQ7S1CU1alTr29Vk/AR8eHuViK6ykR\nj2GsOZ3MwxACtZ+/D0h9nRUH19Sbt2msXZqvypOoLrPA5nUB+Wod0Rmk4rM2\n81fRz+s4/L3n24WWQIesuXhHUSCCsEpFpToMZFpYoCmDNKRhGcsVBuHQeMmH\nciyvQrgR9ZVst9Itg6oSN3NWx9uVrPLChBuXVsVKJ/Lb31R0eITEcwRqEkvY\nUpMKUHxzNqL0YD8dCvBgl+TGSVJBA8TSEUe/a2dIiCAgpne8rWWX6rPEwu8b\nFd0j\r\n=P3rI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDCDphtRPBxMQf4bB/q4VROFdbGmcreZKfGmiGM2lI5qgIhAN4cFW8mTdQoR16KdF23o0g6skqnF7Cc10wVqxwib3Tn"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.17_1573416799168_0.15886108716101588"},"_hasShrinkwrap":false},"0.10.10-alpha.18":{"name":"@react-ssr/express","version":"0.10.10-alpha.18","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.10-alpha.18+920e69d"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"920e69dd73be71ef4156e052801df768f226a4c7","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.18","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-II8vl37m9K24h8bMi7yDZHDmkqRw4d4obeNNo1CEMC1V+f+B2+6WOCWvg0HZeDco7M75hgHfsQArI4Dbz26y9Q==","shasum":"bda453d10d6b23a152a429dc273663fef04a1a5e","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.18.tgz","fileCount":9,"unpackedSize":12494,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyHA5CRA9TVsSAnZWagAA3P0P/18C8tkBhhmm9jWGg3fB\nA/K/KcIG3prK/jrPZXCvJ6b83PQBijrOcxlf66HEpjBlGV4OjctF13QBJ3q9\nU7rVykAaLTlw0aI3bFK4+4BqW4n9DBSMtb98wxX0PQ9/J7+0BbJo8QbMhYIt\nbFsI9vDRxfpKSvyhq2P9qfZMtmfRj8ojl5kTU5DWGhTF7fzFMZ3WnO6BRkfr\nlmlGy0oCl/M1mUChLjZz1kmYCTclMmW+vk0aBCCSNE2QyUNKoOmrRa4RIjoJ\nk8yVOonj+ntGp5xn6oAaGyB4+7RQYiJ+rpDGKKPI6No+Bm5hCVcsNi2qZ88Y\nhxxFYNdiXfHqtRd0ouIA+sLp81LoWt76vODMiG0aXB87De8272vy2i0U+C8S\nJSAs4wQDgur5F+6csYEFB4nLi6/FBjrnS3iE9F/REt5zwEh6nQAmcxXOvNqj\nqXGFAfumzecy3hOZXeQpjjnTpqf8jd2jztjoWj5C0J4u26edbClXOqKMLcsO\n0HoXm9YUilYt2bobNJG3uKOnbfIT0BWnCzTPVOflvKSy5IM0wdgApZFPEK40\nYOKS/aKXmMwwQEZTkfRjhNosRI2EbtE6Tbly8ibIIK0jm/TRoEqi8FFa4gUa\nq0lbDX/U3kL/kjiLERdFjrcx5W03rEAaOEyOuTe7Ud55T0bQ01klZvdPpmXk\n3/Zd\r\n=0icp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD+bZguNykyxeQD76dQ/HLU5yG2eOMGurtMkjRFbQPPcwIhAJ4+RA3sbHuqzeGVNNi9iF8a3ADf9vvNsE5tK3a+Avmx"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.18_1573417016755_0.9793822411218065"},"_hasShrinkwrap":false},"0.10.10-alpha.19":{"name":"@react-ssr/express","version":"0.10.10-alpha.19","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.10-alpha.19+dd979b5"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"dd979b599e2f323e76293bf2acbfd77178a5b7ae","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.19","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-XT14chA9Wl6nkEtB4Cg2ZoYCBD2Cn+1KLt4tTTYAJYlJiWucIu2UMTrqakuQW64pXbQjXKnzH4YB49Wb0tARhA==","shasum":"2a0def7d8661fb437234c6a9254f6f7c47b621eb","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.19.tgz","fileCount":9,"unpackedSize":12494,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyHJRCRA9TVsSAnZWagAAxEoP+wRZVxMYKlyYhsXL++sS\ns9F4zHphYMIe/VJVe9SIjN5FssLQniS8K0Kyy9KJzYnQa+A9mkH5Kon0OKmH\nP6kPBMWb1ac/wXzqxEoARphvVisdPI5tL+q3wDLI/+fclMCPvMADFPD199n8\nFuIr4efs46Im0m2/03EzqPNKlkxBUDMgBaV3f4EOvoyE7JucZvMUMO02yixw\nnIbr1xo+HEJN5h0yTMG63DrYGL3MMFJ3avO/naGkgivcYcdH8Uw4EBBC2k3u\nhbfuRcd3Aqzc44jBYqaz7sfCRkPOmd0AjVSt70FqJwZM7Ihp+yRN3tfg33Lb\nUm0BCy1z3SLObSleeqsxEehcTa3p6xzrVZdmAMcsPOjMEx3UeY2F9FWRaVVY\nmLZdv5NjX9kfz4mdngktjtmZlbRSIEcov/7o3wVbODbxgjKqnMDeey/gj2et\naPihVAT0FxkMbv7ccK+mvjTEdJI9Zc+UkHtijJy0ekMmfbM5VF3Np6+UOQ9+\ncECYlUxQzxOnsyZv5RmzEtwwU1J2Vry1eHq3+mtlUeJ6zWJwp5Fme5clo2CP\nZ9sikR5djZ5jqyDQT/FALJUx+hfyzu1w7L2xySfXUJvG+hwKifF4yJAfarmY\nktKHkYh8fzhMrvf74TbywoWcBWG5LzKlt48LP7ITQnQ0wmfwFnagBtx2tVWu\nSKWJ\r\n=NlB9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFK+D49B6NvNf4JU4zdXpl0tlG6PZyCHv6GmchpM1vUEAiBA5aI0V47V9Ey9wRn4XSG2t2WWKd4Z4ms/htlAywyaKw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.19_1573417553319_0.006899974791043428"},"_hasShrinkwrap":false},"0.10.10-alpha.20":{"name":"@react-ssr/express","version":"0.10.10-alpha.20","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.10-alpha.20+3bd65a6"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"3bd65a6aa58c74b2fc3ae78116969265fad14e6b","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.20","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-zR6ijZ6/BydJVYopHFpSYn0o2vAqaabVmYqhsoG/6ru09PpewWTEI3kt+SKKSxTtsyFFM9F3Wshn8X205Sb0Yw==","shasum":"d9905c71bf8e7432c8c94aac960867bf8e404307","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.20.tgz","fileCount":9,"unpackedSize":12494,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyHNDCRA9TVsSAnZWagAAIHEP/0dQmQhQktZi3CKgC7WN\npp2DYZpK0U57KsrLieShsG6nDAuns7q9x6Ax//fMSs4fz74doyGJ6n3dT+KB\ng40tiSA2XoBY1qwlC5xQBoNXtbrsZuUIhGXiuQ4/FEvGbKSbXFiOn9bQBl0F\nqCAUlBianbI7WBwcmMdnnGG0WeCvzI3x8ZElZ4qowQExZaC+tul4t6ffS/Ih\n05p+QdmFunCD5jZCiBqOiFzah8UKnZQjAGCImjQo7o0BAYPEUkDdthsWA51n\nfjEoI0KjIaS5BZYrGznc7wl7f2VWXwSvS8MqAKdQEBpXO+AqjMenjGcckvnX\ntFuFGuTZwCyaxueneRCZpcLtL1ka0XsOGCi1C5JAQaVkkxJ+baTgPnkjrocS\nT6YkemVRSN0yig5K6zugZo2k3BkRFth7klJB73VyGvfkz5PCnQDCFdcErDYI\nd5X4Jxnt6Dss4HeblZQkUADvCcxxo7XvM0xesDmocnHlxkmZvZ8v5SDZ+25L\nUkwhtD1e2Zon5Ky+6LRJASyPsaGGnXPDARy/MnA6B+n90atk/Jukgc9Qgl4o\n4GdT7dHpNhU77xq7XbEXurmVq2M3qCZ8zt4fGESwyUEf3NIfxJfPMJ5++WEb\nrx3svRi1OEtfnjy/9ayo5qBw7UFmPcmNYU8d1U0WPkqUrepG45hgX8qlFz6F\nxP6V\r\n=EXJz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA2ZjK4Sj73ftkMnnwGw9jI3gAWZMEuY0C5SwmeOZxZTAiEAubtFUNVv/6a/zSU833EMkagU9PdXbRvJKh+ZXRigUWw="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.20_1573417794683_0.07147323419948859"},"_hasShrinkwrap":false},"0.10.10-alpha.21":{"name":"@react-ssr/express","version":"0.10.10-alpha.21","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.10-alpha.21+0dacca3"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"0dacca33eaa91bf183e58e000d0e192dc645b61b","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.21","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-3YOVpsWJ7IhISy+/6/LAFvaTMZTqeVorg0RBxkcj8ePRauxzxYQ8FC4Jh9k3WOga3N9992cRx7VuTbR1KdRVVA==","shasum":"21b579e5336302650a08d7d7e8e898e71c97f347","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.21.tgz","fileCount":9,"unpackedSize":12494,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyHOUCRA9TVsSAnZWagAANEQP+QFQCRGwyk3rOLLdfode\n3/oDe0NoqnbgHaNFgEsdJ8EbP9bfrIwkVXRJ2vbGHz9wdE7Aw/DQDQq1JQeX\nO1RVLRUsRLT1OHfOtKkGg0XFydN+mgunNptlJc9NC29tXdHff/d159Td8BO8\nrtBbP9FUVsAGCb/mwyIGaPjXiAIEdaKxKg5uQ/5MIAP0C/2RLbtfbSFtKFl/\nCfCJSKVdvHHMl45M7Dl5QZoRj9Fwy4yipkPK0sKX9I93/NOJV2uT8l1eORtr\nkxXHbaQAULK/m/UR8uNwpGJawTjPxShqlJcQA6iXvP23hyNujCtZd6UyCDAm\ncZjPRCDPzUM+cLF0Gq0er9reTC78Oc+sUNDsewey8lw4ie2yVWyR3sERlXox\nX2wmZhVt7/itaF/mWKqz8eBgByz1ropzuY74GluSZ8o6HV0+60cgYQCjS+6F\nzJu4UWASzR5fdd23jurUbh90TlH2XlsggCxAJ6Imyc/cYiu1A08577Q1fy8Q\niH2NndhrxadTS4DaXyXzyi0zzyMgHnimn2zkDGThj/iP9xUHzSxerIw8EEXI\n9RhNLX3jeTzrACijHM83nySHakx/S6FZH060Lk+gktuGRXM40xDFb3c48mlQ\n0YRQ3BbqEeSR/o6KqyeKRNOG35h33FuxMMc71RjDp773hmLUf6yQzrNNmu8E\nrUg6\r\n=VRaZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEgDufanjs8+3QS4fK7KPy2APbDOssrcmURRkwutgZQnAiEA3pOLcYPVy4SE3WNupY3sTANVGlYi/lMNThjRwD3UHpo="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.21_1573417876323_0.612353822445928"},"_hasShrinkwrap":false},"0.10.10-alpha.22":{"name":"@react-ssr/express","version":"0.10.10-alpha.22","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.10-alpha.22+c5f2dda"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"c5f2dda0a0f3b4e5c0cb1540f5f4cd0fbedecc9c","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.22","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-jCRnZcxr80JxQvAKUYFzAAtgAVTvK9026QfdEOEY6iIVrmGe1lPleAuibQYK3pqISXdoE2jdSTJGmhcoUXtzqA==","shasum":"892d899d101fd1f75d52c0bd027bb538b593ca7c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.22.tgz","fileCount":9,"unpackedSize":12494,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyHT3CRA9TVsSAnZWagAA4qYQAJZvRb7ZQsjhY5vA1ZcC\nVsAjWVpDsiNJNibElT68qRMioDHqghf5LZ1XLYjjCAn89umuuYG0UQf8zCcR\n8PJNlxp2BTnl4PIdIqAI+Y4ZELXBmjR/8fR5Me7wGqLHGImWWyTZZ4AR6aO+\npTDj019m/JUPO8JaKniIJvplQcmhAiqLoHbOyI+IfxWLdzck+ObRu0mR3qGo\n6RMvgnfoNG/mpdTTJSFVBGQotSdZiQmFjvb6uazm1pudNAs9T1tizszyB/Zg\nOCbdMCEWto6Q1FFyJVTVrOtAXmdnR2tefXIjp45NwXaqqHckPsQahnYDlHz8\nTAshFXiyJRvkrZHKw+XgmQ5SSv9xPDXJBa0PbTi6J14rjZ4Qq7sPZ/WCvnXY\nFFkjE57l/DyAUiP2z3uEuPc6/u7EtMxZrUicBsrvHU38PSj/wY0dHQ3DrIh0\nayaICO84ahDo4zs0vOCXXGuPVrPB4Ya2JKnJISDnMRzn9IbVacW/erQLwxZB\nWGxlxZW8b19vMUj0krQs/MtdBXc2liIwBdXBlFE39JQKbyS4bKxnvl4g6h4e\nwilHhP+9NnKnQw4Ky+o20hKPw/5/vBudL3MHg0DUCygE1iUrXeK3fHUmoFP8\nLqWwSPWuB4IHxGAWsPeGY5+DPFqBIvC4z8qbjtt6cH+a5rHL/S5FZiYrGVKM\nxzSw\r\n=+ucX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCFYrS9/E7rkGyc2DDcojW+WnBIgtTHm2Y0lVPmczJkWQIgKVqOtlsfICddm3uhGH4VCNxy5VF+MBPEDnRX4yKOYVM="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.22_1573418230529_0.8442675174784735"},"_hasShrinkwrap":false},"0.10.10-alpha.23":{"name":"@react-ssr/express","version":"0.10.10-alpha.23","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.10-alpha.23+b014255"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"b0142550e789c22b4c634ff2e9c40d67d093b4b2","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.23","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-0iRGeilA7ciT8GYMXqffkJiXGrlQWPNjVNqhVb8BS/M6zommfI4VY9MHiZQIcTqdp+9veURff22z0cspuhPkFQ==","shasum":"30bc4c01d6b877e9e5ddc442af9fd3bbee611615","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.23.tgz","fileCount":9,"unpackedSize":12494,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyHVWCRA9TVsSAnZWagAAPhAP+QAHEUbNfk/T9Jf7ntMB\nO92DNrgnnAhFc/e3b/eUkhRimjE/tTI7Cqfg4xlifG7eXaxCvJJfx2EJCMky\ncp5kPlS9N12XfCDpczdTsJ3vYZGNzuJoFFKFKXBQPMZhAKMNbggUFjfQ2pkF\nXdTUkqJ1WTm6SIsx4aJxXp5CKuvw/CjePU1R6GQVtB441LCqgSojU1mxEVUT\nkYnDes7ib+rsXFac1cCs1CLwEtziDOb0rCTi9LoR8QMgB992vIXCsttiJoqz\nH7jZSuEbGShPQODA4FEvTdTTWpGYg2cUmOgigfttcKmsSd2U8/FoerYc4tXq\nD1u/cp+89V6HbxTGI+qh03fzjTuH3SDpKHm85nR5qmgdvH/6FEexlEffViUU\nQwvSerpqQrgZkKO47nBhTxyQqhKkcGq5tKynywoJ2z7XIJyvc+DKIxrJxQrs\nyhdV/UFMKc5JhkWpmCBIN9F9yA1qMo7El7sNXFBiFu6g0QzhC8fgImZW2qjN\nznz2CCv6NH1Xqr6Nl2Fmw54FQsvU4dVVikAAaG65504sTxokCRqd8y14oxxt\nMXzohqYaoYBa8QxwhYaCuSjxxz/JGKTSg0wTtdLKzeCROXhP/gQ6vSUcGlAF\nNDfqOLR3ixtThA5+rXYxYApXxTgOGI6aKNZI1VdMdJhGrnXv1fTiswrp9czm\naqC1\r\n=nU5d\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGyWH3kCpwGldJYNIzljU295pf4g2cSExjpu/TXMG7umAiEApmLEvINRGpvy7r/8eR8uCCG6NY76ktyY4p2zVSZBDUg="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.23_1573418326317_0.6522718913809138"},"_hasShrinkwrap":false},"0.10.10-alpha.24":{"name":"@react-ssr/express","version":"0.10.10-alpha.24","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.10-alpha.24+ceb7f57"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"ceb7f5718b0f53a53823612e81c6ca546486d747","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.24","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-HVlBNLyy52n88CDR0vwxyF//FjqTvRJzUmnNgEamKRd4U5Gbs+U8Q/YzaSYpRipZV+EnqdAvAHnKddLfs5APAg==","shasum":"2d4eb9e546922da840e5ffca7034409afabee9a6","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.24.tgz","fileCount":9,"unpackedSize":12494,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyHXfCRA9TVsSAnZWagAAr+UP/0bgJoIcp5xCvkr1nr5L\nMW7sBmCFp8uvZH5Bxwfcd1re93HoUggsrvO1QV8J/e18EswIYG3FYfJPy07G\nFQ4b9jXUpFsvtMt8N9kmM66EIjc5PATF65z4CI0l1bqKLWniFttQTOP8XCOC\nOtrZiw9tMPH70RmRNiGGbEbBDtlM2nHKtoDNNbfvcubY1WVwGSIJnKf/On8D\n1pAfswDswKt8Q30Pf4XTogXUlZU24QZGBH2Wg1dd7YDvy7aWmQjzOmgXvjxC\nASc+ARCizrtHDVObA0b0daaRVm0hwUFsdL5daDlwHJHkkUh3O/6tfp9Ornfv\n7ov6ct1WTIfmYhoiYJVWdVsYjjAhlOzEWUb1PxJHOeWmaCl37+B/a5Ryti4W\nfHlAjvMhS0qwWVxUk/PtPAAHyy0HKkSDv05hKd2QAv1uaiT7zMag8XR59B8v\nLgm6HAhbbCCrAtOfgSnkcywg0OtnnyZ9TqBin1Xc4s7s4ujhePJhQ15Za3HI\nNNxE7G4dzudOFdmBbNsM2Pg6aWJvP28KmZI97wnylDGOMUCGGv0CKYyG+rVZ\nCy5k69VcAxITSi8BKp8FPFj9gcNyC38Z7BpE7vk/HceI1015C2WQutAB0P/4\nvxk0/asarfZejGWoAonPDleItyxEyXhBsjz842PQz6JAgLI/NKiGetTlHSAV\nv7zH\r\n=ttTo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDoe6TcC2MrkPapdlWbIxqQMdNlaqu6+hIG87xLg1ivPwIhAPaYra4pVrss2zA0v2e4z9riA2jJ61wzdznmClbWJZKx"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.24_1573418462802_0.8616967265945397"},"_hasShrinkwrap":false},"0.10.10-alpha.25":{"name":"@react-ssr/express","version":"0.10.10-alpha.25","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.10-alpha.25+721d54f"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"721d54f46cdbf7a876533fa8e584b8d11d6a93d3","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.25","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-xxsaDRVGMC5Nxp750k0mRrhWYDBTtcZT7qsb/Js/knb3fw6IHGk95w14P0WmUpWQMK6H9CNwleHFHeHEXSJ2Vw==","shasum":"09e008220de4d59687793209e5fb78d5764707b5","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.25.tgz","fileCount":9,"unpackedSize":12494,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyHdGCRA9TVsSAnZWagAAr48P/iMrWu9prMc5ia1DOqoi\nxHaAiwV8JqC3KnlmFH4Y7bhiwAyaqZ9YpIqYkuVLL0/arU0Uk05pfOKogWYa\nqxznfOtDQX4pn+b8KNpMeisLY4olL6cHAoiW3j/rYyqI9fX6NWo5eR/glDId\nNtvz26tvQ90eitEPPEzEWGfAM0NSGN6USUZCqUgRMyd88YyLBmMxfzYWVqs0\nvOc5hEVmFWl4/4HSxG7oBI8viopoq931J9jk7nhmNaleWEFRi+TyZEYrNXMX\nu1BKMMWOz+3NkRd//qokf4uYfq7pKQygb+wUihnTTyYb8bk/bHUeAMGKWgjt\n+spnYCfsn99pPrJSgw53fKNIvSWAlVuNBZNijHaZRWRuE3H1YLE10U1WyXBz\n4L2/30HMgvWCFQ2KV28FJl7ytVh0/ZnoCQ7KIrPrMWhjNd+gP/PE7iybbj2S\n4Vek6mf1UwYyM9QSyeV3h0m1VBLrNFOvtQNZpwqbGHxsDag4TKlnuLp+qHJO\nqbcrjguH3UGK5SE/DvPjpWxaFKn1lC3Y2P/gL8fURdX7+6OiHR/7u/AVT9d1\nssLLz7AYJyBUKEbAKqkRbS9UwK30xoU++zc4To4P+fuY0u5C/B7jDJkOfEtL\nHO2fF7tSqOBrsBATCffSjP+oMNJsSwmWVI2gFuTgxVb3HOEkfOOc/f9B1git\nTAJ3\r\n=Jbpg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFK/g9/k2/Riu/QV319bZ43PartzSQ4bVeoiPxP7nZyNAiEA7fNmpCz5omULYGjhjcTpBQljwF5dESYqUmRZhp7+HMA="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.25_1573418821680_0.9534340870729179"},"_hasShrinkwrap":false},"0.10.10-alpha.26":{"name":"@react-ssr/express","version":"0.10.10-alpha.26","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.10-alpha.26+1f8cb6c"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"1f8cb6cfcf897fbae197e50c40094b9847fb5fde","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.26","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-YqL3+cIQhhPowhqDJk6nI8FdSjukf17dWE7MFIixRu4YYczx2AKTpCVSeXo1NK0tL1eJsokgJhBbRUp8yivZHQ==","shasum":"858044b4051dc9f8155d59c3e46d270406e304be","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.26.tgz","fileCount":9,"unpackedSize":12494,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyHnvCRA9TVsSAnZWagAAdP0QAKFiJv54rSL6AdZUnwYw\nemuQI5Vdm/QvHqh3R8YXCw0xGWmPYt4G2GutSCJH2SPOSdlsKqI0h/mLA4qA\nVbmfvxO44d+aSq7Y/ZsYX1ggti6ldZkCavv6UCOFyUskb60QhqSr0ggPa0rF\nUW4aLe6E2tcqZ9oXxJgTGuYLp3U0sshBxjHhjwMKJxgbLuyDGnwKSZE4efE7\nSdSEFFQec5gjNyx24r4R1B749tS/tF5LhtKzXDltnZ8p4IKE9fWv0BCnKdfw\n6G86x4diEQwfV578sJEgCJ+Z/EotMOG1ytFizl5FuFB4wUbvrCdXQuiiGrsa\nNulO6RdfLX7FI9Rw7KFh+2GL6BtyTTu3FLQ1IbpR3UrP0TTMGE0FmP+Qsf35\n7r0/Nixuv+jF4UU/hmC12hiCk9nSHwiSyLGerpDbW7oIPnEQWuL+FZH5MWle\nzQspGcRHgWTOMy4qBdzY7vfjJMmeP5DSGNFIh7qG54/MxDMsrzbIq/+bSx1T\nTb0mi++XKyHpj4aNQcd5ygFk/k5ee+QqsRSw1jofNrI3y26tB662tUexjpkC\nk5e2ubIxmAKO4qO960rNmqF8RJ4+OJrQikSHZ7/f9pWAs144v3r8g4NaF3hQ\nV85dIEbygc0CYkvXRm+/SIhiy0c16b+NVoK5P8UbSriEljLpl2ovv1f2Rc9J\nRR6a\r\n=HyQj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCk3Bopb7gcvUVaUJ4am6ZuAVxYje4iUQarogww8PrVJAIhAIMqVUBkXk0DuVwwHWswcqWb3iJpkjMyUkhTXYIRfvJx"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.26_1573419502887_0.7105828312196929"},"_hasShrinkwrap":false},"0.10.10-alpha.27":{"name":"@react-ssr/express","version":"0.10.10-alpha.27","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.10-alpha.27+4579a22"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"4579a22b3b82be0be8573174b136f9d1460a8571","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.27","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-nOBjYL3o6IOBT0ERISeo1fbEEiaIRBc6PgNY/YefroLkYG7M/xW2GvFjiVGj35/+jY3rfMVaAgkgNBkm+81C9A==","shasum":"1af53d7e5dd8335d4c67f5f3d20a040343aa0637","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.27.tgz","fileCount":9,"unpackedSize":12494,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyHpqCRA9TVsSAnZWagAAM8cP/iDZEyYsAwj9okrdHvEq\nw3830aVjw6HESTncPuwMGaQIlWmT2l/kiGagcretnbuc5JyILLzjNbaHcsn9\ng82o29sb7gQD7Z2oUnBgCddvZihvqD3aLCgnasZqa6rj6b0m64bZtOBkZ3UO\n2JPkFiBLqQTsQeDW1p6BalfO+PmBwdQj/0dMMTmlsXJVwmap9+1xoNfrdboG\nPlg8/EsURCc0PUvq8RcTm5nBg54BpdNWr1tfsDVIimStdnz+XJaMLIiFymUd\nn0RiOP3sy6ZrqeOBl59JN+vIkT2EZsZTnqgrR+7r+R7aeFp0BnM+BgK7WdcK\nUFpTh9RmL4OHHrB1KLe53XBhZvzBagmZJ0BEEs5Zxd6D8irDcDqm+Se/2I1+\nW41/BUl6iqu+yU9l6fHxwxwtOV81jfW4njXK1RWbROzWH5ukTaRAS+aY83Us\nNBTTbRR7wTXjpn/RP5WpNhDCOfpeiAAO34wjIw/RX8ptyq0uko6xy7rn94Ji\nhWyu/ucDUlROEihvwDHr+CeYbuddVPwyWOThBkuYZ/dYKQmfffWb6PiVSgxT\nPhIjktRPHUd/T8j4Y+J19LtLoSvZPfk7WpTb091iguD+9a0wCSP70ObA8d9n\no33FOiQZkj4+zEfBM4y/0wqM+n9Hg8jblA2l3JhIRup/XWp+QfTxZumpA+/s\nEiBf\r\n=Qcsk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCO0LpdMz3KpVQ5BeRnbbz15RoO7JvKJpuAr7cL0jJKdwIgFbSwGFzBd+fy62UCjlU6xN2iXWI7/Y1sP2OsLP/v+f0="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.27_1573419626445_0.4616569513318869"},"_hasShrinkwrap":false},"0.10.10-alpha.29":{"name":"@react-ssr/express","version":"0.10.10-alpha.29","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.10-alpha.29+f8dc96c"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"f8dc96c82127dbdea47b3c853123b46c3f343343","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.29","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-/hngnKC9FigtdEeK4EkQPGX1qEHIickHVkVzG7veC9dX3+wolwbvGe7rl+dp14NLdflEsFpUCrDLKVBWnM3nRw==","shasum":"4df153313938420b5354237826eff13f33bac3ce","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.29.tgz","fileCount":9,"unpackedSize":12494,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyHtyCRA9TVsSAnZWagAAmcMP/3fPz08x9mLxUzhRJjcn\negfTd6IJssPAOmxBcT3KeUXagS1T09dxne+fy+m+oLAO+dAUCl4+S2YL9VTs\noEZZurda/LtWtftayDV7iUqhaTr8PZX/jienFWbwWpJmCdJoS3eJla+plwQs\nQWZ7iq3vRQzRJJMVcVt3e9/tlDZuihnYr4z/Th/0yzvyWP70jYPMsYrb3c4t\n1a5Dk+HJVe6BRJX5qLNziHDY8D6YVRppH3VLN3KI62SFRXQIQpeNAmNqi9KH\nhriPfs0xCZ3zyE5zzw8LSH3ww89eecN+3LleZPdpvVX6mOhw02E9iZr5hkdW\ngcO+qFLK62O/ue1D+HEQkKpRWfWzjmlc4Z/yJ/b8O+WfIVjk12Sb1hgZUSMg\nGU+zRVh0AcSruSEpEmp6cdYU6ua3/tLK1M+DcNsm/BOcbxtTYV77WrYXFtiy\nlopjTCqC/BXmwKZqC6gCH5dcJ6wWNzbtNoW0Zgq0Q8ea4+B9qMdJtXSrYJR6\nh0cOSfPY0xHXeUt2+CyKM6q9L27xzuiQ7vfqPGZaigbJj7vye5OCv5NZLuLb\nxks6xw2H/HXVZokeYL82LnkFeSo1h5U+fOfSEaKqnP9xJCdMa7fx2nN9SaRr\npmNRhxfdPlQnnhY3waZJWYbnEkWfUHBQ2HUJEuG1Zb9P7wkXZoPB9QKaOCAP\nqTY7\r\n=cWmr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDapBw/S/pwVu36fAo3qi6REPlMdb0hbb0GY+AS8Um2iAiBeLJSKd54VvQ2p0jsJXj2apRdlmsl/Nww5z+bR3c3tNw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.29_1573419889581_0.5230283029679434"},"_hasShrinkwrap":false},"0.10.10-alpha.30":{"name":"@react-ssr/express","version":"0.10.10-alpha.30","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.10-alpha.30+acc3873"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"acc3873536452c8ce278e5757a9e5caeb4327d21","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.30","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-0uptptabX1/etGpnGWSBgCkpl+PiGuU1mRPeKUtSseZjHsQDALWWVE6QQ3TkxGE2yAj6FkI6Vlo1e3cJBlPEGQ==","shasum":"40644b4efa1df507c1ec69182c63de1661e53797","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.30.tgz","fileCount":9,"unpackedSize":12494,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyHvACRA9TVsSAnZWagAAW30QAIE1CCkNWFAHQd7jw0jy\nEwRq+z6NTMBioZjJ3x5xb31GcD8g+18GTTqIGf3wNPwYGYleYzEHr+ek9iGE\n4FstjqI+CkCIEi2cq/bjhEONBl5RArVTPinuPHd4mvRKTUcr3psDWMdEprqJ\n871OMWk8XYW1Xl/88dcyvvmdcxrnqMpqRexSY/T72+pVsR+r379cZho95nhU\nkp2R2P5jIJpVh3m1V4Qnjk1YZTMzdWPH+jQf2P3b6JYrKHI/Lov4+JWD1c4L\nftIQRSgdUpKmq2YM4mRk6Xm2HOKnoG31ZdMgIiy5R5bsELRZp4O2YeLLXXum\nhAMTZOL68qSUA+wUcVrCFQeNn49U5+3PYdG0zr8X/oEjNjEEQwicNQdqYCxC\nbbY4Pe3ikJmdnlvfrYQmOgGGp2zSbiXRkb6XohrOqTGVPRyqSb1Gjodf0odR\nUBaP+Y1mig1MCj5Y8RCutONZgZN5ypcgut1oH4njDq9JYobZqlTf12rF0mqR\nfeHWJkLn2idQwi4OB+8uFucBTyjKtbwObxNRAbcTeEiVXaC4cLYig3e2P0fY\nkFqS9nxjh9Q0cBIjZ31UOaxqk0uV6JCMdPOmCNcxmsAQLMnT8i+dedwyXYwb\n3LM4oPcmrd903uUquy//iiW7vW4j18+up3pA40/QVVyLBzYwvKgAz6uVrXiJ\nOrbk\r\n=wMKq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD6U6KgaRui0MIKxP6aUqtbZB7aeuLy1EuBk7yqJNs36gIgQGSn83OTS9PcnsYKovGtEfeelnpVkEbV0Uqj1P3I+2c="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.30_1573419967721_0.08894515395006275"},"_hasShrinkwrap":false},"0.10.10-alpha.31":{"name":"@react-ssr/express","version":"0.10.10-alpha.31","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.10-alpha.31+925d1e9"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"925d1e93bd39f90d7436ee419ce428572c8716d7","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.31","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-S+71R/JZQfcX687ITSZlqCyS3M5LesVZVn42mJ+lWOno2g4PsokjAXZIqIIV3T2kkA0DmlJHKn0VHlSE0qZwFg==","shasum":"661f7a6f86e8c697d7393431ba660379f52167ab","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.31.tgz","fileCount":9,"unpackedSize":12494,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyHw+CRA9TVsSAnZWagAA0xcP/1dnpGyjP0Jp9hwg9e/z\nbE1Qvjbs/6kSuXE0AiAWlJS9HKG/7symTR6rh/MJVuOEtxBEsbcyfFVihGNx\ncW8AC9y2ivxum8HDEphXLL7tP23Se/6e/1WNHlrrQnYKYnQpHd+ODgD6CMgu\nBBP1JeQQIq3gc9RSX0wo+99QDt+bzlxYIV1Zpw52wbBHHE42oPdPwP4RD01n\nc344HuTk8s5c0MMMG7+hCWPl8l0dNa//52nJVCA+wE81HcKmzYEZ1gXmHHYy\nS35UPayfi8UcYWtwyQPfSqtQ9DH0Y6PxW35yapnTi4MMyhTBOtwoStSJIC9v\nyPAajP0xCs517irs+Uuwj0akwaJ54COlSsQNhDhu9FuiNGQkN+ckEmHoHLcp\nZ+4xwr0vkbkcR++fZvsvmIyzckuRXtUNyTJR+qBmmTN890qFE/jwisUed11F\nSXvna8MwF5dzdv5NRDUAmQFKu4i4ZKT47b0OE1RFMaRvcwJPIvvjxy44dpo9\nesH8n5mVQSCToU/ai3Ou6AF+KYXypQI2se5UrLsMxYtqWKMyBIk1ZiLKY91z\nIxaZt60s5NNFE03HmoDwyklp6E/I2WVDVM8LySuznR1ijFRjYmOPvZwVdC1b\n5PKu2A0XYoIwIPjS+Pzp2WEB8rzYtBY+Yc40dB3wmYoqw87zD/hqShwXLG6q\nZVDZ\r\n=6Z8h\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF9D2HUiM+Tr2QKvHdBiIZ4jLpTPl72gYKtdmGDAGPVJAiEAw71fnQXPC1He/OeNYkJyRzSfqo6M+lUy+OO+zT/5lNg="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.31_1573420093612_0.9488090945113767"},"_hasShrinkwrap":false},"0.10.10-alpha.32":{"name":"@react-ssr/express","version":"0.10.10-alpha.32","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.10-alpha.32+dc29432"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"dc2943233feccdebfea527a6e6273a0a9002f8a1","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.32","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-OgIzNWYNqtR8eHdw76QjIZcJGiSV2AhkgUQ9EHh9/Mh5rHIiYVV7Tn3tfR4+OsQEN8WLSIKMegz+zIVuo2kSEw==","shasum":"8bbe4c1d738844193d05635693d697bb6259e98e","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.32.tgz","fileCount":9,"unpackedSize":12494,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyHxuCRA9TVsSAnZWagAA5CIP/0n/gHrRl56hAv3eu/mV\n3OuPflMAXTpkRsNogcAAHXAJJCj2qz4nvJVhRyS0rJaFTww18ZvTdJnUWyG6\nsvWoz7++v50YK+AKAZOwEI474JXFrxz7lylGjzypEzAv495Jj03QsQHB16+O\nNa23wtS2X78KVDMExWc3flGFcwRROG7naHYbiZFNOZBWmilmkhjbrQqW7Zsj\naonotBHdRuwFLAyq22nVowkpKz8W1bNyXRtEqHkm9Dlo1eTpl2rvXujE7zq3\nt051CIqUhZUDaknMswahzy4+b08UUUJ4Y/jKTqb4FtPo2CQFFwoHvdvIqlFY\nnQKs6IR0gUMcF9AJBCkMIgrK1oQoOWJFrv836gzNZmGz/LhMtCjDDEmGCmox\n84RHcGqhD7dM8JDWPOGTClUj3Tpj/I49UTXCugQiE6pjS4Yn2oM2bjW1IvXN\nCOgw93gCxaN5irw5g7OmNDvvvXNSsTFWdenBYY/f4x0CuY4asy+uW4bp6Mry\n99FxXz57qR/TH86gdxLX+fFjkCd9NSjyNdhzPSLg+PfejdycJufRLgQJa2Il\nWLVC7F3Kl42hWwR6V7Y+jd7MhP9fwPau1zIMOsk3PMzYJupu3pL8LFZFjyPb\nlt7BXB/oM0xJ86kV1dln29QZfW4f8epXq6t+jyfMaDfUBhgZNfXn68vXilqp\nTxDB\r\n=uwMa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA8/WidxHiImxY1Wa9Abc3ZTi0c0uyxDfnbfTEm00hvdAiBI6GplhUU9R4LVnD38lNVSaQaQnrLDdgd4euGagLYCMQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.32_1573420141538_0.0746013464237989"},"_hasShrinkwrap":false},"0.10.10-alpha.33":{"name":"@react-ssr/express","version":"0.10.10-alpha.33","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.10-alpha.33+39390b5"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"39390b5abf572447635ad320a055df308b06b10e","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.33","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-2WmggpzPSOU4Re3JF2kDB9zWnzceu5swmzCO7R6ROTwbU3G+BmWuH3mevBHqlE2wrnNeh2Y0QI6OxMwPW2qZnw==","shasum":"f2f55e9c5c00657dc5ac87302745cefd75236c6b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.33.tgz","fileCount":9,"unpackedSize":12494,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyHzlCRA9TVsSAnZWagAAyFwP/An2KAJk532Eo48tcUx0\npYpWaCKWJXQdSkW3AgvlFaGNK8/UNgMX2VfLmzQ9KdG/wtwI1S9xTeVC/Vux\nSDEGpQysCYJ32vAWGvzflew40DdcIK4SlHtLCdTmCDSBqTGnpNdLDpnqJhIn\n3pWwp9nteg+EwXVTUQEtmDHJSD1d2zxRgYU9IGvJzoxAAgfPbdpZpoHpT4F+\nmWXpPsRn6EUo2L+ku50r+w4g1D4JQLrCqBQxzum7Fx3j9EyG18jCGJXqgJET\naXtV710s3+jCZnnpBs6Y1/vtnl2vVzLtgU7M8Fo8dD5BGQpS9gNc0lwnyJ5i\nnujI3wyFaJ1hcZiyWcxxQH2v9gp4yPVsJ5RtVPXaOM7LdZtdAMc6Qi02R9WO\nooTf8VM+mbLlcj/i+fuvgMO9v7P9VT56wV+nrA+NUUkCn0yYksjTt5TeZNMZ\nwGHHnU8uRwyfGOt/oshBMrX9rXkBkptPxG5PAam6m49+07zRAExzC7ibCw3k\nXIixdNuhOl9yLW2Av1bL3xx9xaxKOhdouNcretcKQlDNABoyhfQcegyQcAyj\nR1vFQXUm8kvejHbh8t3XzFcL9glEXaVRmgDjpHDG8xggyoeKg9GtOY4VXRSb\nLsyKu2MkJ0zSoFEaZ++3LX34uDWu+8U02POsylt0HAs42utc+y+//+u56fkj\n34W7\r\n=2cQ4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDyuWn0gEiANDiBoK6hPNMFXHMWDu8+4tGyTx9NiYRR0wIgSOMCXoMp2pm9zmS5ZmQBW2SJ2CaRQcNrXGuXLgzairc="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.33_1573420261359_0.703705638138794"},"_hasShrinkwrap":false},"0.10.10-alpha.34":{"name":"@react-ssr/express","version":"0.10.10-alpha.34","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.10-alpha.34+62088f1"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"62088f104b507c729a44b396d185e1c3edfe8294","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.34","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-AjvbaijDbWAXMUX13InvEgKXFxF+6v6LCByhLAZyfqV42mb9OXIrqSGMyPDzjPw+sK7f0CbB/J50lS2PA0DOlw==","shasum":"1f5f79367a623464aa00395a1e2467ecf35833ab","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.34.tgz","fileCount":9,"unpackedSize":12494,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyH06CRA9TVsSAnZWagAAoc0P/12fCkntNU9QFBNXEMNC\n6fNetZ1LTahgNYKwWOIjFwWLvQ6kTv5ynw+KmvFTlEmvRBSeLJDk9reezlUd\nbAgfUVc+ZVyLDoHn4/gNSv9N8exJqRGAkzCFfFlqm8FOwZj/1fyixOgga6nr\n/pIZ7jBGb+na4lPt3R0y8/BgvCbmcEK+nVLJuHZzXlgJmpLKWe+SoMl6y34G\nkF2BV4QSOetDUWfhzc2evFQPsfVTAre2Y8sDPaLfBhU5/deiWMGry4gDmGhC\ng5e3qj72IcXFfU0zfe31NBG11dNwn6pb6f3TlWf5/EIJLJSf/0zuM1PmeLyg\ncIHr/ZyG8TJGozDVAOEcnHOYWUQUCDnGTYtY45rdC477mHOX9aOWn1ktjCFN\nX8FgDTIisa7pJczb4DCT1MiEYj1BTD9JDNFFhZouLZ6hzxiYvrcOmaYZGInK\njjoFSFE3jq/7zpSFeDBkn1lOPQAbdmjjxbKPRWNpWk63VAo+0YSYNXXAoxPk\n1+X020mjE1xrLWZyCPgOfNVD1cjAYP84gjSWtajLxt6h4xZV4rNLaht8L2S4\nQUVcqUm4r5y+/tmZ8bK6tI4UV1Trrv+nM3oltdi0Paa5yp+dq97oBpDP79HS\nJwEvJXftptubOWqynzLD6uV3JnErAwYBfXCi+fTOOTdxDkPkv1OI0i05ayrS\nnH6W\r\n=3rEj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDeJ3rNHJYgL2PlaaWWx+BVC3F/7dO2eho9zKuwjxgfSAiEA4t9mPs6341++Bk3kWhAWfH3TMk7WuF7AzBt0Q/H79xo="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.34_1573420345895_0.7908766428244562"},"_hasShrinkwrap":false},"0.10.10-alpha.35":{"name":"@react-ssr/express","version":"0.10.10-alpha.35","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.10-alpha.35+0c01161"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"0c011612d17c11dc36d93da602bae33ca3b2c484","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.35","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-fwQgMQ7S1JNuVsfuu/WxcFAqs5jFP6fZ3DfTyt+eRThv6iG6kRnmZ+wl5r6XcAnLo01pZ3r4m3yL79/8ovFLFg==","shasum":"e4c37703a02faafc91300e71af19476f28e1dc8c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.35.tgz","fileCount":9,"unpackedSize":12494,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyH+0CRA9TVsSAnZWagAAJCIP/j3kYfTF0vMUgv3EGlTa\no3fsK379+FZA92E5E/Xj0OXDh6T0/xLuBMaipqsYr8H34SotR6TDrAgbRYOe\nphasYF/bfbLE6cQ4tUZl4MCU11BoDdP/H6KmUTqK68phgAHHXSpvthwae3mv\nX+RRKB2Nwo++mb0n+j8FvvP+aGGM/sbVXf8moesOaODNNPzEG9Y1KkobZJKm\n5TxQ94wEQe3eDzBr/6GLUAhDj9RWh5/8//gKDodIujxLFXe3ApJT2U94fBsN\ndOWayroxN3s8jwwF3z9u4pkTswgQluZXrWQ8P2KIacmBs5UMinV3nuOWUrUB\n1fr/XIrt5oRBMpyWQxlO4ljY899iJQ7R6XaNW0OEtRP1BxzFHipV5Rn9K1y9\nIK5ppTfS3gsNktnxh6i+S04tKSrjuc8sBjy9fbyqsdQvXSjzZC1fPFtd1gPu\no1sr21FFVXgpLC0ms7Zlyrh7QW6WaMXeDCmVcDZItP2NybYASIMJ92do46XX\nwkDxVaRC/yzgxqsEOuhuc6sBCu+JtZqpQmzAagVR81mm4PprpZ30uM4nc4D2\ny+biITe/jF+jXyK5fbPaiCuD7l08fGN5EJa5u/DOWAo+JV0e/4Sn9hMHvrBS\nTJy9dHDd03VQzIwQlWGqXG8wR+3Rsj8abOqlZVdNNIweCqq3aKPZbYM/C04O\ntFuZ\r\n=UaTI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD8zxjGiaMUo2lij4SgA+ItKrZm7fUQMrKNvvgUcoX0JwIgDucC7oZYRyKKX8VJtWjAPJHUaiSqfq14nWm78l/ENXE="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.35_1573420979785_0.21309845584329534"},"_hasShrinkwrap":false},"0.10.10-alpha.36":{"name":"@react-ssr/express","version":"0.10.10-alpha.36","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.10-alpha.36+059ca77"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"059ca77d60c3362b476154a733c7c4e679a8bb17","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.36","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-7OyJ9Etsms8HYLR3mdcORligYooTvGSO/4216XLw3fcY2W/YC/TQ2L5lUYgVRCXeyZQ4NTdOkFAtcKp4py4/eg==","shasum":"04efa760999cd9365d0805909563270aed138867","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.36.tgz","fileCount":9,"unpackedSize":12494,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyIJBCRA9TVsSAnZWagAARLMP/2NF/Ok8bVbtrCa0BDCT\nvVrxvoh3Qcj/m1/OTsuCfqOglM23lqVD5db5dt/qM7WNxeFYt+yuGwrIllus\nWtaOeTARo/uGATba2lT/hrGYmTM4jgvf5VLQc589yeJUvSP6t+xPszXfSSpz\nhPyREyFbV//dgu1+hHCemuyqmujWst8USrSyYUbzOa+c8VsvIaG6bZCmmgya\ncDwCIWvbkbPILjmcaQVsNvDnCBR5dJjxBRMaed+sScOcoeSOxE8CdIDppvcP\nNDltJ2c73/KPo8mzNwJCQa5Qedna0m06OaW8Y34OcsloCZO4gJeoMF1erGNN\nM/fqmCdYOnE/ZSTFdwSj6N3gpLZDZzxZfbduzm/P2OJULpZOhMpXIo3kYUVo\na9NX/HJfXfQmksvzTlDXL802WMu/mFCpZvb+2pGcrPYP7ebIeVZvckq2gxVR\n43cf/7jy05gNELcc4TP+pJjvO2EgTNWHZZarukK+asQWVyxdy4B+bfrujaQk\nKbrwSAUremuCLjAt6Eojld4DTjr+1PkQTw38bOXUTPYZxy/WSXDuFqnpgtUH\nM3/E37Lxwzutc0daQtKPXB5j/lDGF9ij3bM4GwT41qf/ZmtcNX8H+UJvaR3V\nU8F7VHsEd4xKdrCVx4E9zaIl61KlrKZyRNaiyJEoclgQ1bLpXUcOH1odS7LN\nV8wx\r\n=jtST\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFP73LXhHgBN2+CpPr2ykD0Y55G/yzDhy2D04Nld5ep2AiEAu3C1teE6pQ1J3lWPUEoJBq4yFF2MKrRDLQpjprRWvGg="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.36_1573421633457_0.0660911897844978"},"_hasShrinkwrap":false},"0.10.10-alpha.37":{"name":"@react-ssr/express","version":"0.10.10-alpha.37","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.10-alpha.37+bd5cc79"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"bd5cc795dd62bab690f28daed41c7703311bc48a","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.37","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-DIY/3s07TLTQgcvBcnfc4iLlbAt4KLFpqQlnoW8eJV8gjolvQfbs5afgUpmWvqEoALqQonOiBEffegyR9glBNQ==","shasum":"15c7f640774ce6c104111d2fbbbbbf77dcaba2b2","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.37.tgz","fileCount":9,"unpackedSize":12494,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyIPfCRA9TVsSAnZWagAAXKMP/3Iu+eFdnFTSz5yH3th9\nCNBEmKpZPZgB4USZfyh4EH3rotujrzASBkCvisaDI8zhg+rr5FveudkNxqcd\n29+IW+JgG4vJX9ehQE3LwUZg4p5L0LX5O7DeQp3dXutfbgXGSSzEd9FkUuJr\nBMVyv0rvMST5VQ+KCUwJHl1Q8/KxrIv/kE0ofXgZeYf48Fsern8KDnEWm+Fq\neGXz5746kdE/7yFMRacKcsozhA/pPwM8mjTzKy8Mee4EuVsNKKYG0hLdgTX5\nzJahWVnH2jCQFEW4OEMBTTTK2BJzEa+Qk+dnaBFSM12tYPmtIfX/kZbkdZ8h\n3HeVlLHI+18/gpvojifKLSLHwAC1m7yv12OL2jBbD5SQCl5HTQ05/7WM9CpA\n9XqCvU9ygLfkmCdVe8+G8BRN2QjUc+FqXJFix1mp61lATbRwmwXcrzhmdG6E\n64Nqw7LxKg8/ZJmKiA2jyb5rGdhAFTuMzj51BTTeg+xjelcxvi5WEcw1JZ7C\nven4ZbZwo5GxlGaFGyyn1U+KvZGfuMcjlE+aAjTwlBqVd1985GyMdp+0+HIC\nFvSAekrErUyMaE080nhnkAKs3okzzA7FS5z4kjfcNj9X4Dj6er04ROlbI7iV\nYBji30uMRdeBjKRRpKLeZc9AZcd+KGYu+Qskw6L7cnHJSaym63gc1K4MkCbU\nPIow\r\n=qbGg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCRLc0s7CaxcfdoYLRvTlt4L5x6t4pSv1RYdcH8liF/UAIgAUlvpzSARlm09I4gG/rrwku/wJcEsWjYm+WXp3j2r1g="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.37_1573422047392_0.9900446215239771"},"_hasShrinkwrap":false},"0.10.10-alpha.38":{"name":"@react-ssr/express","version":"0.10.10-alpha.38","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.10-alpha.38+de1ca8c"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"de1ca8c5342480077de0bc8b054b631403daffb0","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.38","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-0g2PQxZhCJ7JUVKViDbDYw2ToaLyCByyzOd6cADOHKgNWmfAqkipZYd1nlWSKSk8vwyla3xe9+69A9wa5F/t2Q==","shasum":"937277d40d40868fdd362f0a5d9aa971eb420696","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.38.tgz","fileCount":9,"unpackedSize":12494,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyIafCRA9TVsSAnZWagAA0y8P/1vXOdnODspxO20qPElw\nTmKc+9IQCfMJzs6VhYxqxi0bRLIW9tHE6g/DuF/Q7rtfSByuosXRZVwjuvcO\nhiJcM0fFuFpWjsWXK6id7ObNfeiN6gfIV4Xei5kvs27LEit906S6j8Q0JpfP\nuV2X9Upwo6d08gqswFEcmAJ4BM6prxe13vp2xly5xdbi5KItX/ToluR/JrpK\nSMK1SuORqf32anFGytmMVSvwg5xytl2OjBobAkBM+bvwn5xv8ck3fGf9anoA\ntLD2NmlgVV5Y0Xflwj7+6o56gQLE6Rp+K1FXghqYQD14B1LFFiRWvovwbKK3\ntIBKjUETwTnmGdNAnfk54lANWYorhUqAyCrGBty850JHLM8GDOnxs636hx4Q\njSLLveLI9HRv+v9Obc6fUEYxB4pZ4rH7FR8flSzg3Kd/D1svwlWPmQKsLW6j\nipK5J2Oc0CqUHLMqjjvwMv3kO5wY8uePOpzG/zfr3EJ960fl8nH2kmMSbiDm\nK71UFS6t/xOXT3lveOdXvYJqM3fg78VRMT0QI2N9/rIctuuVg/g1PBZP9nnw\nZLj9w8Yisu2AP2dAqVdtZClCnfWxHh7A5ThbPai7EIdXH04+rFCXgb2FUQ04\n63yIxzgAQYi7fjVkryd/YYtQMDQhb3A/tFcC6st41IJoHmfYB4qamGG3U/bQ\nwMIb\r\n=pAKp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDlVAurBfr6Hq8ILF1X5QpzzcsJhL/ixrAOCGcKim0PQgIgIgoIGHzMK46zorSB3tw7vTK1fNj9/mxcj7561FEKnSM="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.38_1573422751456_0.6917100876799065"},"_hasShrinkwrap":false},"0.10.10-alpha.39":{"name":"@react-ssr/express","version":"0.10.10-alpha.39","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.10-alpha.39+cd79fd7"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"cd79fd726fd94e42802778a8b7e58217373045ce","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.39","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-CHtGB0Z2Twam3LNHa2U4lGRtaRpCSRCS7yl/W/V5+zucvyhgLtSXPhYWlKEzKkaP22Au0fBGQ2Hxpm7E+0+C9A==","shasum":"21664616563a9d42846f7196ebd22ac140d5b935","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.39.tgz","fileCount":9,"unpackedSize":12494,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyIdqCRA9TVsSAnZWagAAJTwP/jTW9RVcRzyoiR/HzUyL\nYa9Qb2sr0bPEyVqi8V14O0dmbapJM2aNqaUvoPFdjPBW5nyMwk+1XjQlvf2F\nWD8rzN3KB0VxIpzwvOVpOqcduw219/KzKlM0XhBBTUsWo40DkCaefyonfeBh\nFHYCgbWxIE4jSr+puok8ciX2ZLMh+8YvIqHAg2nDq7GjWixdXSC5iLmkvVDI\nEqNSgUobb0+kZwcudqW7pEZ/SQIhD4LVE3eykJFctjQlLdlf7Ts2dhGLsWpT\nUsn1HeHW/dGefs8j7tEF2rg2CyjhjluawkDO+18XfiG1b+8JBOltih8zhLyg\nKZfu6ZNzMDW9mk5Xx1+CUvgeC/MEXvIsi9el7Pmb5VKxuW2BlAbgJtVPqxXJ\nXI7YgJKbPjhkfItUR5OnY3OW8Z7ZbQ5poDcbx0hQyK9k5ZBO0OnAO5VGKWcZ\nRd9JBoYtV7ViF1e5JnYklG+OxgCbc/3IzkkRqGIaX1ZxH5zJIyrPqO1+1rGi\nDMGY0q8yAvQbc1qMngGvzM8dY9RTye0SDcLZ8YxV+0QnLl6a6fdfnG8XRt2q\nIn2DBXh0q32Y/MluZbi6mv59lTbT3H36jZaz9cGpgWRNDJEtCpBQfAchasvv\nFHXRZA7x418AQq35hghuTZUesrFv8QdF7VfPu7mXExXDHuCwPiEWRefUkUrx\nc4S+\r\n=UfYO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDCvFBJHq+0dx63DQRWPYaTJ6FaHEi6sr9M16nVf0yjoAiEAnlb766cHWfFtA0wh/26g6/jb4B98Ku0fwzyzJJIqb/U="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.39_1573422954095_0.5543618328001239"},"_hasShrinkwrap":false},"0.10.10-alpha.40":{"name":"@react-ssr/express","version":"0.10.10-alpha.40","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.40+9bf5814"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"9bf5814aa34ebd14029322659d2fa79059356687","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.40","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-ERq5THwzNTGqd94JX7dZrx5Cgx901AcFWexcZQu0hi4vJ0BgXdKYjhZ4Fv9buKmMzglUi3b8rIT1Evq+0MXHyQ==","shasum":"6db773c6537a2a5851c63b6da08f82a1fd9585c2","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.40.tgz","fileCount":8,"unpackedSize":12567,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyNqFCRA9TVsSAnZWagAAsPYP/2KHUlMmCFs8ekQq5gP6\n2iHbRfRX33J0ImhCJhOeXoIH5pHc5pK73PEkN2VJ6qMcCJ7SnzyHTsYUVM0b\n1+dStub0gk4H288Ngj++zxWpE4ZyK9rg9ydmHV8JufscrIY+hJuvkWcVJ/6X\nSYO4XEPMcBrcVISElrYH4eIs8R1I8otgrL00fON/fQbxaSwwkuSKWnP47M+M\nCzWFimipc+yz+DuQNmdRof0tpkHgmvSXdGGyQWRpj5SYqL312nK1+LxH3qyc\nsPW+fenNNkwuJCY0dXzrdHfRRztWIq4T20dSbKp8JR/6hlGBeOBf4bZ5YK3U\nJ8HwpvQ+ezxJVg5yqe/DMXpwPP1Iw4/4XzdtYe54VjZXXXWjqtz4v1nW/561\n6o8MYFX1eR8zyVOspgG7onF9IMmxXNowA+OE1taNkcb6SkR6LExjkQ8/sXiI\n0D5NHSByDzyVnihUA/ZhPRFIbK0PWULjKfqT0r0Sw3gbCf0xO3NQ3sxlsX9J\nlMCKiQ3uPjdHT8iW/sXRxRufICxxjThC3mauHwlri4XZt4Hkjdbe4AdJtBwv\nmuKcHkcZc2FUVGEwnWWOvmPAXjHTeY2rF4t8erxNPJU/EufobIk1jXhP9LXd\n06ekB3KyuTfhRwzYWWnzK0fz74vGV7bfL4ZIKeIhqDlgM0v7wxSPov196feu\nH5L5\r\n=3lNQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIETUCPjhkTipaXNYBQgMNRSXaAxrJgltKa4ijj2n8/v4AiEAm4dz1WAHmHqZZflBrDhtNFyKlan4wfczf2yAYJAtBR8="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.40_1573444229422_0.256287825905136"},"_hasShrinkwrap":false},"0.10.10-alpha.41":{"name":"@react-ssr/express","version":"0.10.10-alpha.41","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.9"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"7f5be5ec3cce25c608ada2b4044be016d9e28470","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.41","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-1fafqDpnoBD/yXjRbd9Ch9DtGypB6BxLlVbESsua52nbAxhSlRvD8Z/762Bw37AUMVAaT/mNLqBAY85BKqusFw==","shasum":"69a4ad00b836b4b2bd4b99f5556b53d3960bc6f5","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.41.tgz","fileCount":8,"unpackedSize":12606,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyNwiCRA9TVsSAnZWagAAg1oP/1yZTEelO+kp1SD4rZhz\njy9dZH4lNSGuOt/tJfJWkQQ4OXFn/DFTn92F2NkLkEtYOuIkq60jvl0Ydkbo\nPsoz30EHoPnZK6Uxlgg+MQk66NLklFUrVFBJzktRN5c3/FRry/6KHKqua+a/\n938s8ZJ4SdVuI1ng+ZZA75bdrlTG4ateFN8gFeifuUTT4PIIiK+G97apb720\nxkVmpa/TAkZjQ8+eF+p9RiL4648zhjlkOKWzNWyp5kFdTbcGlK1TAQG0vU5R\nA9JgxBvWJDFM8RjU88hVkx4dI8DkzATkgjisxzzD5vNr6FKFbeTTidUmrhcP\nSL0QL5xpZS1Ykmmu3pcqEfyIE8z4vUCLS2vP8ywyVljY+eTtOsGY32bhAcSa\nGDMfNUfy8vMk8KfHWNLwOLpZkVLRWVC4ZebAPDqtlYrjjeDP9hLpNLWelHf1\nHcPeb0Z1J8isE7qIA/dA8gKWqfy1jEn4Mb39gQaqtciqH3oZYP0ASmNSsIzv\nppjcDegtNUi+k/wJSg+HFRyqBrib8DT7Ic45GrIFeWPZP7qLCZ+KZDPCdl1T\nQVHmL706W4FuDHwNlzRG1GWaWhFwAghjOtxjVScGP9LB5FkVFpZX2F/l0pUm\n7DmF8z47QTzTVW+GdfDf/bPn1URBl6RviGkHCM9dgHRwgOelSIombsrDSiAs\n+IEY\r\n=hNZZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID3iGySiwryD/Oowo++4TJ7SIqUrHv76Br9m8FwpU82CAiAwzp+wQr6hhYjOC2VZO7JuQ1rUBx9DRLOU4HbUkWYEZQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.41_1573444641856_0.8852056971627629"},"_hasShrinkwrap":false},"0.10.10-alpha.42":{"name":"@react-ssr/express","version":"0.10.10-alpha.42","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.9"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"11179f39e8111d27fa0b43f8ce2cb47616900984","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.42","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-OGBRvIZNNmlurCIDYjLN8oFoa/n4e3hCGYlN+OSV07QRkn5uO8gn1m4zB1oOEMaCqLyPied/BC3zrxjkvkT9RA==","shasum":"a2b89cd152ce57c9e76bbdad511ee19bf0047122","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.42.tgz","fileCount":8,"unpackedSize":12708,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyNzQCRA9TVsSAnZWagAAq8kP+gMg/eu1OQdp0Y9c348V\nWJoU5w0I7OZuVWjx1YFzxwB1zQER0apaXbFG/OeXw9gDDvn3FIltJlFfoYmT\nZPtZ5Ij/u83f/72Vbfr/mRVLi7duK9niB+zgby8zhlzInrpijQ0oinGWQgHb\nOm12VzggqIr9+I5tEuK4YsMPu23vGeMSGaGzsiQVj79WfvV7U4J7qFA/K3kR\nHtW4uVk1tHNfK9Ac/Eqt82RPQ5IIJ40qawBIjBw/Ih736drRSzp3zyne5/3f\nozBJZbQ4C3Lmc1Vb4M3TVPGEQVGPYfFYwSGtij9y5DK8pU0AEq8yYiLGJxdd\n7jb5oGKCVfHc8wWTi1YYEjVJ5EMau8orfsSUJKu7qNqnVWLDKrW0gVcqL5+w\n0FdHVqBOeJRSkkArfFCZt68G728PQbfFAiDvwx86mk4K+JP8SwWInudzrOfQ\n4g3w2sPRgSsyKpTLPzcEEaxpysPwEKQBpCeethdr3AWQOojH/qRZJKNG5PHV\nviw9Tyz525V99HRn6fKJlq4DXvpUvNNnlh/4KWPMssreZQbJcEIBSCHYxc0S\nbIHHtE0V0AD+JnY9i1UFtnUV2U/WWchsSU5n/b/RL4GdY29pA3e7GwX3Tu0O\nH8EHdcXtJF5e215oPLGhOxn5hve2haSiA6U5y8LbItgJ9AA8xY6Hq8EJdpwX\n2gt6\r\n=Bfsl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGZ1dzYC69aUnbzS7KJlP3fdaEGJnZrjWZuUv3mQCVv0AiEAm+qQIBaoIAEn6NjlbVUYnqrG/Ma0HbXpBn/+Tc54jTw="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.42_1573444816077_0.27037329018533307"},"_hasShrinkwrap":false},"0.10.10-alpha.43":{"name":"@react-ssr/express","version":"0.10.10-alpha.43","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.9"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"5f007b0f4eea042ce397ff9b79960dfb9dfdd56a","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.43","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-DsdS4SwZrPCI9TPFA/hSWeJTnJn49kJMZ3af6pYFsQ0I/LaNk+FYXIwb7tWRwSEgHRzQWXGgSC4BTRjg2nCyKQ==","shasum":"89b240d9d8f41a5654deb7ad7005b99c768a2483","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.43.tgz","fileCount":8,"unpackedSize":12709,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyN0QCRA9TVsSAnZWagAAmrUP/38Rjtr41zwUqad2d6nM\nh+7QbH/5zZMXM81tX3y1GACXb5XYJMPOQeSHOO7ryM9CoJx8IPfhF8JbFud5\n7NpgMmUjdpJyRRHcziyRaPUghKe5gAME8tbnvw+5ZoOH7qXpmqaRixWVhhuS\nFrfLykF61Mu1BsozpTUWd7p8fgNszTyPZ5GZgSQyyZsAHDVUUqC3KrkAWlXD\nOuNFvyZQIP7BgNuJv1s01n8jTgv2wr4SlfHpVVKPTYQyYfSYmZMiZKSh5up8\nT611XWE3y3uwqxaMRFcxBqRiCE/Kx6SMIS4NLuQ2J2elnyHYqNlVnHO8YFCx\n3uL6IkbmhlzcIr+8w5PsjVBzEVLMZbBOC9ExFFQ6Q6p24Y/qu3zObORyfXdC\n90OTlT6+sWmD4OCWuVVn2Q1YO6T4YVp6LhG8lLLPxVkX87lNSLwYPQO/mrCc\n61e3vT+hL0oB9MMZnQLCWako3UfLE3vE74voTaLKMpQZAPajjPHJDnbKEhTm\nDfXuplCDa7/qpKC7VMfFUeLK1Ay7yjeEWUbEf/C0LohkE4NuTW6hTU6gChwp\nkMYVJcf2lxEFrcUuEiGpYIPcJhywYHJcswg7qQEQ0qgIdZRgJU5deh0eZkOC\n3PVU9dgA7g4OPCiViE2Ur+7PDkajySWiCEherU1NLhWAj1IDNfcaym6vOaDv\ngWj/\r\n=uj/M\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCFppb1/Y23YeWVkhCg7MmSvJiY+Umtftv0Qs1cibDoTAIgWhFBozVmJg2H6mSFEfBgjs/MMIU75GdBYDynPbSQwV4="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.43_1573444879933_0.038949362259103726"},"_hasShrinkwrap":false},"0.10.10-alpha.44":{"name":"@react-ssr/express","version":"0.10.10-alpha.44","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.44+6ed0e35"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"6ed0e3500ebcb0b9ae3c4d61bdc8b2c2df904266","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.44","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-uGLBBOjKQycZU1Sflm35wnNac+E3JXLK/BDFJKGLCVriEm/J9UUBClTSC0PjOc3xio88PE8BfiVROQYkE8+ieA==","shasum":"a9d649c8bf2dab12a24e501f8623b88291ffc15e","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.44.tgz","fileCount":8,"unpackedSize":12727,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyN5WCRA9TVsSAnZWagAAcjsP/AvqPrTD7jhMjskWWg3M\nmiEYjCS1+M6lA12KkV4TDTtfWgkwa6a/eExyqJeocMF5mCViuJT9EuZHoxPs\nY9vdkCsh2cOAIx1wK1UlesiiqSrgVQUCgCb+GScXbNZO9EyYZfHkgfMeDiJR\nW4naKVs139cbiOxGTgdOszN5PkKegK/CaLnfOYs6QQ4qYA/ClaqGm27WMTtI\nL2I4LDQXPKpuZaxE5OeIcJBNeGZhXLVS4MRzGeqvr5nVjBsdOAfkhwC/YQub\nsElwriNCE75LoHYpErLhH99kFZXjFmHDhN52Km57NZBMis2MbNUps+aAzSCN\n6wgy8W+ahikpHe9zv60l5qGChGStdmvTW0XGG7uqcD0D6PRk7bXYRx3AYa8A\nWZR+Kqw9DTiJEPw1tef48xQNy9ToxbTy0uVBkozP1DIyF7Sjq86FqkZbDpbT\nyEflMIldYDj60jBaferPXluzzU8LIR0gGrnAAyEiQ/D5uZUWUF859t7KvL/B\nkNqMy2iQnpb2MBI48XEHn7dMyw6hqxb5+N3snww3+SayCT/voC+2cKArPtv2\nqa9gBwy3WVdug5v0XYRdPgA9YsxmGTjp57RuiGAPKWlsbjbQpdOm8llDUzzC\nupI2PluSOQNFDMQMLelEVIXo+P699inv52ZxUdTlo0JXJS5ky4nP3r+cZ0hV\nS1IJ\r\n=hwSF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCFyLJbT30tDK016Z1C0NdrDGPFq38tlORXCbDaQJj+0wIhAOqo1KhVcJeuyE1J4W1RUi5l5+xbdRJZQYNDMPeexySb"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.44_1573445206382_0.7168240701029605"},"_hasShrinkwrap":false},"0.10.10-alpha.45":{"name":"@react-ssr/express","version":"0.10.10-alpha.45","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.45+7f18216"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"7f182168e0d84386d401d7965ed418513b644b92","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.45","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-z7HgY9rwmyaxzfMIthfpvwfHGjarHXTKJg+hgV4KNt3pEPF7Lx5gawjAXFg1DC6waUVahwQ+GCutbC8WnVk0fw==","shasum":"d2ecd09a5d6a6e2f35195be1c8471a5f24571c19","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.45.tgz","fileCount":8,"unpackedSize":12727,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyOAICRA9TVsSAnZWagAAMJ8P/0YeklG0o2n+ypT8K2hJ\nr723UNHP2p9UXvWGiL1cfHRM0Pe1nXUnYZNxAvy4AMtBTZDdyBnPlIpGGqda\nktMvJx9A6Oxalt6UTqw9qzKn0W3152WQUihv0bD40v1k1ms2OU3BLUswo0lP\nqIduuHwcucyjCGnDcNZ1m/L54Nbe8iia7p+I3BOWTm7guZvlHA2tr+3XHNMm\nxseucyHWG+OAVZhYY1x056aRtR1UDC8q0+ECsxk9+kWm9bVQpZqiw5YE4les\naeKsbY68oRMLghRg+xhOAC5tVAtDU9OD7lKRVVTgs5YZ85Wy5io6vwdbXnEa\no3NXIiexDZawMFQ6rLk2umlQ5iNRkfnS5SE5J3vKU0YHgXdYmeyaNEiZ6hvr\n+8cyEiQJ/QKUzRtbHWJYVKF3q6W9IBlSAOrohdwlvyACqGxSljDFW1StX90o\nE4QHNsXiKZsEwXsf+9OzHw1HpDlw5DiuL+pKNLlLKJqjSoIGHn8UvCuqxb3U\npcgHq/Tn0yzqvOR0TZjPETxZuzRBbC8Plu28Ae/x/89iRO+FdzxznRPWLy8Z\nUTQIi5RYWrF3WKzmDeY34i8lLvh2RR1VJLP9Tu2uG1QEkzdnLJ0mjq0TjSxv\nlBpwPdKtMncgpf7o35+m0ZtYb7V+xpoygUIgMr9KzusBVvLjsQkzcSMOFvZ2\nF/jD\r\n=59pj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGWnfct3QmOtYESJpg36XmiKOzXgkqZYlGIJ/kozegYwAiEAlFGSt2PmgNq3c2BRCnDKUXfsDfq9mDDy32oTEyRWeOM="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.45_1573445640345_0.8690031978179584"},"_hasShrinkwrap":false},"0.10.10-alpha.46":{"name":"@react-ssr/express","version":"0.10.10-alpha.46","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.46+d034b5c"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"d034b5c32cca51de07872298d76fff8ec3d91bf0","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.46","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-PBRJmL1V/RcI7h1MVdM4HlCulFXXp7EBEvv8gJxjOMO+0xfjeuQcG00my9wOQlJYvHWSZAQJaOmQsfDv4u9mEA==","shasum":"6ad757208ce617d2f1df20e609313b4c9d252197","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.46.tgz","fileCount":8,"unpackedSize":12727,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyOCiCRA9TVsSAnZWagAA/iwP/iPPzJH6B0Aq6Zn1Pp1l\nG6jrfrjS3lrY0ASjq/QSFYs/F1rEonbGy6wZmZa30d8oZoX6vWeoFIEWzEGV\nhzaWDuP/m7HDVjo0TxjLigio64SPeWFQhJScOk/a5mjAGwlL3BX5US6DlNxh\nLcJfuveoklBbiW5lsaVqYu5mQXHrRpfzvYKg8exdIgxrh+liRDIenebwPivI\neKOvmU74ndhoYPPOyuWMU1ipYMtcdM6FswMB6jMj/vdkgAGb13YkhDbltwWm\n5WgaVt0TKt/0yCUpaZQEYNmNe8bsZoCbjC5u+IKKzG1HMZmSOhaXEQa75/sZ\nR/FnRI5+gByZMBqe41a2OupSCSaCHC7neaqUNUHKNRq77iSPpi518jqHlcyt\nXBz8c0ZN8j6NMdVVr4u1QHyHqqnPZXG4EFmu/lUrYUYU5SAo+JVpbhwcZ6Gz\nIxCa4HLbsMUm3VKG6OlHYy1rJMNU5zLJREbMfqPSC7LdkWEx545b3By+dP7y\nuItNi7ZyB8EYeoz0L3MNK95suo1ZezIXnH0f9C1q2SdPgXIXaJYNkdEBu28Q\n9yHu+ZzQUCmG1ZqGKuB5XUeHaVfAaRN8VCFRTUBMDeoMCwsLmZmb3bCc4V+X\nUYyNiCzKi8pGQYg8kXxWl+383Dg8QceOsFRQV+AHCgDShl5xEV+QPQu+SIGy\nOKHP\r\n=Etzn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDvHEqIYj34KlH8Nuz4v9NLaZlJA4+erIPNC5q0aQmPPAIgA75DiRu/tOQLjtoRyQFcmKsgbS+yf3m2q8t8d2MGays="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.46_1573445794285_0.12079411300248744"},"_hasShrinkwrap":false},"0.10.10-alpha.47":{"name":"@react-ssr/express","version":"0.10.10-alpha.47","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.47+ee06949"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"ee06949e7c6f9f5fefbf936ab16f393d5beacb2a","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.47","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Qo6OmA3lwVwDrctV8MH/S/pDiVdFHP96/Ie3G0oU4d/73Bb0VIKc8U43STeQlLtgCS0O7SzGBONMJbyHqZOYkA==","shasum":"4b4adffbdb1e26095abdec75ef540e87bc04ba2a","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.47.tgz","fileCount":8,"unpackedSize":12727,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyOEWCRA9TVsSAnZWagAAS88P/0r2XYs8SWc2yJxa0GyL\nQoL0bSO50+PHWdG6578SLSVlnywMP0jiZVKyLHlxJFVlJ/0bas7aI7xHt9tc\nDwkXjIAgxU/tWXSkJKzwgRDNDzdJPM86+/wRtODnaZ5+y3xBIQtYUyEtbFy0\nAFP5FLdKPCDVMd6yETCzExjg1l7xBz/y9ypOZ/Rfo4JZJh+++TrPAArW75IX\ntvKRLjS70XHN6Lof16KOYK3SvsBypmrA82R4Ygv9dYuk4c4GJzuNY9JBLLst\n9rjnPD/uOPtyZDq2JuWDF/vDC/Lm57HwI+oQ62SwXuOowuEu6xJiE6U5gtPe\nN1jUDaaM4RMDVy4FUIrp9t0V7erUIH9aVf02T4u8A6pogRUCn3+Zf0S9nOsa\nRgR2Pyv+B9KeNL/zxpW7gHaFD/F5Go7qmeZDJiEc2AcrrszJaSG/MJb1pU2+\nsqupwbGvUcDlttyJ5ljj0tqAT3CtenOIzF0wiNWcBKquQzrPxybyXRCnjXaP\nruXxF5HZR/tmpGACzcu/BBzW8AwbVi/6A/nzj894YWpyc0aTw59DtbR7M0jH\nHxCCyL5evuhTns7xKuTgkYwlUx3UcVon02sUin7YESqcGgPleBD4qG3V5hlN\nmBOyQepHdcr+N1flDW68MFXZlvWSfEqYkx+Yn2sBtvRhgeZzxPxC4VK/WTZf\nLblg\r\n=zvwv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFIWaEHcPeNWwJyJ/1AbCNge9rNVTpV0uzQK1CvqNRclAiAqoCcKDPAoi+b+7Ro++cINnaoKcHl76pMJVCY3XRiDIw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.47_1573445909828_0.37330994138683793"},"_hasShrinkwrap":false},"0.10.10-alpha.48":{"name":"@react-ssr/express","version":"0.10.10-alpha.48","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.48+a211cab"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"a211cabbc577ea23348da3464478da71a128050e","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.48","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-cnTIhBH2EJC7kMDMET5nLlEDM/40+4VoYsHF5JGF0uLQEogwu4hRlTN43xZKdFao6NYcQ7R9axPAJbKh8ugpkA==","shasum":"d7741a39d1070dba22beb2ba61ed757d49106d1d","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.48.tgz","fileCount":8,"unpackedSize":12708,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyORRCRA9TVsSAnZWagAAFkoP/1qtKr0yKGgbY1/mrxZa\nXYlVm/BtTsPU3MNyv5/jBwa/dQXR6oJ9Sk7obl/8438eo2F5gL95yNK/z0uB\nxGRbS6vixGOJjy2vMDdXhoXDWNlhfoibQGhPVNp7RGVLp5SPK4gLO8ZEkWP6\nrbNWodcM+avZu3nLP0RafQdUeIF7Emo2iLZ6bI4cFwZwjRzcELmHzjf1EWg6\nKtwIc68+T6y01jbYh68x9Fvt83q3EWRs7+UNKJGYZj3698moHzi9PcV7V1O4\n5yDnS1ZbY5CjUTH05hfQsRoclpWV6VjWVnK3IsZvYn+1Dh0d15Zu5jRftTor\nDzzLT32jhHD0IxSNsm6TSt6IRRrCrJNyYuEviUd9KIYIQUjrw1ZHmQt/4ehJ\npvZ1XL0X1HPuvFswpiDfNx5rOLaSWnsgJpsbNsWcMoUGD6e3gdqi201MivO0\nP3h+/0+vkzBkLNbuGU2k1zAbzk+z5dSZaztHHT+H53Pe25mIN7U85zmMh+9T\nk98Z7J59uKYBM4BnYCnf1plsp3+nuAESnGlfBPUxZvE5e+iU2ebYhV0pyUZU\nJ8iaJPL3zx8JsD50Fslw2al/8YJQKQ9DKhnq4BJ2Zaud/tKUi+vUssWxyKue\nYOQAMaNAbT9S8oovnOFB7KHXxfQgfDU7744jyM3pZ4DI+5t8OqyUCDGaA569\nn3Nz\r\n=yx0V\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBzMFSdKuFOCyCC/2aQBpDWKW64t5M1hZ4RbRFzEYfpCAiAsFIYoj3YrgS3tF5TjGKtRibs2TChk324RFz/FLc+W+Q=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.48_1573446737465_0.31785821925739"},"_hasShrinkwrap":false},"0.10.10-alpha.49":{"name":"@react-ssr/express","version":"0.10.10-alpha.49","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.49+cd398b6"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"cd398b628ab5dc542f65beab6c4b70a42a8c2538","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.49","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-UG6X3ui4qGlnf3e3fsv3ZV0bIyFlNyVxgk4pxLD28+MTTKXBLOxLtVYJ8wmO35aM9pjR1ovXbwWxiQe4Ef86Zg==","shasum":"48b5551c11be0cc91c6dd2aa636353a98aebbc11","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.49.tgz","fileCount":8,"unpackedSize":12708,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyOT6CRA9TVsSAnZWagAA+kgP/Rm0vJK1th2U+Fcfu1YV\nenS+3DbkSUphLZYv2bqzpzxba90RBb8n9ZIWVKq8B7yo15ytCpK6ZMm0B5yb\ncVic+bEDOkbHtSRq+23Z6oryrO8kYLH/q8LHVF5S5Jf7QrvLWWNjvKAlaOap\nO9UhPq49JDS5qdvlVf/FFPC63P3zaAdkGQVgrB4cCYsDpR3C8Op0S8fC9zhz\ncfjdoOIycYZf0mtVeDYgG4Ut0AkplDsSCQODMdAOwLwFjMheLBPM7mrFkEc/\n9ErsLB9ErNihG02q1YDMeqUkreaJ2VX4/Ejb61UEtLe376ZJHG+RjkfbHTWy\nc35o65OoPuxu8VJwBRw1BqC25GqqHOiQjoK5sgS3Qt9XbYeYeRO+okkruvaE\nlqOSst1BPZAqVG1HdhmuodUguUcQ0kQo5BID7Wgab2Jur1kT77r6+FQZ3Prv\nBRGig7lCrXZTw99duK147i1dDIEXPJgGQ4IKkGNbb4IkQMhN+M6TSgxEPM8J\ncnFUQ8P+sj/HzSyf1TI23ANCRoL5mrTI+3+EWVU1tDIrHwIEjE2BJ97qGEs6\nVJCnu9YBLMTl8CE6jRFfo7oQZ/74G4fBTOtBik2qzP/zCzf0ZbswrsN+Xefl\nhygifwFvq8Q/0TNoABvDwUKXnlXutdldFvcoMl99mxwgIYKyXGNGpeh+deP7\naLeB\r\n=Jx00\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICuVB4RS4FsIOyRaL45rNWuLpv+AYeFYu1Sj7l6jBBYeAiEAuTjPv9+hDJRAfi9qpDFua3hDirUbFbCaq2EufdYXl44="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.49_1573446906475_0.19770100382427658"},"_hasShrinkwrap":false},"0.10.10-alpha.50":{"name":"@react-ssr/express","version":"0.10.10-alpha.50","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.50+02e1556"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"02e1556e2e52a45d2cbf89bb91bde918a7ee22ec","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.50","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-l7UXiy/YMzdnyEX4HrE62TEdYiFJPY/xChXkPpLADkUS7j5efpDnncBpDavn3HPRmITqjpzKGggjCyovAie1EQ==","shasum":"aca1c621c007df940869f7eb83e73b98a33fb4a0","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.50.tgz","fileCount":8,"unpackedSize":12708,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyObDCRA9TVsSAnZWagAABGMP/j43ywpGOG8JOFt9SC3o\n9buyXKyym2K7Hiep/l/20WSBmaT5aYygUJ3GNyR7b66Q5Q4sPLYabkkK8HdL\naitlJR5t2lYBRn1S19yGd14LgCT6sNON7SBb9HrbvNYs+2362B7p7ouEpou+\ni79idReCHVnmC/vAb3sjWWpC6QLZ4uxwN4aaF+EN4gFKfrdHPVLc/52b3igg\n1jeMGRftBwXtBlEpDQH4mVgTPOtZ0tDxD5HUsXb/4ng4Vh8SQ8wlz9pydUkV\n+ceBuluv0ab+dSQsO2gofw50ASCwTR7t4ymaTX/2k8Un0rkS3IBfoQBw8j0M\n8kCJbUCJI9nHzX/EnlW1iq12WUSt3pE2TTd8Dhr5WBAPy3YVaKLuzJyG3186\noPwmob1mGJ3uJTSB0a632LL+hzBi3ZNQwjmfgsS7fgtRst4MyRB4IvWXNIQM\nr+GKxidtPjqxGXXAJTLToLO+QXasRcnGD3btGgeeLNMs1C6bwXMD7oW2/hrJ\n85Nz9kugFO5AY/Ryz5ncJO7InBkCtMifKz49tiZyzdXKr6jxHGI8ET/Ub9Ge\ns43TmqCTEhTcXQV/9rAKU9H1rc2b8rAfSBbZXf9x/NaYALnv1aTaG+Uawjrx\nEQj8Y0H/VZ04Gz3w4Vkd91OuY+s2R/jRE8dZVFi8qbr0hyhUPf1isMD9YTg2\nl21f\r\n=Heid\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDbR2COcQoAuxUJKVEHpJ7CuSDtyGGomRubvJffeK3+XAiEA4SmwrNNKH4AW0tCRbyAX2P6cOYgHPg5txOQVgpbFMfQ="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.50_1573447363135_0.1724499933816872"},"_hasShrinkwrap":false},"0.10.10-alpha.51":{"name":"@react-ssr/express","version":"0.10.10-alpha.51","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.51+7731edc"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"7731edc202aaebe63e5fdb7ad38450886556f9f5","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.51","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-W/fplrMT/3YXWDioG729QNx6y2bczmMoL45Duf9IZZdaYb4rTbsU1d8vRbPd6JXwRr1hD5otCuOU1Au2BCOY9w==","shasum":"0e3c9c26fa391a1650912b46b160992dc75cbc66","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.51.tgz","fileCount":8,"unpackedSize":12708,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyOflCRA9TVsSAnZWagAArAUP/215D0qvrLMSwoztUO+7\nvEed8RrbLmbewE9oti8818nbESBAuosWla9h4O5/7OqcZkuMCJxdFLUg8pDu\nAoLPt6NyCmGUh2f/P4h/9uNizWGtxI2h2vidmIcye15oplDza16526ooSuWw\n5IRyDYC523HNZBM7eIBvgaEZ94D4s5eZ4pYSglDHCs3M8VczlqlzCvkX+pEP\nws4guXI9CfdsnwR2n+LQqgybhYdJg3q2sYNU54ftrHLdzg2Fg46BQMQsxZr4\nPak310hovivrQUGDqU7C52adEjv2/MU752sKbKMSxMi7pcDE5DQgpc2kAn0D\nRlo//lZ+KCZpOMzu2RR1FwOAVm51s/iE/b9e91zEubjujUBi0E65jFstuAhs\nOGGsAyjXmP/H1eBAkaHiPLEDaR494y2syejVryWzXklaJKpqGjQInqQrG+7E\nReRTi6I1dzi8TqqoDczl4TarJrMKqwOFJKLGFllbHiDm7rfD6ZcnagfTkNs6\njJXv7aa7kK/GectfLMxYjiHgUbvh/vUiL03zq0Ld43SsMC8KJm61vesu7tGn\nXSr9Aay/KGQpzQomLtc6U61VHkStstitbKUsja6LD4Hw1eekI0FwOZovReeZ\nLAE+SSFX8IBESC48+NudRyLNwwD0xNeIKhaEk+dJ/IcFP0R3u7ZutaqWwi4N\n1eVp\r\n=dFfi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCmUVbhbU99ojLgcps2AZ6VU71eqpCHwFuFx9cxZ5oEgwIhAPXk0TY/db9yyLDbotAoM0KIBufSiZEaT5Ylk/hVj1ra"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.51_1573447653074_0.5916819869172802"},"_hasShrinkwrap":false},"0.10.10-alpha.52":{"name":"@react-ssr/express","version":"0.10.10-alpha.52","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.52+9064dc7"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"9064dc75cb41c3068aaea4ef69acbb15e4b2286b","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.52","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-wXIUMgK0zyVBSP5LkZa9KOfiXxhIrJ1peh+MGCVJO2B0fvV5Kg8QshBidnD/ixRYf/IzcxCHdNeVF97UauRbMQ==","shasum":"75d17dd851a06e072f06e8c20d7904d993be9d23","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.52.tgz","fileCount":8,"unpackedSize":12708,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyOjDCRA9TVsSAnZWagAA68sP/2AJn0a7HuY/k5ZfI2Zu\nNHLMUAxOso4cFYRIKB3OOEs7zIHZHiNsoc9JuTz255kybfxoRMKzsFdnmXzI\nGqFqTPW7lUbeGnHb7tUE+3+5pzmMEFQ0g8bz5oznMf2yOOL8KtvUpR4pQE60\nCPsMjY+15zbkaMxBchHqgBaKiGSPRojtvIAD8i4uIUJIN7gat8T91Pj0BPC4\nCkzCSMiNb/PjVht+zvB2tVOyXBGYAPT3hODJsQYsoIu4ngk5sBRmqNS7Eg7+\nHBokAs34nu6X404caN30kNe6re1SmI3prnFN8noH9crIYLOFM1Tna2qLDv7F\nXQVJgDED3JCdoRZyDzH1Abh305YQyG3RYKYQpLP97D5xRN296JZ3aIbxVc+x\naNp9iZGSz4IlYiAyRVu3GoDtlResFyAuKZjIw7r3lbHH3genGa+EWBTGd20D\nFqVLnIQAXnlFKOC4gIXhUu2CHZX+T1g+N96esWhycf/td2tQRT6sASXSsL7f\nixhInDSBIcaNdgdw1FjekTDlbW+VLpdDFpVweQXoBjxDjo/ot/pbqbGziFOH\n0A6o6OeWCtX2yuQzrJH0Wbt4nufmnrXSltjke0N6yIoztG9Y3PS4ArL/COoZ\nC1JLOPew5wzQRUUZ0Yzbhfu0SHTmapi0vB5wBSKDtQswshaPF0fXtA0g0n1A\nc4Nq\r\n=F5bQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGIC1xDIV9UzTI9JwtIFmjEzi7UnreA/6RqZhO8zzWIZAiAyf6INbXy+k+WkoXq8iLH5vo8gGP2quJGaomPB3qDf2w=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.52_1573447875189_0.46368593814551495"},"_hasShrinkwrap":false},"0.10.10-alpha.53":{"name":"@react-ssr/express","version":"0.10.10-alpha.53","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.53+9528dac"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"9528dac50a56e2504ce83490ae941c1617df2837","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.53","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-5Gk3bwK99DWPYde3bkImJWqGs1uuxVuSN/yS+C1Th2TUuU72U4aq2aZaa2QI57bnTWrKrO3OAaSXHGwvounYUw==","shasum":"8cf64af39ef4c138fa25712336f92c98478c0e0d","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.53.tgz","fileCount":8,"unpackedSize":12708,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyOkHCRA9TVsSAnZWagAAAwEP/1/WotiJ0zkJcAcdo6Gt\n7eD6nU+BxdZiNJmSMlk+U9Y2Ci4RHTIYbVDNw9996gO5ro8ZUd55huD7ZNFI\ngJ69mkn1IO9jzYkzl3yPrV37DeN3Z5EG3OYUGfgBQs4GeVR7h8dCqNN6y7q4\nJV6r4+NpCt/HxO1TEcaE/6u7S8iEVpz1MeqB18IaEsiSPrmmxCEk3AGpNvds\nCFNzW7ykmrM44Gs0DDwl32SULQ+PrkDhmwfnFD182Cc9persg4K7ERjb/Umi\n3CggxQwVKd3ghT2OCeAaNdb0EgvuxA+3KuqVrq1Rdkn4dYrcs3Qq8qfRBfvH\nMzMFN97de1gCapDbIVmInjtP55Y1AeCG7rDISdBXxPzhP4jwxFg4XBBLqvMz\nrdJlAXZq2EVXRjJDUTJxmvRCscvjnaEgWwM4Dhou8tT4QQuYvhRGl4rFEsJS\nKNF9TxfmSv1cG2oqnacCliWlai4ih4pYVJwmAcqAryWCo0B5+rHqHMDVuMLb\nL0VYzij7papwixyLWKVqC8oeckzygKXUvz+mcQSa5Y0DNu9iGoTWNAkhnnqV\nR5XmTUnapM8HbocyYfdS5ENo4JhdNKQIgVTcUXoFRbDg+vYumOv+w2e/C94l\nyA8adkuLHkNzC1Ensx6Rp5g4NDT3U0IgQflUC9h3BOtWSnIoqVbGfNpExz+W\nExQg\r\n=//LH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCsBNuR3p4OKQ7ZDYvFByPVjl8Le6YRdMkyntmJTqubVgIhAM/opXy8QkwpMTlbLWIV57aEiv9yWwhXwcenHBymg+E+"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.53_1573447942637_0.12930457636470827"},"_hasShrinkwrap":false},"0.10.10-alpha.54":{"name":"@react-ssr/express","version":"0.10.10-alpha.54","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.54+757d8d4"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"757d8d448a29c4ee6284983a0e190cd510195c32","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.54","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Mr488OuYuDCNJlt5CNW2BYWZMBULc7N1V9nVScEj7mdgVgKuINhTG2+Fm/gPZ1aokocj/juVQ0lb3iilTiWOrg==","shasum":"fb7247d2385d42e4915184b8e77703c408954fec","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.54.tgz","fileCount":8,"unpackedSize":12708,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyOmYCRA9TVsSAnZWagAAO0cP/invFoGUYUMSNLNgpTjT\nZaBmvbcbzvc/0wpI8D6hC5fh6IhW92CqSFS2K9wG0iTTn+toFl7BzGLfsH/c\nVDJsRNAHQ+n7gpXh3lBCh/ohYLbHjleZNLds2P2fT/C8qBxCTrGS81gFC7zE\nL4sgqE37zMKleMtu9xVagun6VFxYMPmda1Hq2knSnNxj+ITheSMGRmJFyJ9x\npxLSib2D4CULRcVVXX9HmBBVxWv1uLgYT2mXGDE1W5B2uie8INPxd0lR4DdB\nCl+SeBS9q88ZkNR256nqlvzBpK9kjCp6n2fQD3vI9yDL4o/Dbbm7oKOnCoiK\nmZtXArhHkY/nLDFPuS6dIV9rxIKvB1S/q9Wsp3LtTc/i120WWU09DV6b5/VK\nH82Y5XzK8fzDE/EfS5rceuZcisSCDGQG+V0l2FeWY74FoZ3MlC7HGGkM4NLY\nm4eI7a+xFYvZu92djKqIJkyZhlCRiW01tfqTI6wNwzc5Az2aRkCpvQ9S9xrW\noOEgwBujuZ5s2Ab4ybxAzdFqpNeM8VZZt5ln+gJmfqmosUahkqFvapsonq3k\nABBKWqncPmFlwyVlRnfdBeK8mIWHNWtxyiiEnvVIIcSu6x6SuexnECwbaErz\n9ED6SMXDuSA8a2ziF/GKu+OTtChlabkWiV8PgxXx6ikJ8TOnfIkfEqMjBGHl\nxsrx\r\n=sVES\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCOPPtkXXVG/j9YuxmDMEwvP1/gXGRyWySyPJXDwgI2LQIgASbMS6TZ+TUJC1hTWtzwiPbn7pKyOQX4o31uAYDo+XQ="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.54_1573448087764_0.21494258601970806"},"_hasShrinkwrap":false},"0.10.10-alpha.55":{"name":"@react-ssr/express","version":"0.10.10-alpha.55","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.55+21ef99c"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"21ef99cd3f0cf377ff7db18855a36c04189ef07c","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.55","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-DkENOwRSjmKzYeFzwoBgzTOGUXs7UJ/u2E9im56Pzek59LeP3gljBpHXMSVdurmjSc6EVYK3ryfvOeDMuAwl8w==","shasum":"2e082ae233ee18066020bae29ea79d42323f9ef9","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.55.tgz","fileCount":8,"unpackedSize":12708,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyOpUCRA9TVsSAnZWagAAe1gQAIvSYLAZQxz9bb2oT1ZG\nTDrkg22ZcKq9Eqxy5oMH1/1h+DOWIktpcUw8ifgrKkUDl9N3NWFy/51q50Nr\ntrnogMJkvJUh7EGDvJuI5HY2xuMkoHx2BiOL9NJ/9WJHK5fMckFgI+l7sk8A\ncFpaV8qRCV43TPzMCyyELX3GjmK84kPxan2hRWIu3doqiAmh0ocNhKr0oSeD\nNcO25raaLfVBPNP0OwR/Gfdw922ARjVnifO/1HWjgupTMN1SVfRCjQSW/pxJ\nmsTySrMzrshA7ShMj54YVyXKlT1GBwyJxATZkiOorO+/2vtZzhdpFfpk9tJ+\nlan/EIlE9z0WNTYw4kqGcLx9vatGlNC6XKZj5M8KbFjfzMgrV3rGpKPo2qTn\n5TznLV0VWO0Qm4mZT8o4peWIsDGRzZ9id+kvH5Po3aXTcu/4WRYOvlxUTH9S\nQJLZyL+7V0o6r+uhmoxdhkcl90cvSeGEg/37m7mq0V+VOfyezg9tQdLRzb2/\n3P9MMvUvX16USB7Jern5wXR4+kfrl7feA868xS4V5BTUbuBFZ9vznyXinLaJ\nmeRgUoYpRjXe14saEvx3PePSg91DiKrouECk786p7WTHAY2cGIrlV4cMsR/D\nQWNcPkUuvL7Nxy7rhtz0nnMLSpdsk93DVYy8Bpt0XED6ljo26oqMIhUXyOJ3\n4e2R\r\n=2jx/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBushdFXhGqwwGa0gRez0Iv6zgYzEVQzZtXXcbTt5RtrAiAU9V990psHVsVb6svBgt8ongoHvVlHFht6gQPfGJjHHA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.55_1573448276345_0.7325567077282742"},"_hasShrinkwrap":false},"0.10.10-alpha.56":{"name":"@react-ssr/express","version":"0.10.10-alpha.56","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.56+8feb80c"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"8feb80c12ee777c72c6861819760d3ce620b0de4","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.56","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-HAwOotve22F1KquajRG5KBFIKlqumecZP3qXFYSIHm+nSruv33PHXVI8g9XZ+OYeCBzQjRbCAFGxPl0U8aM9NQ==","shasum":"f95e453f490b11cd5daceb8e4561d389535db3b4","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.56.tgz","fileCount":8,"unpackedSize":12708,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyOuzCRA9TVsSAnZWagAAQokP/RovN8UXq7BvqcZHl7Bn\nuBVbzasfXBIX9QwlK8Rqt8n/BY2qxNB6ecq1I8/VE6uB7CpGoRMJFMjKrlc1\nBdn6xaw6iwZt7fIBvixoXpRv76siigawpGK+VfmISonLa6+abYtOOCVSLYIp\nV0wzYO1a6HA5fC3jQgcyD2OweH1NodjriETZ16ocTW4gh/quJi4m3i+F+1AZ\nRmrgdcdu/caYn063jOB0I7LJVXEVtOeGQAmvhqd239CT2qNzzQNdXTD2Pd4Z\nDzPqoK6mQh23LdcpNfjYg9NzrFjl0vb5aZZmjo90mcPFQzlgKmjYoesrITw6\nc3goOnfcGc+0CCgNSJaWxHEHykVP58Qa/FQSYZ8tI9IGNsCkqGz/yZSAK4SP\nhhdlf52QiRIpo5vnLVrT8WzIEot8EY02/xUd0+vmuUg6596NJv3cn84vcOxE\nlra0edyFR/Bt7jFDKYT5gVke+6dEUIVF8v3KBk/BAWlHU1KDBwDNPIMtqx9/\nBleekkrbbX2bxHgRIrxJdaTxrkktttkPwatO1WYOdNNVXv+uD6R2yqm+NNQS\nWpnEtyAo+/KKNh9iTiwPKx2QN4C93Muaafj+ObRMofxNS9bAPY4QqOh7qm/c\npEd7QvCIbKrgfZahH+ZD0CmdLEH58/c62PuoHWs8NQD1f4sjLHOJqkQgOgbr\nU/Mw\r\n=ogvG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHmpaIGnMYIC1gZdBguQibkFjbBFqMc1GIxS/noGxQSKAiEA7+hMbkwBKhWpUiEx5uraf8C/7NKH8918oZWAiKCOveg="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.56_1573448626623_0.803381610754542"},"_hasShrinkwrap":false},"0.10.10-alpha.57":{"name":"@react-ssr/express","version":"0.10.10-alpha.57","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.9"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"ae232bb07fb95623bf03cf158ab9c959e3287180","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.57","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-vgq1fHdGyTYGFkqUmSVvlJhqL/jwuW2ZnRv4hJpU9hTxr1+JIpySfNYgfXSuVSRQu7skZ6EJQBu7Nw7Mnt3jQw==","shasum":"2c80f5f9cf7334168dbc5be088017558f4eca0ea","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.57.tgz","fileCount":8,"unpackedSize":12711,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyOwDCRA9TVsSAnZWagAAHCgP/2jM5QM0WFyfHUoEJsos\njVhrCTEkZ2Mml8y81Uey6ihcGclHSXFkJPWRPT2cPPf6buUA79Y8kBHqdkrt\nX58e41lez9bv5pU5jsSf2lI+XnZC/N7/jpT68dHCB0IBCq5C2A5JelrGKsw/\nncr6hy7l1RVeLgRoWxP+tGeQdubMinR82JQgBptfJHgvcCKGfZlrHz5ZP2JF\nzDvdgK4SI72n18dBE1ne4YOUDi+DEEzfrgLR9cmTHVU2MwULTy3aABD2s2IZ\nPg+Fcjq4iyhGyJsgjJG8v6jCjnSICsTR3+rjZ3N5T407E/iFBNzmu1K6zWJG\nOhYN7Qo101aVEULOVs9APLIoAh9A7JZaJJYgzqniFjdyRMSGaJ1eSZ7T8Ol2\nRamPDLT9GZSEglWOvLHlSg1tpjQbFSz4IDvJ9XszJw8WjCIqL1ciIbcwEudK\niBNkORSH9TOVpeT8I9CuYwG7NcDGAxhsjhXhF8mEddU/VWShBM+gy7WIHoLo\ncHN4gnPEjuviDV06Aev9Wy9q+a7CrMzOlBnZ5Y9VDKqSMs4mqiUjua2v27yp\nCOxTw9s0DiEKhA9peOAiT+8TqtUaJl+3loYYNbfse/nX3MeZPbwFuCTie+i1\nYCq3psiO8NszHyfP0JguIvs+s4+tL4sDZMZk1ZYPAld4YBfVXhuhy4HjYLFK\nKMHK\r\n=Tlg4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEpyq7rdHtzQXylYzhtqtBFInXXOnJpipLA/vUM0/nB7AiBtr6dq93lgfX9t2uRnsZZJszqdjO/aD1JSLQh02RqLOg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.57_1573448706734_0.8601134965820629"},"_hasShrinkwrap":false},"0.10.10-alpha.58":{"name":"@react-ssr/express","version":"0.10.10-alpha.58","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.58+c33bfbb"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"c33bfbbb035192116ad776d8c9590424992d5c6a","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.58","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-8qD63H9cQ8TXkCHChaKfWIzm/iEr5+nXbQdAlRtoo2WrvT1C7WijJuStTv0fV/oFEkZOcXG9HgnssVtWrNaK6g==","shasum":"6831767df3769d016f3a6dc55da3c46afd2e596b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.58.tgz","fileCount":8,"unpackedSize":12729,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyOxgCRA9TVsSAnZWagAAQVYQAJH020gZccAZoYgkZkYt\nTDT4ByGMRsgeTDjppB5dY59fcSgbY8x+G33HpHjDitI2+nkFydRQgy1+2j2O\n5Aj7VXo4G1cFDYM+SRPeK4JBUruPvFmO4m7nUguozX1h4TaHi28rxcfXMcFI\n5SofHCihMuWqhsNK2eoZQ0Lj7YzAmnuuRDtcJIFYLnfCeoiD78BdUM6kYQHV\ntbxDX2lwEy64XI1JhAnT0SnZw76RCEsisSWu6Noa3Vf6vGNOh7obG95uy/va\n+PqDZk7eMgmLSfrP0G53TejnKRfsHtTs0AbNG2Ko59dexQZozARcxbKiBO8b\nYWU43whZ+NLNzouLYc3rJM3EZ+pMID+ZhHza3cOak71lptLcwAE+6RcqF0Zz\nk8DTnTbmKpbj5/J/lUWW9J+R3NzY2iERX1EGOa1+sELyp/71RDRDifk/3KXB\nVzwxLEpt1jRXs9cD8xsetfhMy1VVMjDpBHf6bOj87ZmC9foqZ5d/e6ZDC7bV\nHA9/EMEV4MpkZjitwjpWusB+IwpWnxh989CwP8epNXy+S/h+R0rUTeIji1A/\nJZeEw6+mH0IGR/8cPj5cK6I8TPsykFgtxEMCGmMi+0Nes0PLZMTW/UCl3YZU\nTRpni94imanOuA+xCXnn1kN3UdJy7FubfQrXuD0/kscvewvEY1bPFqZ8tn4y\nPGa5\r\n=WBBi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDb1ZEEB9e55vuxwjlfVIL7DV+GN09LfF4Z/E/sU+h40wIgBU3/d3tIlQflpuplEdTAGWPkD4xlWMNM7qXMgq6MF4Y="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.58_1573448800399_0.6796948695581222"},"_hasShrinkwrap":false},"0.10.10-alpha.59":{"name":"@react-ssr/express","version":"0.10.10-alpha.59","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.59+0030cd1"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"0030cd1565eb8fb2cd9fffc71222ae425958863a","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.59","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-P4RogM2s177YPEuS4QXIL+8P3eKLdy70MDm8DIKqx8LKB/EJjUDigtmST14lIVb9cAnKOtaWxe8xft7LETfWOw==","shasum":"dbfdd9bac0b498f724448c1822819acfba7a5c81","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.59.tgz","fileCount":8,"unpackedSize":12616,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyPAWCRA9TVsSAnZWagAAOw4P/iSKF1TdYpKLvMDBNTVH\n7GJKbbVYT41xd3kQohKIPNe/01048oj+r2DQoWy/ZotYRr+pyDpzUnbnS58q\n/+3It0xR6BxW4onbyWlzQH4VeTFO84qnPcZ2R94my0RKhK78A6ogbbQn5Cxw\nvlyk8MAUkHjwk0aLKz0+XbE550IuxUZ6QBbtL9zIGHirBwI4ZfuorH8VzZrI\ngtSlIJBmmXPr6Ml8sGwZQ0PezA0WUxMavvBX/exTm4v631bQzv6i0CUOEsQt\ntomuTaEJKXIblU6Y3rijwZkcvEYvCNqlPsLG5C611ez2T2/BjBniBBEx701o\ngHgi+uUHeIkNtZCQL/M0sD46R4TiCHTp3pu/4f6gUhHb0awJNbT/+8gXRmyi\nQyWsdTgjeBMAo2KH8fxLKhlSJ82BUAHt9Dm3kq330Qt8xY8M4sNIulCZSVcU\nCQ37F1rtuETtGSSzZ779H8/Yo4P27eJc4eqXG8axTtGACn+rPAQ0gspeACYk\nl7+OpF1ygGzkGieHZs9GvzTYOHaym9K2sKfJTMCfRd4S/pOGXX261eJs10ox\n0iX+AHF7nylXRwac3hnJ2IdtRvrmTiDTppsespV+c/VNE/pTXjJUCRWNnCrF\nH7npJ+HX1lTNkH015oR2ulLa868SX87vpbRV8XuCS8DR9e5b9YIKqcVaWL/I\nGRV/\r\n=WiAn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDNTdL7tuCR1bCBwIj6Zt9vGTxQCevsFgCY2b2XI7fuoAiEAv8UTbZRiCf38GRqKkCLPYkh7H61m8Zw2pyN976Z/lMM="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.59_1573449749751_0.789058454251244"},"_hasShrinkwrap":false},"0.10.10-alpha.60":{"name":"@react-ssr/express","version":"0.10.10-alpha.60","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.60+fce7e4b"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"fce7e4b90ebfab27f2d2aef6aa84a1a923445cd9","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.60","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-xbl5ddVs8C5+PQPYucg8SZb9aGvs5DP8gqA5H+DVECMv+hvjCKXHSI38mm0CFN72QiDx3AdlYjIoZW11CJYqkA==","shasum":"06ba6e6bdc325eabbfbdf5fd17d0b298eeab7958","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.60.tgz","fileCount":7,"unpackedSize":12401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyP9GCRA9TVsSAnZWagAAp3kP/0HeOBnKxonjWUjuAGrT\nYxmhjt6u3SU9oFhTAVWAomhKRYxsKTg4l+AzPMw0GgVLiuUqM/15ICrsFU/u\nw8Iexu6QnuMLwRQOh2I09VMjblty9PnKkhTEPX6olhhSjKJ/LpGCKdcycvxC\nlGZJpDgFb5eXGZESHYfGxNlZYQTPgOgz3SDx0V/WiubvvWpts2LiSogK+jPd\nRk5oPRZK9nvo2Nkf86UkZWuzSF0NETTEiz9URE3irdHHRp+MAD5Mbxhz7gAT\nVee6zwcC+zRbmej79r2PIF+vdr3vw3jXKVTAF/H6j60ZfCy/bQwU/bg+bMIk\nmjb4kJOVxZDjjxcl/mryvGYzos7OAYzcIIrjsP2xsqyPMMJJ4D8AmSTNHWif\nSCJALz6qf1s30GTASWJpOxw3xQ38MEIIw7fTtq6E27VsA51VKbb1A7nUL8cy\niDNYTM5QLM+EwM1TQIksA36Zu8XFKZKj2+53gRzrLZI8p9evdO/wM/noXYvH\nx3fBf1jZGOTZQgykKBiqAlfYDXr2Lslf3JH9H/v2NdXHxWVZKixNbTNx61va\nD7D2o3xJK9WUHq8/A12FEasOjHCCukrJbFg4VnYTsqbPtdh2uOcBeU588tDm\noupMvPEg4cv26DQFPu9CwekYofkWRpQ0r52xWIzwqMHU1eFqT/yCizUCodph\nZHbe\r\n=21Ka\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDNAi/xwt8H2eF2oma2JUdS2ST8YdTqUJxXfWE6il9eoQIhAJZj2M60gJYhatehhZ65CEmQ78tQ8z7HHeqcbfSZhcE8"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.60_1573453638308_0.5584531639748844"},"_hasShrinkwrap":false},"0.10.10-alpha.61":{"name":"@react-ssr/express","version":"0.10.10-alpha.61","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.61+1442370"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"14423705977b98842274ff9e7f50a4e2f7adbc49","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.61","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-b/wJ9+fQjqw3YHzEbj/XjPXvL3LzaXw6Kcx04KcKp14Uhn5r7wqiZygoHzddxOxd7Os8KxOWJ9C/5Whswnfgsw==","shasum":"9ceed4a5a8f682b04c8e8c4d82b02e275b9fc1a3","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.61.tgz","fileCount":7,"unpackedSize":12401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyQF2CRA9TVsSAnZWagAAVMwP/0wKAf3ZWIwPVPyh6lvh\nfim/XNjgfK6cgH0ZJNQxewlna0r7tvKgbIHa4CmWgbDxK2Sbc9ohiIRcq8OE\nnxhwqdllhFfK0dHvR6aJGXDszLqLSZGnDQT01sCEN1KCxvvApi2cnbs0vpcN\nyCN8VMfmiMkbajFvmxzoRqbb7vmuZq4FvPU+aZfwZSUyhkWf8BDYG6F9QXd3\nqSW21+vLTpByOH9kuyd0BFN7/JkNxK9yL6aPUVbTlLljn3Qb03ZoFI+2M1zA\nXFRbbcICKPJXb0IZKS6/gYqlZdVEHAgVvhMpy4SwQ8o/WozHCfjlYR8bjyDT\n95UKOZCKyQfd41pqow4p4nrsksPnrjXyEJfBqSZfuKQk4O6klfhxdEtXzSwf\npQd7DEerrXC9VExEeWtz+8/v/37JAF06ZwmxwKzm0Qb4MeP2DTS61T0Y86/Q\ny2Z69NjVAUTp/JH8iklDFW6UQCkbqJhzoFkY7O05KbSdQuY2XmxaAm41MHz3\nF9fqIc6Mg07VP8hpkaxwTf5crqHDXNT1JK1V9vMeP7RH12Shu3AsCz5CCflI\nxRkeBxe9PYpgY95a8lcLaS0EWTIwn+ky+gWtkJN4gfYypCFkN/2ZMneousBz\n7S11rxaGhHSUk3WCoznFmvLxyPS5bDvbKYdEoXi7usR0FttfC9hgYj1JBlvk\n8imc\r\n=1COm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCcU7Z0aiLjRb3t7wpEYnuPPuo6ueSHRSFEomDAT1NpPAIhAIPL+f8UdHtRuQ/oIinCZPlzHEE9aqqJA79gD1d8K4Wj"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.61_1573454198215_0.6629632486405534"},"_hasShrinkwrap":false},"0.10.10-alpha.62":{"name":"@react-ssr/express","version":"0.10.10-alpha.62","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.62+3db6f0d"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"3db6f0d1e88c47596811805c71184d46046096f5","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.62","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-dVnYoNXtWkkVmA2BD3veoSRyhqmTbn1HkuQ/C1gkhcatt9kUOF8FChvORmGHUw979LuYmFlSm8yvP8bD824HCw==","shasum":"1d7f4f8a16ee47c0815da984910736154c2e5335","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.62.tgz","fileCount":7,"unpackedSize":12401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyQHvCRA9TVsSAnZWagAARIcQAI0WO25pkOvKdUHiOc58\njbW28EQAx672UQ6AHaKb19p65Y18hSoYIL0Fzk22Sk+QOii/DiZPeVbCAnM7\n+bxFq01QfL2MEwo/j7hYkJnK34tZ/msr1JSK7R5ZPPJg6GcK+Ja62beI6NwI\n60u8xSaHqkExz582fWO3TWBo2dyuitAviaGJcFLBaSsj1Yra86THXN9qCwDH\nC/QXK0E4dmbE9L2h4DW7K51nWAK53n0BeNZxS9g9TNN0W5pYrvXd29nPvhhX\nJzju4ArcneV2QUFXdMLFX9HXLE3vumURuGo5kN/v3N9QeFX1pkAKtn+QmcFV\nBUkUlqEGWw+K6j21R2aVW9SjtMaGp68W5n4q5uYAcZpkuMoKl+XOno8KLOhM\n2+gccE+ark9M9ne2G+ZyCuzcYQw/0RjTEwacFSVK7xo1iO/iqVvZv/GVrUeA\nlxYGghbQTJ38b8IMgE09H7C3KuVj1Bu/m/kKAEFlkTx9v0FagavTRIsL6CKL\nDc9aPidFKtGLzyidHhHwO0J0iCHQ9JxL1cnzHr6UzdvRXOhlJsIwgbeCHpAE\nBnlTiKgaa6nqL7nmfGrb2H42RbOhOb1C6QxYzdlxvVUyFn3grx/oBqPxzfjD\nN0ZeGMFQcZ0puPCSGvpdoLtU1yuH0jndAR/tqcbJdn8IACYqJ9OVrOBOxp0V\nqnDI\r\n=6sZ+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEQkYsm3s9LCYhhwvkFoLOpDBWqqwqzO4od4KL3BVYVcAiEA3RC80l3Gaa8MyOB2LP3Mly4YhYEEppo2UKEJj/37114="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.62_1573454319503_0.10910827245822174"},"_hasShrinkwrap":false},"0.10.10-alpha.63":{"name":"@react-ssr/express","version":"0.10.10-alpha.63","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.63+5e67e91"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"5e67e919f2dc415e04f481086c0decea77632974","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.63","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-8AkP+vI+QeV0HYsVofZbvXUGG5gS2vyPgFxNu4xh3K6zlxVUi8Ie0kaT8WoQk1V1n6knvECZ3pHoTHlLj2sZ5A==","shasum":"f7d8ee62ceabf8b83828a1254f2d2631c3ddeccf","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.63.tgz","fileCount":7,"unpackedSize":12401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyR+ZCRA9TVsSAnZWagAAy9MP/0xy12/8yp3GOvO/fWhY\nmwOzfs6+2yspX3evrbSHMrFFsRHGWizr/iXAPj3Ll+T4yK+H5m/G9pnAtdQh\nLtuFCPvX9LtoE0wq6OX93kw+gAFejyEqByjU7aTZGT9kETuMImNQa24JX6mb\nZZQg4wqjS6C90qCF6PDJrlTYfcsKJ2s7i8/jAykj3iQHHsI/Dr+lSJ5bxdae\nucEERSN5IXcsxGl7ZmscGr4ficbqOtiYk0oJNyFtZy+O6eWVkMp0K1N4BRNP\nt2eQm0O/g7Kv5sN7VOtxzQpCDfwOOie2oA8C5neyrvLacMTPebZHm2eUHKII\n8V+CaaRFYbqN6OCxuNWkm7fmgRUDRJjOni6BWMSnUxvCzAF7t4Kn51aKFsQv\ncOEkPi8lRtSgx6XcP2dflyRUdtSc8rMweuYFjS/sWtAXKNTQjRh3OKLhmny/\n3vhU5bSLqTVwaU+JWyYbAQ1YYrbktp86Ze2a5eb6WcD69uBzzrHpzkXOWnJV\n4AjoqZKCN2qUW8u6H3GYZnSB6pjRsGU5sOCRCG5t2x+71sEm0/rYz2duYgW8\nuk8ibLblHX0YRrxLI7n9yxmzMWhZCN6UYzNEbY6NrvGxRa7/fEnOLvS/4YWq\nw0C2h+/ehYxf3Tei+v5toRkrhwg+AudUwwNq1ioVlFeJ5OUTKYIhgGoViXq5\n0t+y\r\n=UHPL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD05UpC8os7qEFKVfHkLLL6lQj/xhC09dp4vG/+T6eLeQIgFvRbE6vTE+B2uIpfyrW4MN0wf9I6nBKDklvt9x/yO/Q="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.63_1573461912864_0.020669264725961423"},"_hasShrinkwrap":false},"0.10.10-alpha.64":{"name":"@react-ssr/express","version":"0.10.10-alpha.64","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.64+5b7438d"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"5b7438dfcd26ce2b1e7de48e21ce9f8c50539cbf","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.64","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-L6R2u7WxTWLELi0MtASliMvhurleQ6aC1NsrwnVkolbSprDVIxgp5GmG7IIGwEaXGcMOYvyCnXGCtC1UdUTtfw==","shasum":"44d7669be04e25539de2e6ee50d6b8e522933cd8","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.64.tgz","fileCount":7,"unpackedSize":12401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdySBHCRA9TVsSAnZWagAAO0AP/2eS02vB1BatYoZuto6S\nkbvDE4lp4LKtGkp7xUtGxOwH+noRgoXaxo3QNVL7gTNVCqpE5jotPXhUm4gg\ncMgNwzWnlkGV4rPzqkDNEfzIRs/5AP14iUpI4nth5C8j/ZyEbq7v/2UB2j0o\nmbEFrucl+KPBnY4QayCQjiHxJxNR46zoyHI52g5shF9jgo/MvtsUHoahCkDM\nms3rBZ8BMGyiZNmzOSg8j28Kq71HqYzgXttl6BUuiEMBzW3VgzaMRWWAKR1L\n3pGk7Bu4XOOXJIZeCydMDNrPTvZrZPoBm2fAC4tHUGcEZjuEm4n+d5+4XLV/\nbVh4E9Lojnft8EdBHMVJZDojh7tTtUHRiQrUq3jEtaOfVoI8Ai18KmtvilfX\ncMOjk/dLZ10wIXUknjd3a4IzAyO0j6eHnDXLNYbMEntDrwgPkuVvVhIbQWVq\nRVSEbF82Wj6aw4McA+0Z6Ir/tGyXn9sfxjL406gl5LGRtlWKegbnJGr4g+db\n4BS8AV5vrJuwkqMhY81hnG4ywRh5EA/0FiMwral0+AsrxxDwV0PTZWfF2eCi\nBwGWdFDde9ZoS/EjDW4Bw1aVNuZ+ixliFBv4yiHcz9UiUvwiTS7lqhOEfaSI\nfZyRD1Q2vZXmh54ZBRUn/XgFzimENHfBqfwgCQtgwGfY2g29Z6yEz8j6E/8V\n1Nze\r\n=s5F/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDVBbIrKFRnLgiDd3RxBHPh5o/9DjMzPvfgSQAR0UQlRAiAwE86Eev0SZLHvT9O6seYEUJXC1Df2vfo8fvJEcZgqJg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.64_1573462086625_0.37302423960103637"},"_hasShrinkwrap":false},"0.10.10-alpha.65":{"name":"@react-ssr/express","version":"0.10.10-alpha.65","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.65+6991335"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"69913358bd136858b92a28b5498984bd18533c2b","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.65","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-OLgaGFfxgpJEIQ3NmMXPmYvYtBchl2g5pth5oCiDOHUKU41n/eurG1eMJHMk3meNFawAZfYb8i4aFIxrk0A80Q==","shasum":"a4e7dbdfd2c92d26b94791a4857cc915435d9516","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.65.tgz","fileCount":7,"unpackedSize":12401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdySDOCRA9TVsSAnZWagAAuJwP/RB//S2mLO0FzPRIcbr9\naXxGElDpnNVE+S5ue4N+9sTgD/L3SK4wshh+T30a3SeooOR4ICCizfem+NDa\nSkq7ivPEqm1rgV4kPqJTSndrFNzhdkxiG7cWfadEJwSmuPcmXOkECuyHN6IY\nJjL1G0jwKbDdE9Co1Fyn4/J3DZZ4V/mWAvYd7wJnuDzAHhl04g7c3ZtIIS2C\nRpRS7LgK+G3KzeQqXr9BGPAZ7BqZyGXI5yFzBBK5QPIRVniJbu7QXAx6fYzE\nQ5zJAKydkqg16PMUj8LXj4KpzvI8HdceemmoKhwUmr7DPTFXjq58btLSZyi3\nG24KFPrRzZ3FYuj8IIgpD5QzoIMY308zmUfiO/T0au+2gUe/qAWejoVLO54S\nSW6cadzyeogFPlEATmWeHo40fD2fOYDXvY4LTlaDWgpiC4HifSf+yeBxmIYZ\nwN4/4MspNCUCw7zCNte3Ivrv7v0RhOiE31zCBrOV4oFN7UxUNp4XXR2YyZd/\n4xRCExDLZSb+6D9Ku883B8BUq5zce0gacAiBf8kM+Ane1A/zVwTd+55KxjTz\nJGmR85aH/qXVfTIBky+gvVNgy1HFmgZnAsDjBWYle51JOZ2KdSpeahURxdWk\n4PmOM9RGTjZWt9S1uy5Si/80n3NjldfIcrhdFa0q1QPYSiWFDntPN2IylkWs\nZ600\r\n=r14y\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA0k2zjt8tcRREQQIXtDHkZOv7unUezUqEu/4nF0d46wAiEAzAzznVoCXd2LxabFW1F2283Lz5XCJEv5sxde0h3lEd0="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.65_1573462221635_0.45694563134039545"},"_hasShrinkwrap":false},"0.10.10-alpha.66":{"name":"@react-ssr/express","version":"0.10.10-alpha.66","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.66+49fdf3f"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"49fdf3f8daaceb621f1969967bae963f02145236","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.66","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-IgUdmRuUYBngKvzELyNzLm43VR6ImZ09vqJ3WfX7Ard6sqyOvjyVw1gSI/L4DaoRh+M88xWbJwRGso303YpGLg==","shasum":"4a041583d8e91e3f07b126885b1e09965996450a","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.66.tgz","fileCount":7,"unpackedSize":12401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdySFuCRA9TVsSAnZWagAA0zEP/ifXKbmcSMlVZ+JT4u/r\nsbg2bOC9t6yfiDrb33wlOJebs4arwBasZSxZvqb+6mmejv8kP7fvv/8UUtgC\nllcMxH353Yfp4viUknZBy4/EnIk6Ss1kns/0YD4ptSqylOOzJPciBdawfNNn\nTMa8roW88Te9LeCenOpuNQ275X+VGpl4LeJb6A19isf3dJxyrpr2AX+papNk\nOAFAYj8vVuFVqVBHcAcE3yGlZZlrvVvVK3jgeEJAD5kppoRUVB0PjFjJyYlU\nY+SCWKf9V0qcPoymKSM4c2KNlff8VTbrWdNPkToR5YKEyWaElna0oOOYR2G+\nPRGL+xs9k9Zgb7ZjNCButdXrq8qnS2PAOLMf30uWprKbfR85Ffn5DUBJnudx\nd2RrnuUesUj9twqGfYeYdYnEK3NFQ5xG/IN025T7Vz8vMp19Ww1+8rlpnRo9\nGMipTj0VNvFeoPN0F1GPDL8Hln8KgiDrb4iN5ZU/nFsCWHhfb2XXC+zuLOQX\nBclxyq0BnjMY9df6ByfnSOeL2cIFU8enFAR2KDyTksKyJcNPPmmDwdx6KnM5\noBwdX1gFz7SaSOvMfLvehJ1zqFFFSK3lvkztiKNEikYQxh9NT/kBDTP2s8MH\nCydUI9GHYrO700U3zQkAd4kZwt7s/rywxXcSvO/zcWfNleI3P74OBQFcYuH0\nXbJB\r\n=yRrN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICA4G1zfoaakad94rvYIBwhqHHfGP4VMWOWpc0FdyNPuAiEAkQjIF82ExGKcIUyXWh+GgrV0UKAPLT14fvP2Xa0QVJY="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.66_1573462382411_0.9235032827748375"},"_hasShrinkwrap":false},"0.10.10-alpha.67":{"name":"@react-ssr/express","version":"0.10.10-alpha.67","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.67+9960d9a"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"9960d9af0f18f25e7bea73a801e12b1ff1422fad","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.67","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-CnW9wlRqKjvAr/IKXtRZEQnl4uRQQQu/AiOMR4NTY840Y6saVjXwFKeh3GKn/omy/l/Oo7k3wNAc7Dyl6/EKbQ==","shasum":"2e1280334f8966f93d1fac44136502532752eca8","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.67.tgz","fileCount":7,"unpackedSize":12401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdySKLCRA9TVsSAnZWagAAUYEP/ApXCqVuB9VnHFS7KfE3\n758XW9buiGes86YG9O11qwLkP1dgfwDPVpFj1MxIhlZ45EyJEphwlT90KV1o\nNBxOmFMJYq+ZWQpnDSAxg749iguta/mQ6XpMZRctOMQM7ucwbtvIELUHP8pn\nvIh7Eb+kQeXPkXlnFpVUCmvz+S6p7/aSSVI1bl8spffiUsMPpr1AUCQkd5Wz\nSi8yun/aXF2bfEVNTlE7KZG2wS1Xm4HMrXtnfJ3jt7SGefZtg0hYP3m5yDDF\noj9kMNchadvZs2RVJpXPYDcsvxCbAgqP3dc8W4yKA8cThFjpcxG0r0T4YEUk\n6jsT7WkzmaUt/sokX5nRJBOoU6Ll4vBpep6OipTtrG2EcfmH5cjCTImeTT6c\nyJ5R6BvATeAL3sCL0bfJJg7mjr4Gfo/Bh4Ao2+JAilKz9t4sRdWBhdhtUOjP\n9cyfvNDMqSZrbgY8mKCavgEbNL01fbh0lw0dGUNuGXrAJ9BnrQPTn64m1u8K\npleYAU/hKqjSZfjY035BlTM6aVYYuO1vWRnuvZQNI0GeevHVLE8cOJ4m45I6\n+pEivzTyFy4/bzHCJwBhbD53H6C/PPYoBpb7nixznUvWBjH/pGKtiudcYHYl\n6nWqzqLE/LmbLPhVQEQixWU/tvDvWXoCKvyTNfKPm+aPzBKjMFD+zX9myMfM\nXA6r\r\n=WkSa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAqQAxuO6ZxoHwzaBXnTocv/v9nLQXCB+u/xkXdJNksGAiEAmfD5XOpWb0TOQsb2t2uIHKyaBwRKWCmLhtH/c6yy7Bw="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.67_1573462666617_0.050682738303313934"},"_hasShrinkwrap":false},"0.10.10-alpha.68":{"name":"@react-ssr/express","version":"0.10.10-alpha.68","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.68+1178d0c"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"1178d0c3a9227e51085da3b0062803af07407c53","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.68","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-DCA8Zi4l7lw/x2vzPI/Za3Dgr7G/iuxh/+BQ7FXOyf+8tR6Lq8Cec9fayC2l3jnslF6LejZV4cQO4djzY+lvVA==","shasum":"eb76809d258761ba7a0584bfdd71bb347cc83c3e","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.68.tgz","fileCount":7,"unpackedSize":12401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdySMDCRA9TVsSAnZWagAArE4P/AtlCEKRcVSKL/GNXb1r\nxVfHKg0krHL5tOpJaFkJF09HPaqqn7uka0YOk7kFZWNXXOCSYotRpf4mD+II\nYU3AbRibPQ6WNecwZPNtfaaB2kY/dMb4CGTlwRFkwNGQ3cSKU0GE0csgQeIv\nHj6EsPeFt/K1Z+LYWoKZgVfGaHEDzQjHSI7g+wvV4vtt96erF5w++PH8iFi5\n5H4QJ9GkrhrH2xSLeMqIUTB4Uo7cNm4h7w02OFyO5Cf7P3DVBbIOlzy9YO+h\n84HIRox3seo6KsQ/Hns69AvR1rJDGWubMKY1Y77ypdtflcOaKGRz+lAwv9xI\nsfNbfS/O211kGfDBcjcyO7Qw1Kg6QUf3luv6z3pSw8Su1544weDS2Hq+SKES\nkJ5A5kvuE8T+kgMOV91z3lkOHOryBM/qBW4O4fb4oGMW049Cf/ceZhUJNWDN\noBc59svcxDMoCurasxJQhh2Uz2muEjfccvjb4Zvx9vf8vNCwpPIKhFYhHXPu\no/jkdgIBYUwF2jX0u5gLW7mPAEFT5UVLwulMnY8mTmPXkmuSu1akir1y3nWw\nlprUhr2YE/RZmowcPuc0cxg04ykg0OPeTqDhSBW7tBqgKX0DJ7Cc+mO2g8EJ\n496WTFl52PLdcC46KGHS3klT467BaA8zZJ0poEd+ncxxRuUKRrEL58hDhoOk\nteCw\r\n=HFcq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCwHV5TykMssnx+vpbXfWXa9NkZPwNysO0JBM1YXbrZpQIhAJH6SdTLkkfAuNPOpplWSSlVOeoFIqT/c2rNcGNGuQOz"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.68_1573462786988_0.021015451382399686"},"_hasShrinkwrap":false},"0.10.10-alpha.69":{"name":"@react-ssr/express","version":"0.10.10-alpha.69","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.69+18061a8"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"18061a825e3f50b53e47ea2c12cf60e1bbaefd9d","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.69","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-krvFPok0Ye0xoxwGtE8wyag1joMIMrxlguIEmrHbglzCd56kigDzihpIA82dTTAjlTO4F9WbBc+YfphBB/GWDw==","shasum":"f77099b1fc2450199e6ffd90e2624f8ab96c7bd1","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.69.tgz","fileCount":7,"unpackedSize":12401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdySRMCRA9TVsSAnZWagAAsF8P/2URiPQYkKRJbaXTkLU7\nhi3MZGuyJ6F9ljYQbKihG5alREB92j6UGLL7AktSihS0M4/DrkMhqW9I6v0a\nAgX+GRM72dykKT2X+3A8VexOvgCg3AiK6Ad73tyrvw6PNRdnko40E0/7oOQI\nyuKsJpZT7jvegTdBTy7mV2ax6QVX1mg4j8lwJ3HLTvw5CKRzEXsNcHkb4CJZ\n5x9dYrGzGWt1oANuLa6KyxlLZupmpVMyxtK4Yjb99Qh6f3gCLu5mIoQ/kyGa\nsBMNs5cIG77iRt6S5e8GQREmoSRvnXd4uY87jSdUNMIsE3NlPKbX4PJvteOA\nHII6ggN/wOBfHAJ7Kze+vlMCfU/YdY37prFr7J+xGBvFk7XhQ8kPu0BulDeU\nZKppFsWCrbaiPHIi8MdXKUIZ9Ob6P7ZmIrWx5y7vR+YPkIIw0jVrPLYwkkVE\nkjatOqziX9GQVepdRmx1O/5aKLkPdYY+2xUDO1V+m3TJkyakbVvCjiOcLl0W\nVX2BCo0Bb2f9YMmqjwRYQXtgvtwCWoBAKG7p4YgCy7uhCKmLRkyHigMU0GLv\n+rk3C1mVLiQMpH2RqAZtgfe6T9hbnI5bxcufOO3OFgMYzRreB4gLbMymjbUc\nlzzJ5rSyQ3zj1VMuLjc8nkBm2M6RufNW6EMih8JL9I0oMyPDWL75Xh2hIlDr\nmOZG\r\n=6maB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGe5QN0TMO7zk/tONCAlOXbKPxjNGMTnk8V4/Rqj3MsFAiEAkt2ZazeCsapp6ZPTvtpjI1Ik53U6FT1G1BTxuuHRcwg="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.69_1573463116173_0.7512002033553367"},"_hasShrinkwrap":false},"0.10.10-alpha.70":{"name":"@react-ssr/express","version":"0.10.10-alpha.70","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.70+aba2a3b"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"aba2a3b433252e02f3f119fdd4ef720ff3a99438","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.70","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Z+tqkjv2vpHiZzKYJxr6kIHF4l1B1cghSZVIAPxVNC9Ac7uEIkvPPyAT/cXIGmuivb3V/Qg3pvFS164QMQe4ng==","shasum":"75b242787ca85846cbcb3165144700bccb1ca471","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.70.tgz","fileCount":7,"unpackedSize":12401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdySXmCRA9TVsSAnZWagAAHIsQAI2CqXNQ7+8Q+B3xK8eV\nhLUJj3ayG6T9m0f86g2ePz6acnzV+6373ajS1s4jyyEnTyw24ceRcj3zrnyj\n6n4en82nGGSwe/LgGRZSzzhw+3ATUHIM9z1v5RLSqOdftxJfVVl54gNQBAdd\nNXtZD+VzO812TikibLXkQ08RR8XYlqAdmeRt3uD1VSsJ3kFBNR1kEfnvs/Pn\nkecZ+4HPD+QCA2JhYvdiukJnYuNwpa55NrJyqaiuTAB7y0hoU4IAef24WanT\nI8doceOVd2eBbedh7cofwC2Z2HaG+0ATk24cAWnbOs/PTHNR2sMqtZm/0ZiM\njk7C6Jdn9/TFeok1NgEZ48aJ6sKF4nzappAVXVTG8g5LdzATuZXOOKA2DZub\nKYO0PtvZz7g+jfeQY3urpt6qOEreXBRoPy8IGg0ym3xdgoXDm8KUI02r8ORn\nxO89N315Ndwvn3oiXT7SNGmggl7Br6YBf5wuQUeYnMwIGFqq/Sq2goFPVKjm\nL0wtt6c8s0AK+3pQy/DNJYveGgRkxDLfGRsTPUzhD2an++b50sIFMZtb8cet\n9IBSD85Acud8yDtkK6lqU77eQWh8Z4MTbHOoCf/0p+rasN2rykZPErtWpufT\nvAtmN4EYft5do8OzRzXSR3Pri7WzASvvXD8ZuT9fUGrTw+O6xIwRGVjv9tIQ\ng1SM\r\n=XIBG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB1zRbHHNNgbAXJfURbb9pl9jCEr0C0wbnLQXC6h2MxtAiAArPLomFrOYl9ntVRAzhrKAib14RkeFpcYWWjlEiZDqA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.70_1573463526127_0.9413828053387949"},"_hasShrinkwrap":false},"0.10.10-alpha.71":{"name":"@react-ssr/express","version":"0.10.10-alpha.71","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.71+e60108a"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"e60108a9aa3b6d40db38aab8bc8c386d93c276bd","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.71","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-AtQTuHfI7laQJA7Fn0iKfpRHhsZAloQKnIzIak3rcBiTsdAOKE2ux8tICx3k1WIG9+CSPtpTonw65ypW+jC9tQ==","shasum":"322307f34d6d4fc2aaed5184b3b002adb5ed9a42","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.71.tgz","fileCount":7,"unpackedSize":12401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdySkDCRA9TVsSAnZWagAAOKUP/100K/qner4vZsdLLgeB\n2n88NIOX6hUW5a7zKwqZcI1zo7UZo0YfKrhXu2ZlzapvNFBxnz/wNUTqT+tj\nwF4+sAvuFHFwjtZ3NcRHek/d1su/j3Qsfn0lBErVXUJeDNZqQkKpRNfdUePg\nuncRFevT8BPkEkOkbQpeM6J3CqzSN6PP6mewerNY81oWmGtYPzZE0gCjk46o\ncNWs8hk9nzWBX5b+IUNxHbb+kEVzK8NLiTeLX2hFPEUnDmjPDS/aKYOh8TTG\nEzZsLtcCUnPV8q9QcW5Rtjq8UCR+K8ys8N9gukkHO1doVXTWo7zQtoCZ185v\nfzsarRkBXyZI+4mtoy615ne6m2FlIXdMXPwRph5iPJu4nrjQrQqUmbWx0mJS\n1iEnoRYxNepZnPnHPo/9/KIUHQ3/+NIGWZwANhnS5LkIrKU5KrB6HsgSwJkB\nQfe9wXU8xm+iAjYGdAsPvlTe9y1xSmajrQcnB3u9LuTXc9G2XyK5ON56H6zN\nYQd/REe0cCVnSkW2X9y71PxHhd9fBTNswbhuqy0yQ7WBfrzhePMqfFSJzo/Z\nRUfmuaNjbsINgsrVAhVtkWLn/C3bqsOzGLMSsG3SzmjsxIU7rb3+ztENwpbB\n6LSKstKWRew8JK6DinAEit9GgmrTK5bYFraswRgbIdhklaLKbTqBTdFk0JkV\nxcS8\r\n=Iota\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCZbYLbAw57USz66FswXo22qznLs+9kN2hDnWcN+TKgsgIhANzQOxTGnPKXT+iD6xzmPHRqLFFl3dMxVaNQcNumu8UW"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.71_1573464322518_0.8620492323812006"},"_hasShrinkwrap":false},"0.10.10-alpha.72":{"name":"@react-ssr/express","version":"0.10.10-alpha.72","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.72+6f261bc"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"6f261bc93f91be67305db2232b28c19b0a847e12","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.72","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-IkRz8jQahGuIgX2LLx1xfxuuqlMG7Zw1dgIhwzQdPgeci1EVvNy7JO6nCAWelQyLNZ/aMJWDvjHBMuYuEGAQ8g==","shasum":"8c5bd0a88416732164bcf00d1875edfc651e4424","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.72.tgz","fileCount":7,"unpackedSize":12401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdySsNCRA9TVsSAnZWagAAe30P/3sYzfd6GTa5js54pj27\no/A7+2InwuJe7tGANoBPRF8brNYCAR7wPOZ4RxitOzFX+xbaEoPFZXpoWA4V\ngGPUWG4kNNXt9gd7mREkNCGcLl1KPYWh70lsEve5tTDIvNxicVMJbbulwrGl\nM7ZibpkZ0WwYyCqLIe+UJm+4V/9sPbnym6BFzsLl6MxvP83LkAKiuP3875Zt\nKiAjoxeWBmnaqVNc/bzJ51SDtxe/FAfHDXnNVuAL7pzdadDEQy9CeH8jGXiO\nvZ/zyDBcRDhb9pSLdzgp8v59MS9lrxHqC5ln2igFzojaRnQXjDFSjB/w8ylU\nlvzgWofAUuyoao7+ZGOAVwX/txO8E5F1aHnsxhBynuWkFrUW+qu3IZN7lDTV\n4iGlWc7GwZXkVQz2sl9UJQs5ktBXB+qo6llrwF8JF8JIKe7uSuf8kWzhVKUA\nIbsnR7Gkb8Y7tq0ejEXfUfnj4N0ThX99DYi4qWrpKYTlI00Q/WiyP/8U4RY8\ndxZBXyxRxqCj3Kuwg5rtd1/9BYzOFABoU0cUpNyEBElRhxmbz5FpLxMToTzB\nOqf/AGYEsA3x6Kf+7CE5sbLsqHP11WrYnO3SD036qH4GOzJpXvX9nrVhbm9+\nAwyuKBW5mxtrQxlRFGvZs4QD+t7q7SOxt/68lbFrqjHET3roVy3MrCAgcdVU\nsA+M\r\n=x2W7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICzLN3ouxIlq8CggwV8lfl1+nfiRSp5M01p51ZJyj97VAiAH4y0ouubQ4mmj5F70oY2pYqPj1CmYIE6mO0RBVkrlgg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.72_1573464844547_0.8312263743167294"},"_hasShrinkwrap":false},"0.10.10-alpha.73":{"name":"@react-ssr/express","version":"0.10.10-alpha.73","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.73+ece11da"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"ece11da56f3fee8b7d3e4beb97cecdf9c521621b","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.73","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-fv4Sm34akg9txFyO4NNvisYUY5SUHCEjo9nUu7rlSV97bNlmx4W4bh/FoEojZF7cr8I3nhq5EZ2r/4dPQGXaKw==","shasum":"7d890c6606a8e30dbda83634e3b039fd3c33e8cb","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.73.tgz","fileCount":7,"unpackedSize":12401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdySxfCRA9TVsSAnZWagAA3DcP/1Eobl7TkB5pSu/irEHx\ntNuOK1a1ci2i/xp/emdi7okgbdASRCUeI4gHLb6VnbMEH05iffqlgxc/f+O6\nGqv2g1hJjl3YR1pKNvdzfe+MU+tlQ1T1aamZAuHuqsAPyrFmGZTsM841LhrH\njkQ+7VP99Tr2HgUAsAjUsCmSYl8mcDcAcXAYfJWermGMB0Dndo/NJUV98d0W\ndquKz6VUU/iBCe7lwncCqE2ZMS4ZE7KHL+njMNBrAgwR8PKPaJCNP1U9RWTD\nK9UqMjdtBDVso+GjlmZr1FEHTPp/dQvzVoUfDOs/aaa1buKHwMFZeJmaxw05\nR2D38llk0rp33Y9XKsQ/Vp7ZVcqGmLRfJJusmFBFM8v1yCPkbOqAjzshTeVe\nDb0L2HEh6Nej4QnIIUVBC6v41XZdEdHGaUsuI4Vr/9vPWMsL5d7iAyY9ATTE\n0QpEsq4lS6tYU0dc3ydSKbstd1tJ8Bw7MCKWOQhq/iM6pLavPWkWcMw2CHk9\n0TNEftrR3hXzROvpbvyrNj7Y9Etnm4zArldI7bcm3GWcIkjgsPycfe9OobVP\nIQp1UGYcTzD4Rx7VUO3NlJasaez0LGr6b6MmEQLje0Lyp3xvlZi4k4dehz8w\nQkvx0ZUTE//MC9pfEPRZEiNoxgOXaB90bHMSGfQS7d1jAiUAAlRPF9xVeRLw\nBbF0\r\n=2Hok\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDn04PdG0+J36KSS3rBYaDkQGs1ZBzuFvACAd5jbgH3AQIhAPIefVSbK8wwVQVvZy5sr8BczUVkf0Ea6FsorDARVkX2"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.73_1573465183263_0.21327772220773067"},"_hasShrinkwrap":false},"0.10.10-alpha.74":{"name":"@react-ssr/express","version":"0.10.10-alpha.74","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.74+a22ff0a"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"a22ff0a356bb0ca019e9be5fdc8c5644284d7cf7","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.74","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-iAGJAUrzTJdH+CibsFPcWazihkW5kz2zAVeW+qAsekDhu6IgikDWtMuEPsUqF3uovopK/otcZau1Ye7iLqYjVw==","shasum":"d212fb8a5d2bc6e0cd846049f5740bf52a6d51af","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.74.tgz","fileCount":7,"unpackedSize":12401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdySywCRA9TVsSAnZWagAAM40P/1c1ax8UrvKCNTfMGgm0\naEjUct8UceMmBadou26KzaewHLIsxax92N+feJ1KCRASTkvRQTswOB4Znhol\nsGP1Udesa8Q3lSiMO4IcSPw9bJLmnaA5XrD9iJljY9sbMSojEhXwaf0APXF5\nJLbS1bzSSPNC0cJ0fHlfMlWgWMpW6uYiZYfvUEx+ctx2MgmaNdhUI2aThU4C\nn3WJX/2JzUhfArjVZ8RTZbXvhE6d1EyozLwPBMmgExUXn2EjJAaEgugqs7Us\nCjWaxKcBW9ghr97DkX+oWt27BPJ20IcvJDj4GhOmeFLMTtvrtwMKQMd0EpJ4\nw/Lyy3qVxpFWMJebfdoSX75KI07nyFedt1ay6nKnnH9U2hnFEN/3qcaHabp5\nkq6k+91OaXunhiLLfgRt91ra/LfMCCjwTCKWshOYM8DgMWWMswHmsJRkvJZZ\nz1eOPIIFiGoYUb70Z+ughw2zQVNbf1XKSEny2QM5oHWDIMHdfZW0Wi7ZEyE6\ngcdcOSQvPn0QJO7V/ywZWF+Ap89VVIKBS+jrD5HksagqueLjNjRR1+ZNx+4C\nRR4XAVZYCD+MQPdXFdLo32UOdzLwB6pc9RGGprual9nzW8M9m95EpPQ1nEqk\nCIdiLneVdlTGaBtbhN+Q+MZ5yPRo1RdTG3c7cvfvhSrnQLnE4PEqK/iFsE5w\nOdA7\r\n=00xh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCiSTukzF7Cr/9AiNZAVWmR7n86FKB0y7mMLxCLcNTXigIhAKd/C2Nwru5tAzeX1P6EyTYQ1YluWUjE6w6ETSTORZp+"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.74_1573465264133_0.5137439653341362"},"_hasShrinkwrap":false},"0.10.10-alpha.75":{"name":"@react-ssr/express","version":"0.10.10-alpha.75","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.75+0a66b84"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"0a66b846315914555e96e13a0ffe7aa6b3298f33","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.75","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-jDIr1jZUyvNfMRytQ01uG0WPVu/afyRF3MjgYn14WPkNbXUEE33M62mUuEeR2vfSsstJNemT7WPhXtJxjUGLuQ==","shasum":"92c88d56399c9e6ebc5e5e041747537d6b32e829","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.75.tgz","fileCount":7,"unpackedSize":12401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyS+xCRA9TVsSAnZWagAAsLYP/RUh2aA1s/W07z1LElsX\n5NDq96dPUchEfyOJvd2+yvOjZVAM6PCrKnEsupP9tf9kWU4fcsFSnKf78L2q\ndWwmRuhYYygZXLX46nmhT8zHYbxFyO8QzY4KXRVIUT5lVPTs75qnd/JzJ9YR\nP3st3qAW547liKsZ1VD1M14A/lL0DhxITJSaxzdVej7h/tHcQOr9xe8MA7w8\nklq9dHt/G+svE8h/J2RH07r2A4SEjo/BNW0D/V1rkLOShHXdZlxuabjQXhI9\nIkaaEbpVUtMt+S9S2NgfnSq5M9938hUvoffG/WfKv9pJIKJFJkijRySvivYY\nRgJSMpqJ8ulel2HaOv3Pct3HSNZzh48AK0z0Rkm7S3lwhYQ+tC4rkz/ea3UE\nb4c8hs7L2XM6qnbwDi+uX9dGfKMwCi95SV9hohAs4vaIcxsfip8EbuW0Mrt9\nfgie8A5Iiymc3I7UXZOFiWP3ZyWox1M2UAdaNXGVYeyRlOGkDDfOHXeOGawy\naEhLvr9lb+0Ezqpp8fQaMhvjI8MEv3AV6hqWe3AHho6xgXFzH5Pj1bgr4+Xq\nxAkpr0zjaCyoJP5RSCaSA4+4BiCa5vgPOVQEgpdkOaPVi3V8KVkmLF6HHQ5E\nyTqToVqh/k1wf0lxxIcHTz0+gd8XZ5lNEQmMEPT2Q3E3Fxrv8WOiTL5vIrGO\nKLxv\r\n=NiRJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDLWZNhE2Tn57+mH5FuF6CsPysMrtJ5oBJIYlEpQOBDEAIgFYHYelYkeyRkYgTgq+2cBu7HSlBk8AGCiqWKR/kHqhk="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.75_1573466032585_0.6050984370796704"},"_hasShrinkwrap":false},"0.10.10-alpha.76":{"name":"@react-ssr/express","version":"0.10.10-alpha.76","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.76+706979d"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"706979d23c7503fecda88d6e491cd264c68cb54c","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.76","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-zlOajGo+FkWbGFYgSEJJ+y1fe4HZ0H3vYoSNfRHhggmhkZdIOmKvgKeFi9qp4BU/z1zJAqEMEIukuaK6B7anZg==","shasum":"726061ea0b7c73dafc4b50371fc89d85d7909380","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.76.tgz","fileCount":7,"unpackedSize":12401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyTEACRA9TVsSAnZWagAA8L8P/3AphJxDymyHRuFI1kkp\n4Yq0CPQCGEgNgzfwPbjFkcvhr/7XbuMxTjl3UhjCyOs6f9ftvN+XqBcoWDWq\nr0cALTe3IA2Cbl1eUGCcfacWbxjQfhgYsbXENUoU4EadOUb/dJRpam6uB4WG\nj0BXv3z/Z0G2tF1KQyPbRyV0HQzucAvUaf5urBlMsJS6JJ3yltkQf03PJ2Ec\ncr/twVsLxJcKf+Q0TYR4Qw1DtMUrg7NUi8d6cUd+UNwlnWLHbpBGkUGUQn1S\nLw1KMyPel1C/AqIqn/FmqDgzdiqDnTKOW6RUNZgWzFOP3unoz1GQbbI3et5e\nb8OaizBWY5aUTyQ80NtSydST/Fd2niPJwVUO0F6gwqmgkryPh7r04CMXZvB7\npkrjpEGgrJ4pkHT+AWr8oJxXM4dgKE+/kqxCdFumgMetpbLy8UeugJCfyPST\nIU/II+wC5YcQSHmxPPqXa/SYFhEZQ546N9JPXIhS6B7ZMS/o1aqAS/imk6mY\ncni12kLHGnFwFq5Tv1xRUcpme3WQq1eKo+ziAlfJDwXUzHWQ/logiFCsXVMe\nROj88JcSFlB0CKWSgKkmlBUKuqJcFLTNtvfS/LyVhik+uFtjjyoE3J49hCrL\nfU5ZD3hQVtaeiehtBfjo3GcsRN5geqbNoVfaH5wfEb1/LS51kKyVVr1Ag2vh\n04gf\r\n=TYT+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDoXyRnmgnhZGVuFj0yPdYxjZh6bftb5flaMaN9xnugbAiEA4qq/PKeds/ZFvqtm4n84BjgKTQYPp98TUzgH1/x41OY="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.76_1573466367641_0.21934144173138503"},"_hasShrinkwrap":false},"0.10.10-alpha.77":{"name":"@react-ssr/express","version":"0.10.10-alpha.77","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.77+6e82a81"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"6e82a81881518cfbb36c3055def53830aeb1470f","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.77","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-rfC/R/kRiwYdb/l9jzobJXS58syEt5gQQWi338OAYf0DWdZ09NW+SOqiyfbbp1bMFqbrg/WvRbsj7n07VOxNWg==","shasum":"66cbee5017488b1e6b4a3fbdacda79e68f16bf5d","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.77.tgz","fileCount":7,"unpackedSize":12401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyTMnCRA9TVsSAnZWagAAJfoP/RuVsw1wk51pusHgAGLJ\nOhoVh1An8OqwYrUUARLjMLJ7xrPAf0uDjg259aB3aUQD9eEwF9mU8A1TUK81\ncyacqVb7l2iB5ly61v4jDH9YqIvlaStH57QETWYug75cM1EkihotiJ9o/9Ql\nHXaRW4YfLt8clMy3bVTWf2sfuvbWWQd0r9n4EIr39QVWtoGXm66mDnuMEiwg\nASmmyU6R0n3WjUahDKGiPfB0b8Ws8Taqwb3YJnVmbzLMb1qcVEKQ5QQ+R+lu\nYlkOkaYhyXIJQ9OWrvy8U5gE1Zdor7D9xZAQkQCWix/7fvagk5V0MWc9qysS\ncQoqz5F+VjtGPv5uuC9TGU3q66nOx0ntiIeo7gDnz5iPliR6rKld1074B44q\nD2TNGvOlxhX6h1eEHXrFM4aHiZEAW9VxZz2dJuWvGVa/rOJip628FRDPTZxE\nBl1LkwIoTRqCYkuwZM7qSdECuxHYBX7rTsSNuB4sXx2yLsF/RDyi+06udUCB\nKNPJaGi2Am/jvcn7XmfDyetQnyzu4VQYLDyjh2gFL6eWTGHr39dLoBDMSuDX\nEcObGrTqvc1+T+Sdh4rA4GumesNBftFz9SHu4UuHAgZ13IgS+ZH41V3fvX99\nPg34g9ZLJ6/MrEkGh8uOQfjNnli8ZEQSPch3/P5wO7kopwiaMx3tnhncldJE\ncrvo\r\n=OJKj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDFM2z6wRRbFI02JO7Poa+MGXk/b5Fx9z82KU4oAX+ZtQIgaRpa/nvegsC6hTsLMJzE1V+MrZ2TRpYSsePENLmjYPQ="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.77_1573466919525_0.6068462219976649"},"_hasShrinkwrap":false},"0.10.10-alpha.78":{"name":"@react-ssr/express","version":"0.10.10-alpha.78","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.78+2f04cf3"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"2f04cf32d71c5bf6a7be97414ff2ce0ec1e17b10","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.78","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-yPJjscvoxseedgyayKNwaiKON9QBY8oK7RndhujOoI2rvN6SkAykV94zY+xXs7iWERymncBsaL2LijtBw3Iu4w==","shasum":"2223d34033257cf99d0af7ebeb8608d58c114500","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.78.tgz","fileCount":7,"unpackedSize":12401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyTOgCRA9TVsSAnZWagAANdEP/0Ik4ei8bko43wwYrZtv\nrf9BhBqdrCkQKe41cMx2r0dmEyERvFd85nO5GzcGh1tcN8RN7w7BgkDavBbC\nyj0/yOpLwD2EhvgbzC90eB1foasIfxDbISxc2/2ooaygIUOI8AGD2mUfFxUM\n01lut+9hRYHFVz/FzX3uLBhCSxXzGR/bfGmK8Dtb2aigziEqrF9v9Pxdz0Vl\nXB41CscaKEdMpLKzjGls5P4ifPeiQO5oGhDUPGlI7HZn5QYGlIEw0rk4zxaP\nH181MwKwFD2Okg0mmPhU5POK0CanrFke09X+H+5AGGIo5qc4BdRB+Uy8fCVK\njAFPvwrqNf3hzmlGQl9lxH3mDI9nF5f2c6/Odzycf0qrJTlFOWF6sChk7ycX\nV2PyK3oO73kRsgJSGDE0Lp5+zVRan9A320T2kt30g6LPM3Hn6JCe+LqMyPyQ\nYB2oCbvQJFZCcYVe0nBHfNupTBMfAzdbYeksD/dSAjQkDmRZpjMrX6L3DUxZ\nfUzRkZLwEcCUdkHpKgE2HFihEuIXyVu90hYdwIVoOuCp55c0JWRmMRyEa6JV\nm0RDR/eGYDIKNUDaX/rJoDmsxoAouwBE2as7G1dCktOgBy0YtZwBi5Eik6Ws\nMwz9iO7Jd2okCYSVR8mBsckPJY5BvqtMfY4uw2wT8DEYEs1sBcyvRdZWfXBN\nWNZh\r\n=GKvK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCL7b17Mx8amAiDQK3aTxJWR3mzEPjb5P4geSqH49rECQIhAPf7fYb3mYQu+7BA9CNM1oFyNHLsn4omnOLBWD31HZs8"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.78_1573467039558_0.8701563784515207"},"_hasShrinkwrap":false},"0.10.10-alpha.79":{"name":"@react-ssr/express","version":"0.10.10-alpha.79","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.79+09c4b00"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"09c4b00f7c6c48ac5efed056096385da080f5b73","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.79","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-x7o1qQq+68VOG0HioF6Nq1HQvqtzI1DIVjRHKM5Hx3QDaefacpHZZRTk2yO73e2PBLfOHWf2Keh9Y+QPL9+zMw==","shasum":"746606fc99e3e5ff6ee37bb78b44180668453edf","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.79.tgz","fileCount":7,"unpackedSize":12401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyTQWCRA9TVsSAnZWagAAfUcP/21WXDdtMbnkboVXJzWS\nPFutqfMmdJ42xKKOxoJZxVGHAfYsqDv+r5spR/qRUZlqkFHgGNeXn8l/jAuC\nR+1pkYmfELOusdczZ4P8Yv2YT6jYcQAtbRYTJI9p4UgNOnlGxO+yX/p+FlhB\nSwABjAbnISzCRFy4o17Z34uqawptCRsWHhcWTjvl3b9tTRyVdvGgwftjCYz5\nbQuytQKEkKD3FZwr11/o7cb6ZBmj8EzVRFM8AjKSw868EJ2YHFMme850Dwpi\naGNa4fri3ciIbNgb28HnoOhBhNW3lP2xA3fhl+K205JDOJi1BLqP66uhLnjm\nKnomp4AAE26YoAtNcSWo+dusBLqBS7ArIkMFo65tKgHt8fZyfzoO74KbQm6D\nHM785ghbMqUGFyXbVEHvwMW8Ax5/DfnVGk863+8Eh0qwN+8Sn08V5thlxGPn\nyvJ6+EEe3ib04FN/A/jKGBTrEdu3joqlFG3qDcIjKNPldZylsHJKASr3nHs8\nO/gU9tmMQuCFoBRjXxkTMCsDqSbLCIpvn+Sfw2IWv0pJha+U9Aqi3ADz3JVZ\n313JPgdvgi7dkSVLJymOJ9MOOlzdSPOH52HG6bHXgKNDxXqYR/t2gjnAWBME\ndsT5/C3cWM8mcQD1dsIoumJiEcIRUcxmRI/D+O+QbaOCM/GlisflrE88bXfZ\nDbAA\r\n=I4Cu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCgj6bR7vaONTZRmFur0DJZ/GucVrLbiAAqK8QRmzYc6gIgWib2JarDvOFgaP+A8WSc70ZS7F9jQ+B0QcxB2g6uAVY="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.79_1573467157814_0.08872375647963349"},"_hasShrinkwrap":false},"0.10.10-alpha.80":{"name":"@react-ssr/express","version":"0.10.10-alpha.80","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.80+54311b7"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"54311b71826b69998237f5604447906b845c8ff9","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.80","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-SOBPATST4lAyg26Z+qwUT7zd/oCvhGV2c6n7S7QFmL7wEqUtV0E1qkIwGCnjaTcMs0qOMDafBm2Fms50ApqcrQ==","shasum":"bb7bcaabf1233d899a17bc3e7c9a05c50b92ad6c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.80.tgz","fileCount":7,"unpackedSize":12401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyTTxCRA9TVsSAnZWagAAoNMP/RsUSrP+DRho7a2fg1cU\nen7W9+7Nzs6nRUE1eO5KLmIUlRi263qsRrjL49ZhRKPBBKW6t9gGcku1mNUc\nSFN5qPD8ZhIMgFshbefRxmXPhporKBk6KERgATyA12pgakukNTkg0GL+j5od\n4Y9TcZUOwwqmOuwZAKLDdtIjq1h4eYKE/FOg4LgqOehfN0/xyYT0/tCnColC\npnsdtWhrAg6Fq6KErBfE+Xq5DfQjUWw2dqVYge86SAPXozBZ4MG+xRhM27dB\nHJGmhey5ZjcCFu7jZayO5g3Xo0Xc4zSc9m/n5bSphi3CosWdrMmpzxo0OiB/\nMEGBDl9QHP9F0zeobFClLeX+kiSNDvetKhXtWiaor+qVFZHWfmdnrLjYKKqd\nm/H0d5X5PsPbc+nXa9r2U7eFpx4py2U+ld1fuS3UtSDqL0xUoF5pDgTXH5Ib\nd7eQMvyiJdPfLPDL0vi4NC1EVGUM7T3clvV2M25eQI0y6eQZlH9pUHpNIxF5\n7B0+ccHx4PZTUGeEu9jJsw0UrOOaUOl17gKvz3gnHQJ8BxlYGGCqqLUPgO5L\nzqTSk32GrMtItNqStt05I2RcJ7M9gy6JN8u3ILgPmA6t0NxvMOu4ESGi0KhE\njr9S9lfDxGR7dHIeNd6WHT7kiIvnQ8wbBuwNweMqJdMzBQG6OGGxwMigyma9\nrM9X\r\n=nbLV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC6Uyjg3yVyF716PhH7+MZwxmPK7r76Dv0K6Q1CadPu+QIgJm3+Qe7ArlPtsmMiRpW/j6+lU1KEzQtApTulhlH1Hp0="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.80_1573467377261_0.7224116151355979"},"_hasShrinkwrap":false},"0.10.10-alpha.81":{"name":"@react-ssr/express","version":"0.10.10-alpha.81","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.81+f114bcf"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"f114bcfbab0146813f7b22486d700111fd7594a0","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.81","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-pk/+IKqyCZfr1b5APFMxdV+pKS6ryVxE64WGnXngblHL1jy6SSOSnr5LF+yJltBAbN+8IUytfYI6KoSsmzRNuQ==","shasum":"034effe340ad99a7dd44d32696294047a2f84127","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.81.tgz","fileCount":7,"unpackedSize":12401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyTZJCRA9TVsSAnZWagAAU2IP/28KkIbNm+sPaPfL4Mqa\n2h+33Mu5PhMpM2/7TW8mcTlVTvVTcUP0c70e2WaLEAMVbWjcO6f0CfQGc5PR\n1JN44q5y1qktfrUnri2lvzUk7Mdb/dLAYoYmiei7n43XSDkpcQllGRkVc84b\n4bRMxJZc6mG077ng0Aa+0aiWiT6eLn/z9ffNZsw5qycnCs3gqR8DMgKsyYw0\njcdJ0qghYYBACxOR8zXo/Fjsksgj+gYNgZcWaRebpXM4UI+cw1Wu6+/H6JAq\nvnN3XMv5P50W6OOG3pMp1bBYBSuNg9qFn4pve/px310Dn2KClLQ+BPhZbrjv\nEftubeVQL3Jl+J17sZsZm06/bsS7H8ZVFp5T7iUKlel4Qaa/s/XB6ZKOJum7\nSH6e9TuSy8sTMHJwYw6W+xl93EhmKXO4k8nYX4Di380Jw17E3j006btVOAI8\noZmqHy+bsodXuZsQNgmU26/J16RLGI4wf3b0BbCDTozmUVr3DNYPT9RPRiWG\nZNifetPP0NROC8qBBjZrF++eGSxuKEwu8ew1GPcgz3tB5XwMkygFTgBEgztS\nM/uTs7KtiaQSk4vFTwCYrUnNePF946CC8g3aYa6OvN8RzUQKR8i0s+FUnTwg\n5m1vnw2fVKCyA6/rvPM7n3T7Y3eDjI4FXKa0pW3SRn3ZbWtv78SIP77TWWuy\nJF7g\r\n=pejw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDnYkBr/oA/tN649bNy4opTPNbDNrNStZGiLb+NGNR9rQIgQss+cXWs8ciHoPewv7XZrCVTf8CuuWpnREN2kGSVodY="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.81_1573467720806_0.010725817945217875"},"_hasShrinkwrap":false},"0.10.10-alpha.82":{"name":"@react-ssr/express","version":"0.10.10-alpha.82","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.82+0755be2"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"0755be2eddc81fe877e8107ec97cad01e2d3412f","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.82","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Jxu6XQO9GtZfvlz0kLdmmFY8RX1kVGoaFVPc2TjWrGV2RErFN7GqEVg8cR9wwWkGP9GCv3g/rfUqRTYUmfkRJg==","shasum":"f6b1ef5a2a22923abfc14fb97d438dbf3b9b857e","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.82.tgz","fileCount":7,"unpackedSize":12401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyTc6CRA9TVsSAnZWagAAL/8P/1xo0Ov5pbp7wXQgZIzS\nDKSqbvEzLtfdsXgeG04Q6zppIOY+CIg0Q9Qfx/BMWTJGBuvo9jrw5ffuM6oy\nr9i8yd6ITPe2HnjepkMNBNogK8AjSgQK0M5Mur5hNqyRwwq4C+JF437d+0kI\nRXAci/WoTkARGdbkL8dCyvh8CFlByQPAa6f+ZY88rh7KVbzNky1zWyst63s/\nSRfvIEXjlV+eQD4GtYh9tfUtMq+73jC+A+TvIY53ARiNn60dsCQoPby+YZoR\ndG0GDo05wm7pJBOo2YX3jEA/CwpTWM1BhcT+yzTPlzjIZrmuLJDWN7If6p6c\ncjudH5FWX9h2pI/mRKcQLYOfXRIIgnD8+oF3s05rEGEMPWogPyN3O4uEEKpP\njJBBGFb3pxI0VsmT4OS28vrCvZdlKBjGajaURZT3LdODa7CAxgSIGkwvHLmr\nWRN9bcZWXXYv6gM5Vq9IBpLiQBaBhgNPfg3u38w5PjyGTau14xDwLIN9qm5I\n8TmFuVzaxzQej/yPS2Vw9TN+PNsZUF7vAvEpkHHq0xh1ZIjIQ6f7uadbqhA7\nPg4LytLaaZRXlMSSPwqXPh6lZC6tQohT3OKs6IjamrbfM1QJMwctR0RDxZni\nLbrJjTtYme8EikkiKXvZElv8uxos2SLxvqMneSy9yoiWSADJZTaZpkrbC2bW\ncKiP\r\n=WoKm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDMhHWM8WvTlbFiDJBU5vZlqYhOvdbgrrYqkNz+Qnv7YAiEA0wkIbjh8+y3ABpCrp0oIhPQyV5/1kokWpm7/jlmYnKw="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.82_1573467961789_0.13443148082749978"},"_hasShrinkwrap":false},"0.10.10-alpha.83":{"name":"@react-ssr/express","version":"0.10.10-alpha.83","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.83+4fd4741"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"4fd47417d397e1a2e8ab2a587207e3037baecf34","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.83","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-2U9iQsHKC7hSj6ckslug0ATRpcVKvsZobaSjwPLKoZjghuv/dZdj9XshjwoG/SgUddrqcHTbbUsOJ2ti0VmDhA==","shasum":"1dcf3673060a6bbd9ccd45db39ef9cb873c1a637","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.83.tgz","fileCount":7,"unpackedSize":12401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyTgICRA9TVsSAnZWagAAdfIP/RgUV6SJNRLqb4NrFBkP\ni5+L6EjAqg0Yfi3K7ONcJqv//k1AVmFF2YDqzVxUL2MbNOO/2ngOul2ZfA/N\nTgXazULB0XDzWhIGeM+h9ogz+Vwrj5npLzmakrAkJLBHzcvkEtjKtGGBvyMq\nrG+pDDyC+QXDIr2bAKYaIcrChbOxKquEnJrKE1EfsHq4lIieZnr2gvaqpvgK\ndX30Q4spGxqlRf9YqiZxwqq5R5+FRfa8XdxL8CQozb0HcgirbmrjRYykf+vy\ncBoxbQpQRuwvS/sgW+T7s9wGJ6f194HmDzKz6yw10jXi1LpFAUzrebyOkHOI\n1POB1PDD14xqsUNroT8NL9QrcDCjpa/r85yZSbLnk6s151/QYFX0JeQ8UwLY\nmqs5/ODCkkq4am/Um1HTyPjff7GAyr3QgkdBuwQ1TBhsK3Ym6CeCI+GA2UCf\nu4oVEY0/qnv30rQmDYutVWw8u0/Jml6vd1Xj/f+7dYtUkeOA5nfNpQHTdGPM\nD0QSF2FZFc1/T55zABllk9Ql8Hyi7ot4KI04EW82ERNveWKi5zRPaCSIqpnr\nH3+tf9bIeErc9d80o+hPFMXIdTDo9WkT7xO4y9S30ZNkQ17h+/YLvHg8GD6l\nZrfmnk/8Su66J5sMb/m9aTB0meKkBzm6+j4ybXFeaXf/zy+fN/WZgDyAavaN\nSWNI\r\n=c2Nt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD7hh0X5lg49l62vmBQvgFexchgQWsgUHuzDvXB2kpE6wIgHdlotWAAPY/geTze1floD85SqhAITtvdYES5SlFAmh4="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.83_1573468167457_0.6548767486763631"},"_hasShrinkwrap":false},"0.10.10-alpha.84":{"name":"@react-ssr/express","version":"0.10.10-alpha.84","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.84+a6a181a"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"a6a181ae9997b3afb0d30083ea7dfb06a28359b6","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.84","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-zwL6RAli+ONW9oM1S9tDEgDINGpCnGjE4j8y61cPKsBP+L5ZkuVI11SMcvR4H64PM4LaPN4escp23vV3K2TjeA==","shasum":"fc0cedef59b714c25f28567dcd86b5decc153d8f","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.84.tgz","fileCount":7,"unpackedSize":12401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyTlBCRA9TVsSAnZWagAAmtkP/3Hxgk+AxKN4rg0hil4R\n8qiA/PDz9VXH8mYVIzua5IbtD8TBmIqi6ZINeWGRxUK+tpZPxO3w1C0V09Z/\nFiPMrwe7e8TWjYCY9nZHEpG0rRrFSZNx2WyZmEV9KvofZP7rsvNk5gFPcUpg\ngq5oQYy+r8INf/3o6LW2zx2OECPBoAOxCxYWd46oKd5VRr3mpeGnCgCTR2V3\nrk6pxetppB7pvKUQB5r7+UWTtSAstI8Ivb4S+VtdwJRNpyXAY6wOtFUf/8M+\nW6jIDly908yE0fFNC8+sWh7wkdyHQGNs5qMjeosahz5vo+QWBy5K9taSpJGG\nl8rt0IbGn3NsdpPo6ssqmnyZMHT0KsTKsUXC2dpBJrd+LFY383Y07o3+UDaH\no5Y+LnPTTNR8sm/EV0foEpm6spXu85R8dANPLQqQdxwZbjEiCyAA8BvflRx+\ne3S78oB0MuAjRaZWuk99VtKJyfpsWAhpXdqaPm8GOMV1D+M9662wgAd5Pu/v\n642Nbpah4BrF4CmzBPvCi5Iald+nL28LRdOVp7V3SxNzjedU206vCLEzCRVM\nfWiAeAKjyiIzBjgh7BvkLDA2oMSXquvancTO8gMW3VbOJT9wIkam1XdZ0Ng0\nsECEAR/cPp2dO/4h60KxLpxfuP5RsyL07YEty56tynPTTTT4XeqR2W4cdqil\nlGxT\r\n=nSKo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCIz+2yLsHL2AEYorn8Vab0F82EUTC8j3Y29ZUUn8Q3VQIgUyZJ3dfhQUuz/P0U47osnEh1lmh3urDvKtlAWYOjLCs="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.84_1573468481209_0.6588830347742691"},"_hasShrinkwrap":false},"0.10.10-alpha.85":{"name":"@react-ssr/express","version":"0.10.10-alpha.85","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.85+d5d11da"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"d5d11daf7022b20816ee014f026d058fcf8401e0","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.85","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-VplzjvSUo8G608kpXBxanxFQtQmzCz3XyEAmMKSeLsJHkzAyzof4JUybgDWUNHPsvseq7kIF4U9+I3JMtSkSCQ==","shasum":"bcbce1da0497cc4546ad728651f39e51e6696757","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.85.tgz","fileCount":7,"unpackedSize":12401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyTmpCRA9TVsSAnZWagAApvoP/A/5+0mxptWiRaBrXcdQ\nxnjxebV1bqMIaUhnctuXIN5/gAVODLkMFYiHYP/6PvSPNUIcf81l9ze/mjNd\nW5DdwqMpXWCz6HF+9J5GGj+9024hnNh0OPA5YX/5beyQ8iI23o/tisV2TD+P\nq5XqiD5C/lB/pkKmAuuvnaK0tflnQgXV1ldgMXIqCCLO3iblqaWBFXHV1czo\nhjFTClnmp0NbeKSfSK6jNs/vCQiBHXy9KKiAycSvcLkiqJWLa67T21ImBd1L\nNTdu1mVMsPyGIxWpvzB5FqFQjr/PJsaV+HzsT/qasphSRmPE3i+Osl21J2R6\nnycegL745ApkBRag2SQThmjVm8iKvu21eUJEfClZrnHRPYfUqY2DmU6jFcSI\n4Pn02mn0QJBSdzpBwxIAEQ8fpRdm/TKTsoVDmuL+6IUIFwSU7ZninCNcOEa8\nrhtwHITcTv7usw3evs8l1VXzGEEX3BM4Fh+hF0PBsHlwmjL1TQqx2ro5N/rp\n0qtjBHfQh9GoEYMuFa1mIinCZmur9WDBR+6X6W5BF3FVzt9bKcOo9niezUZ0\nKopBJelzqU9WM1pQnlVKqDJjaktaxm4xxTkisYVnCxTn3VuCkAnKI4ef/7GJ\nFE2q9o0siTRbF3Z9Yk8N6OOE4BAvLcvQL397RxM2pzImSv+HC0KCGrs1VYIn\nfLGV\r\n=NVRj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCtQbO4A/pioLOuTnlQVTPeeONNTXPwyN43VWlIXeyAuwIgLo1nzkRxOEj9m6i00n6anxG/dq6royzjR5EP7sLMh68="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.85_1573468584907_0.011552818660963471"},"_hasShrinkwrap":false},"0.10.10-alpha.86":{"name":"@react-ssr/express","version":"0.10.10-alpha.86","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.86+22c53c6"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"22c53c6bcf5ebdcb80fcd325a7869efe88bf9417","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.86","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-eFvQPVcCAZKZrIsYUqrx3qO1JIc3EOKV7luaezaNv+PPvsBbTHMavh7JO7Zbbyv/3CqJVp4pB2AywWZ3jzm9Qg==","shasum":"9d10303c985b331feb8c43887549a960200fb9a6","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.86.tgz","fileCount":7,"unpackedSize":12401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyTo6CRA9TVsSAnZWagAA/jsQAIjYwXYJ4pa2pp+rocKE\n4V2WA9YQmv+RZ2D3x1T3BiiLAv57tqoPTDIQvFayQucfqwHFi3J77VApGKsC\n+wxtAw4aRCph6V7UP+AP+GoDtubb09eg+CGnGFRWKODPA2JXke7nJ9haoTWU\ncGtVcAnNCXhldhoiQ9BsdIdvAe/nCg0TzD0ugyrzVgKmQsz4YTUWvxClonal\nzXH/57EHrB+cjH/u1rSjSR60rX27dD3M5bjREnpb4ZX9SbHMrWtTjxp2lUyK\ntmzUUUC7Ifv14PJN09j6+V1pQWyFWprdtI7f8hFSkICTOrsiEwwnCKX9zweH\nAGpR0SLj8CE50EfOoT6dtXeGIe3GdBrNAPEDcsMymJB6piQREVqhK4RMEmPV\n1js6LviYak0JUcfweIKhDj8IoyDLqweZaNrlC/+iPfwQ2TQOcM+lo9scsZ+l\nlNairXMsjyGkikjGgpz1FxyEgwIDVflm5sMebLN0CWEL55GfbCzAVREmzYx0\njXDWTpQ29uOE9AxtfCFxBZ9XlAy/+s44dwAGYlTlwY3jFdG72m/NjCvJ/3CM\n9Z3oPaZvauVeO2WQ2H+CofyTQSNmEkecWYuitJHYa8+rxb6y+yiSp2rs1vNR\nvQaOdM5zcVDIjfwOwoCzSNgYMm1v55XMvzzV2VLG2P8TbBGkM8i3Q2qaYZI+\n6Qzn\r\n=eDPG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHC19L4skYHwggnGyQXsauz8d8+KQdgjm/UkO+voD1qHAiEAzzKidJgVct7bknObYBMt4oLy2fZHQpebpfU0kt58sds="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.86_1573468729815_0.18946823509188038"},"_hasShrinkwrap":false},"0.10.10-alpha.87":{"name":"@react-ssr/express","version":"0.10.10-alpha.87","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.87+5df773f"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"5df773f74d53bcfc6ae5ce49145c7bffb54fc548","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.87","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-yCro+Hqz50bG+v+xqy/rMjoRkbXrfDo2OsBxvxh4OaqulATneH0f1DhTx5BZbJyiwh964esnK/01KEYIJCazVw==","shasum":"055e9d95aa21ee13f80f2f8b8bdb2eb328ea1e97","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.87.tgz","fileCount":7,"unpackedSize":12401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyTsdCRA9TVsSAnZWagAAA6YP/2zecUFL6EVvfARYH+wQ\nrsvglOO0ZiLCAxAJn+YGrVzL9teSM45vEWv/6ao/RlUj3cBtkC5cik/aWCZY\nsLOlmjMI41J0ejdF/XjbXbnyH0GHLqIVgAzbPRrUrrP52mjOqJwSsfMnjs/0\nnxaSBeQRryaYVZ+y6aZNV5jUu3fvsT8KDVrOeaPnz4CyYB6uD5nTQx3v+IUd\nMhgUv2sPbdjFPV2IkWek0s5FX4sVca6/DiUBYkSUL5qzHibu0OaDIjNkElKd\n5HecrX/DaBhPD7rfy9ADTGOkZt9XqXhfEeccTIcttvgUVg2zw50wr7GQlsKN\nN/wkPAoJtX8EGAbXcBeUjUtS8n7ZaomBP9DI67dqJzuRInMxFlPlRMfVioES\ngB3ct2TgLm3/PWYnQ00TEK1HQEN5rnVIl/JF7P20Jw3MG9ICDRI5jpuspBZ+\n7ogUen7INbe/o0R/m+dztSnprt4hwsxuT1F95wcdGxXvoT+AM5bSy+HR9iOc\nS/ulrLhDC5wX3L0AtdrKM3aSn5IoKHzi+zba8PtfKrnt1GZ8VS5tjfaz8oeY\nM44nCHV4qoJmiU8xsSyFKRhPZcQUtfPsPgdtZNYr9H4Tm8vY9kQ6ymtoDt+t\nEIEa4w24YXwr4sJlXCPIJjv0bBdyHt3UiwH1tQ7B9drzBNZw+3Anjgn9hLNN\nEQDe\r\n=KkiT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDXXyOhJ07B+ETDb/KAj7D20KMHjWs3v2Uo4keCHpOcnAIgC2LUAani8+lKYUTDWyXwTPRJqu84HdqmhxTCpDRzfYI="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.87_1573468956647_0.40137143243476725"},"_hasShrinkwrap":false},"0.10.10-alpha.88":{"name":"@react-ssr/express","version":"0.10.10-alpha.88","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.88+9314a59"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"9314a590b78dccf92fac44a7da971cad77e5bde6","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.88","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-7HujnYIXLL5H0lxWhvEYYl3jSE8kDBDDLejJfCEOZ0B5dp1HPCRzm6reAPDlowh+dDpL8xcNoZHF1AuWRyGCZw==","shasum":"240d098c009abb146867c91ffe5289a274303338","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.88.tgz","fileCount":7,"unpackedSize":12401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyTu+CRA9TVsSAnZWagAAUTMP/jTfVOqCAlQReaQE4rGk\n87x4c/3ahGCdfhoa5rwRX5A2RM2KjrKTU/EcABev21m9WNYkpIcx57EpAR+y\nPICEMTd2SIzNhUHYw5nOiQkrhfkLQ3pDCVjlKdF7HTHla/qpHJq7LkrwFN+z\nwiAZz/wji41mtzN7uq32jJtGFaYyDHbjZdH4ABmDlK8VUtRj7li9owAeqgQF\nmxU4Ji01Sj43g6ijcQl9ptWZE7ZL7Y/+SuRxrnDV/OgPJzBL7Bfw37O9qDY+\n0P5ewwK1zJhFTIHkk4C/4zN2C/bwj18wS+j66Xzwg5SyUhn6aDlBvAzFVaBz\nosLxvNVCQ2UlhloiqQQSgML9hWLxyueQKtAqzJ3BbgNbpCN2eTmfd9ekbFjR\nl7jV0tA6SlGh3l/3mshIUHyqaMO/56D/g7eVamrMLTEEcNdUISwSJpIpGI/z\nP06XJ7+hMEYjgVaZwq3JqYRac+twgJJboVd5RzK4vtNqxwghi2Bnq4Kv/Ftb\nmEQaIU+fxdgDQdNcuhSrZyVwiBO3fNRKwim8QXA31eCSEKvNElg4YL13D8RC\nVGaFsbAAX/RH2s2tAhikzE+u7sGhCDwENxtgiaceAQBJSk988SOX93ruSlTN\nl7fNegw1EUXmVdt2ypb9PnT9I7yLNAtfhciyhI68oLR2nk2Si8sI9zl5MX+X\n1+nG\r\n=ydXE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCzl6KGbIiGRmf+RgyLLZVoge8k/uGjBNbGsTrPhnAkUQIgFoCC2QeBLcvIOdi2LUmPyHebPbFyXqfW++zhw7ttjWQ="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.88_1573469115525_0.03567166737197747"},"_hasShrinkwrap":false},"0.10.10-alpha.89":{"name":"@react-ssr/express","version":"0.10.10-alpha.89","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.89+10f2395"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"10f2395b3dd00339d85137d4defe0be9b5ca0b9b","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.89","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-2RmEeEOJB35rZ1HQJSO3lecWs3i5POjn4rKgzJh6GoNBgyJhOL62zqrs+2Gt8X5MVKANHCQcCXZ0AgMVWjOnLQ==","shasum":"1ae4ee03c79d9064e19bf3b14a208e05784470bc","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.89.tgz","fileCount":7,"unpackedSize":12401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyTzUCRA9TVsSAnZWagAAnv4P/3bxOd4vRx4mxY5OF2mp\nQ+5qH7HHORW3ESP+WNTAKV5McTWMZemweNwst2+Nk/252T0YnKfCvyHmcufL\nD0OvvdFXn/j+HrnMnpo2gL5b2a9GQy9vk6Z5Ugeq7D/jlIZzylSEhTNUcmEV\nw0xdHi+QUUHQBwpo4aTwcLn4Mr9cxbj1jMN+PBkXjHt7nusohAiixnxtzMLc\nRiFhjMnHgtebaqRd1TeIayaxS0dK+4qPfG3Bbva3Q9imn0OHq6Ej3HiGurU9\nhH4sIAyiWNeE3xmU6pFDRaZPbkVN/rBZx25exKQcg6bXMdyCV6D4qzfs3P3+\nzjOOXzcQA/1tfHEvi3HYoAYDOhUQAgYWfD3763yBcjZtk/1b5HYeXGzQc0rd\nPxFvYjUyiF1UyMOf4kQBVjsyaef7iDWgfbeW1suIKW4eKCP1uX6OycxMUMcn\n0wMPzJ8JgIwakAZTuZTNL3UdGtb83XhXnm+y5zNKUpK5mbnLBDaTwU4hnv6r\nREOpnsoQwlQaBOUwj8AULD+ErgdUbMyaiGITgbgaVYZ44b8J+YwLb6tMQ6Zu\nTLqaFH4V9/KcDLRNzVaqscaT8dy0W+n1ayyKn4IKXXO8y4m9DybYN93za7Bs\naEeXdeAl7RuGSo9A9uFC40wzAXBfLrPoopFopzaxkIByVB9yYJkeBzooRD4L\nQYQp\r\n=nEk3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB7NRGXc57xhJ7vXV8xiuD3HDnz87+KfH73vzw4Wr2I9AiBjfB4SrlWNybhEjTo9fVHxCL0jULOEaVZj8gN+Ho5ytw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.89_1573469393373_0.9329662455544059"},"_hasShrinkwrap":false},"0.10.10-alpha.90":{"name":"@react-ssr/express","version":"0.10.10-alpha.90","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.90+5c85309"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"5c8530960d706908831a6f90c8e6b9c9e6921fff","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.90","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-tqTpsqqcYCOIc6wL/nJcjiAjeEbx5f7oJiCLAFFH9CBVOYUVhMp16TNb5vBXP8lJm3+OouCSes6abWrrrSKWrg==","shasum":"dff70d9698b02a01791a9ef3a33f8d48abb7479d","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.90.tgz","fileCount":7,"unpackedSize":12401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyT18CRA9TVsSAnZWagAAxwoP/RmuYgQ0dmgP3by9O2PE\ncZNkCZckfFtl1h+/8+rB53AbDzEIBCPw7+UkjWd/93VLUTxzTOrwQ/srDk+8\n+zAQDcPM5tdTgsWK+l9N0PJJjsFtSEzWdNIcBuTHhISl6d6Yd0lRU79Xw4jP\nC+rw2XS/qvME7xR9Fm8kNt/H5/OllJ5raSSF9DCQX7eydBqw4jbVgxYkYOQv\nV8DFsD0GQ5+f0kzE98cTS3BnlReUW8dbYdlLhkSwYCZSqz4wD4U3iWcQbG7s\nU834P/r9OWJs2evWzdGOZvSww6HcbFAbQbt3TC9AvbuFvKu2FTdS3k4375yP\nwjMwCnRxX/A7ZilzlU7wC/A9H2YMM8J8YT+rSFTSjLoesYRNzww5/YExrAdz\nYVkZKy8QFhu0T1zFcWwr+/V6yyJYMBqf4rmW4YY2Z9Z3alMgMCGDHJ24/JTc\niMq/ZpJu4HuPteHuOZCBRo2qwGo4mHgWie5GI4pqtb/p9qWF4qeabTM3TgSU\nOoWw8wcrc4Aa8Ewj9RBWCEXvroOILvXLk873BHiSBe2OaJZzOenUiJ3z4Sq/\n5GAROgKkj/5NoW8M+FhbNGMQVK0wh9U/M6BhqrH/8fQrDZXIxtZh1InMgEh1\nVnxeKb+ueKCUcKGk8zyznX+/Sh6G+ByDQGhNkr53Kf7R3tYZyhL23accjGWR\nyf6M\r\n=zhaV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICyBiAtpBhNrbJZACIUy0UIsQgny0U60XWQa0F5gr7sBAiBM6TToMH8hUHb9OV/3v5e44EjM/YhzEFpQzOJw0LmpEQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.90_1573469561099_0.28832448000429034"},"_hasShrinkwrap":false},"0.10.10-alpha.91":{"name":"@react-ssr/express","version":"0.10.10-alpha.91","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.91+12cf89f"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"12cf89f783d94b05f4cd44b6c681299bead55478","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.91","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-IvS2QLjevmMlSQAgSUzpyVv7nzuAi3SgySfVcK3+/UfxZ16++nBnQotKJgyYDnl+59YJCjB04JtzGqDg48+Usw==","shasum":"926c9367bc6d1a39b48f082994d9df196e3fe706","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.91.tgz","fileCount":7,"unpackedSize":12401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyT33CRA9TVsSAnZWagAARHUP/3+nQPfuMN8FpFjvrRLJ\n52sCkN8KxoLiOGDIZFyD4oBcQbT1VCX+IHgzPZY3ZbwS7BMTqhKePma7A0PI\ni7y/9boqamHlxCU7Nh+CrMqszsWE5hfZXHSwHbBfTTesz/5Cel2450D2b0A2\npXAPdze4h2aWdyr4poTQdZXJGAQOefE4f3fN0F3SQp6JtyAUZHagd8YUdt/i\n5RESHqR05ek2BR36XqCnXeGeDBCYz7xI5QcK3dnJYUTCRsSut01HSh/aVSJA\nIbd6t+mxdcfJQJ36o/+ETnIocTzlVO02F9avh0j5PP6srJzlled0i8Uiyze0\n6fUcuTKj0vi5mdw9a+mIAXhGw/lfqXFRUt5vnHpwXCcpOCHjJUyJoFZLjZo0\nMu1m1KiKvSJ+U3/ki8RGQdiBJ1BWg9b/Lgr/m46ThFQLwxyBwbC+x+SkE7FD\nc2m9V1zNgy9E6ws2t0wtUOZ3ioM+AvxKmMqxPInuBW559dEyvxyfTnd7VVUk\nnBsJvU7ca92ZdZ3D6GyKT9Ngy5hNj5ymlSAxg9XvT6rWVpGu/ruuzkzIyvip\nEaxJyCydyPW6bWUwnCAkDcq/Lw8qOfXnO1scaB8iyjS2GOnvIAHiEh1lzzYz\nDeDkuw9wNqUCXWFQWKfX5sm/fQ/5pa8XsB3kxCPUvcuFfuY7d7bWLO98AZcc\nU3yZ\r\n=LOd8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDoW3mvWDxpleRDkftLh18/r3siO89/63dkWBZruaUU6AiEA3TXhbkBFKYz2cjIZ08LFfLcpRh56TubSQUHFmtkRAm8="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.91_1573469684170_0.32407346074581134"},"_hasShrinkwrap":false},"0.10.10-alpha.92":{"name":"@react-ssr/express","version":"0.10.10-alpha.92","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.92+934a675"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"934a675fa197379fee8058b9fd1d7a1c89b1d976","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.92","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-boxluFcns+v2TBxiFTUQG/gxAFO3JNxMtFuBOcwgIK4pX1HMJeDOFBmVeCH5WwW8/w0pYMhYt76SHXiCyxcsAQ==","shasum":"4ca93a1a2fa0fdaa9224c262cf7b34aaebd2e808","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.92.tgz","fileCount":7,"unpackedSize":12401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyT6uCRA9TVsSAnZWagAAwMMQAJyIKcCYOTl/9tf7C48W\ntVtRZMrE3b8G48upLi7Hi/8aLJ5xpMAtyK7eApvgMk5BdEDvbaIpDj016VHe\n4/7UgXxHQHTZ3hqVT8FHx69gLr1AJsAFTyfwbi8t/ua+68RqA8MSpZAv41KK\nsmttnd83qs1nP3Y8owxxMLrmZNLl0PbqPW0jY3U+d9Pg6Rss3OnRvw8KxZWu\n40eIMK3vWdca9tQdKTX9c2EminmIEbdtz4n1zR2bRHxfJDJcG9pRjYaTMkdq\n32T1osn9BLoNGH9D3vKwjH4sXQdePXJ8fJNpdSXbh8iT2F0YN3x22BY4m8/v\nldPSFyq17JxuCKn1NSjlOnDx+kbY451VeXdo+Sab5cXhKQPUH2q1cVtEw0Mg\n9fLyhYeynp1SE6/a7+iPqgDmV8UwN6ciKZo8axF/Dj50Ccj+US3lcLlpZmzd\nK61tkHBr+OFkbIHpAnIxtFoDfb1UCwmiyAZOJ7aqyHpBtUWs+JNF6wvbJNAO\nndzjUR/lVjKKNWuKZ+21O8jGqejXv4ytvVCvJaDY3n08Tp7QJuxbT+rcLoW+\nM/szSmoynhVfah9AwSDajqsX2wjgkeoLsGv9SRiVUwJopkWtbttofRDFdyUb\n92621zEPH3ogbwmi+oF5biTVocEFtPSkXXn4HZKKYPUssrnvvafQFuyn9yG8\nsv9h\r\n=osnc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDikJr9kPXn/Mz/dgk/XRYwGZqELHAgE1vkw4IhCTbpoQIgGjl991q7kmDw3oLIeFt+JXaoSTVqHF0vXmbjhY9uqlw="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.92_1573469867571_0.7085038213940882"},"_hasShrinkwrap":false},"0.10.10-alpha.93":{"name":"@react-ssr/express","version":"0.10.10-alpha.93","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.93+ecd7979"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"ecd797931804eb4ea4808ed9c61df444744f323e","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.93","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-F6Q//2OQSMxLLut5gnrPvbCEX+TDo7iW0a+oRMw8iBR81i8AKPt1ULkTXE95FVEoNTbf+qOxZx8AydUUzeruSg==","shasum":"2f8f2de548e678ed6c8f1c78fd3b3791a0663c6f","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.93.tgz","fileCount":7,"unpackedSize":12401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyT8UCRA9TVsSAnZWagAAoRYP/16Ab20OynjzQNxtaLXN\nfWGJ+Wno5FsHrwL4N+perr+/VT1GUnrqYzgKg9UASKsigiTjQA0O19avhjq0\nejYX71fB3L0JZr1i6DsgQp93EXuG5Uk+K+iRHzW6Q3T32vIW8UHhCvbgmCQN\nbiw1AoSBmOcW06/caJjRvYl/q3j+mbZxrJKnaE2aCq3LE4UzJEl16+81YGeA\n3jtoYrM7/jLuUIlhk4h1H0zt1gng00gUIl3Bf1/1KLVJ0egotk8QXqs0MrTb\nXgM6E5PadU5nX1sGvF5JNYZCVZ5QZs6/+JkaIdW8FulmnvVBIGirV44vT8TL\n77cIjwVEGANz2/JenS73f2h1CulDDDWUMVWVYs2aLgMGPLZQTlOP8PHYnmsq\nqOrMSKbxvrFj5Jr+HzNEX2OwHkt13I3hJxjskwksMH6jWi32Onv8boMojD5x\ncpsrQX47Me5BUEkPgbUTwmD+tVaW88EpI/WYlvRlG2xHRecqhH/kjHktZo75\n+YR6oQP+4093TK6VxOkrqHI3ZWNlt4bi/Tz4iOesu6HcU2FEWMOJ+EQI5N5s\nb5vB0JE+mXSnrneF1h3iHYWMLcuQVOJTPFOLKIXpPQy7525qt2l7d6dNyyHc\nPQ0ewh6Am4tsVp3ZqP3W4xqH9hyZnpLMEnxYeE51ENx3VffS6dFs6M4my04c\nlSUd\r\n=NrGg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICJCXovOPSgGQew2EhSdhsTIUrgCquu07QC5lg+5iq9KAiEAkgnti9NK3FUHXS3mpjyWEQrRc15JfqHS19ExHKUMmk8="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.93_1573469969254_0.5894145809507754"},"_hasShrinkwrap":false},"0.10.10-alpha.94":{"name":"@react-ssr/express","version":"0.10.10-alpha.94","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.94+5a2f5af"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"5a2f5af8438cff2d749362e77fce055116b30423","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.94","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-50rkzKlHo7Ceqc9zXjkCr9vS8L/dJMrMCt+vXcESJC5H1pNZ6IJLgV4jdTn5gAnikmvzvbsG/do+WYxjsfyjiA==","shasum":"d08d007e7b4b3d7af87b6ad52ce68e8b6d27e212","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.94.tgz","fileCount":7,"unpackedSize":12401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyT//CRA9TVsSAnZWagAAkWMP/0+0NqAQRcDW7GAX8ihU\nfSjQFkaidaPpZAFz3gzBdKzkg+V0zcnjelSV46fj5cE2f75p2jLXuUq4v83b\nEq5ewuexrXJZ9wnYgXZJPVRdS7GbSQcJB4FASxp6yU6nToiZoM67rSkIYwku\ntUWuR8TmVU9gQWWDmJBZ/pvcCK1+bPXXy6odGGt1rLD0tEOAu1WnwubP3VSx\nf2tGNPuz3+n/HSsYVn+sNFQ7nMt9R77dGTnlds69py7Wx2RWLIqvz7UBt9wd\n11TN2HTNQ+sd3NgavCcT6g7iyW4i0bZQeAnuUfPJ7YbzVL3L1t5aQhwqGu4n\nTUTH87pf7/+QJaTeGT+j/k9zjq6MjOT4TK4Y7npbMzs+RrjFGcGZ5C8OW7Dv\n8U9a/A8WhpZ6I0iBEKKxNmuy4HXOOC2bQT4fanxn4NdNlqPtIAHmviwUinUF\nbrqPq1FFN6rc/u2BxpYfD5hJIwyKxgaeWjKr6GkwvRMlIxAX/Tf97CgghFOL\nHNwM3iMOy5vl1vCD/cy8CA3r7OpK1O4ZpBaXEu+/4ruQZYj7Z5+0GFcNmLtf\nkgcnapM78iOw2XevH0PEUYWXxCkfulpkjw0MBsqirI3DW5XXW1bzc3jSD/GW\nl+EdPiF/Ojst4jjVVCfeHb6mzUH4S/xmBLPuf6W+5FeMy5AqW7Rl5Yx7S2lT\nQqzN\r\n=rcYj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDzZJRArUdc8N683qkRQ9afgsOkcFr2hA0XKBxkM1zb9AiAlDvJEC1QDWdHlus9hJMVfCy7jqfwVMaI9YvFRv5hZHw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.94_1573470204006_0.7990708790079282"},"_hasShrinkwrap":false},"0.10.10-alpha.95":{"name":"@react-ssr/express","version":"0.10.10-alpha.95","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.95+2832021"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"283202103de97ed78cb8d959802c30ccd4615353","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.95","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-vpmo96/7i3Uy/XL19PXCarg7TzsixyDEwPidSDFEXskVHQhd7MzZN/gm7sYjQOG/jXo/6Va9ymVug8LadfHfgQ==","shasum":"55011487bdaab021543f342a881d6de14fe530bf","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.95.tgz","fileCount":7,"unpackedSize":12401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyUEMCRA9TVsSAnZWagAA9asP/19s2HU0eWITHHrdz5Kh\nNH/ihnuaipm6j6Y83LFOft2gV6gW6EI6e7NjXSqNR5Jine4rIi+XT3uEqSw9\nf5zu6DgaOp67TtRwbAf/LiGx81VNiJYrfqNZaU7VtlxnpPtxoogGwlp+kgDy\nT7kKcVkAFQVhqxSL9WUtDBcfjTTLxz0JpK1UH+/la8q4K4AHnwiUzijfP1+p\niKhWHVavdvgcRR9vXXRe9Drsl6+JQ3KuvsPQfjbdlpaTDfYVRMbT4pU6jGd0\nxKsjX3CtexsfOqN2KKG8R9h9WOaCW4E4fubDJPZmpaosbYl23K1L8ZHj4sAb\nFidPRTnVmJFyTRMlQSEMyA2hLYwKMkeCopBpQ09AxIdI1BxebHV00EzQXnAb\nb9lr0HPoOdGh8zEAZz4T9P+lCHpkF8H8JMoA1nMfTU0rRtvnf1W7+0O5trzf\n9q/1eQNWz+Kosvvexcgn5zWKapPuDIee4VM4YbXdzsa0Kpw5HafGwLUsopKD\nbFDTOYXcDFtRrbXeTfNkVigMQ/6A5AH/GfLbt7x5rg4bnw3Byzz9tzHDdGKl\nQdwt8jNMXQOb+8pKuJ5sAD1XY6bBKD97s84ekYGq90f4ZnaDllE3v0woHTyd\nR4g7hIakWDLzVokK2V3PvCCPBmAR4WNnmB15dbkaiQ4PyHNBD57Twd3lVfcz\n8Ncd\r\n=baNT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC8lnjrgw1JP1YzcyAJYpwrbrh3kxhC3nMF2ZlZAqmYKAiBdfQ2lusidqKiHYAbbJMRhqGT3pGBCrXITWhQkAdR6NA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.95_1573470473228_0.6421113677808075"},"_hasShrinkwrap":false},"0.10.10-alpha.96":{"name":"@react-ssr/express","version":"0.10.10-alpha.96","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.96+7b8c195"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"7b8c1952360df638e4a9a425d3adad24f324b91f","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.96","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-ht6ChIx0aFEBGDC34dW8+mRtteNcAfEwH1nl8YPsupLfeJosMg/ozz/T1noSxsdREmHDjty+DUuFKJwcl7jIFQ==","shasum":"4836c815110e592a824a6161c8faec0dbad8567c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.96.tgz","fileCount":7,"unpackedSize":12401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyUL6CRA9TVsSAnZWagAASjQP/RSWjF8NwPO2y+lGzDlK\n8TpP2ga1vcvWjeaBLwDJ9m4IcrKchB/wBa2XXBkI6pk8jZTZWxg4XHWgMZJd\na1jgqEuQ/ipNfL7Z4kqNjPgaJ3sNzHbLdFi+9vWqGnNYbrFBXAf/Oq4G7Qo8\nbpwknDYghvhJgw2S4bIPcpsPii4s1ZoJGAZsfWZbBIKNY2+QbU9S3XJGMORm\n1lfkY35sAslMdgNqQx1qt4yjA+BGeH3Tgnb3p8LKdpMF9ERFZBfcSJlg6Zw2\nhWi8bPW8YAwacfaKL9pa+bFsAb0XGsQTujMjaltFDehzLKja+6Y7JigSBAU5\nOiAEDtfsAfcegT70L480HmVe42Z8M+aGQbjKuk/vNitxeg8VtqvDYfblmOsO\nfMpmqYMJmUmJIyZm6A9RaDTF4SBepwi/whDyMisJNKHnwvkUQf2F6HmJmSpv\nLJmM1jXOobMohviwgTlJnbn8jJdOHbyFvr2JrXbEA4klPjLCJgtonyc0JNir\nTEn2KCM//MgJdX6pJcslo+Y0zhj/TQ8UFjRCER6hLy513s7pIfjreGyzCzPf\nr6JDRClNimhEL0WBsitKJ5qCjuvIFC2Ck4LHl/ncN8z5qgbPwduiqAQJujbK\nyptJPlTBeGKDSRrlPb7zBtWc6B+KBoupitAki4pRf5WSXryI5dBfOh8DFVhi\nsABI\r\n=zCy0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE3KnJNFr8ZRepqeTgfn4R5KgGv1CYTxk8b+Ij2nOB6/AiBisnQnjco7waNBx7Z4HLlBsdc4ZT4vNDaNUC4QwQABbg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.96_1573470970546_0.3399359101749009"},"_hasShrinkwrap":false},"0.10.10-alpha.97":{"name":"@react-ssr/express","version":"0.10.10-alpha.97","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.97+a2c4b9d"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"a2c4b9df8c9b50f30c578e216ca46f6be3a98c54","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.97","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-UjDIMeqa3nlc6m7XXfas0nBVjOQEv9/Td53po0fstIjL1zwnQ7scYdblCv7q6qB4FrQVuJGGV4ydLgKofuagKQ==","shasum":"223d0408f03901597ffee1ef0ff5866135c5dab1","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.97.tgz","fileCount":7,"unpackedSize":12401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyUadCRA9TVsSAnZWagAAnFYP+QAG2r4NFqh3hFvRh724\nDgmPrAfcJFzRvR870jQ7aCWDG8cuvKzH+vvW6ImrkvgzCTeBT5VzTqYrLgj2\nvgCFFAwd8k4RTar2Hu4q7jFkWBrT8WEralklFcMtu0S3l3sr10D8OFjLEiGH\nVgTGx50aArkLeVcq9g1AzozzketQ4wBwxL2R0Tc26m+pAoGZOjR7npOmMzlD\nzClcBHyYxtt5ktmKycpX9ewX1YHFaEEYQSixyS1+5AwRu26et6e0GiMkxUd2\nVKwXhktHtYtLNE8FIViBfuP3vEnCfbT/ZhnG2w1OaJkgBeZiJS/XSOr7HToo\nJlFu8/6I0njK251yvweQGjGHI1p9uSaAJNsPFj3oVwwyXGMHSZWW4Azoq/7k\ntCvmRaLjkFGNACRT3lXTQf/hD2NCDIJxDZ0z69qottZXhOk82Zxn7UHpMyiN\n6ie0/RkJPXN+XAF9r2do+eVa/HOh9VWSp3AZ5rkCKX5UFYnR9bWWGjzBNYMs\nj6LFxi2z/c7uS7RFIJuKNQmgRp/mlUTNMr3KL9RijjTl2IM3U2HethPbRj1j\np4x7It6OlkprKMWKhLbQ8ckHCEmBf9AN+KeL7LtsG5/AVr0ekFLokE4Mug6O\nTWAXGbmNNO8jE4yBUr+aUolDgFErbv6fyCgcCsHB1WQ1XNdJco/55FKd9irB\nCBOA\r\n=7LT2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGVJ2CP4vhKZQoxmMcLRX4WaixNkedCy2Ze+6JToX6P3AiEAq2HEpfInFlFmzcMvrdtshhIVHPVIjhR+Z/1FPfzIdi4="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.97_1573471901001_0.3028432114239876"},"_hasShrinkwrap":false},"0.10.10-alpha.98":{"name":"@react-ssr/express","version":"0.10.10-alpha.98","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.98+6985a15"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"6985a1511ed3e2e9294b7c93af8fbd8b82f633e2","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.98","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-12yO4O9OlAsi0yOfKrSz74EhAzl/MrlGjDls0oo7vymzjNy5MtLjazE4gXnDo7Upbk6CQWNAHu4gpnX906J5IA==","shasum":"4bbffcc2d578eed00093d1c64d06141fcf7fd6ba","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.98.tgz","fileCount":7,"unpackedSize":12401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyUe2CRA9TVsSAnZWagAABEIP/iH/UIYZxWcx2YIXTfiT\n9IqTxgwqlv/79Bd/2pHqkM12SJIqiKOhuGtjbrrm5TX+dNmE/m+M+WL7+lvM\nhwooONYPRJkDB3YNJi2nzswhqhSjy6NHBJjZMoMS8m1RzOUmsxltoikVKI2l\nidEqSOi6ZYDuv0Chs0aJRZD/EQzLb0YemWprsYADgZRXZ3ZlEikbte0gMcTd\nXM+lI4XGhtJjDxfClRYbP4X0S5eFsjc5swtKf5tCg5qpmQcCyU5Ss+dCDVsI\nbW4cxcv0bP0VJjSqWadg/nN8zPeMHlzEn8AIcQGog33kADc5YQDBnfOH8j+v\nAWLbqKQ1BV7+i0s5ac3NLHYPKxFwMHmRYnA6hN7Jo0rkCInWqsDiu+/aSHX/\nqIq+sJ2MK2Bq1EV/F++2pbXCJXxHMrSg1kumlD+uIn4WFFTqwDFgsF9P+Ydx\nKjumReqv2XbFnbd2Wx+1GSg6LdHfr1HmD5L3FvzR2T9E/8URvjUX+YqLo57o\np2K2AFZHZM0VDO2M0dpgsBjikDEAU0EmT0tAE5eZxyG4Bptc8XVIojYvKJ1s\ne+GT91rRVsmGiE4l07CJxIejps6eq+oNHJptUmf/y9REqa+OgRJMVG+yy+/2\n3aegfbD67zAwjnkMXAgEKYwZPX/IR6AWOts5dq8vUoNcKwXZN+nsC8dOVm54\nfjME\r\n=M0V2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB7kJLliqv91ojCKU1uBi3ADWeQ1kWo+DN1lMxayGA/0AiANZ71nvzjRgt2ro2FYNtZ4LQBJs3wCyDm5nQBXZV85MA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.98_1573472182430_0.6044921390521509"},"_hasShrinkwrap":false},"0.10.10-alpha.99":{"name":"@react-ssr/express","version":"0.10.10-alpha.99","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.99+99bf0ad"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"99bf0adacc0d09b6a9ba01a33a4f632b657edcf0","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.99","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-CpAio6t71XJEVseRbVlgQTSEcyiql1wJkAWl//3tB6B+GWNlTg7GZ2PqUUVmRdcMVFsLiFLnlBBDEBuLrPMp/Q==","shasum":"a482fcfce239c4a3cd76beba18c3851dfe82fbcf","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.99.tgz","fileCount":7,"unpackedSize":12401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyUjZCRA9TVsSAnZWagAAXgEP/2kIsRkfTclaBgUJWobu\nG7HeoNRxWcUPxTyedTmj+tmPE70+5tmqSVVAuJGQ88W2tIZDp4D70qUXnhxP\n0hNil+MJUJoW+4lQ+nAFaicvxu9y9KTNbOF8rR85PficzYzBiUuMvG42Wrjc\ntDUPKTDvB4IWtODRGKqlZlc6trx53UE5XRkbMrF6Elp614MOMv90+cbFK6mu\nMM6pyu/ma945w7S58z6e6s6PlHHNjxg28O4iitjzzuTPVE3wGDJ4quwtsKI8\n80ZF2fvupDM1wSAspyhpV8R7omGV080GI6EvrOfZSPiWq7ZXOuKIdCeRJ1q4\n2cBd4BhdIw5fAlR/0bA7d53eF5XMQE8UIIjLqnTSY32s5SVmLV2p7P6PTIU6\nuNC+DjuuMvwxGWJpZNHZjE4wh6WIpx1urA58BeZ8Q6aM935CHC3/fKzFfy3/\nUCA8ltkiw20T8jHBg1cW/mTgi50jXJZBvwRAJ81ehzBHnVYvsRpmHipf4Ipm\n4jXjBh5fvFKJQ1kluAjcWI0wrdxxMJjDSx7Vr0I6rhZqsDneJeo4Mcy/VdGe\nzbXdBvxOjES+N3EaD6fsauhH48RmjbRs5esVqYXV+WnMSqOjLS5wwa8Vd7Hf\nWHlJhRVyfbeOfzO/xurBaVbtYa+0FUBNDUrq1tTkEh/80skvEPscpzB+4Fld\ncb73\r\n=Avgl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDhitBNWLuxs2Zeoh/w1Poe0bnTRFI+zvWhKXF417YoOQIhAOzC5C+kqyKIlURG1byItEQQ5IfkYp1Mr0sTXrODmc8x"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.99_1573472473277_0.5479671683778466"},"_hasShrinkwrap":false},"0.10.10-alpha.100":{"name":"@react-ssr/express","version":"0.10.10-alpha.100","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.100+1103693"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"110369347353a39305d1d065b02cca9ecedfcb9a","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.100","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-9rv/okS6xU40nPNB/yYE6AwaF/6Ytkw2YUnhwfJhP7JD6aHhnQPT7iJLcaYwKCMWW13vUTgzg2VfSv4WRSyLOg==","shasum":"4da18e5bec7482fc34fd7c29135506c3f2b9bf30","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.100.tgz","fileCount":7,"unpackedSize":12403,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyUmICRA9TVsSAnZWagAAnpsP/1Rh98n5DKbT8h+lM347\ngdLziC8AVI8B6U+/HuQUGxAMeYHQbA1ZlsWwU89LPk7QAV6HgwcMnD67sbtT\nygz3TQM5YbFtl3XKuc0CSvooLSPGS9lUgqP5KLjk0UW16Ih/eaA2yW9URYzW\nb6XpOBG8zfeV9wqXxuzvBb89BZhj5I8/2R7nfosWwNo8k4Q9aCYUgaZY13nP\nbau/wLtwOjqSvL5YXWQvbzfL3ALilYtVu1pBdTTOPT2AfJoc699sdLSB9X4m\noWXSVhQlE7MR2ZIXIinKOm5D7JCti/3oFK/U+fEy7SxLXI5xX7K7KeSlKfSh\nG5nzos0AaAdAR37GnJnjZ8EbVKjXdO8wZE0e3UUwbb8ovFuFWvxGiavgPb1J\nI+Y8/3r4nkpUPaAG0GRXQSuEqkt+3o1gr1OOC830SoAelHDSXOxAuxEMUkYx\nmwLFpZ2zeg+cRkQuL5Rtq+uR2PLCB0T9B6ZamHuan40k0io6pPPJuHYsM5vC\nj2N39zaqmfGzexpUpUqnBTv2nG5LC7Xm46z8Q9SemuSJI1NDU12ClSmEsfVH\nx3ioR6aExMS6C9fajatXFomXAQ+aG5CmKRbtjrFe25kF/kiU8XnFMm+4hlua\n+hDFDQi39lLPu/2NFiylRNbBs/bHDyE96mAdQ5KMteTtouM0+PAaMLkuNdFe\n7Z+r\r\n=u6F5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDMBJCr8YVnLyn5S+GDACQ4SYbQGWMG8FT1BHXrpnJCagIhAITxJ6l1ZFqoToCBSQFJf81+HzG7PMBvJBLPxc37Xh+I"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.100_1573472647818_0.32201181507032395"},"_hasShrinkwrap":false},"0.10.10-alpha.101":{"name":"@react-ssr/express","version":"0.10.10-alpha.101","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.101+1cf83db"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"1cf83db9fed0dc55cec31ba6a8f18232549ed0c8","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.101","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-J8MLpa8oRSV+AukZGrbz5h0fWs3IhNXHpYnt5t3ay2o8Ai2v6Ty1IhAo8gy3phXXQm1/bIA8bkMBM3aWvtaN4A==","shasum":"a69d1e4ea4b8ae9d1679e38a553a666eb33af26b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.101.tgz","fileCount":7,"unpackedSize":12403,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyUqQCRA9TVsSAnZWagAAFUIP/2GfQDImg48tZJH1Hg4m\nlZowJsXGSB/oPS0SWLntKXuUknWsLRDc2VbShjn4sIsRlB393YDUBodC21wc\nElVFC6uWW0qatp/08SDWIBZbAtdsJ2vSBV/FCVrk5f2bNpgyIKMxUNlwgBZJ\n4uF2pX5X+irgtHXdFvZDs5AgoH1Lb8sp5XD0HUPpdbsmFyrmiiI3GUFVy+NS\nhJto9WvZLZGyx7vrkmp+mY2bYInRpl09kQ0izJpTKwqv8r28Ook6kbK/RWf4\nzWOq9rIP00oK8ihhNahIrIIf4FiVsOe1Pvqrwx+k6cffRytkMmK35GqikSaJ\nQAQ+yw3Pia32CGQpTxDxvT2Ous3GuUSZwyJ1e565WGf6BxYYoFXmdlobktJF\njD1FGPslD/e7N+NicHiwRWzI2UsVvBqK4RCY3v5Wkg41YvOwLal+R5F4U7em\n+S5WcyoErgPqDsd+1s0o/NJYROyg7/TMfdGUAcgKXZ+iIBtpDOeFn+88Ofmc\n+D/oEgT71dc5BjA7TwAOvaJvMFXl/Y0P5Rr7c2BaUDVY3/X+1CVbmhDRF4Hr\nfKmbgfOFy6FT51uu0QiwNBfI0Sg/9LQayuoqwbl3Muh6pxYJzhrq7DEmMRWq\nkzdtrNt0n1nJi55dY7W2/YV1wF9zdcOqUOtU/hjLapX8J0adHUxKAluD4ptN\ng4zq\r\n=kUMc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA0t52NycDITz9OpNQncw7J3Pc7VJXbl7BKHg8Tsuo/EAiB9V82yrr/0hkDzW6jJ4fd4wPukZqcNnqVYm9PWWsV72g=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.101_1573472911803_0.9798866254994474"},"_hasShrinkwrap":false},"0.10.10-alpha.102":{"name":"@react-ssr/express","version":"0.10.10-alpha.102","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.102+6199dd7"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"6199dd7459cb6b5e3adaebde8517db192b4965cc","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.102","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-ViHYm6zXFcccj5ZAtPqlFc9MoIAXHHoJxhXTmrw6mmkdFOu/E6k1NUMM39t7eOjB3lDWzvDZ316viyjGoDrDFA==","shasum":"fe1a507636a97f954d05aa7213dae3616d0e4010","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.102.tgz","fileCount":7,"unpackedSize":12403,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyUr4CRA9TVsSAnZWagAAj5EQAIgp2mCKyIii1L2t7d6Q\nf3pnj6JiD/7f8eVT2FIUqxrdMOVU3xVo3D4sPKF1l4m6fczNZ5QSyroBS1Fd\nW3U9PHVcI2Yf2UfxrIy2987QitvgRrwfCjMBxBaVAppacHAdtnzHugzMis5t\niF1/r3dnF0D9/hPS0eRXUq92mdLgZyml9NajpPmALYGvwIRDy0XJI1pNwBRD\nyzdIZDT8iYWLKQ9XFtdYE2iWYEBhzQVjG8MgxPk0HFibfsAvsugxjnFOalTg\nm4ZWNmtTXGQeG1xVXQAWW1CuIOyAqjolF68gOEbIQmdyL58Pvfx3MG0fRnp1\nSr6CKz/ptekDwiNBvHB/VB9/78mHWCZFl6KOuUNSXX47xxJPv/66hExvoqgM\ndQezKMxOdWRhkf4nJhw4mVPn+mfzL0SS92Ins6SawJRs1eSd+tkaaMFQaZYF\nCMSpCsv2Da0hxmZWPl1/3IfMj1UWV45pn1wWurenPxtkyD0J6naB5Q/QpYMj\nLyMDj00zzJc77SzNk5n1VsO3rRGZjDTko+JSezkMZezhx3dq+XiUUC2qEtSx\nwZVaAYf2hiso+XYWrN2jgy+tQ1h5X2EF/qpdz8ty33ZULShbq6bXaiyIjt5N\nGf2Srab4m2hpahE4dK0iosTjFAYtEd57UuI5wiPK7FlqEyRZnmy2ctxXIBQV\nq5kY\r\n=MeEZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCl8/Uy7l8vs8I7+Erw57ISBmWQlrPCppcy8my6IKeT3gIgU3+pXFoq5Mq/6tNQV/fggmKhRYefhJq3V8Kjc00S+1w="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.102_1573473016250_0.4836958917323795"},"_hasShrinkwrap":false},"0.10.10-alpha.103":{"name":"@react-ssr/express","version":"0.10.10-alpha.103","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.103+5a64380"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"5a6438048660a83e81d344a576cb9c3a6b69106e","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.103","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-z9X/NUAYR52DfRHkuE5FByZyd7vZT2r0wQ7/OD4moj88xqoIqi9NP29arJJgNEqbfwd8q+QBu5Dm04GVMQqBGA==","shasum":"0267db1ad4ea88b611321a6fd9290cd31aeead24","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.103.tgz","fileCount":7,"unpackedSize":12403,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyUv1CRA9TVsSAnZWagAARKQQAIrwtn/wnW3hBH0/fk46\nGb0MUAKlL0I0A0M+MxVbm0291IyTZYAU2zqcdRZbqKpTQkjBMsLOtO0tdWC/\n24/oqnWhGdphAE1ctTMldiVee5k14lwpQz5Ehq/3yUOPDS5YbCVX5vYFJSQ9\nsFS4xt8J14Rndpmly3WpE8qDKhITc+V7cV4tHCXLF+ee2GzOD8lLEbVZQR94\nK51z/ykz/87vYeuYRHzS3JGPrzZD+cxNbL5Yv/nXcr33GzCnUYnMzqOI5y2p\niA/KIVxQ4t7MPgHaKaeGdrmLqJutyztyAoVE+TKijNDKo9I2hQUlbovljTJT\nTk4IeXz1n53tIjdmfyRUg3zn+DBeCOsMVNS2dfEwATCSl64IYHjp7fKsqVtq\nvK2v8CC7nFzdDJDnLMbuVsXWeUJ1HYzslBlLwc23p/hlKN2b3KkoiNTtd6y6\ngsGXuM/o1MezHECQv3vGN8oMx846APU78MD/kE/BHtZH/ls6K1bsqs6fIN9Q\n5y862vVaEpLujnFSAVO4sQK8flciNnm6EcQf3mJK1qp85XlGUMsxi0KKl3qh\nx009fgR8p48e6LEzeE4oYhfBXrgAhT8NOS3e2bYwt/Z8d7DVeF4nH8yOiDp0\nopDz/tzVJxSndsBIUsE50igatwUbkY93PFWKwmUF5R3Ekdc3dW3sq3VwQS3C\nF0rd\r\n=iIWw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDR28X95nl6TdfpgJ2G1wAiTHn4+dUWKOdOyD+NRIFa8QIgYll7hSACKmWw/Y/cT0HUthqVsefbLB8tGucOEVOYv54="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.103_1573473269476_0.7900174441344252"},"_hasShrinkwrap":false},"0.10.10-alpha.104":{"name":"@react-ssr/express","version":"0.10.10-alpha.104","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.104+11893b5"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"11893b5ffe510fc9513751d19a570d188ba5153a","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.104","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-O8q1rSAoT4HD8ACpWagUbKW2KrNTTIbffqGbw2JVT/7ef09fRmrGr7SxUbxEeuZH+V224IpiItiqnODRUmDeCg==","shasum":"db4d9186f1491c9a40a8c9463b909a07dc33786e","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.104.tgz","fileCount":7,"unpackedSize":12403,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyUzQCRA9TVsSAnZWagAA9KMP/0i07+pnr669Pu1gXMfr\nKgzpwWH6KNmMv8jwYKvCszr5Q2ViGJHGncmKSsfxx4D0EOmwcxOB0iOKB1ai\nDw4FUAc1azYAqoLNhlm6yOXgJnmt3OTKLc9LYoaalgBM0Qat3FJ2+/KsStuf\nm3tg3GU98u2Wp9+iDH+A+zLDCuzeLr0Hl3HZ+cqznQUtCiwu69AoVkB8DGAi\nCZaLUsHbsAmd8Px8RB+cR0smqWD/5szB0yOkrChU0bulpiJ/aslo/xxMor4M\n16X8DrAdRcIDeVHGG7zwCKJydeUgk3SZOFOHeKNXPTU0wqPGJViolUOBxn/3\n/emkyAy9Ka/+LYI9e+eWdyymPrPtZExF9DlLUDi/MzestyeHZjRzv15leKuC\nH0XKEovkcp3i85gp/6/FXixVhGu71sUlKdzHXUZ/WgewLnUafxgVtmR2onKw\n32oVyUbWUzaJkIH5Zun2YUbdBW4Wrsyg5tJHODRzK01MrOie1wtMm/oI1saD\ns9DOhMBnSqF4txVWJ9ao038s8WrdAbcBTgcHQqNDYEAC60w0Oap7Zek9D/0Z\nnMcPFm3ytzRaAbyj5WANvYcm3P6CxWDwCNy7sJ77mMWgQvh//o7UgYp6hRj3\nG92ez+ptE0jRNwLi64tPWGTPLOm6J2WkiZ+rOsqY+puhiJSXxlMAnDBDvGDq\nrxYV\r\n=HNsG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCWs2sLtxwwyXB+CLAxug9ChwuiNnpJlC4xnvKnydpO6AIhAPajRcE9uiwfO2MiSQjN6AXXaUX3vN4AUJX7I04c+D3p"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.104_1573473487928_0.9074126485784664"},"_hasShrinkwrap":false},"0.10.10-alpha.105":{"name":"@react-ssr/express","version":"0.10.10-alpha.105","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"dependencies":{"@react-ssr/core":"^0.10.10-alpha.105+97764ca"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"97764caa281838e33cf66dda4721b1d476bc17d4","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.105","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-fskJlWGeud8W0PJeGmiyG5XsmGdlLWn0vorkhK6znsSJAR08+P3mlv2i0HgWatmMUKuc+UHbZSR4FAiSDokdCQ==","shasum":"f7fcaf0fe007dddd855403941a3f76a2fd32e53c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.105.tgz","fileCount":8,"unpackedSize":12739,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyU8JCRA9TVsSAnZWagAAM7cP/02x6mbuYLdw33q7vIwS\n4i+Gg9hVsx6yNYOhBbT99NCU6Vw9wpkyy1ApuD8RrZnS1a4KbpHrZNpb2u/v\n2qQIM8E03uYtECAq2ZMjrXV3R4KVjf7qaxkkis09GKqiNO+z3rgq1PZBdATF\ntTUuXjNHuJWYM6GiSLFaetbZid3hcaKfcLgRFRqDc3uCGWz5c/LljrXNcopG\nhI9uSSG5gp/CQjHE1Kk3mUnHCR6qVVqz7zpkPKddY1lKRrKviMpNN+0XE8O/\nQfKxxL9GXYyBJ+XV9chUcZfEvTuqPO5QsVkM5g6KbYFdfuop34zAUS60kMES\n1mLcYsL8uInIo9IVAep7tGJ7L2X2iBP4VJwE3vNetsv2oQ0c8EususCU4aAu\n2T9JZ6RCTQ1s5ATWhyFPPlPjdUuduZyLq4p02mZ3lg1mzzZrUoFjLhm9GsmF\nyTnaTJf//giA5xo6pOb6w2yXwcGiczuwazAZrOdNvf6XwBQ3Bg2il2c01w5i\nFJOzCreQA3HtKxYj9d6gpQcFPV8YL2sbL/aaYZXGe4oyfvMC8YCikpNByKRW\nr21sp9MXGrBtLbODsJIOAzdPPKKce0Ijt5fdveGgukmh7VRAHP+nK95HtCja\n5OfnGw1j4vYwVlkAKswXpL1bsQSzcolbv6T0hvLaeagOMWhw8T8wJnuEStF/\nsgHu\r\n=K5uz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCZe+a4kq1rLm98t9qA2xT9DUr8xztAMFKBE1uigpRefAIgTwtIxaYVy1YL3aLluo3flnDPgP7xGo5HjyNBLkadizA="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.105_1573474057299_0.978233916738231"},"_hasShrinkwrap":false},"0.10.10-alpha.106":{"name":"@react-ssr/express","version":"0.10.10-alpha.106","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.10-alpha.106+e764309"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"e764309ef1506af86d52fb80fca046fe95f0572b","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.106","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-BnFrC6vN/Mu3aE9cmCzo69mFsEGg9STfufODeWAkTfzJQMhxbDVxYOQ428j+7uQ4wcUFtifg0GT1GwDci7oDFA==","shasum":"87acf6fde11035541d1e9575f1d523f328fbe888","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.106.tgz","fileCount":8,"unpackedSize":12761,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyVBoCRA9TVsSAnZWagAAutwP/3yOvSiHhBR0C4Z7suzY\noSl8RngeGv5AmtJZoMz6Ebn/q8Yo5vz0XEpXLt2BQpfYY14k+otX3n5bVJTb\no9SkOehLM71Ao/vAYDwfw1MfBL2+TyNcq63j+d+6VYGstsV34sRmScFbMKGQ\ncgFIvkmcholLVvyFKuojOsf9p96B5lfSjgk8fMOJAiKx6HMMPKbFwprqILT5\nXphpcvRKkN0ScwX2ROc2lVsqbyUgVtwSjdfK9SEtgELaffrJgzCBu+Zv8dXB\nsSaKvDXDdWx4Yv44iXTg3hNFixekmWxJQfAav8sc7FUkOqOqzdEbYRFWhnk+\nmA0BYTb3MAHlUSyfbBsFBDYyAkQjit6NqNkxwsolqRsUBkki9TGctqtePxVs\nxXJ/z7FWSwG0vAR2nLuNOegxqmJY73OqTvBrh5p4f8KYcEIazi8ccfzaBtE6\n6G4l1A+YssaVsaPNMvsI8cbCpKs2ieKCE/nmkc2Lnpnbdnmahh7fNNA06Yu8\njrrgs3FUAxSIdXqJ1kBMrSNdlBHkKz4juaa2N3H5iIlqSdhoFSm2lhL9psEF\nHVcn/nIEe20NUvcqT+GWQmNhBiPRDCzJ2j10aCZFRt+knwU48O0YqwV41M2y\nMUtX+zRpV07WJW5GU+uHS/LVC7bcMco2QwJ1V3UNQoumsoqGYCQVkHN6twPU\npCtz\r\n=xoTR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH89E+MJD59SdkFItsHvmqS23EelMl7/hHC0LFCMojt3AiBxWDa917L7ewZuKyqdk5vJRPpGJd/pz3hQSpohPdIxNQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.106_1573474408003_0.10901365222167092"},"_hasShrinkwrap":false},"0.10.10-alpha.107":{"name":"@react-ssr/express","version":"0.10.10-alpha.107","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.10-alpha.107+570161b"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"570161bf42439c4953eddb6f692b19065a35c41b","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.107","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-1/c3pi+RBUiqjDSbBq4JX53OAVayK3DejlZOMT8962enVRM0BGCGlo0d88MZ8qe5b+WDg+nJT1uSjpJwSlHdBw==","shasum":"22c1a1c72a3fc7739a65d30803c9d63ad695fd1b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.107.tgz","fileCount":8,"unpackedSize":12765,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyVGQCRA9TVsSAnZWagAAasMP/jwntwDhjKDR8DhOlNEB\nK9UaT6kItPg2DJU+wWduoRaxtgOzOrj17hpB7G3NIqAr0uQIBn4eLZIPqksg\n6EKxWduNz07fkKgluCdFE6gDurtkRI8JyE+4t43swD3a8VndXNPTshmL+Ns4\nXIYWBVuy88Kdp07NJSW37wkJSCPqQWcb8dyG8DpjQphfZTUd6p56ESpdmV0Y\ns3WGW33l/fHI+uiIhYgSOYrX47unFOUrk0bgF73+gS+zNI2FiANTeI3ylXtY\nq4LfHeoBdbgmkIUo8evHITzXAMgb7e6gg/5PIU8ZiE0GMDSr9AMambbeCYjF\nGt8T308Dz39ilFr7NlK1vZtYjg1osMiwOMdgD35NEH93UVKXDl7h4dYRYxKW\nkngvJoWsWLM3HWW2x+9VjGLX/K+RcWkpj7oWFdKkyPkib+BzM8J8rdPH06Hu\nVieIUgx6gdURcTOK7FzD6C8sZsRDq0mGP/Bzl4jT2KGnMIuxvBXroGhjqSg/\n4MetfV3F5zJu+ZbZ0pY2+JTSt2bA60pte3v1C4sI9ft6QNMclWVIFcsz43yE\n0twVcwY+YKE6ECZ/2pXjcYOUg6noZSEBSCy8dXKtgx6R0XhTHx2qPbdAx2rl\n33rn7NFdWPgOgEWrQ8C0uOwS95VEkdPz87MTTUkx2h9sVuAoqVykytnqpuSk\n5e+X\r\n=0uPH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCrpCXkkXYU6RDZpzvxSYmPyllToAiCjz6GTyvMsWENgwIgQ0Aa65fo1VWesnC7k8EEoOdjIuU7gBnWYJwb3D1r1kk="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.107_1573474698406_0.9113360146839795"},"_hasShrinkwrap":false},"0.10.10-alpha.108":{"name":"@react-ssr/express","version":"0.10.10-alpha.108","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.10.10-alpha.108+f1f58c6"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"f1f58c673f674a719db70cf8f911611daa0305ec","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nWe can create the layout component like this:\n\n**./components/layout.jsx**\n\n```jsx\nexport const Layout = (props) => {\n  return (\n    <html>\n      <head>\n        <title>Default App Title</title>\n      </head>\n      <body>\n        {props.children}\n      </body>\n    </html>\n  );\n};\n```\n\nAnd then, just use it as always:\n\n**./views/index.jsx**\n\n```jsx\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <p>Hello Layout!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `@react-ssr/express/head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport Head from '@react-ssr/express/head';\nimport { Layout } from '../components/layout';\n\nconst Index = (props) => {\n  return (\n    <Layout>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </Layout>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n**Note:**\n\nBecause this is an experimental feature, currently it supports only `<title>` and `<meta name=\"description\">`.\n\nIf you want to use more supports, please [issue up](https://github.com/saltyshiomix/react-ssr/issues).\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.10.10-alpha.108","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-8LngA9alnLrzOmziJqsEDD/89l8wEbA759PdQF/q9GcBV4C6dNLHinvK8HT3bCBAhFEQu3wzaLYCIHapUc0biw==","shasum":"23e1d3b59e56356bfd64781c4a7f201a0197c45a","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.10.10-alpha.108.tgz","fileCount":8,"unpackedSize":12751,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyVJfCRA9TVsSAnZWagAApJgP/3lFQUwiHMNN+uJ2XXAv\nLr8CJmhoqZgLTjIG8d52lSHZGacX1+fRh1k9NmYWlBgEYdfaIYEDFJbTnVwz\n9fh01ISs2DHTQ9YzsQW3iac/NsI/4VlXFpRpTE18m5NcJO63yg+ZsI/1TLfr\ntCokVGYQXa3AfWrN07cWPWbzrew1w9dqFSYrb7csPyqjfCsNwzb64PDYWqMo\nK4FN1uTpg2mdi1Cq8BYNoLmEURUmYw7LxjJiQhu1Nhw05OHkdDZzCIZz1xed\nQJcCj9wGVSmGIBSLagu/ixR2lDldnke3P+fV7DVJJN4B0/vm1V+yJ3nvUWr8\nyZzqp2BKqHL7EGKJDyNs4DMRPxdINgN9M49wDued5swaM3VqIeDVLNDcF3z0\n89Ndz4QHNAZR+oD/cAzBdqoydLdEJld0tZwj+kuSDdpOryq1q8FqDNCk6mlY\nuYTtbzgtnEkzEikTtRpoBvjuhnA/q/1v7mpHDR39iNnr8WYKN3cGTvzk0V/N\nd0xzIZxPmffWG2bb6NlO/CFb1OH7l2zoZ3kz1V7hFudxIn8X6Hsqhyd/I8yI\nwiUCybkd2ctKZj8Cp57rsIJ4jUxHpGvbyoY5o3ozjwCutm4h4PJyp8ZVckwz\nPbXQU7sUxP0NQg6Ntfz8kTuDyb7FsRQwdKlG/E6DKgQiTWPEWn5FTRSgSn9M\nJg0F\r\n=x8eH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDoVC8jaOxgQHUHvORPgrABZWypexkzHRvDccDp20OQEwIgYpH38JfEFqGkQHxE0mQwYKMPaIfH5RQiI3MSVFEge3s="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.10.10-alpha.108_1573474910528_0.9302802932642542"},"_hasShrinkwrap":false},"0.11.0":{"name":"@react-ssr/express","version":"0.11.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.0"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"5a722c0d8891e129d28c35d2d63d81572f0179e3","_id":"@react-ssr/express@0.11.0","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-pL7BebCG879dKI5ZFs4fYHSaGbMLeSAIYw0UFtgWKfLzyQkNoauKdTmx4iL9s8k0MAw9LgBq9l5z9EDwvdkBww==","shasum":"9ea83103935168b384d81b401e2a7e981310425e","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.0.tgz","fileCount":8,"unpackedSize":12568,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyV6dCRA9TVsSAnZWagAAlgoP/1+2Nyp5pnB0pVe8PsWi\nZ8j4hRxnEjVq+uWpQUMoSlH6+nLF0+Dt+DtakRZSRQTgfmPq4nTRV92az87V\nlZkCwjq6NRzZjTN03wmig7mKVVP13ioF8kV//bWroSQ2xTWbZIzbG+dY9hlt\n0gQcToiuQjXzB/e8AJESdffhjYKNtgEPM586Quyisehbf0fEK1JOVo4LuCh4\nUujX6BXYau/6cTcPNvRDlgzmLwCw5hp5AcXIt/Yz3gBJXYKiVeY2dN3PAIyh\n2B7DjDeB6UQw0gNDhvWrQ2qQDhAYmP14/nEnT0fpQQ9bE25LpC2ynQfB1K3n\n30lljpT8hQ+soHOwEkOTwlloZ4o/bBibyMJVYEHG0cLchcN3jR9sy4qlxfk+\nGtDpgQxUBe7IL3F9/lxVuCJzuS/HpeGNXrUpPXcEWEUHneDIp0z4ZA+qhgo5\nev+mn/OPevrz7icDM/4rMb3apcVsSCLC0XU+g29VPpxc8Rcums7XQKiAcosQ\nMp/3vira1d2oLrP05nk3xIfhA0nZfd4BwwHKFT4C1ZkWHvLjtoXmdrPs8+QG\nOEeACL5EAL70sh8ny3grpDBjOpTlN8vQU29EyRXwA23C8p13pdH2vuoYZZp3\nlllK/aombWCxUikffjumTANqC287vfr068T3Ilu41tzaNJD/nLMLBr5cH4st\nV2hB\r\n=FOk5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH7SdXovOu48xgxYmNcQiLXQus/YNZ5oCSZSsrtydZh2AiBXTDDHG1Bq6Cie8wTskB8Q9txSE7DJj+xiynC2t0LrSA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.0_1573478045241_0.5885929312820561"},"_hasShrinkwrap":false},"0.11.1-alpha.1":{"name":"@react-ssr/express","version":"0.11.1-alpha.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.1-alpha.1+59f744b"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"59f744b6f349ad6491a3a314ca7ee5c166be2cbd","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.1-alpha.1","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-ntO6kt926C9N3qHve3qBSEXa7qZh3AB39Eq7rC88eg05saRuaTqZlLua96lsJlJ14mvuRJyJpNWMAPQ6e7yicQ==","shasum":"aa84587c28002a4824b7200bea7d877da915811d","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.1-alpha.1.tgz","fileCount":8,"unpackedSize":12600,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyWHhCRA9TVsSAnZWagAALN4P/0lgkjRvyjvqB7lveCek\nWYsGo2RHNB9xnbxQh1pUPULrD5O6/Kbe8djXOluQCNgtKTmHajLH+o+E2KtJ\nwuviFWOpQ912AvW3gaQ3tkHhB5Z/pzFNPf6BwUlD6kcjwUqQ+8xZc0Yb3Ka2\nybtVqeiYtSbE6aCzZ0ubF2RvY1Hhjr14QvEq3HOn+hmfDDPzDQiDQU36nolS\naM5vyMyyKYmk3T/AD3cM9MDyoU3IVG9eO5ob8igUMBh1UaALPKWUUN+079i2\nZKUef1I0bRT6tFM+Q6ucSNzpr0ZeFwjfXF4KkFeUviA5cAGjvUvKm89YG1Dg\nh1LSUTiR8QZ9Amy+YRLAATQBX3QJObycRbmnrqcsnZCSbdknt/6Usl66CHeD\nzqyISMd1Ihh3iPmhUXV07NoVa/3NUmyGAzvOWtT0uZg8eZDVmfVbVzcBwIzb\nD0E57CRVCTwPV1yz8Xdit/HKbwk4hK3Agq6w3F3EtDzpF4EbpgbWTVbUCNWS\n7d2ly8Vg29G1k9kzlgfRlvi+CpgdkxvjxBYK/4bKhw3MV0tVpPQa1ORDYuR4\nGUIt6VWRvfTDZO742l61LNYjGdQagCk1BWHOXp/TI5jlIsmteNGN39fNKCgC\nK+6WzFed+wPgHLNt4r4x/t626TRqc3OuRr6ucrhVI5HCPJ2dPycSRb3D2F7D\nZq2N\r\n=1AXv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA5d40WwS8uMnWKadJlR+22MmFLwNCmkAV9BvXQLuFXKAiAr+4nD95hrno9MnYBwvWCSPJLnN3XX0jrp7h0yvTJyog=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.1-alpha.1_1573478881412_0.33662189291170996"},"_hasShrinkwrap":false},"0.11.1-alpha.2":{"name":"@react-ssr/express","version":"0.11.1-alpha.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.1-alpha.2+f96817b"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"f96817b965fe920c36eb61097cedbdbd046cb266","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.1-alpha.2","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-C2UWzUDSZ6egRPiUZ2ewAOQOh4u5oM/J60E2dS8+ihaQkjQnCGFQPcM2RV2RhGinWpuGTCSZfCqu06fNejXAOA==","shasum":"0f60fa833f0d5cfee67fc54a337888c635f3c93d","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.1-alpha.2.tgz","fileCount":8,"unpackedSize":12600,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyWSeCRA9TVsSAnZWagAAy/QP/1lAccVHCC9zLAmNe3yb\ndspPCHG67AnDj38wTldxDjFVBJ6lDuz+IpomGMHdDfZb1OWcj+fqRNqFE6Nn\nNEbjPqvUpVpDQDLJPnq5cMUZQcmcu5FZ+OBs/Mf6TVK88+GzTl4nhd0GDr/h\ng7jSvtNHItuv9QeYDTh+5c5YoNhBk+XmDHmB8/UJ54ROrWSEZg4BCK4TNhXL\n4T+z+9+grVA8WTpVtIUKt5pH9S8uCoYN+TgO4a5Jw4NmfL8Q/etPOSVYsA29\nyXp1SdABadhM7tcixD23H68bRU0o3MJ4Fa+EtPYrrosq/+vs0pJEp9yteMbx\n6fCWaCW8jfnQNW1BiZRy2URdJy4fq6AMhjLaDNC3h/6zD3MPGUD5jlOc6vp8\n3jtxMcF5HR3AI9k56y0SsoHZn1s+eLbNknMNCTdIKXZoXY4RRqiPTenk6NqT\nRkQ4UAVnooGiZw9MtB/JUy+WTcg0hRGamC+hGbaT00J/jTXHpGjwLz9d34vE\nJU5MCje+bVQGk1X7ceyvT78wY6kX72qbJRz+pWKBEBy6xyudtAlWJmQLJCsX\nPXMPsU5sz/LLY7qDxtT0ppH5fWoXRPLSXi17HtD73twj5zaB1ZHW5iV5/TSu\n/74AAhT2SpXhInNBB7DMFomp0wX1xvLL1pAPxoPAxcJbCQg0vJMzI0tbHkC2\nX8VC\r\n=CV67\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD7qtp1RMW5Q8YWXBQo/73v5hHt/bmMyMMfd1nUZ4fw/QIgfeXRHZ6zdkDMSRPXKQVoY4vGx1v5LKFlu8ZMx4KUJBo="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.1-alpha.2_1573479582530_0.8111492042301738"},"_hasShrinkwrap":false},"0.11.1-alpha.3":{"name":"@react-ssr/express","version":"0.11.1-alpha.3","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.1-alpha.3+761c192"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"761c192e3d1f868b83e03e5b5c27e2b381aff420","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.1-alpha.3","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-RT0vyZb0nlQgGcZ4Rpqg56Vb3xnhrUxQD//QEGyyxvZEP7ngDJww0rKmX7/Vr2Rpj7foB1V/WNWO87VZj3JKqQ==","shasum":"30dabe79188f5275ac00e66b2167197a6666a58b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.1-alpha.3.tgz","fileCount":8,"unpackedSize":12600,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyWXkCRA9TVsSAnZWagAApiwP/19UQTnJIyfZCyjpskd3\nEsXd4bltznGmNyvmes1z9fypLbRI3c0nr0tV54Xm3HK6tFKdqYs5I4M+od6f\nI91yrOA7Idr9UJCgQYwtmimYGuafbAbjf4/IW8m+E0ocyWuxyZFQOFkFGx7+\nW7mZgbSMnmMkqu/jI4X5RFyaMMMsMNC9mr/ycZ1HBVLdbDesZosJbjdhS3Y5\nqrtuGhPqoEQHDftl0iQSs14vjYAaxWX5wDRvOnftUHHL0vIUbxRO+yNIjFMM\nRwA+Xujc+zmVcajC9ig7JC5+5Lb5L2zxKQEMpYCi+7zzMGi3OG5aZSmZXr9Q\nMfq67oQMjsSHDUsMygnUFxcH7QOvNPqTi4Hu1MgrxOE1L24NuNkL2ji2in2c\n0SCI0Ll3kIzzCUM8Gc/jVQW1O2ja5leeMh+hCmx1D2CcIGtHskDhmQ6xsXs2\nQv9qw8pYutQkRle7/Hu2M4DaeyfUpjEaazCwkrkp+7zKLR9QSf5H6em059HE\nE6LW46/V2/DF7KClmgEfryYFTzMGGgoS/9A+DQ2OVLe+9Qg2noV5IDE40PGG\noyMyR9kWM4oEdqqLhEnJZ/RmA/dE6//cde+4ZfVEx8FXlDjmyBsS2BRyx+fy\nMWvHUkVD5U18TPn9I8lYbKVCKp04uF7aBOV0U4bN94JMOHcKABa4klG1nV+A\n32u0\r\n=3e7U\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE2uZUJI6+RAuPprAX+dVzOWLXdP2Wk5dFI7S5MFzGNmAiBpmA5UF/gJqh3hwDZdAsvV3choDoKkKFX5KVBYHMsdhA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.1-alpha.3_1573479907727_0.19485503770482504"},"_hasShrinkwrap":false},"0.11.1-alpha.4":{"name":"@react-ssr/express","version":"0.11.1-alpha.4","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.1-alpha.4+65cbaf7"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"65cbaf78e0824d9913ccb703363df74683480907","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.1-alpha.4","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Pl0SmIgGB1ZqoGz72NTa22tP0d0/hk1SD6kzdlDBeZC1/MZ+SLUVe/fI5IiR5TPpvQTGYqerNCjbKbDuGKF/AQ==","shasum":"6c8026e47a9f845d09efcd0b0a43250de19c45e1","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.1-alpha.4.tgz","fileCount":8,"unpackedSize":12600,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyWl/CRA9TVsSAnZWagAAnz8P/1B9kbjo9YP/5EfBW7vD\njvl7atL6esb1OZWem1JloB8APvVohhp2X+RB0IpBL/o+ELyhlmuSOE7tsIUu\nxcj0O/VQ9ojMcrkt++6eJ7HeP4pOq1avHrn+pcfTOHTGvVY7MSO57976pKJI\ndG7wdzF70Zb+p40CD+7LNTpkqXBb5Dyip0lxiZYUS8dhbLZd5DTAjAMsDNWQ\nxTvu7JeZ/H0eoSz3PhIag/F1pY+D5Qi743/LK3+czvJW+9Jai1GCUE5xvD/m\nKX3tTL1Nqm1uaee6BKCymtEM8+KTZWlXKsNd7MqIDox524iOkUJH7oy8g3cQ\ncjM+Bnu3iXVfuGLL/qfSvBUF/DUpnQUmsmJfyfTjJvNTsepgax9kwcU+MOa9\n7sJiTyD7DrzOwt8BwxJLDmJsbPP+EaeB/EJTTNzVdC+yYeynAi5Utz/dPGuI\nbsn8vggM05gUmDY/mpdxYVVaPJrf0e/xXFfOdqdaNjmVne9Zaz+H79u1rX55\nHskqoWdbz9ml1nc4VbL7xfqC2l/rbSAAxO2puZNyX7SUShTt49PGbkIyNC+I\nqgcXyhAS9rUgNcxaEFluJxEzIJHzUTCioLRKbV8edRhsXnJc5ojFbkO+qpHp\nF7Z0eeKtBPhg3Fn1Av84EZZm3+KSKA5258iWBkpWON20BBD22W8LWIbzOqMN\nLxmF\r\n=Ri0D\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD6u/6hkl0SXWogiuP3nqSagxQFpOt12pPyjNYk0xAmBAIhAJSkR6HPTxkcQrcOi9pQRmGTXJX92XdqueK/uGSFEN9c"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.1-alpha.4_1573480830550_0.8448457728213248"},"_hasShrinkwrap":false},"0.11.1-alpha.5":{"name":"@react-ssr/express","version":"0.11.1-alpha.5","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.1-alpha.5+ea39f18"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"ea39f18e6040e649e663fe1e55b8eb901bc56202","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.1-alpha.5","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-xH25JCZgkOUZBYRr69GFQJceKn9oRehl0cduOvU5xS4NgplTCWlqLHLSNBvtB68uRGjA6QcgSdPVzzRqlCXmDA==","shasum":"40582555edef4612e87cf916e3e4402bc2b6e919","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.1-alpha.5.tgz","fileCount":8,"unpackedSize":12600,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyWqnCRA9TVsSAnZWagAA8GsQAJOaIU9JOi70T1cG/PE1\nXkR4QBClpsVFwyA2wR/vGnkAyGvTTPBEzyEYhG2QjIh858wNI7FMqeuktDMO\nwnKf032m5GWnGSC9fmpPYzzZ/ZQI4vvGs4OTj0xY4ca8RXIKbzptybMSAWjS\n1RuMF80WmaPYe2C+flQm4EC6nvzD+XxRWMnXP3Z/LifJHN+02krjwYwYjv1D\nICcTnnhe1daPPR9H1KKNW/o4wVy2vsPOF+EAjeRnLTRIpmhnt/QZ/5WKjsfC\n83qhYiymztImpyLaitH02sws6mGYKyWmT4OoepwKhR2TZiNbavH5yWP1K/W9\nDVeubV3QLarRgPb1nobRBUKUnl3kRxCoSpb1bl6tR7KighM7MWqSxBxMQ9fQ\n7Lu+7GPymOxCxxJL9iLq1bSpUXcc0xnPDUrVdBzu0SkhNQEQYjGEv779ZZUc\ntJKl1XP0bAblVsT/kfTBMtXuQUBi3X4W7/wi5Hra5dKAUJIe3so9Ygpqvlkm\nk2paIms1SNsSw8OEuLI3jmITNgcd/D48MCElAktPPG6i0rezDP7tAyBtTr86\nB2qm8v0VlDEK2cpfULhJ2jaqTabWT346w1GR96BYqYiZ+o8zKFVVoXyijOYg\ni65p39sOTGSjW5txsHm6Rxz8BzgDCqKjU3XcVMtApSF44cg9wMLlw+bnvQw7\n3dpy\r\n=wGEI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDJzM8tAsTHFhut3a6WpTiz/7qGSfG1K2ruEz9EZHi1CAIgdoTesr5w4sOcSHNDncTzOMbBZxWA3sHmFaK6IbwjfgA="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.1-alpha.5_1573481126582_0.23269491414977428"},"_hasShrinkwrap":false},"0.11.1-alpha.6":{"name":"@react-ssr/express","version":"0.11.1-alpha.6","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.1-alpha.6+4618308"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"46183082d893ef1d2037ac1c68603ffe4ab9f4fb","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.1-alpha.6","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-OFjiEngrt1BCs9xf9ThEPYDtD6T8Do8dNNZFizT+1sUsMSAiFcifk8tVDrGNml3uVe/LFMbvn4fkw9Kxd271Zg==","shasum":"91a271d9881ebc176a3335c818480a21cc2c83a4","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.1-alpha.6.tgz","fileCount":8,"unpackedSize":12600,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyWu9CRA9TVsSAnZWagAAtTgP/iMGyn/Yv1myYfkLM6BT\ngSkPBc+vg9UuP5b4u1ns+TqM10fjXqQjxHKjENI287sbM1ax14Blinx1QVpE\nNuUZ16wFDuaG78Rd4vombI4tJQBSyg/vQrul8EkoLkzLHgLxvxRFaAcF7WWe\nxizSSsB/3uLEjLlGUzwAavjLwN67R6WkCMcYMtzOAh3Rvm7k6TZqnB5SLcFY\n8jb5EYEmcC3kS149upUPYM/6lOdIFlMiOavYArpy3bFbldoDbB33kc5mPn1I\nx5c9gX7wT7RJPOhjTIws6P8b6vyQk/8i6aMz2i+VbzMNkR2D+myypDii7xVd\nIwihBIZ4YbDwbdtErTKbU5G1qf0/9oQaLj9VVxVOFkqHTe9zJcAg1tGk028d\n9ArMZPMQXLeDme7sH3yu4/1weE6UfpJzIlJ/CycOw70RzKlunbiYQRQNnS/0\n1ZWqCWPTRK+lHIW8QJJbavDOj+SowZJCLLR1DoybEoAVUo5ILS+m1MHJX0xy\nI+FHkjfdajFt7Dw1McQEDbeK2UGG0qNFqGwbAH0OXU/sDDCu6H7uLkOfMz1S\ngplNy8TcJt9GO0aVwsgo4LEeuQ26UBWlvxy/misV+PyRWy4Emxp3G7X1VDpi\naiIBiJ+OshH5aWWegPP92bQ4/Qk7HLgbSaHpYBPBnlWyR9blgfz2hpNyOafg\ngSy4\r\n=EW9M\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHXEzyHhnv/9DrSNTfl+AkeP/qBIraqwa4dd9hV5OZGkAiBV6uyrSfVkyYK7F6zh0h7haoHMKUHUpzu77UkFWhSMHA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.1-alpha.6_1573481404661_0.21674481186511052"},"_hasShrinkwrap":false},"0.11.1-alpha.7":{"name":"@react-ssr/express","version":"0.11.1-alpha.7","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.1-alpha.7+0a4a014"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"0a4a01481ac2aacc78800816eb324d32c9646868","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.1-alpha.7","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-FRSLrEJIu/cG08eg/x6r9K2fkIX35NPctPm6FB7Po8UkAfM+9H0hrYtBGc1nvxNcV6nyNM/FxMdtXaXokB+ZFA==","shasum":"63c3cdfb50e8999b0dffce4dda9d0d47c9776f96","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.1-alpha.7.tgz","fileCount":8,"unpackedSize":12600,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyW1BCRA9TVsSAnZWagAAK8EP/3GtX7KwVI0ukJOp3cvC\ntZZWGz8G29P4yxqY7e8ByfbVdzMi/Wy8A7M9HJshhD4vDDNW4wcCU3v+/kgq\nTDNU6uP1ARW+AJ6ORb/QdY7DeSBO3kS40uwByW8gQl84XJmdsF44H4l3DoHP\nALNPnHngEIItrXSSOupRR91RCQ6ktQcBKMJU/ppabHZCCgg3yrb0xUqfdeKA\nZr3qhHRH7ei10nCy+Nwgi+b8OG9USTzo5zAFZEC+/pKHfPGfggMw/hZNTTDJ\nj4MJBqVHSVOzb2WL1fYaO+SNP8RoqBIC1qiRceIgubnhLz4aQNQt6JWngBal\nDo0m0wMtvsHswyQJYY4pzG/VE4XhJOWzv+CK8+nrVKodYpNb7n0POMoKhPKy\ns+tuTOdmao+eMa1fhPTspy10NATazdFbDGJ80UkZwtZRqj1oTzcvrS1HIFBs\nx97Km4X4nEMSMrFVBNQExWFnx3FrRlLpPEumPD6BXrrBnGbT2AZqQIlasjvY\nN6j2IJ7CK089Fl5G3EaItvaQ5MhWzuCWY6LI9l2u6xGWy/jli+Rq0g1R0Jzk\nAWB2zpDTtM7urFOlLCAdSBOamkYKLremds/KAF4KPBetmxnpKv2Vp5D0R3fY\niuwhV/dsNiM0lTEhi8hcpQzXzytE8HKQRtPEruBQ5J2564lDA+SoRx9gI7/0\npOPA\r\n=l9Ic\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDXh12n5AV7X7sZ0vzjJQAMIFQTwNmH8D1isNblEqHJvgIgJMgWbB3Q6Q4x1hZrzkmyEmkq9ldPF3ScpT4fHcmvQ0g="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.1-alpha.7_1573481793053_0.42733135555656565"},"_hasShrinkwrap":false},"0.11.1":{"name":"@react-ssr/express","version":"0.11.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.1"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"6329a5a4c64ea9ad1959ba9133a04d96c8c20956","_id":"@react-ssr/express@0.11.1","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-+4apOk9TsH03OycD3RajpnezMeHlqNzdnoQcqJlIrOYbWkJ/UFM6YqQSkNOZ+CIiDlWNLTZU6xiGNHet6WifeA==","shasum":"362b1ef295a28de62b342b534438b2aa3f4f5485","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.1.tgz","fileCount":8,"unpackedSize":12568,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyW3PCRA9TVsSAnZWagAAcpkP/2PxNCzNyTeB9Feoaer7\nxJEqg9dJzo4CKYYVmiKbfJHVD6aQJvua95J5YAOz9xmmW2UDzdsJkusdHimU\nArPV7tm2/dncHeQWcCR8zgnj5hLHIErFbJCkjmYudGekQCjtkvmAOJE16VVQ\nEkpSE7izGsTfRlETh+EMfNDQqLOlO19amZASAt2BYKUZwOarfJIQklCJ1Nn9\nRiD/8PBZZItuDdb3FCnWx9vlP/vHT+t0z9+dmH5jfjW/CX4w+dBkTmk1lAJS\nxJXdTJN/+gvR7gHR3A2jJXrBtHqXHVO+rl4mmFvmd/FIBk6bEeUrPTE56WR7\nqPc6E0DZdaRemysvsgatRoGbZ6UkLGV+TGDOrmbfIGI/RM+iMcKHwqe/BDpZ\nMPVRuq6SK9TIwujfyPzbhka/IpIDaTJjgF44KmHYwC62qN+OqdO0GdQD8tsK\nHryyYc8I/FHUWwMhqGZ8R/SPEwhEpkmwthGQ1k9wPfym9PZd8yjt2Sl4Z6Tg\nYRvQnfLt+51iQCtXKeKk+h67KqXBoPHg8r3M0AcLLNUD/uRMoW1RJM2Q/VzD\n4tsRutDCmvbenUJY130UOnAIayLaUUlk2ZBBHZiljtXUwlI50GyJ9hXMZ4IM\nzd5pBwTUFjcHYasUy6XrduNnoOIp5Usra8+3mL6x/krpDo6PlZ2YyIvnEGC5\nNZnC\r\n=cb+t\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDcd/oGEgJQhAT2JrxdzrPNxbtl4IMxCVm/UXe7rfWonAiEA3lIU1EgkvAruk8iJ/bfippgkgrpzJ6hIghEaLJxMJO0="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.1_1573481935447_0.4286861450636279"},"_hasShrinkwrap":false},"0.11.2-alpha.0":{"name":"@react-ssr/express","version":"0.11.2-alpha.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.2-alpha.0+ef9545f"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"ef9545f24ab2097dc0ba7eb023f75bbc86cf131a","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.2-alpha.0","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-I/KiL55/2PSR90D4ofCGdn9nzqzwcmon/jzqwMHELuo33phYLvD9Id386xDLFYTqMtMOZhJ1hRpBpC6i2a/0Ww==","shasum":"4b0b4683b0f4fed8557b0375f26ff09bd588eeef","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.2-alpha.0.tgz","fileCount":8,"unpackedSize":12600,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyXAACRA9TVsSAnZWagAABNAP/1EIiXomcrY4qbBTvDNw\nX4zBYuRA6h3g0rU/MYKNr3apIJWXt/+s6VDUKRXiGbS1CgRNNUarO4vzAuTq\nHaNVVsThZr1aV/B3y2166A1vjZf4JP3NkCWPcYD5vORgt6TEXbpfF1bk3krX\n7BzWuz8fpi/YPI1zHOaAV2OMv7iuiLP+nr2mSnrMxM5FUHiY1DYUFCQs2SOI\n++YKBqHA+crK59W4RNpd+05skGz/b3LrlhbwWcGzxRSzht+Ch+p2gYp5k11h\njHxs4nGRPlmtQ5bUWWXnEryBw2HQ+Q3YUvhSE3xRvlG3b/SmOMmZ65jc+Jzt\n2i9NF9Wi9TulDa+JB8KuD06Kh7uRb+IlrZYIReJ3bDHbB/jDr1YxrZpYajyc\n5qVKI255DryXIurS1qam8iae9VgCFEAZBy3gdLYoBfxvlKE66TLN3vkQ/S8M\ndt+eCYLgw8xcJHljyHOHFyh6zroMz5BF2gK4C1cBu3hYg0q2vTbyr401SuOd\nO677TvkEnods9KQ+qNf6DR9hpWWLjyV9siTY8jgboy2wUc6O6GUaFEn3MODt\nuGX0RIU91681zsnZ3413/3Bbog2aPTJ2bjLXGLjTaFYy1YyGfw0tfG3WdGD8\nRCfKyMuJ7b79oNwHdN8FlvHIxlkLW1T0uvK0i5PI5pszetoJfNU6UeR8N+s5\nMXUM\r\n=h/pI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCwfF5IN6CT8xg95bEwESC74MDlGLcZiLcEu+T6Ucd9yQIhAJkq2e+hhCQNnx6ZoPxhE/FtnHZM5QoTOui2QH6bBr4S"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.2-alpha.0_1573482495967_0.0548539768232712"},"_hasShrinkwrap":false},"0.11.2-alpha.1":{"name":"@react-ssr/express","version":"0.11.2-alpha.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.2-alpha.1+6c81f75"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"6c81f756864f6758c4ec46c463a75f58d0269d06","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.2-alpha.1","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-uN8+Bau1zRGXbh/OtbSa7lJJFKbVxkEL3AV68EDwmtZ4aiuO7awjKImhOjuPqZXCNdAdxNMbDpb8Ow7VCbuB9A==","shasum":"97095696aa729c1618b00d0aa3f13ddd68eb1500","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.2-alpha.1.tgz","fileCount":8,"unpackedSize":12600,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyXJjCRA9TVsSAnZWagAAS90QAIPc/fwrFgyU62qGheCI\nM8zoNEjNnLVvBIAGsTLUy/qCysR6aU9tXfJxTN4OvqD3FKpfE8aCOjib+YA9\nWSfD0Pk/4TfW35mYAiXArCvkrRIkaOzlxGOt2IZp6iH90ae+RDwDGZHLwVQ8\nSZypA+YynRm50z7rd5YsNWsjMtOmZJAZsyFVcZU2QiQeC5aegMz59x9OkUmB\nw2XQakCdv2UoIsN4UuwpvQUUcOalCh7LfHtcTuHukxrP8PnCz8MsNwK0p8rV\nDe4hH4g35+xK4xtBTkGq9sRJoKV6HYDDs3zwQd1jhSJ34stZk/msarwiwPq4\nF2hlwrvUO6eCkiRooTfDUDDrR4eU/+Mm5hxaOgMJMmHsrxmDLPoZqSTsdjLd\nYZHiDPNHHKi3bOe2kZHYFOPaXflDBieQ7QtP+4jfCBKxiwGa8wn5VXgHtov/\nlMfvL6ehCc/QKTdhvAQ0jq+Yp0Eq6pjST0VgwgDyG6l5fi+589ajPGJyCfjY\nTQAeqc2V3BK18w8fqFL27jGknYbOmbaDu/0CmYcEYwgnn5wZcxqXKYyf2D3C\nHMOceM/wM4U0m40tXcn6hUK9+AxzROVkBomNlVJE3K1WetMestuyWcBYZZyX\nK7jasNk25L3bPi8AII7hPKDi2Dd8sDP4iMdApy6JtPIeOzO2Dkm1pNdVg8fb\nAjp6\r\n=H87D\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCcAA0HGXYcIj+vdoUv2+3uy5LEw+K8JUOWDoT9zkfmfQIgcmvKB6F3P93QPVxMcGxcOSukJG3kKIOvpb0M0US4FR0="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.2-alpha.1_1573483106710_0.18860870354048487"},"_hasShrinkwrap":false},"0.11.2-alpha.2":{"name":"@react-ssr/express","version":"0.11.2-alpha.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.2-alpha.2+305a342"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"305a34205a3d03b15ff2e74ba0796ad0b6737132","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.2-alpha.2","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-9DlFXV2+A1mtpnSYYaU0LB+Lr4N1iJVuUsSzhh9z3PWbGBzQ/s1Dx9fk4ra4ou3Q0p7L8HuvUrD66Uof3MtB3w==","shasum":"6efbf2a1450632f5a146935e1c80ab668560a138","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.2-alpha.2.tgz","fileCount":8,"unpackedSize":12600,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyXLZCRA9TVsSAnZWagAAlPwP/1SwXrwIlTBBfskn5f5/\nEYPN0RlUNJoSCoIzKugD+W+b0LpLGnBDQhl3Ffa47iqYuBjaP9P8qZ7KQdKD\n+jf67ogZw4waqKMO7UKKjuQ/gtdkfD5AAEHi4G4yTB3uGGtP0GgM3DqE+8XX\nWKfaGB8fQdKsyrVAp6FCGLAGqhJnOd854KzdDXGxFlQg/b9b/MwLlC0UkPNS\nuCfuJbnUkG+miTFxXFaTtbm/q7Cmj+cDQZnbQ6YZ21RGrIRo5w31hQJ6Z+Cy\nC/W/zV/9UwYZj9oMMj0C2DSRMmvUiV/4dMO5RW+JUIgeWnEEpGZ7oGmUmbgw\njHCri9NP+cwuD7Go667RUvvz+DFULJ9OtP6MHj6bUg97iptFM0TKqE4J0ppJ\ntnoLAwkk06CHNfqgt93t75NFqyRAdGMpMf/bnDnWMjc2imX29wZ4pKQ9X4/4\nLYKHaLTVUMKGiOnKGSv5EiZKqpDWa50A29A8mlIFRYRml5gvS+6b0pXTm2+E\n/ozaA9k0nN1C7VUOZswhGVkI9A4F6wszDKQLiI6GlKiR8I19ooHSh2Kq7cE7\n3oRPNVHluouDdYctybG7F+P16qwOdQjt6D+R6iHoMH+JxwRownvXG3gMA+bF\nMwIypRz/eEpkPTPfGFoYmKLAyn3WUCCd4KsuJplNzIoBGj5bSSWSZkuUS0fC\nyWKI\r\n=tNgy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHZPJAVPRUC7B6VwPPIwrWIlnX55UUT/JF3H3chiCOpIAiEAqSCdrzglaZkgM3LqvCUg/R7+LMsUXjApV8xet16IS2o="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.2-alpha.2_1573483224950_0.01833477621484092"},"_hasShrinkwrap":false},"0.11.2-alpha.3":{"name":"@react-ssr/express","version":"0.11.2-alpha.3","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.2-alpha.3+3468d22"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"3468d22e4e9b87a067df9be229ad3b876ba0feed","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.2-alpha.3","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-vDIiWM8cAthwPME1ZItEOBPIhzsW1HhgqKnSTEQ1j2Olo+aapTKqHDtFRNi/swI/mQ5mFj7KKpHY18dRrimc8w==","shasum":"87df98cb9ce3496b4b2e4568bec2153777fb3726","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.2-alpha.3.tgz","fileCount":8,"unpackedSize":12600,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyXS7CRA9TVsSAnZWagAA7wAP/RP/Y+uCpnCL0/4RYKuF\n1xpKdqsCk32WDz55ch/8U+y6hkHGn0RBZ2AIa32Ex1VYRRNp8PZc6z/SVvKC\naTr1ApNzcBoy+k/KrR3geGksMl/WjgbpwtI1GcTvspMZnpaRnCQpF5KIzrNI\noYnexTIswCkrbZrwn1yvR7VETrZlHXvao8diJ2pzTZk0pSUSVbQEJBturBCn\nC4YQw01MOiGa+XNsseoHbsBD9p4BAEdkwJTRl5c8Kk3yCwDFBbdUtq90de2e\nMEO29Mwxa3qHdYSKuaubBI+dRVSzDxdgjtXqcm5EJ3OF25Uakjm2qCyQA/Or\nMxEkF2uOlDriO2bDMV0nTSSTHyqHTteUJ5N/gIjf7YlF357zjFt5fL1Z4unk\ntmyfI/y0omAHXPd8zrxD5D6SWQ0mHX1r+2xDbzX4+Na3U3FROD9KiFf6B3qt\n5t/78sKrcfknFKgZhAPFyQ8nA9r4hMfBFQBVhGGWlfefbERFtjCStGG1M8P2\nzLmXtWV3viMipqSEF6y16yvzX8GFd9TUuon9+AX6SihZYrh5PtQ3KX4pC4rt\nK4XEFRc0ebV65GXDdUgWgQCi+G9s3ay4ot+pCT5Hf1Q/Gb/CCDqAa304qvnk\nvYNUeZP3ikBHvaI14R3uyxqD+pDoQWIlkNdZDUHkH2pkvwfu1/OJTf9gdv39\nv+KW\r\n=ARAP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAC92/Ey8QF/z68EM1zjzQYS0ZkoROPWkVDO6nagsihzAiAnVw07CgGfxJqVFom6eEAY8Wj5mAM2ah+v8Xy9MrZ1YQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.2-alpha.3_1573483707066_0.8216129243265073"},"_hasShrinkwrap":false},"0.11.2-alpha.4":{"name":"@react-ssr/express","version":"0.11.2-alpha.4","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.2-alpha.4+441b5d6"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"441b5d6b193d0b077023fa0cf37b1bb8308fdb23","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.2-alpha.4","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-44rvcjFaM9KFTaRPsMXYcNJADUuP0o9grYZhcwvSiBNhpRr/1PzP0SAh/Om4IaRaj+0WGMOUWG5368Gs5xQ5kQ==","shasum":"a2b510b1523c9cd2f7b7355117773ff2c9ac852a","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.2-alpha.4.tgz","fileCount":8,"unpackedSize":12600,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyXUVCRA9TVsSAnZWagAA/iIQAJVPHMOPemv004vAzYCJ\ni6gSPa+wM4lA7PV5p0aUjXAPdm7qYr09QM7uwCDrGuMZ7fIeIpyePo1VK6SV\na0ENFjXe6/F1oY+2XP803RXXMFi6fLs+X9P09RmWvwH8ngX6hDyBYO3IzoYS\nFUhn9xtkvp7HMz2KASUCe221NdzHM8gzVR76rzsSo3pJlnKfAmCmEIsfX9aF\nJhdhbN9YWPsWWC2MqrXN7AKohXASEh/GufJ6h6W1zHfHVpmx3zSj4KdhvnC2\n8unzN9tk9wTZh0W8vSBvoU6Zu8GjquUSjpcTEJ/8SfzzaoJXh1XE9GCYCDhw\n09TUFGLr2IoOOqSKnpiL+HSIWdEnnCVdo+YF0ThqHf5X7Y/mUtanGwCDBjoO\nsxbqT+GktE10SCKsmDvdeK70rmiJ1gYV69X0Rdlp6pP5VVaKYMBBN2Jhcmpg\nMpuJ7xDeu+b/GuDYNVYStVsBe43kBLqgRoJGw/Cga0LDOyyg1bLeoXtEj97c\nMukQSFFPckh+X9CP6MyBafMzmiEbRHMRYH+R6Mm5Xv2teWwFUOQhL9+YmFkZ\nHEOcbm4/8q4PwqP6kL1aCSTOTRvVlWcDj7/uhteN4sd25odlk8Dwhb+bHxvJ\nk0AiWNaDzdBVbIQp9YfE2Jsfcq7UayPqIziuES7aOmWzdcKx50NvVahoD8zO\nXaH6\r\n=b9p8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBrz6O1qCtWWV3BIaefpUNL1u7bvYDosUSBeZCxiRPqIAiBgfcG2tli/Lz49iWrO39MIvbzP/4AOtLhNyUbxtzkwZw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.2-alpha.4_1573483797451_0.2104893602980391"},"_hasShrinkwrap":false},"0.11.2-alpha.5":{"name":"@react-ssr/express","version":"0.11.2-alpha.5","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.2-alpha.5+d006483"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"d006483b0d92488428dd9ae768b52d94ca995811","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.2-alpha.5","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-eR+T4V3zQvOmkO7rkjU78dZ/LK0HzvafiQ3AqdfX/3K0bQXpQyQcAAOgx84j0c/7H8mM9fCu5VEeUU0sLrm0eA==","shasum":"cbc4a6a912cf44d5d81c7c848e61d1a04e5f52c4","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.2-alpha.5.tgz","fileCount":8,"unpackedSize":12600,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyXWvCRA9TVsSAnZWagAAeBcP/jML+KRHPigfUmKblB2L\nPhCEC48swxvWbaprF3fQh4AYj+7NKK0WG72MwswUVnSwhYru51FdPIoQLNA0\nnMI0Ba8UmrbkKPjsmcBlkvJmEyY+wIPPXjq76mJH/HTX1d2tgDKG5I/n4kAT\nNkrakaFja0whfhnbfQac992R5VrYbzfUe9z+en+lUE1InHwVAgiKwrPazVs7\nxyjJbyF6xAP8J1w1sforVdTtC5GVMHtHCS+NTyVU7rrdCoaCqaoJC031d7yY\n1VL8X0HAPOKu1M9dWuv9S+X5269tAjbq8LZudIzFHDvHQQ9r9Y68sEBknMGn\nHaGrMvygsNnTV40qxqwgbnrY8pwGjk6JGsf+SyEKERf0ZU0iNz4hqZ9gyv2o\n8GkfLoZUPPpVtErP+4W5aMjXVv4F5X4PMDclX5AA9KmKP6A0g0GfhPhV6d8v\nlDQcs/EvMCmL/dPj60O7fdMaiVi5qcUymzdmzjtdVkZM6inyBWdHrsUG6I3e\nySWRBa6MCXZERLtSt8IW6pA4zdnOJe8gwSGxODJL3gx0/tBIEpzPX8H1dvQr\nlyo3YKS72FuaaIWKOcbHcjhJ2Uq22UjiDuwHxPCzkenUsxNwHkupvIOFMaeQ\n1cigh0/twdAKqIEEVeX+J69gHrWxCuykC2CkdE8HGb9Qg5PaPUgsyr0B6vbB\nxKlQ\r\n=JNln\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBTRVijBkpdX7CpoHaLoLS3qhehaYWxIet/rUnN7+Kq2AiBVtlnMHpVsckOx2LXx+Fj54JsUiaTfiaynAVL+rN+SkQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.2-alpha.5_1573483951316_0.08543039811216024"},"_hasShrinkwrap":false},"0.11.2-alpha.6":{"name":"@react-ssr/express","version":"0.11.2-alpha.6","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.2-alpha.6+e46a9ce"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"e46a9ce1badf719f33fbf72e8a4ace769d0b858e","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.2-alpha.6","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-TH0QYBaWSxni71e8EHT2mlZygYOECultGvvb+NL2ZTs+RCAdEzsbQgvPJqV0Qn6LIZRpnrrhD/0i9wYnCAzCrQ==","shasum":"141a43a294528fa5fcf68ef3c5fd225fafc7be0d","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.2-alpha.6.tgz","fileCount":8,"unpackedSize":12600,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyXYjCRA9TVsSAnZWagAA+gkP/j3x9ZFOi5YNLj4u3WsD\nt5DlM+zfRQu9zI2fBkwCE99bmH63KY5dmA8mewBC3q9GGUCBVIrnqpcxHBLl\nmDd3RS36nbNP/QFCcXVf3RGQM5tujRFY1+cw/w+ya3/YGoxxaiZeEPNYdOun\n3bXQgM6a95incmhb8XcVrsrCeEfB9cn3Ds0xtYFgdPwASGw1viibig6RYw5E\nc40ym4ljqZyqD3futNNsnhWTSD2n6kEr224DJkdWYk2Kl0sXd6YQe+znbKjY\nFZeJOlyR8rS/eJ1BeKuIfNAysFMoqvCLs3q/3akaSLq1mZoesslRnhw0oHhv\nMS9hv7ZBpBVLmMYsBtQ6LzTocUnv3FwGq+RBAKWqqZUJxL+ca8p8+SBTspSi\nZWHZL3m6R4KZatlT0OM7Fl25awKa/IFnUxI20m7AVrIas6z2RePoxkXqwWgU\n70vmVYcjFw4xB8dA3fF+o/2ZUQj4rkOnu4UO0rHH/3y8o4yG0jvBL4rjXpPP\nZtxlBgAuUoy8BFtYlg5DNKzV9PYFw+Tzcj6OjVhiBJhvzXfgituFPNIpfaL+\n8PkJ20Z7XuNhlHYFQ2+fBVd2khVWBif30zA/hAf2rfjg0NT6LBYOXgNlgBDn\nYyhCoaCKL4BZz0o7SdTseq7+Sd0Hbo4qPbBd1fM/HjKNLAeYOYLNVwgKvX5x\nrRRx\r\n=08b+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD6OzqlS1n6qqV8cjWNkqqnNqiMdNV9z+EjmjSKlUilvQIgLoLw1v2suHy/0KKVWZve5oVtKKZ4HcyiOE9FxcPQ10c="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.2-alpha.6_1573484066885_0.6711879783653663"},"_hasShrinkwrap":false},"0.11.2-alpha.7":{"name":"@react-ssr/express","version":"0.11.2-alpha.7","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.2-alpha.7+18e70a6"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"18e70a620cabd2fb4c3ae77fd5a20f6f93de6635","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.2-alpha.7","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-wPN4YS8OCLyM35ZArwKnpj+3YPNNAUhc/aqcyXJXtlgM8YcLjZXTIs+GoJx3Mw+2NnNxFvHNIvEMgtV8Y3bRIQ==","shasum":"e17e1a676b5c08c23bbc72888f2f63050d6179f6","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.2-alpha.7.tgz","fileCount":8,"unpackedSize":12600,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyXe2CRA9TVsSAnZWagAAnekP/2D6M5gSAg5c5X+Ncz7y\nw7GgAAwv7LLjJNnE5W4A36idyFSZZBH+C9/q4u536dbsxa+9Cu7rQxyNnpsq\nzH36NVK5k31Zevj0AiXO8SiUH+CmW9DyPzeMRY0b3/y/QZANqqZx0HUcyo7w\nKIDA1v5Ancb8G7Q18EfDTR/lkAcBt/Dne4WDRHqRdxkBfjggOV4dfFCbGwuZ\nhTV1qaUpdqmnAGPaQ+l3wj44acolzCaYQfZGGfKEl9FXBrcrDJeT13urpZET\nVpVV2GTcPiyb27dRP7mHh++PIt4j3+//yZ721VUp6svH31HJcaa/NxjEufms\nGbOBRNlLusdsMun6PUbNzkaxemqX77iaNRWbfVUaGumJPQIvZ3DhW/pOmR7S\nJX5QCAeROfdJcxGzUsISf8/y0jbZjPlH5Z0b5JHV4KET9QNfoBic4grCYVmK\nVxKamMrZTwzBdqjzXoHg63/DwQeLBtdEjebgzg/2NqEUqMV0B+bQgpAN5+KE\ndshPSAoekJ4yjj8x0yh4mZoHhyelyDZ/JO2NfJQ5MFncXEiq13N3MyBbjq1N\njhA88CGd5U9dhVzpShDbiljKH7Tan9Kk0WjDI1/dHLLGtdFdZGexFTXG6Yla\nyZpaMQO4myuLeu8v+nlaMmPf4sFk/W6PmR9iEnjXvaWLQP926cLkdhT2RuwG\n1Y24\r\n=vZ8d\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQChlM3al6/WYrJ32j2/dC7T/ISO7qrCAu3vb+XBWw2UcwIhAJO8/Op5BV64pZ2CN0eNCwV7fhXE7uPxfw4OLq0oA1fV"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.2-alpha.7_1573484470098_0.24232378299734925"},"_hasShrinkwrap":false},"0.11.2-alpha.8":{"name":"@react-ssr/express","version":"0.11.2-alpha.8","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.2-alpha.8+e8b93f9"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"e8b93f9e6a7a1ceca331745c27238b4a8e58aba4","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.2-alpha.8","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-QuEbPRNnbBV5emMxpS52JGUFeBbnSzSptErE6Xg/vQRWw1nbqD2BUGJ0zw2x9rx2TQpLfxVJUT1qp/Fk0I/gyw==","shasum":"189531888865945a4501c96d9de31055dad0fef3","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.2-alpha.8.tgz","fileCount":8,"unpackedSize":12600,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyXgfCRA9TVsSAnZWagAA4ccP/R94oosJRLiQrL2qnJ9G\n363p0cvgvc69P6gh45mcmg9esnTqCHhSMGHBd20N8PQnZzfeECf9q+U7Rmsr\nNqU4RMp0TAHF+DLUBb+2bWpCNfG5gxrE5bhgsEW44Xed525CUu/vExbBxZIg\njRncT+KAm7zA/IUatlwvtlJFFJCNdI/qyAs7p5HWf9aa1VjaJ/YqlvwZoCox\nJzTvn5iyNPpnbeNcXfaTzdTCFfpwiTqkx0mVig2eOC2JD9+ChM8dkyEQ7RJP\nSCvJWLCroi4NB6HwceOOQqPyGdxwXvlo9QweEKXN3swANSjwO/fGNgZjY4QR\n7bVbAATpy/JfLvUnDzM1R60V+0vDsllZ8vh0JqzigOtEWQUmuDUUwfACCO6K\ny3CiYp0XSUVO+U/148Yzet4Uz9ADyZE9pR/yrg6riTcZxvF+z9Mc0mV9jN9x\nUwAvqLFb7P/crB+oUxD7TI//J/f4KbZ0vxiuL35Hu6EN/6O9nUe8nqqQCsx0\n/OVQo53sFnqytmXXuSkj+OBFFixmmclEG2ES89ZeViC9zjF0t+9nAdHj7ddR\nODGhV9VRvDz8+TxLSJsL7Pn3nZrKgpGkyGpcTf8tuYqXfsfR6+J5vu8PWe3K\na2M4a2CDoslHdnNMpRszmafaGsZrJp3PYlTqDM5uvQFP9bACk49ez5OBSu/4\noZtp\r\n=KMnZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGw4xcfKw5FuUJ4lh6aa//khoOZ+Mk5Pph1C6T8/uLMcAiBna7elSV5RkpKajCBPCGTocQUDWw2fpNeVQ5/TgeV5jg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.2-alpha.8_1573484575054_0.009895041443722441"},"_hasShrinkwrap":false},"0.11.2-alpha.9":{"name":"@react-ssr/express","version":"0.11.2-alpha.9","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.2-alpha.9+4b74ad3"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"4b74ad3d1e1d964125c41704a0fd4a753d558c0a","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.2-alpha.9","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-X34MU19vCt+pCy8mUtgmWELwHh/V+JlLW+0n9p7HiC2KiOOiiHrWib0Q2I1RIq8wMv8gVcya7CQjzCKoHm6k6Q==","shasum":"ba36cbba7a47bc867bea08da0c6f4242f81a1c8c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.2-alpha.9.tgz","fileCount":8,"unpackedSize":12600,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyXjHCRA9TVsSAnZWagAA1okP/3f0smJfkOOnfbYq4i0e\n8qUkoURaFeLT+sg+M7ZA/LbyU2haTtH0JRbBntgWznJVt6/8aDzg6t4xAdm2\n+dcA9oznt7KES3cjhphpJQfmXhJ7jd7mNelTzuaa2VVwoMJuQiqw1u5PFLKz\nqkB4n2oy6eOelUbyR/l8m9woEc9w3hTa8aRSloMhELQJZHk2Peg8czbbNQ2Q\nGexWEQO0cbx4PAhaW+9/K+JdWXM7Gwq07aZnL14ldm7N148q3mbszEkzHR7e\ns6Qw+v74kjLZKNImb55ktUFeLzJXNk+JjGh1lFGi3O3t5/44dyoYElxTGzvr\nhSG+qumxtiSAcWT6p+jrq1xXxMzcDohzWymSTfX6nSwVShOLUPdZqIH+oY3Q\neVTaTHRCFmsz6I6PenLKVnbexheG5uZyDPp4DvPbcfFTMysdKSmPO2/tlPMs\nN4LB/fBkeE7WX+BunxNm2f5Xos6Btd9Q80y6LZ2ehcR8oyCP37qOT0gcUIPo\nC+Wumk96n412NKYQiMt9c/YKUbjTAYQ/KGH5GCm4koyyezTna3msuvLiFg2d\nVXN+pvWgHdXb+nzUHSmrjIZt1gi+HtT4ahwHhJRwDhebTAQLf+/CnWjpVV6V\nZ1Lfi+tApfr+cGlC4eIuzSYH2MJ9JcDffO+AZ50bjqQhLwqUma16WntqYhvn\nCjXX\r\n=+SF5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEKZHIu1DtCi73B3UgyFGMiDDwg63zv/vNcRviRD0p5zAiEAmLdqBWNEeySP9Gcc8ic6ePCScH90Vw5OyM2Roq5S48s="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.2-alpha.9_1573484742803_0.5108635230890581"},"_hasShrinkwrap":false},"0.11.2":{"name":"@react-ssr/express","version":"0.11.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.2"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"91db641515705a0a1ef0f036fd3bd102069efeaa","_id":"@react-ssr/express@0.11.2","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Ag6cnRQEESlHctVQMf0jTfpF+4wxRxF4mSl464UubpbSc1TYE1g8bQyXpmKesyaNw8SfZz4Hpgj7NB5KDskucw==","shasum":"2e69f1a146680a24ee2d10f9e383af8c90b819a5","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.2.tgz","fileCount":8,"unpackedSize":12568,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyXo+CRA9TVsSAnZWagAAruAQAJjsBscROtEZZCGYZtE3\nXZAogk0bHLcDxOCuXXVWIhuITkqywFZQZjv8YvvNHd+rfRtgzB545a21HZci\n5m+V331mRegqosBLRccRSdxu1Nk9A1l3gLm1R9+3xmGt9+gVgmVSMNnbdX7T\nfO8laIw8fpL9P4O3wQhqJCKOJzCHa1FKjXfIGUIrl+dYr4v53Wn3McE7gVSm\nW2dISvQaTB28f6o5nQp1bBlx3YhaJbaxVey2vskiElt4iQaHX83G/V3kTz0C\nKd4lTAtICwmHycBwCipIdUUxPBK4bGmCLLBj0mrYmOKPPT/9FqABFu5INeDx\n22czLkuy4+Ms7FdEGE40bJOs7LzW6FryVjv2t/PIsckYiW0htbSeqptf1ok6\nBkddG0AIOJLTBlNvNdEYoa189f/jjnX6UtMNhFy4z7+hxn0Eql7pBnRV0ypG\ngB3q5T2bJetAIloj316zyUNmqPlWpT6a47XXdciNXD4SAtpyD1ksTsx4y75X\nsmGtwfYTb/ci7vVsvI+xYjAv+zGpq+PNXDMY9X2x8H6X/1SbcDlADxShiqtE\nzwhsct5CZrLcVI5iUF+sH4YGkCXGNU7O/P+FrIar8BQk2Tif9LL+kjPBKU3c\nGNPudmIURo6GMrt9iF4z8sV80eTvpZnBsDWIFa9+f1NhaXhW2ebzqRrbvkLl\naLud\r\n=wsVd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG0DCpx4Q+wOG+3LRen+COuB2Flvcl6bJgB43taV+lWuAiADOg+C/gt+STOgz2lx7MkCwXV37yESGVxQLrYFdlox1g=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.2_1573485117853_0.6095557445344708"},"_hasShrinkwrap":false},"0.11.3-alpha.0":{"name":"@react-ssr/express","version":"0.11.3-alpha.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.0+56b2e1e"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"56b2e1e0891d964895de14eef6bf658df0ba2292","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.0","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-ikNGLU/aVyFEW1NFxyyBFmRFQYa/TztOrJgZ+6iVV7fUjReE7UQMAOfcUx8CTIBGf7ZmPFYGhd61cTyqxOW/IA==","shasum":"3d0d44970f93eb462c25e7ceea07abc94d7a4cfa","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.0.tgz","fileCount":8,"unpackedSize":12600,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyXshCRA9TVsSAnZWagAAp2AQAJR6T9n+vLuS3dWDLlc8\n7W2buYtNinlpfnSA0JqiFL+XqILqmvIbU/Yl89V9CcTNAdeWJ5wae56Go/9v\nOB/as25O4RnAn58UP9q33lyeIrTNK6uKhkDrD6Q55Uih0hS47uTqOuXR7kpZ\nxYbYMVISHScela0lcHdlvU32GiLPhRWviKgVk2FARIGKYGX891q9x5UL3y8F\nLYacRilBl93JjlQBmNDJVu6eFLixVboszxg0wFhdJ5JnNZGRjrgXhmhW98va\nJDtcwV/T2941STa5BFzwg4EgRXTLyCHoersA+HTSUyoJ/869QJrOX40e38T2\nXK+akSIT0q0U2nvCIKu1D1+fsS7Ltj40EA451OZLDlgIgGcIbuiLDboYu5k8\nTiv6fefG9N1aaINJHZIsA1Ml6RivJJzvBJxWKdfff3GN7KKYj91yF0j2r4ce\nHWXjEaF/eLGpclQioIeth8FuedP2JnXVx+D2SLPea6s/SPmbJ3CyoZRFOkRh\naA75DnOUMbYOX0D7Rc/5bhX8T9bZi5oGjFVXoklUQEIwqZKL2kiTDrZDV1fb\nvHMw7tDtdOb+AdmEYMwxr8OEtUOQfKhw4o3BRc9c4l1P+DWVwMuHcpcxh1cr\nWa/RWzVtdU3skU1NfWwsO/zKP1Eo7jsjq1/4cX1t1vOEn0s3bZCrmZiSTcRw\n1cdr\r\n=wzKb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQChrmHvoQGqJTp2ETyedmGXC/otkgV4f/B0GF1u4Ad3DQIgV/Tent7Yv5ScsW0hK7q8TlTU42l8QUuK5YGxwRkrxyY="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.0_1573485345171_0.06488769894961632"},"_hasShrinkwrap":false},"0.11.3-alpha.1":{"name":"@react-ssr/express","version":"0.11.3-alpha.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.1+d2cad81"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"d2cad81786202a9070d3debf3985d680c01ca391","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.1","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.3/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-I1PGPfZSz+sF8BFyMyVPqZ5TuVqKezQ/O00pK/rp//G+g2NT+/RJcYvZLLc3azKPkTVFeCklwbfsIih7+sGenQ==","shasum":"f999ec2c88e826fadd55af1ef2e883262160ebbf","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.1.tgz","fileCount":8,"unpackedSize":12600,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyXu/CRA9TVsSAnZWagAAecYP/2rgJec/JbdeLQNeSLqj\nXTQ3HiIVOwUbr7wvQbiZy64nTpmV3IHY0jR6TJ5kacC8SGZuQzlo/uIE7/WV\nmKsUvkei70H990g9pzbExxM4bykoGRS5vqQlWz9lwJAXzn9xqF0PU677f3g8\nKKsrYv3na0zgtxNgqfA+x12W/YPVhBjPXNCJPYmX+p8iDwLzO4O1iFRXiCCA\no24VW3/wCx8JHri1YO8pVv9yqHR3B2ei0W8Lwq5LwBZpqUeTF7BzfBg/+LB8\nWz9fo7zl3qlPTkHKH/HLIRb+iEQO8WBWatPtpogpMRX1xNF6CQKAmP7/aKNe\nEKsriZ3e4t5T0BqTJdn5hHZ8JmRc8+p3shwUXJr4Js5oqYba2YzekGmNstmQ\nrVjIMo9B2B6VQ+vUK6qigWl6Im7jLZ5xnzFPHYzTRqcX53KeX6O3P7WDq83D\nNd4ACyJcfZF7O/iL1fD/qQvPwlEyU4oQJRcPCujrgMXLtsMWoYhJIIdty0Oa\n+BrTMjclzUNLqrH4ok0sJ72o7rhAQUyrWPISoIZNaic000S8DeQ/KNHbS+CQ\n7h6QF2ED8kNqpn3nx1kc6ZvHwSbUH90pwkaLq1xeAGOyWuxeAYwPfyhHpP/e\nRjMBwbKdpv/vwUrA6LCN46I/gR7btZf74tvs3o8zBZ1DXoDmE9drt6H7G4Xh\ntyfn\r\n=8QNR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDxiT8bYFuaj6Uy9JvJbRF6yuSKWF89/KnKKYC8J1bkTAIgDyd3eiFkJmn3qwATdx1DE1GDtrK/FIw0adjwTvK20Cc="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.1_1573485503018_0.05289960208825706"},"_hasShrinkwrap":false},"0.11.3-alpha.2":{"name":"@react-ssr/express","version":"0.11.3-alpha.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.2+21f235a"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"21f235adb0011dfc605335b8c1bc36b2c96c1ed4","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.2","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-2wTX2Ur7NMi8NN4hXxAFDjCXnCPOxCZkutv2mg/zKyynd6RvDM/4UAkel7LmotsUsOoFyicbPTmU8bKP5zplCg==","shasum":"b3a6d3fa826e9e9740044571bb0f794934552be2","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.2.tgz","fileCount":8,"unpackedSize":12600,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyXyPCRA9TVsSAnZWagAA+UUP/1Lv3dNYRI08FfZoj5Sx\n1K5Jcrd6x6YmsG6qHIdJkTQsCl3CZgxbFGFKe6rbwcQz0BcLuMDnvVjxf6PF\ny4yNpgiZOwutn7Iglj5bqF0K5rUJHIPVN28HSEwZhDzbzN2LHvAFteI66177\n9wYEQWPhSLd5IePKhJMCyRA92xFO5NbaUiWp5xLnICuRrePbUGTOKFUN0HZn\n7eNkYqTcndxJelCWtkMrnmLORKefucA3e+5gEI1Gby2kxk42LQZ0IHiRnjtz\nx6hB6ZzVDW3JdqH4PWU/QzjRRlVXbQDpSWfsOwWhLzd6VpaLcTaACMOZ396D\nd+K6fOosQ87b8lBfoNYn9ylLKd1QGHII/4LE5vZGUv5k/HtO+k0D0tr4lmu4\nwnKXvgQoI8gVr9Ol5unKVXskcdG9pG/52AIRz1Dl94SuymJuaVXWxHHji0Yb\nSzh1Rtvt/cyZVER3zoq5WnlvTMde5Fe34AjQ5jjKpHocqydq+F3suM3LOzJM\nJTbeyKErM23MiNRw4/KBt52MJMs7nkWzq8GdgZ4JKT6IPwOWX4mDhrcksvfJ\niyB30tuY+FgFXqzvU7IIeej7eZOPZ7jrCpXlxvsBong/MOdZAu+QvoGDRrtt\nHDrmOnoVG4jy/MzGcjObjJpQKzrNto++ro49pPPhhHd3dRNeYxlt8o1LzIaN\nf0YE\r\n=i6eN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDdV9h+6XNJp3VLpMQG5ysAXPHw9WLInzzUzfxVtQzGMAIgRTuao6zgCo5aW9ewFdfExIbZr30lgcRCZKrh2VQzXNg="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.2_1573485711158_0.19364694363669077"},"_hasShrinkwrap":false},"0.11.3-alpha.3":{"name":"@react-ssr/express","version":"0.11.3-alpha.3","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.3+279d098"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"279d0986267c09c3374490067553a0da4833d324","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.3","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-eEQW/KweNMkUw6LE89AkwSVtuNKTJdu2kmMzjsxuzHCzkHww/kqzD8pLLBSl/hO0xoetT7StWADSCZRqqjtFzA==","shasum":"503de47f19aab86d76bbca276d37ac87994deafe","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.3.tgz","fileCount":8,"unpackedSize":12600,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyYjiCRA9TVsSAnZWagAAsxIQAJtNygYHRoBFCFN7i+bk\njZo5fF4Qw1pZNzUU01Ymc3SFB5lp8TeO+72Wcp36BfemIH1JtT7ZKDQF0kRy\ndTrvTgUhx1MkZ2bm7dwUZ+Nq/66gj2hj0Ae1YhB5DnMZ5V9YDHyUdyzYHMN5\nsZdgF6EHWWzuJ25MzzDGqIb2DP68zTt3dCPkazOkeajQKjkhzh/8yVmGRQ/S\nEQnWzNJ+FdO1DWMoc7PuwpiXLCu6bA/iMNFVq9UZ/AkZuETPnSVujHrkoI2d\nNu/0lpVnl3nmQZCGjnMv/6+raU8l/wGY/Krx2JWLduqRnO2/73+tKdviQrmW\nFgiXC9uW2PLkQpSsXNakQJRZ1KVfMC7krIVMpmllCjdcL3qfbwb8w/PymOAO\ndvRBH+CVeMscYkiVnnG9w+dyE821TEnjyPDoxAYkSybqcwpeUFtxulOTe6vK\nfDxZ4ol4nO6K58E68jVWvitRmVaf0f6qnrdYnpHChB7EFmrX0B5M+fpg0OVk\nCatrjGny6z7F7CHyebALjDF1+Y1O0oeZVVxr4q26+EP5AWixSHj40vyYC+Sn\noCGMT3E7ulafJSPNOqLWGD/YdTGRAAdaYcldcL1Q8toyt565zExD8TwYkCO4\nimHN3N36MAbOSlpyHH7kuYeZizaHFdmUOWMjaSNIY/7QP7zKbKLEKh1RhQw5\ng+Hq\r\n=HK+q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDlw3BxYO1Em/d45+wqkg7tcufrECx016quBRqMvW0TIgIgXEa3JihaYdUPxTQFmeUnoGea23eAQH/T2sC0N3yyMzM="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.3_1573488865880_0.8144804775256775"},"_hasShrinkwrap":false},"0.11.3-alpha.4":{"name":"@react-ssr/express","version":"0.11.3-alpha.4","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.4+9f14f97"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"9f14f97c3330155742d7d76a735b906da37bdad8","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.4","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-N4WLrLRA5WQBBwTbotPmGMjXkRVheVcEr7J8fvm+emihzKtqnmvoJZZZoDozw5Ii2R2czxA8CDCBolbf7kw0lA==","shasum":"bbdd92cbd06030734fa9485f69af7d78c449f836","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.4.tgz","fileCount":8,"unpackedSize":12600,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyYuSCRA9TVsSAnZWagAAixUQAICODfpR/Hx/b+Ym6S52\niK1+bW+PB6ZAv5EhVsy7zsbuQXY9yaaG6phlxKssX8C5zRuEegq+D3HcesVy\nox2grUnFpIGZe4rTiRBo2OLLtkR1QTT2LxOgcRisrPa8sYmI9dmY8wfZNsvd\nS4/r72e2AyN8DM4F4+NnNbiAXNFmOP8PrbdPHZaAfmyCc4NvYrcoWGKUhE6U\nFVEre+GsQ5qX3gk62DtT7EtA3boQS6sVGPMejsQCiNbUwxpJMVyJLbE1OIa7\n0cEy1ev5jupE1T81CMN52kgcjeuro38ZxBghqEyAjPoWL5ZrRA45YVl16TIv\nVhHXNxUfMOzj/sp9E80GNRTt0h95YkzbtWasAoND3/2XthYkx4FQlfbOzttb\n4jUyuaTlqFiypC6a8ZXQYO4oD/iftAFQ8HDFbTPEfwtLolDdZZIdAbS8bV5r\nha9UEdR3uvx0oMwKUAsU8OKnKWetAZmq4PKl2p6vAu9ICsrrYDEbvl4u3Hh+\nitmWouH5a/W4fjallLwEZt6KHYM1KorHf5ySFH1vDHtf2ptQ0fA44siGUG6c\nahAQ1ykwyweO9EEA/P4gJsg9zlH9JOvJ1BoCdW2SzWMToCqV1JfheqMjZ4T1\nJZHtXLBV1eEhFQTNSKikhpv+nvwROmVBXg1OY0L942xNdHM1uVQ1tXgdb85f\noBXe\r\n=Eub2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAwKw2TRU1AKDZ5TSB0RQnchmD3mhBO5QHJwwnwtNrhuAiEAki8nWUeZRU9fY7AfaF2PypgUb8qWQ0dHIl2jxZqamHk="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.4_1573489554376_0.08935785355300285"},"_hasShrinkwrap":false},"0.11.3-alpha.5":{"name":"@react-ssr/express","version":"0.11.3-alpha.5","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.5+fb328fc"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"fb328fcd9d14d7f78c9e8bf6e610199ba02e0554","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.5","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-zL0VALtS+RmoZvV+iIqQ2oQhrUqIB2ZFG8jt7fvunTKvBoiaKgY6ozSBlBjaZXL9JsjYoD4mql3iCI1w/0QrfA==","shasum":"6c1051676883419e01c5b85ffb66b62a5f38a679","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.5.tgz","fileCount":8,"unpackedSize":12600,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyeMlCRA9TVsSAnZWagAAkigP/2BeGiafPXl0OTJtC0BY\nDzgXbqkQ+xvaHYlYKNzwDwvwB4l/lCNU0XQS28G13bVKMYr2ju94ZBGTqk/0\nNY2Neo+xS3Ui5NPXx8AFeTSjlKT+4/v/i0bYhJnppBIhVdJ03KrE00mYi/Ef\nam2p3mOBNAyd52NyB7+1CGOI0/AEOa2OmqE3MWv0usVsP9UoQiGeLnlYBo50\nuIGVdmRdCX9+RHl3201Dc+wVlu4B0sNqaGE+vJK7S3wVVy8V0/HXrYEK4KNk\nO8btiViMD7aqDCiekTHM2s5Gnu6wo07GB2jyJiaLeh/dYYARxLb/9s7xbN7W\nTMWuZt7J3MHT8bHl9gRZH2AtG0jpC0SmVEVUK+PoG2HwqZn5TjCYpQdD7fB8\n2POWcRwhkDD3i5QmWZNVGl3d9a6Xv/iJRwHB8tS5xSAwBQxJe9Ww8ebSx5KW\ndH52aVQCOycn9ICKvSH4kAeaR8xQUd8Rn/06AMa2wtm7D1Bh1q3nU54/V8HC\nwhFxLLjncainO/bHDeQfNX3l7QbYYKWRx6IDPxiWNWr1y6v6CMH4wYiGVvvB\nzbl1bSD8BkIduRCiiIVXsDfJ4yTknOioVjpS/AwqIBvzQywOCEyyislkNJHW\nIya+ItTg98+zZkmPYlKD7EOSMF8tnyC+W8wY+I8mxtF9piAptUUp7/YXv7IT\n5aUw\r\n=zWSO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCjBu0RA71JXcKAwn3ivOwyVMZfaEQzVZ2MrkcVZNrV3gIhAOrB65SZUx92n1kxWL3uw85mhZeqfEhIIHXIpF1LvFZN"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.5_1573511973008_0.997282887550996"},"_hasShrinkwrap":false},"0.11.3-alpha.6":{"name":"@react-ssr/express","version":"0.11.3-alpha.6","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.6+0ec1820"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"0ec18208170f9c7a6f14b9a80f7529c26ea8b8b5","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.6","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-NNApHyB+5z0d8NTfpyGLTvI7wRWeNb/R98dInlIQ4oaNTBzk/GJTalvCovdxyh/UNugRDvY90kv9WltyK6xH0w==","shasum":"44bcf8bbc8c8fd13a9d294d1aee2b80b03d4671d","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.6.tgz","fileCount":8,"unpackedSize":12600,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyePQCRA9TVsSAnZWagAAEiIP/AiiZt00Yn58s950KGKh\nnxy/go2gylYWlrIKo9ay2ritQYpKUO7mD0nWz9ehSNzulDsXByenJxCoE1/d\nCSTRT+RZBq53kCE8GxFkDix6s3rXNppt1xh+hh6/Xw6GexV3o2GqV+7sKKH9\nLiBDjRDu34alYAfOg3mF4y+s/saVVLLO6mnH6I1M4wQ2AZs9Vh00nL91tNQI\ncAGFCLGXZYwR9O8SMnk8aAgUyrOCDezojhoKmPFKYqpLmN0Vt0u/P0+y8HzS\nrrBkZU90ilzNodG/OBBXSjNXLr96Zbqd2CnHsqBAC/Yj54/TlO+9p5bqi9RE\nj4T8UuhdYZzs1ZukBwlt4HkuuxBKBxPrWusJYXgulpA0NA/yi3FNFxbuEQMW\nUD0Dkkm+3dD7+p3MjPvib/Ycr8DTLJu7s7R4CNDFRE1+XPZ67RmVVm3SMsL1\nTQad3VgassnqMUppOYd/TvQ7/6hqpOX7ifd7bdS57GNE2nJarPnofvnlhujW\nVXgJDm2j7+knXWXRqiWSr1ZCEH5NEdC53IuzHkm8MG8efkn4JFQV0NNvHRlm\ngZ5t9XH6VqLUXzix5jFZj3sgw0N16FUtrUGt+/wkwCkYsdmj9tdFIvysNOv9\nbAkfAujs/OwMAODHvfzOfZYiF3fypuNSyCqTzrlvsM5Cure4nopUY/gfEYMT\nRXf8\r\n=ERcV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCMQJm0yvD9Iu9bOaEmxHJcBPYHRYJr8NLudTnnq090NAIgGG0QTkazG1T9EJqo6UMhEp/28jHWUJaMDAGGctfn1FQ="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.6_1573512144435_0.9218814509648641"},"_hasShrinkwrap":false},"0.11.3-alpha.7":{"name":"@react-ssr/express","version":"0.11.3-alpha.7","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.7+0c196c2"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"0c196c299b1aca3d5fda651ba5d2ffc76adf2833","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.7","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-OPzS7EO+2gN0V4qbgGtv9ZiZmZFizRi8nkIqkSLxzfP+D/xOPkgTSqV6VvqH9uLyWQD+2w5zES9DQCFrwyrT7w==","shasum":"b55e458f128f64c49353ddd189b0df00843c452e","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.7.tgz","fileCount":8,"unpackedSize":12600,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyebLCRA9TVsSAnZWagAAq1oP/1DoJvOv/rgG3kRV+nhX\nwuXJDZ292g5j3I6Xs7neKox+1Nn2vpH4L1SIQti9O40MvTwRJQAqlhbN3tCI\n2yEW3g//Gy9B7MglLt+rGx2RNRg30RD7oMI/OmFSix9anurGLrNRGLGPPs4R\neS/8jIBGHFMdOi8x0K5Z6z7r3Ymj9smOOMwPc4dMidXoC1OnzpPKWOXapIVj\n9zSZhNarwr5EylNqMFDm1opdM0qmisjXpUo84Rmwv6PoEwO12H8SFzjSgUfE\n+E4nAh/HviOMTbZvEOK9bPi4twX/BYxB4Re1pv/DVcc4sADD4HlTgTesAIQy\nhY4NjsrUmPoApwurvzz490kN/1zdVt5ksDD7uYXgzAV5/myDVMTGYEikeqoM\nMt8ukowqtLqTgWlbGi0ZcrHtdIPrp0NK+EtE5aSz5B8OFzmWtRMFWCLEX7W8\npwdOmgAneXxv3hmn55E4pK47dhlG1V3bmG1qV5TLIryYPvSCoJtDE2vOQTFO\ncdr4ybKsZs+1IspTCdhUTQtIWPDYUV3tOwL0zmcoV5RZQrenvuVgV/HZCT1m\nz2IbjBpdyk9pz6/Erj0rqhMNu0/HS5W0c2pusPByXCMkUlFeyb6zSGgJiuWA\nDJ3AmAo5JlZ7bLJpvJDbdZnHnbf86HwglSmfkzqrKKku679YJyheJHPrTtR4\nxzBV\r\n=qCR/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBA2NBBXXsdN355//eD3sCoHQLrlU+7+evWrX2s+RRgSAiEA4Lh/E4OxSekLgASQNrJ3RXbBy6/5kRMcG1OyICl36ZI="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.7_1573512906571_0.6383348218494722"},"_hasShrinkwrap":false},"0.11.3-alpha.8":{"name":"@react-ssr/express","version":"0.11.3-alpha.8","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.8+3331f3d"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"3331f3dc017b4b505636933a687091070511526f","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.8","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-gXVhlNolZSNlqL9aGHr0pw3P7bMidM6LdUuFhDienDUqV0hLwQ60J3wtceA9VFSi8OBeEwuVoTJfSoE9KWl39g==","shasum":"19a74daf5785c9891543f97be7a5b513063056a8","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.8.tgz","fileCount":8,"unpackedSize":12600,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyeewCRA9TVsSAnZWagAAcNIP/1X5Tp7iWYchaEyF58fk\nvweE8Bw+CxLqf9jrOfiyNIPqxzkDU4/ss9EiVm7ZU5fjYz7zfnhITHl/qobz\n7CRJUV+l/XTjj2EopTDcxhcvD+guWp4C6Q3EZLNDnPb/WK27TJv9CvPOPjKx\nGLyTwh/3lZsID/Eutaup5Q2/qLhf8RzTrD/WlEUKPJOt/Ur0waQYzslZPJmJ\nxbAHpdFRL8/Uak2ewzSRyJYFbSQfCtneimkqdfMG+sRiQP7eEtpaMlQs2Cct\nP3KvxflSBtcUCDWt1WfPwEtXwg2lccnRO6MrlmF1Xfs4f7lsM5Wxn/Hani7X\ngi+UrhxDRs0xa5KY5UGMpQVM8+qlPVZhPkpl3iJzoCEIpMrIwH8VEFmyZciB\nMhyBKKCEe1KdI70CbSbq46a/EE5bYVtMyXKVTEYd7F7AiLk4oC9/JvV6N1S6\n4RXaaneHBI/SIuSzONBF2qVcv7/V3j95cPaNaclm89bKCAE35PouLlLUKp5N\nnFbZ69yIEQ055tDsOEOehUVsVJAQCSxknlCKCBvKj2qklz+Lk8v8E83av8wz\nqkPqKB2I0lUyBx1rhRN4kPANWL7nQ+USbgA/KWeakWV4z9wX1ayctFygvhqL\n0Aa7A4rH2e1U572G2lKQpgf3M8wLEFfyQnBXQFQyXwtGJMGpIep22ShnYtYs\nz5zI\r\n=TxRI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICl6MyM3Nj14Zi6UEltV2pI7EZGPUIny3mn5Jdjn5Zp+AiEArpU6X172HgX3Oz/tTXcQZcpVQxIVNR2koHuWmGHi2eA="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.8_1573513136227_0.45232838874619463"},"_hasShrinkwrap":false},"0.11.3-alpha.9":{"name":"@react-ssr/express","version":"0.11.3-alpha.9","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.9+25aa255"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"25aa25552c4c1351e808d44762a5c6e823c6c587","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.9","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-vaTNnuNTL8SIerA4Q5yGuyfLREIlhesj0rYndpBA3IXbERXyqzpR1aOht0S7aG2Ynl5QbDPlgYyUSugsGA0AeA==","shasum":"b5e4f3cbc829df979f1a3f65430849b0d64c5bf0","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.9.tgz","fileCount":8,"unpackedSize":12600,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyetrCRA9TVsSAnZWagAAJasP/jXDjl8KuGXaqdGjm3zH\nRYU5kDw5Vod0utc41QWUODkFKpC5s7svDXxWJHwXKPMFECeyuuPIRPrgYSPa\nEuS4HKsawGT+fCmPOCRnwg7SgOcKURi69gxzvNTaTfdRcYfUx85u5APZuMRv\nk0BTvL7yorTvWXPCOsP2oB2c7P6hcraQNL+zIwEQkOafWsgx4FhMIMPusn6A\nIf+MDuhcGQjBN7bDTDXkc9os6VPJ0E/J+Y2N9oOQuYMY/P1rqiMPDkQljwca\nqvbEeU98tUC1YCibFcrzPC9hjhNcaDUweNGtc1IrhUbXW5Vte5PmE8eFdi1c\nH+geKxeuh0YtBiCx4+HZvlCP3ovhUuLrVWfc3LQJv/Du3hhpd6WkVud8kvgZ\ndAuf8Fsra2ZU9bKKhfTp6yu6Dw/V34RMZ9ZEx214HS0UFFHCs9htuZlkXnoW\nZnALC9P+TRHjV7fhP3UZ6oJrw9Jylq+DM5oIdm778gAvlhMxZPgFQ+mNGLdS\n2nv0t2p6u8L4iegJJ5LaPR1hV4uz3mqbD/kL27Exro5VgcHBvpakD32Dez6q\nzz6Pwl19rG6CReRx23/OsUyiXXdiDoKHjqmlW3ecbmCXoGjDk22SuRaWukul\nt3RWyRcAoHRkXE6j3f6cHOuwhFHsAT1Q3qcF9jZi7v7LRxjqQDhkqdkBClZm\nonHY\r\n=ugKz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFUUGoySXrR8xCfj8IFJ1LYpqrFU7qltbeIlTpedMSPaAiEA2yz6URKyyXoaoWWByQCx4p8y0rQPsUn/eLbdH53SqD0="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.9_1573514091281_0.4848470851447073"},"_hasShrinkwrap":false},"0.11.3-alpha.10":{"name":"@react-ssr/express","version":"0.11.3-alpha.10","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.10+54f484f"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"54f484fa3982a1c9e378029eae0d6d9e7b583e84","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.10","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-nua4UjCBI3MVrEK/OYHqWTjhR6uD5JEiZ4SLAVHVe3MqqPvg5SPt2ThAa5E6qilZppNSjoRYVuiJUWgvF+kMBQ==","shasum":"04f807cfefb538a9effb7851b81bd3b827337c7b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.10.tgz","fileCount":8,"unpackedSize":12602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyex9CRA9TVsSAnZWagAA0dkP/iFIru+ur6ZfAAEBd+6j\nL4zPexjyaxRfrvRi6Ha+U9vy6QkZTNWyYU7GOSSsiqBmPHxZLqcpT2orQ76L\nnBp+I+msNa/M7Vftgu5Ktet2I1AcYuMlcX3b3QZjoacPWc5rQiyPF+IlxQHy\nUwTQQJX79lwZILSnX3sT+nm7AT4W7na1xbuU79paT+XnBk/X3MyMlTS0Gc/T\ni8gLlbq8abo3notIB+xADZNMg7YSNlcP29Jzet9667MfeY17+FRz5Q6CixRr\n9JK+sYrqfy+G5RJ5UjsMN+l12vHOorBV0qUGID231jXVU0UU1t+qu/2pzvH9\nVVm6ofBgWVqD32CQ1wqeQXxJoNxRdbPtHZeBat0wloRd/zZgLBcj95RjDNtm\nMvaNKlcyO57BPZ97FPwPkC+cWQhoayEBSnSxSKwiDPVN0VB2hmqVA7mQfCKq\nTFo47lq/WHoDJ5nwZ9hf5CiEBBXanuU4bqmwVv7IXG7azRzAKUvNf4ScqtuE\nWkxk9/2Hqz7KXHRQGUksfqfg4R7nHGxv/UFuYgI4Y1k2UMmmAxHZoBLYqw7A\nUrEgTfuB/v79+MRZxK8mFyVzw8UhB69niphm4xiiS5qoEbYXKJ38E6FkQttE\n3D1uRLCbL5x3/66pVIoPZtSCWX2hUuZrOZakYMVBVKWuPwrwI4WZWNHwdgNz\n4Ucl\r\n=CISt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCUXUSOE5mbR86IEXxQOl7cknBTC5NsNgRRH7hY+0dmmwIgFNwsBI8h+q3PcL1nhPdz5yQBkwvD8ue8qZ+4fbmFTDY="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.10_1573514364727_0.4307033846220749"},"_hasShrinkwrap":false},"0.11.3-alpha.11":{"name":"@react-ssr/express","version":"0.11.3-alpha.11","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.11+5ff6945"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"5ff69457c41a076ac6df6f0c9730e1ed7d91afbf","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.11","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-u8PdezAjTl8ZfBs8vKam/rSJmn3YnwjWCF8aJi4zcoiUNoshfrYf1KwePf6JTILCI2TcmiC3ejD2gs2ps0Dkig==","shasum":"beb68f8927965390a41541396b6c5a646100ef76","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.11.tgz","fileCount":8,"unpackedSize":12602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdye0QCRA9TVsSAnZWagAAVesQAJ0NxMkN7wkuUGw3V/xg\nteL6wDniDp06HDqxA2348PijeyMy2/1vYou3ovx8KXMVDpAfRVJBqJeNTYS1\nMHDgFcV6kX/hXVi7/tZB9D/e1hyyIMUkvji+3baYNJ6G8NtZmW52Uu5B8ET7\nUWIUYaB3WGPM5rStFSW9pyQUk8iZlHjqACu3RT9GB6mADkvNjT/pc3+1DSnA\ny6TKWVcmOijTivwOZ/iUj1WiR4rruK9LnZH60ZcDOgaj+ORoCOFnLVzXqO8n\n3w6ZUJdGb7QRmor0g9PVOLjFCYti+KtTKWLoqyxXfVh+QZLe31wHTF7tK8se\netThgs1DnwPNAa4HZHEovAmaraF7NHT1HGy0ktCVvRsRbGoUl6dg8FPtnc9W\n/HHjChkwYXcVOA1K24zoWiyw+f/JCOzUL0hc7g7NLocPyolndfU+StnE41jO\nxgUUxGzEB3XkSdXOgiuZix2YhU/XauD960XEELSZVWSoiReZzzMDtivYQQth\neh/UXiRFuo8aehmv+jTRvbRrX5QMCOIkQAARZIaGLQF5QWXNl/F5dhYGuapp\ntzXM8a/BchjyFS5kJh0GUeT4eYIq++cdMXEhT+nMLTiInc7PozrIRSm/jn+y\nZb2jiXsgx/TCnRacjxvq+OW1lWWk/su9tlEA/T8cKQaa3PRlPEzAKCUM5Fe5\ne8Zm\r\n=iyCm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCocohoiTE6Qg+EdXs8fFI3Dlvf7N65JE1CxVvGOiNXfQIhAMXsqxua25nTJmgDCHaC9+JO8ZDyVdLPeT1EsTJLfFjm"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.11_1573514511814_0.42918958063453005"},"_hasShrinkwrap":false},"0.11.3-alpha.12":{"name":"@react-ssr/express","version":"0.11.3-alpha.12","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.12+a2af0d1"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"a2af0d1d5b443a5ee92c64ff0f869a86e11ab512","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.12","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-uG4K1G4rH5zfydlyQWz95atugVoxxhvCnFFQ2b2O1OvlDUqLDdvmoe6Mo5bTp9nh5wu5f3extPFEFULdeaZmlw==","shasum":"62efeaf7d2ef934ee1d9b9d67c4e5b20dfbdae4e","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.12.tgz","fileCount":8,"unpackedSize":12602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdye2ICRA9TVsSAnZWagAApRQP/iLvdDyTNWKMmCyI1JZD\n2vIaIWqD2yi/BjOKhSkshH396z7KlpMuorKMpKUUwbsS3P4LA20F3RxxaeDq\nT7kmBErP9/baooJLwfrcp+GSL0hV9apFU1X0yCRcWEv3bI2nDUEuaZfBsrCp\n79pGtXz5t6q36YO6qm8UGO3Jy8RliV/7zHUj91pKIBwfxtZBOHGLEn9kgErM\nu2dtqp7+Q1y4fysbjUDMKOhoJhYdyXjiqs2FBKdgW2LbyrAgP6RITgbxIdMJ\njdxB6D4PO3+DUkA+jVQZfKbETdEgvlZ/J6nV/M+9eo3ev3dzb6BT8wZhDTUc\n2xhUSsXrbPiF+JFkRdIN7drFEbiVQwP6yy3G0iBSlgUOW1EJzzXb0Y3i5biW\n3VFFtTIA/4qbBwTTqijG6WEZXfkeyBgWBJmUaE4znplbl0BH9z3FUwjHCLuD\numAvCOFkQc5Eo7ZKfaLZc1S/spclMVk0mQ8oDwqyC4zpjQr6HHz4yWile6qG\nJ7kli5avsGEBfQI/fXcmRKc/QvZZNClmY+LfY+XvrH28MxotEiXo571Kmt7R\nq8VFpb1PpYKiSUZ58NarqtJI1nYxThNoGhggEvT4O1r52g/EdHYkxskrRxrq\n4R7L3qwhy9TYVpFdnSq+aWnrlbLdjyyI6mFiTH4ke/aGoX9t/xvInPU4CzIA\n70Fn\r\n=F4Wo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDie2GQdAZdJSv3Erenxh7VbpOAj9p3/t7/Nuonc6be7QIgCTcuRCmrKDNzUAxdZleb6wtmZwWhZIXrDxGD14Asriw="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.12_1573514631642_0.4453726532921445"},"_hasShrinkwrap":false},"0.11.3-alpha.13":{"name":"@react-ssr/express","version":"0.11.3-alpha.13","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.13+41be6b8"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"41be6b8153cd833c7c112ae42c496d3b768ec525","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.13","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-cfhuGD0EIRK/POfWG2rKtRrF/3NxBzielkV1ezsuaKli7O1rg82fla99F46c0AoVfbXvyEXtjI7vkc06icKnng==","shasum":"59772892fa1acbaef39278d6d133dc7e78736c91","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.13.tgz","fileCount":8,"unpackedSize":12602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdye/UCRA9TVsSAnZWagAAQi8P+wdTqY2QVuaAJz+w7qla\nk3Qg3vCl5Vdchz7dYOTyDZIHviyhIU+i1Z7+2Hvu9EEc0OYbQSbdFM/jiHoe\nuwmrK4gu9+RCrhkrGQucZAE7ixp6qBxQE9pNSWH8DHhUTkyTvgJZoXqLGYpq\naPWefR4qPdiL2X0Ee8qOuXPesuMdOhfNOyXF9VrvUV6JYnV9bhlU5Tel+efm\nCSg2agsmZ17HPTjygryEzJezFimuZyCUha22XH70sNmkjsdTMqPF5534Vx2j\nMUc/L6XO8XReiDCVmgyCQK47ohtxXn1ciG4cEKSFKjSElMN/sQC9q2jglqLU\nQoYcAheII6XNVs7zbFOuGrtbCy40VlY7MJ+iLVAuhRwsO/2p6iQoLsNQDHH9\nO13R/2acYEm+b6DHPc4qH42edVD7Fa5IiJMUn2g9N8LMJ28qDbvfCA21nk6J\nNkIp+1jzU8yhKSvevgZMGE4YNb2ErdWeXk/d7erLzl3b6PlcUEUgNMzEIVov\n8duCeLNHt1eZW0qac0k4Hz2GyOfPNRaJhSY4hQDduGEXlMeff6oB2lKpGzJy\nlXyAqQKzZrH/2KlIwpRuw7WtNJRuUoLbTPODd6M2dt7AIbqQozCbL1vPtPqw\nGzlbPcoHWpbciCiwQVYedlOztleLdgN48qvD+UeFNzhfX3B827LWnawgAPz2\nO18R\r\n=95pA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAyMTQna1Sy+jjXVl3R3aWpCvcpEqbJk0IEhRYp1SwtvAiEAti9K/9Jp3cjFOBBRVfH01imbDdrpYPqm04GqQ5CNpuk="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.13_1573515220342_0.27177182963799473"},"_hasShrinkwrap":false},"0.11.3-alpha.14":{"name":"@react-ssr/express","version":"0.11.3-alpha.14","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.14+58f5d19"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"58f5d197b7678c255118d1f537bf34ad865b6137","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.14","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-TD/6RzTE6q69EkX4Wil/7IK8+ckLa+6zzwXJNaGuBQBeCl9LVN1izqaUf4k154Ksiv8q0U8YvJ9D0lPj/A1sag==","shasum":"cfbe73b83cc0c9424ee000a0ba324dca93cc5c10","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.14.tgz","fileCount":8,"unpackedSize":12602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyfAkCRA9TVsSAnZWagAAsWQQAJOGyvCl2HrnaE8jWuw2\nKTwuTDYbNTSux8Jwt7SwdrPKyE/7NIRI6/Y80RnyJ/MHh0QwKHdIuUYsX9AH\n0P+uR6Mw8WAr7XlpAG1vrrt1ux9zFw8gtw/WqTvcz9MbyhhXqTrSegrSFuEP\n71Et88AXf3LXfkF3j3GXo+XpS0kbbjENOF99jQiW8XUqQIB2cNQtO5TS6+b/\nn0nDStVrsqt5jZQ3bWdCVx9zWVzPdbWAdE6AxroNaC1qc/xtLR0bTAWetJ35\nbDVnHN18uTVZeFfdIUUohFg36LPGO4VJAu9GEuULoW/+jet2nNr3eTVv3uPr\nnbE4RZexCokfEy/OMBIlE1/8DNWda8bcoETYWfi5+1zxEsPWt3IBYTHKD/c/\nBgHvFFTeaZGEuf/xorGci81XSEoDBVraJGcn7mxR8um9FMBJzlmgBNXhs+xI\nW+ekTMDzKdQyTeZeO4Fis/QXn24gS758NbJwwUZj7teBOYw08Ws06cwCchtr\nMXcm+YW32adWiLJK26V3YANP3Hn0pIWp+4/xHpa71e9I08quCrlyhHXSiRIG\nc0Nek+QKN2sIQGxm3UpAMF6tfJfdC2NoaPuhyff6fg6EVuRIR+ploUxrnoaL\neRawhGwkAfMRAxzCq/Xpc05Qx09vf5AMCExJiv8R/24biYFb8Xp9mReA9uHe\nNZ5t\r\n=huAx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDRvWvqFcGorfYVUOk1wAycwnbY4j+SVfgTLo8+uuauxAiEAlDMB3K67UZebWw6Z9h8D/aei6q/o71n4r0oapbtXfnY="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.14_1573515299570_0.37885656706974147"},"_hasShrinkwrap":false},"0.11.3-alpha.15":{"name":"@react-ssr/express","version":"0.11.3-alpha.15","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.15+25b63ad"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"25b63adc3d617cd4153ee7cf4d97d8e4326f9049","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.15","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-x/6Ljru6tnOKMHxDlAmBFquYGrpZlY+btfADUDJR8JHgDrVELXVyoViHuZCU8BL0hyf04dtJtgrDYHqG0jj/zQ==","shasum":"395135637e31af3c5cda3081773585172f3eb60e","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.15.tgz","fileCount":8,"unpackedSize":12602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyfC8CRA9TVsSAnZWagAA3UoP/Rm5t+yrRV+jvEgdY15o\nONHCw0Ko5I/WRP+lD7xqv4RnO5bVUcWHlNVW7Taw25PlesJvkaIJDtrq3nRM\nl6m6ABN37WjcbsXbcJhz9s1eMNx/pudMxNsR3Ae2Arl3BOBcu39lHVepUOvG\nCuARLpvLfIT0SjmeUztWnUgqqHcHOiKbAMEOiJD9vJ1b0o3nlNOPQs+qYxeE\nT7S0LbXLmOZZ08of5ky/uX8cwXd+0zz54DYPYHmYbKc+8guN5Fk4YC6JHU4X\n8VTZURPrsDcCwnyJ3+zIUF9lw0q+yYOBTM4o1rGcwIr13PEoKnCvI05V+H5S\ns21Hh8eAXOYaAC+gzfb6RckI+u542cT04rPa/lLApIykJfoEyWY3tT+ZT9N+\ny8WDQEAlo6BGHDTRG21Lp4hHpITole1weNujLwyadglQQ1TQ9QKBFtq5g4AI\ndhopTOtOIidbvjP49x2t83htpb0slqHlKucs8+Qc7vndfIKErTsLyKdMKqae\n84lPowpKvOSfGQm5liiMFoAIedYuBs173bfxny62dKLJAoUPrxFl/iq3wZU5\nbC4sosKLeiTNgrTS7rl6ByVXpU+2l8kAhEpHIZz8ZPSFQgbArdv/PcyKl5MS\nrGH0K8GENSFleXXeC3C7ySzE5YbKs2n0BokCNjyIF1wl4CMn1wog0eVrkzeu\nit14\r\n=g3sK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCT6wT8LbjL3ENlEhyL2DoKlB5q70B6soI5CIFgntdUyQIgWWreMiXDNc10Fjqc9y/ZGCyiUik0JIGahuj0phcO8DQ="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.15_1573515451939_0.27786812920930415"},"_hasShrinkwrap":false},"0.11.3-alpha.16":{"name":"@react-ssr/express","version":"0.11.3-alpha.16","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.16+9311ef7"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"9311ef733a352e17d4493926f9d0b795aefd6da2","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.16","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-HiMGfMXpVrcijY5BIBEOZowhIrBf5kwOSX6kvZtUh/6hxFnr2CDcKYFwo3Y2SCPx9HLRH1JZuTWG1D7uh9jHXA==","shasum":"d0e136cce97cb920d5193f65ce3705ff41077f6d","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.16.tgz","fileCount":8,"unpackedSize":12602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyfD6CRA9TVsSAnZWagAAnAsP/0pTRraEIGno263kaXdK\nTCUpCqll7xE5ynInGXebHTGtIdEvg/kVoiGvFw5zgb4AP4fUq7h9KKPG5Ade\n4E7CAPgY/r6Wv5cu8aj5SJB/k5zd45WH391/sebS2/hLhGK6t8ifBTNc/dFZ\nSM6ZSh5rQVmbBA8cipUxi7WciF2YtjHVrTFUvlFs+L8dMk2ClNXoI/z73dG4\nnq99LZsZnLE8zfH/Y7v9Ud/Bs4mgCUoHmwz4hKef7AXknA40Rn1/BFz5CY6w\nst3CS3oYRkEeeul2ABI/uEgpJbaFmbM4J3scNRdNvYe2SZq9jhXzjrzw20YV\nJ1JaVgMc6ToDuo3bJSKHJjPDUOz8seajZnWzd8NexMy/FaCAKfYdpKXufijj\nRxamd+MuEB6nW3mOrdNN5R5ch7rPtv/yGZEHQpH56/RVWBzp1rlO+YcN1mbz\nGve7oDQlXFyjfiYUdVNS+zpyB4A2lLbO6HiyhjMG4Dy17r19slpI/IdbpuGn\nv4iovm7MP9gV+j8RtipqXqUQJqhX+A16mE+EPbVlQderJyQO5PV/tyT1spbS\neqmC9Ff1wM58Zvy5guiQsfagbz+AXhN9Lo7mCrDDJHqvJJHVDxEoILQORkY8\n7hdpwsQH4NMy4y4Ybu7f7Ki9n8lVhnKGBpmRV/saRmHceU0yhiSz79qFgP+a\nSZxp\r\n=zXE1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDDAZ5Y90JsFkwVD2OLdGEmO7V7sopwLNIR8HJgszy4UQIgRGFdZz2AFFBMGpS8omgPNoZocoTegxrvVm68YVaQY1s="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.16_1573515514233_0.2833594902981884"},"_hasShrinkwrap":false},"0.11.3-alpha.17":{"name":"@react-ssr/express","version":"0.11.3-alpha.17","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.17+d68de60"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"d68de6022d69ed5f3beb0b60eeb9b1c941009f2e","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.17","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-tVdkX5se7I4PMFbWR+yqM2Xt4F8cd0tdrb4C8UMZ+6jyoiNqBzkK71xpaS9OPT2Nh2NUK7A5MYbsiSqODsnVcg==","shasum":"e3b90b69091dba820beb0a2db475fdc48d3353b4","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.17.tgz","fileCount":8,"unpackedSize":12602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyfH2CRA9TVsSAnZWagAAPSwP/R3mUoSMtZygOxoVnhli\nnQtZzKBSCQHCM25s0xBPFbU69Y2urF2/OYK0izg1lqz7ShLUMMuI49GibfyM\nua4CZejKSiuNah5TLoXj6YLhqtFx/mfLBdT0MxaXThE8jAcZGfA4sY39+WKc\n2N42prmQyqfz+0O/UO+c0yZMZlT6GBJBW2yg9TiaioE13V5r7Yv2nx5xeqgr\nQiSMq0+x+TYcJeSD9Wpugi1HQm6EP8fBbCVSbbsmD82+5DCU2su+vZwd9kGu\n03/CrpQvZ8h2Qc7iunVqoxOj/GCtXX6KR1kEB/rb50XlzWtmhY97iyFW+tns\nEYgwPx9z5emJMgDbQB+R7sabvIKHKfI1i30yPMgQRcj/awJcB0LRgCMGWjPY\nIR/2ARkkY+Gizh+j7lz4qKTHuzjep1Zh7dWxlaTLia4hmYpxl94cw4iWCh/U\nSetbQH/efCet6+8e8CrOwqaFAT6XCbCCeColx6hB40U6Thf/Cssr5rAo9lnu\n73QcMhmOAEgxbbU2AALCagdPv1shZA3mykaEvsnm+YA9lZWQ3fTs2wSl4hkU\nco3Y3IoZTPgHpfanzQMwg7ZBunK83xL64pFaQFRZcgo6Y/zIE3+zvgdGwWfh\nmhe+3NnaCMEKlNjKBXrEeKtbi8ot1savOOqUfyJy9VFPoGFKBgO0W5Rb29LL\nLvQa\r\n=UiZs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFb8NuE+nXN7Je9ebZq7CjTJ4HmVFjoKFPaYMrsFJECdAiBtGZ3UpwU8vXipFh1dhrMKstmEEfFBkjNJ1rzyiZIV4A=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.17_1573515765541_0.982271212314777"},"_hasShrinkwrap":false},"0.11.3-alpha.18":{"name":"@react-ssr/express","version":"0.11.3-alpha.18","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.18+3b82301"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"3b82301f91b4bdddb42054d6f50e05f7be07aacf","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.18","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-mJh6RhlOmAQfP3jAZ13dh5l4FqX+gKZdYHOd+eGGidQVg+rvZYO3M3UATrHBH1djvJPwycJuCaRb3csQRbUzjA==","shasum":"711805a649a6275caff76859f3b1a7b99e5d10e2","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.18.tgz","fileCount":8,"unpackedSize":12602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyfJXCRA9TVsSAnZWagAAJSMP/055kTRDJM+GTP7+oZBd\nmBIHI9MLIBYMk0nL4oFpHlhpIm4ahHNFGQlQ+cMAH/pn+YB6YNa7qJWpnnbZ\nd7aLMd2FGluzMoTaZCMV6k+wXb/sQhVwUAhQ/bkSIpOFJVAMD4ziWwmEfrwW\nJz9P4/cJpKl+qHX/g8/1fyNVYRY5Ep/s6VJkeq7+O4FpgFQ7ZBlkeTDa0x/B\njI+hAUwickqYqlGchBE8/eI46i4FS+xYYHRYOSpcX2N3zdjp4z3ZqRpxxWF1\nk+7XeIGM66wOyYfIZiivC5Eo+JEF5ZSWemtJ+YKaI5p9KWPf6KGw7vuGWrKn\nOxuEdBYIKUoMcw7XHaFzrfYuTbTVPy0rANYk5SEseu78+aKwmGZfWdwjo6/c\nHaeRs9U4WHnpz34MH7Lizas0s6qnGvNKTv7kuMLoblTBQAVAfUHzQpT9Y/Rh\nYlUA1Iq7UFVhe4T1u7KxOVGCB6YXBDmRJ1v11pdAhP3kn/4zIcWgafSn3ZkQ\nYXQFmq/EnwJdVOSpiaAQh3qYz4bh5fjQqJISHS7BlqVGdmUk1ObctVtMylTN\nJiFgAqyiBpEpT2DVxnfrP00Fn8jR4glKA5XuaHzGjemtAZNl2JPtr0e95nnB\nQWdE4zNmAHnvAMUPwBtiPZqRGhxfGXomIKkbbAlg/sSfQVwkmXtNQqH1Zvd0\nawdV\r\n=1VYZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHJmiUT+oM+r9KUyYw2ncIgBI4zkFTn92+0KcYB5F1RYAiEAg2rBDH+jITsKywdi0STgz8IAnUF0ZDfjwyq5MjcHjtE="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.18_1573515862649_0.5293341727568814"},"_hasShrinkwrap":false},"0.11.3-alpha.19":{"name":"@react-ssr/express","version":"0.11.3-alpha.19","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.19+c3cc398"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"c3cc3985d8c8b3f9142ee36d262e3d6416592528","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.19","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-pk8MyyIYCdUsw1OK75zwuz9SI5MMURGgVtJQLFwGfXnAgLqaKhFYX6UuHSfkVbMyX7ZrcoUjFOlI+lNv9pe5Mg==","shasum":"682b4e106a2d81a040a0b50c98636d77ce283ef5","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.19.tgz","fileCount":8,"unpackedSize":12602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyfLHCRA9TVsSAnZWagAAs+8QAKKwnc4Lx6EA6rGSaBuE\nI0fq72tmu2siw5cFMgqEjdOmkozCuUNAG1d3v9WRdjVa31ntaAtpUJEKPg1X\nRhYUMPV53Q/Z3OYzwJBPBFxDksBxp/TYA4Xq+LPJD3Hrj2lSU/UWVdJH9I8P\nlzmaODgOg25SBJL5X3bsDGH4abPU56lv7GYcrRrV5mDgOKzYpKghTXREawod\n9QmcGFalyENEcnNOWrwIiV84K9rUWUFnX4pU9NGP6nX7bvHFRofaqWdYas49\nwuDCDiyWpuYAwWFBuqwdtQZq+f+dmTLWYe8iVoidzZ80kP2Cu5ca++wmey0a\n9Z5ojjpZKY1XQQ4sn/xJGZDiN/I7TkF1UyljrdLVIFd19c1bu1jN57/K2x18\np/T2ek7gOY2tB3678MI7quwaEP9egFk2tCyhjkEQmLjJ1qeGwD9qJYgqW54l\nGiKEuJFGUG87sXZm9kNZZCJGknu2kwDiW7Z0f6iDTTYIX+tgrm+zzsULi5R7\nw5lYFINAbylNTlTiR++OuWbI3uJPbg19o0X3Qt5POSlOvIfs2iPG/FkMY9vp\nPw1FJbU6krExql8b4k9Xxljf2vmCtyBhiKPhjAzBFgYv9Y0BhSiByNbHSZMZ\n2RiK1bvF0MK3K99R+sQtImHx/POoiww3MoyjM75iIHnwhra/G2AacTcGZxqU\nEag1\r\n=kxBR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAxJmoYXfcwbcKDmqGPDkqgJA97fD3u/pCyoiNcDFoWLAiBnt+qYDKZ3tvtGPxMmC2vcve9JjuIRk0YoV07jwEpAqA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.19_1573515975256_0.23315270531292165"},"_hasShrinkwrap":false},"0.11.3-alpha.20":{"name":"@react-ssr/express","version":"0.11.3-alpha.20","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.20+1cbf360"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"1cbf360882ed9e88a36e7118216e28ca64eb41a0","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.20","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-RON/j6A/nN3GPl8YbdxOYQc5SUyLqTuMv728RcoqCk4lNMKpnNppX9SGb9HAtuVjZ0+ieG5E0eqttPcgG/ce0g==","shasum":"6e4312e69be4d1c167e7b568261e9b6b279f21d5","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.20.tgz","fileCount":8,"unpackedSize":12602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyfMRCRA9TVsSAnZWagAAYG8P/i/EIjKHGsENwGeUiSRE\nvCnAfUVXM/kAIdK6QX//VxqLgMtr7xwHcv65snyCHjZMZ37UwWN3i2NMEBGS\nLtMuxBhry77jUb/l50QQtxvEVaCPkZn9+TNKRQThEmpvHUCWEadIyURnjU4U\nDoOen1eAz4IrQ7wnmKPAzUmrjdZvWO5ZfkV7eU+amq6KskvZqGv2t48Aj5Eu\nnurd6wlhal6QN6l+RUc1N3izGXIIGPgvfCX4hakpZ1AeBVvny8yUFaduX5eb\n/3nht3NRMVyhK3ECmgcLsFPAB6g6g402xJC5mA8w0H6nnIuRSnTVEKwUWx6S\n+2xjDXNGnT5Oiv83deHxxjtL5k0pglH4IMLlVRBSmZ3OFh07Q9ArY90s/lNQ\nc0nlAIlXjm/SGTckR0rvbju/Mh2woHB48WszZxHC21dk/0rTljRz2V/MdhvZ\nc677OWGHl++8P5r2KuAwr0gON8IQu4mAeR4ZSnvkdYHQVpXlLQDfs2qFBNub\nEBtSbW+elvS2rS/epz1cKIorVZl1gEXvfzAFSsOujp0mYvteIbSwX8W4xTOA\n3iSdSOKZK9EQFV37wH/tCMrwqpLVCUJnZfFJVtpMhZVtY6Ie2bX2UkRZlosH\nHxjBKLiG5aaNHW41WYqelKNInWUq3MiYEeNoxljwxVD6tmoy/LATb9Sejz30\n01aA\r\n=1wpd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD6N6StTmThSZMt1dbweIUmapixZo1IJzQ16hzehEungQIhAIxhZKKx+en5R34b0btkOtk/9CKIfGaZiyCYWDPmqbpG"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.20_1573516049392_0.4070274497273767"},"_hasShrinkwrap":false},"0.11.3-alpha.21":{"name":"@react-ssr/express","version":"0.11.3-alpha.21","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.21+f02fb2f"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"f02fb2f2e9a761ccf0302206d3fb3231db1c0316","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.21","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-ZO9516JO+wjlbxbmVtW1e+U54lWU308cTKSgYToW/g0I/1Rv9l5jL/gszHu6RXHOxa6RtGCGixiiNjY3hZizgQ==","shasum":"249262b704bd88ab92092b48ad2d82a638126a37","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.21.tgz","fileCount":8,"unpackedSize":12602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyfN2CRA9TVsSAnZWagAAo8UQAKLUykrGYslPYLLsxrNg\nvn6Ch2fxEHpyxePGvaLx/b9cKY2Hei6iewjHHRv8yRLfHyaTDUz3NStsRF5z\nrmPG9kVUxJPHLJpV1ci/e4NkWn/usqV07NE7ILP01n0TxxiiB2C3B1id6wVA\nd/enp3tsla2krQ9eZl9Fuoy94ApFnIzd1mjnMulYvIQyUTRH3khJiAee4qbu\nBrln7lx0cgxNswqp5TbzsSNMTriN7CePEIMw/NmSIWHGs1FuRr3MxOg0QTt+\nyNNCS/zOZDu+G885RND+FpW8wtmC43ZHL5zE146dNfuHOYwRC5D/5jZtMynk\n7cuK1c5M2DaIJSPa3wP/JPasMDS++pyNRvmBUzEt0hoH1HQCGvjkAZwbmn3B\nSRCXE1MEGy+lP6adRZN7mQXXJNvZsJw4K129yORs+r96MOYUV2Rhrxzkhe69\ncmBvBPo3Jzjrai2n5LQBJKkN2Q8mOItMsxX9VarraIrRF+GfQXivdwqgbitx\nVFcraBZTQKq/K9Y/oYa53swFMd6hFVjDGzSDxyN7cprJuM2jYmOS/DHSr2CD\nf3IYUyCLuwPd6w4vTg28oHlTaibEBMJLlIj1u2X3knCCfz6xbNfxbtNnAJzr\nVDZm1euXYpsSzT6M5bRLhCwksu0DSWCCvSw7q/z1UqaHRDeQGoSiEwJ52sBh\nGvvW\r\n=Kcfp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDbrZvV+iThSYQJfCe0lLottrCUllkCBXk3kXD8wwfbfwIgV1DW45duD07iMpv9jBDf1pWi1axyQ/Qt8fyPpcxA8uU="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.21_1573516150437_0.17107284485727248"},"_hasShrinkwrap":false},"0.11.3-alpha.22":{"name":"@react-ssr/express","version":"0.11.3-alpha.22","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.22+bc7bdcf"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"bc7bdcf3e2f239db26a8a9492a66e6563ed6fcb8","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.22","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-q7tNC/a61vgH19OoXeeMIOCqgNhgfOv8PBUjdrp4dkQA6Mh0mA+xKWb41B1oaXng5150+SIkiRbp367MIwpxHg==","shasum":"cba547e5312bbc79730f5dc1bc26c4475ed2cbb2","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.22.tgz","fileCount":8,"unpackedSize":12602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyfPOCRA9TVsSAnZWagAAlzsP/iNgb8AFOFq5G6kh9kF8\nPhcmhn99CXa7Ackkq+LTvFhkausHYpVQ2J8R1DvTMdB3lRxX48zDpaKeE0yX\nEj5pCY4IYzP1cgO+XDPFlrKxFqExQ4141sVOudynEqsBQRuUb4DSDtFPbtgl\ni4XXVBemU7t1Fsed8wkYQ7C2MxgN+NoSfFyTMJPFgv9Ov3OYEUs3xVGTdp0q\n2BT3raU5Vslik1KPFRN0SPELZnG5o8AbFHV4XtWyVdbp/Zaodrpi4idjs9oC\ngOD1OZjeX+VV8k29pUbJ+bkG9lJWRndB/OYA3vaFuThhtPG8vcIXBrYFYJTB\n7/zm6XvxHNgGb2XlrvqnC3nwoI0R30NVkZGCP/ofIuUMG29ya07AypNo7qIK\nZkNX9vrI0NzZltHFL/bwUsQxSaXv3KTYbjS+6jt98Qo3c6lO4hLlaWXHsWAv\nCunEDXocLjr3yAVgHPrUZMZ37PMAmhBUcYuoLDLV2EbfH08sRvk1siJD4vqz\nsx3sWyff7Kuw9LQZwm4NqBbyeDnQMbQkou/0sDwUjfW6yINWk7mL2BZcfP76\nh5ZPv7373U8lqzr8N28QOSwDisag1aABEvFqsCQUuyI+WKDuYlPlWwZdNYYA\nxIGZXch2RRupiVydflEKf7/YNyQtfWo/W17Be/VHmIH+i2o/eLRUaBFto38P\ncsw2\r\n=gEK+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEMCIBWvrw3BKAeEzXmcsoI9i4/6I5lhzrlHjbtWSUHWeVOQAh9UST9URMkhdILJ1Dj5Zm90rClRI0mix31uO4lRmuml"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.22_1573516238447_0.9315543024485369"},"_hasShrinkwrap":false},"0.11.3-alpha.23":{"name":"@react-ssr/express","version":"0.11.3-alpha.23","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.23+e8c0c1e"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"e8c0c1eebbd20ae615bdd63d5c4d9ca10634439e","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.23","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-xWY9Cv6KAalDkwS+ZAlIPbpUgNQELHhS0B694n8S7S7Oc5wzepln8Im6fT6Bjj/8eDfWf8Ghh/Z7LoRMYUmApQ==","shasum":"0cb143416e671aba0cebb5514dcb5398f8ec8571","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.23.tgz","fileCount":8,"unpackedSize":12602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyfRSCRA9TVsSAnZWagAAnfEP/RThyFvheqYKdLCImHFA\nNuBWCoP6POQXN6UEg41xIf2oz/lUguLkvfRLdlmT7+nhGCYSF8NYjIkfY7PT\n3U2wbjtQBQjvFh36THPaDzBB6hMOBSUdAE12u87CrPsi5zjLjpiSPYqdjlrP\n0t7QPM61CObrNzFkwKTwFx6H2ARgo4bPALsegKHe9x7YXAqR/RtYp/1Ptrd5\n+Yig6Fpk9NIt1hEgiNPb0v79YCGmVKSUCiC5khEhHfbuD2VkzemYyf2h9pTP\nxgZ3Pyi2JP/pO4L/1uNPcVv96nVfoFfD3cAajnWVhWeN1+AsN37dBq0bBMda\nsaD8e5v4kht77mokbde844ePUQQ1YcLuLUsGzvEAlF1Y4a2DGM4Prg39Plse\nB3g/cQGwR/UF7sPxzn9i/JczM23lToIwpbRwvoZa37Y/Mvt24Q0dNT95e9YE\nPEpCvk5Y+jhxDkd+yBvSlkJnBoQA73gORwcEqQA3YZVxIfbqKiN74sqHR9hT\nlD/zfji+KMstxFw6wq82BU59/XNSYhe257+7tE60yhg5roEi343pyA4PeQnv\n1EAU7ULuuPIRHAILYmCAbtGDyFM2OEYUbCSCEcM6rbTCXlrj5FRTBnt3oEhW\n/tuQrfKGvg+XZOessjyw95cQKiaZYQtxjLEHgKMyMYjuBgfOOi5yAPb84psB\nC/mE\r\n=mPo4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCEiAR8YD2np8mZBDnriifEWmryHjWQH7IUmRMrXn+51QIgSyZJ9INedAJtiiTGXcruX+1Nl1OtItFJx3xCx9Rkpmo="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.23_1573516369615_0.4169713347891246"},"_hasShrinkwrap":false},"0.11.3-alpha.24":{"name":"@react-ssr/express","version":"0.11.3-alpha.24","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.24+ef483f3"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"ef483f3bcc3318defc2253dc2a7c7ea65f264b76","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.24","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-hfR1F20kN7AwrDOAlVB8JI92FIlfgEt9CdhQXmw+5S0u/KHfYCNL5Sm19VxiP+ZF0jhaWYtZ5NEew9AuUPuLBQ==","shasum":"eaaac065ce80cd90ad0a4156a3af123a075f6579","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.24.tgz","fileCount":8,"unpackedSize":12602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyfT9CRA9TVsSAnZWagAAdMgQAIbWTqSO6yQcY4GPQBy3\nEKumGnTAhdM5f/BUqnFfTzyO8T16/v5w8ADj4r30wO5T0SA4XqpJtNU7WjrQ\nyuNG/WcKMcyAl08bjWXQdncNCiP31M505+alwUJpV50PQgVHwcFn/Iq5ypav\nEAq6Q67gTeIWhQZFpCaKzPKmN7p+4+jUhpbcl7Yd5K9DU74k9WpAiBov7ohr\nwghIcFFPdCBYXK8/s/YWc6JRfvNs9jxhQV06o74RuK+p9kuYG9aVbzyTyxnT\nGTGZdI/VmrQoNY90PiK69G4XxCQfCMI8d0DKBHzH01bH+8i6Pn2Yza0+R6yc\nyH1SDWoYLJM4ro1yEdHsNTLKohtCUO9hsEcfujyGglUCIQGusoRKVP+g932c\nM04v6rwJrzNWTgWSZPolgB81PILt59eJPU/L6NXN4belBKg7Cfv2uscpzhsO\n8CNMJ4rGJdGXDfR4tXKn1TiYXtY5K6fTbvFUie1NIyzXlTCNHY6MDKdLdNE4\nt2BCsyuV3KW8+OGs9Nz7tiuSwVBwJqyWI69zWvx9V8kpA98HXWo79IzyysyG\niAehqq9UWJpKwWsWk7PQtDBioXxMUb/WTwDrjWNXOTLHxt15aYkMbiEAPw3C\nwasN1M0Iy23OijPfA74Upz5wwYuSf+LzS7IDdldgm7OqV8rX7/0kP8oCEpRe\n9CUt\r\n=xmcq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICgKaoJgUoa3cmHAR5OXxLCFffsVUYutRrPp6GO9P3N5AiEArJN3k31vQbaejWVRS9lJ7OvRVmhpf40o7WkbcEMV3ek="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.24_1573516541294_0.11227208800474253"},"_hasShrinkwrap":false},"0.11.3-alpha.25":{"name":"@react-ssr/express","version":"0.11.3-alpha.25","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.25+e7670a1"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"e7670a18e846ab862ff5b5c9ba119e631218f47a","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.25","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-30Q+tF7U/0PmaCRkjU9TiqWXJQQdCV9GAG/qKNFJ4PgBzZv3FpxTGe1ylVrjkq2PtBwT/7GKl1puMOmpHJ2G0g==","shasum":"103b520404f6efb40ae1ce52461fd098ee9d6133","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.25.tgz","fileCount":8,"unpackedSize":12602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyfWoCRA9TVsSAnZWagAASIAP/juvZkoYfrPRR0viR5G1\np2bSGvQRGO2XlxALeVYFpDJzi7umk6oL274siN+sz9+osWMxLHCwNQ4OcHma\noi+9hNrAb9+0XbnohK4g48kfq0bql6t0O8R8wA6UaoKVKw1qBvHw4cTXIV86\n94EC9KI4qsbH/YflFbT/iAgGsG2FZc1dW/himpeE6U4Bb3S0lhR5JDTBooah\nq65Tx8PBPgfO+cy/35RWOAeM/xM/q7EXm5g5pGQcrCbAAsegBx4ZfbZ2zov6\nTV7Qshk7Ot/0g+WJ1iEFUu++2SrUg8oW7MMMGmZnREKl8XGHNH5SybFH/9X5\n0GLnvz/IbrXtcNU27s3Ky9Ilod7JjW5ixp60BWzpNzHMVNT2ygS9kQ2Cm0au\nIMhDTW2zQZTJOTPElkmo2NVRqd+G6eP721gFS9BkRYpgVDG+0dycRJdSFSaJ\niKkQFDf0SUgBKNVfUd363kNkleRPZeX0tE5iLSrY9ttf/tbClNls2nF78FoJ\n7obTi7FZaoG0SzGFBa2vZlqOLSimsj30VTMKMX+ZuJZhyZPIqjQXxaF8CQ4d\n9/AJK7NJG+CulovjbKt1blWLCVX47DyOThBYDfUT5DcVPVQtvBM3iN30hqzZ\n9Dg7KO02uBXCzRRVGOwSiq2+ZpxRUB3EbJI3Ndrlr+bIXILB1wnWFlixO/WW\nU8wL\r\n=5I1L\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCxyd2gaSSe+GTVIciANdwU4aitgEq2WhthzR01Y/XzQQIhAOrNn7iwDpB97f2tMaMfycOIUHBhLFpsze93Au3yiRQC"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.25_1573516711966_0.7047107373642532"},"_hasShrinkwrap":false},"0.11.3-alpha.26":{"name":"@react-ssr/express","version":"0.11.3-alpha.26","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.26+cb325e8"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"cb325e8589e9324da5ec10905caed11aa155edf7","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.26","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-GhF5VSZE+ReBNdkVlgBNf+iUZTVcil4NRisb5zblc3jNZ+5esgIl0QbAr+KsvrmqRRGmIPJ38dnsgz6UdreK3Q==","shasum":"f5ec17997a74536a3fce43e2816f107382b0337d","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.26.tgz","fileCount":8,"unpackedSize":12602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyfjFCRA9TVsSAnZWagAAlk8P/2i4CIpWDeSalt6dXfMJ\n05HEtmk7cxpiN6jM5l1tXBQvCDiNtF8LX8K7LlVEYvxjAzuCiR0eVg9fP7Bv\n6cv+5i+Ry51c5ohpgmGbfVrQOyhWlxJy3r0khkLmV+/mR/2NqryNw+/n8Avl\nkO7m72UIBahh+fjZ5Dlp0NCOzwM70YVP12s9Xu/LYvtxR0PQ6QfwO7312d3R\nZeIviShhROmfeCzPMpPPQias+J4gz6VQRPHIOC5O/IGrYf2mano/kltpD2T1\nB8SVE8YWiCnFzMwqlA7oDFrqB4X4DS/+GvKq+1ScyTUN3Xk19HBUU91WiHEu\nJ9iD5s5OUKH6RmP2XEgLDL1QI5gMVZtG1SYAdXYPiU6Rasxe4r1OauMiuz/G\nI2nmVW5mvhN1XsaLyGC2p91KMGWgAMkp5hy2TcsIAQ5i+xevkUYjufJbqKCt\nvuZVoyCxL7xxLShVEM75zCexEhowNHwHc1SrnATX+LnKlpt/V87kHlz5TvYJ\n+eHaTpBUYC/TkcycCYY0ifQXE60Mt0my+VXuZE9VBaV+6EPbp+zqiWFuZs2R\nVmLJKfu0p4QtN/OerGm4FoA7Ds9XePfXwA/341meDfg/h+TtgcqEiTBNEzkx\ne76wTSG1/zM172ZhIh7uM0DtJHx1a+F4KJpN1UB5mBPt7UzjxoUtxCiplVse\n4kD4\r\n=TR5Z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHLuc41YZ+8SBUcVMCN7y4id/kWjHsHt7fcCOjnEdAkQAiEAvmj5SHLWQ0twkDrnGlciIV0forC5hukHilWvWFgktik="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.26_1573517508914_0.4476450813365369"},"_hasShrinkwrap":false},"0.11.3-alpha.27":{"name":"@react-ssr/express","version":"0.11.3-alpha.27","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.27+88a8bb5"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"88a8bb544a6be02bc3ec6a091aec6cbdbc1b418f","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.27","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-jwogU5Loh8ktJYYBvZKUCeCjsHDQuqbD0SZMcKq8HlckauyvJeDTpZRUwxnL+kmsCBaq2awwBTHfz2cbiFBoyQ==","shasum":"5ca2bc215aa5d9a1002172577f51e0b3c2422b74","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.27.tgz","fileCount":8,"unpackedSize":12602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyfkzCRA9TVsSAnZWagAAUM8P/3cJFfugFAtYQo2cH7zh\ny/wyYNOsJYt6PVFeeltkF6zoow41+570wdIbWdpXMaeqWdzVejuCIflv6Uye\nRp36qGOZ0zFCLQY0hT9i8ulWW4uDqmTz1oipdgI57mGVP9zJkdU8dvquWDtk\nnq8OAcxSZ/04QdlU0cg/Zrc0hNBSjySXde3PCec19ReGlS2A30YvNBMMeoJf\nXadgx5Q5NdB+qmRInhGwE+VUaInZ/8CD01p9y2x9CzmjmKfSMB8n+PbwU1s4\nhwv17pEEB3nPB09y9K0wzVzOVYPUYL8DvPv/GyH7LYAAlJJx/9qaPSjq6wNF\nzTiCr1CYGv1YEIalGWk52f6z7JQnTOnjTuZaIOiy5wURNI8vIWxG7xLFIMZ/\nPuyeJ94fw3050Ti47J5zowGQCRLAk2dticN1qCTXkXzNOL04f95Z0SQlei7e\nkCFw4AAAadYFCDzbhQPfwHBFq7kan/CL1awaOkAXqGMX78V9lCqwCYS1NVwI\non5zxEv77nqZU7r5HH4fWYLHSNWxWlLBX+TW14LvRRjh1wFT73Eqq55QxfT1\nS6XZ37kGXS0L2/iP1psQEDjHOlrEk18aNGTH+tDz2rYh33BVuN7NhsEDeciu\nzHIBGQDbvkru6J848+JNBkCluKq2uyWAH79l/a4FrTI/nlVyW1a773TdGMYd\ntENR\r\n=uEjm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICFwVtBady26n6vU/z8jchAk7NmrLhAYNqKq75yjBTxeAiEAwrhV1FIbu4+EX/KsulBzcMl3Vptl64rDW0IOuu3+1jc="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.27_1573517619040_0.8953246818757954"},"_hasShrinkwrap":false},"0.11.3-alpha.28":{"name":"@react-ssr/express","version":"0.11.3-alpha.28","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.28+922f76b"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"922f76b26e1e2b13bf70d0ed8b99490815712418","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.28","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-M5ksig7zuBMpgYRfAkaZD/npBZhxvBlnXwtuo3vLtPY6amCybcb/UZn63hM/Rxu9nCN86MPvMIWFib9EAuYYTg==","shasum":"82c11ae4df99286c6a3f32aac693fa028cdd6c8f","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.28.tgz","fileCount":8,"unpackedSize":12602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyfmuCRA9TVsSAnZWagAAntkP/2NXpL3+lSjA8mCeO61i\nq/6iHHkTTLhduVxBhvGfjp2ryWhSXwFNF9bQQ127x+MmvrY+N+QAl659wCCf\nNJllGWAPunJHs8FYgwtS7Eh1TcgdI2dlrbtAwrtM5tTFOHO0mSGimGL71d1A\nb0m82+7nWgfrOGNQeG4GjUXyKy72g4LFe0CBYlxh3h99zhqoAv+5ZERZlwce\nhSwer9S5z4pOjcS+39VjYcjmxQGgZvLXSVsHOSVHxBauduQujTZ0mZMOAnff\n9WBwtvYh1RPvh8sFqLCNoIMm6cUF5v27zWYWiSfc91NYnea4CLWBT7JF3q4v\nVoymyftHa9DcTLEa+aRMYibbDOFjacMGvdefIRDhIzHJ8w8EOJK21uJq3fFh\nLbKsLQg5RH54wG30T+RSPfrBjpsrhMhvxDjN4D+gWa0D/4Zn3sq+16nxECa4\ndBPVrLuf/5d/9S8kdRPE0gnIRVhQlJzZ8UwAxCQQL+1CRUuaZqKPZ28cY3de\nMaGT6bwW3AJRNIIoZdiOBYNKmGGbwW/VsWVxHXrIW4vMvGgZJzN9Hs9EmHXS\nch/LNBkvmu14/KSEMo4yqxVlOYGj1MLpqW18t3Ji73bqEWp5Eyo8RcMuPx6B\nFwWhxSorpLhm8stTNkvKAzhxl/gTW7lmVNGT+kMWUsGbIsXHD2Exle+7M+W/\n2NWG\r\n=cCcc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDbdXN+a4bx3+9rT9gjIcBqMammBTMsFsdU6fPfN9gE+QIgMIkoB21aP9AFyNL9Ov27LebDII2DSyy5/soXljDWDOI="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.28_1573517742418_0.745220531365848"},"_hasShrinkwrap":false},"0.11.3-alpha.29":{"name":"@react-ssr/express","version":"0.11.3-alpha.29","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.29+34a8c6c"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"34a8c6c484915aee6bbb0e72669eee4a10bf1109","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.29","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-zB90c4nxuYa/vSAzl2fS+MISloMIEnHzyVb2ZvMBZJyb8Cs181FJ2typ/BqnoAHQt0kJ628bXpcc3sqJxEkj0Q==","shasum":"509ee068f6653f15e662a1e47faef8bbab66ef25","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.29.tgz","fileCount":8,"unpackedSize":12602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyfpKCRA9TVsSAnZWagAAqkkP/R7AFkGE96WIKHryfHXi\n8zV1OkfQCzKUn6MgvSsCEw+7PrIyG+KsYeVnHzevM500cVEj5tGhs7E6V5id\nhC23dvACTRnOAXay5ipxE88xcLaRx34tVntbNEm560foXDQdJ4p454sRsGUn\nvH9Tm6x8d5sYTWKZs7X7VM5RRmVFyCFABeXIZxhFqO3+BEDdWOl7GqKWBvT5\nczyU4Y485Z4ASdG+0VmOJgKok0Yek7evGJGmxty9RcJh8Gzxa1/FL6aZm930\nowi+P3I9zSIdAFy3BZFWWEohvLErgO0SQcenF5nnHpxJ6VAp+KcR0grbKOEr\n9pIDHU3lOv9Ex6zy81nZn2/fUXnoA38SXO/3cGdDp1JbBdpa4eOYo3ZEMQuw\ncPAEw3A2gDRG0FQGAgVsCGUcB46aBfsmcOw0kol5Cf3JTdiIhbLotFFKwJUR\nE5j6epy/xfEZFKR8lEeToABLpX+RPytyexRzFL80QE7cYN1zVe2fHuUfT+pr\nqIoKykrdOf7ewlmGVxteWjg6lIjRgUorcpTrzfqimW2LTQIke6H3yg9/+CIN\nnc1g0ZuRpyaWhq8HJ3NzmfekNf6Cszm3B5VnClQXKT+wj35MMlC2flI78ucK\n6RhDULzFBP8oab2ckt7upfjtgn6ZwDNJ2uaVPjAH/nz7bkmgivogs3ppCr1d\ndfbK\r\n=ezWD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCgEp+7Z0fVRfgRPaPP5twRApZQZZCgIGirSY8JKkhIagIgMohCe66bW2km4Rr0nlby7AEWH4wV4V+GHagnojAzFtk="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.29_1573517897690_0.718832749289064"},"_hasShrinkwrap":false},"0.11.3-alpha.30":{"name":"@react-ssr/express","version":"0.11.3-alpha.30","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.30+e98fbdf"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"e98fbdf80d1c3564a99731901f0128896d17f633","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.30","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-eDDJAs09EwYuRJNpHvUYnjfcaJ4UDLLYrXgpVZPcR6jVyKxMgjIJBazoBkEP2KsI0qs2Ir0kopA1E2X7SpA5PQ==","shasum":"ba67083b322fdb958af44f7902463c7395267cbd","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.30.tgz","fileCount":8,"unpackedSize":12602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyfq4CRA9TVsSAnZWagAAuhIP/2X2pC1kTRzifceLtx5o\nRdWkHiyMV3/jNPCIu8OcaVA52tDvkrCsK8pAogV854qvL0emYQwbmjZ6r8wG\n+b1ssuZPsV78ghL+ClZa7Gy6dXDTEhhx4ls268Rt5BCc6tACDK6W2815QmRZ\nquVMvONkeZ6ihX++ILV6VVP2ZjuCtcmfUI9dk3483GXeNc7ziDarRHoumFNL\nw280ECF4AZ5ntJszhZASHikij8ePo9VewWN8IfnSgqrXTBS0q/qMmP9FKYxO\nIf8+XN1vYnMGZwj7x+7+0vL6YmxsDnWQM9StJ8OgXwh+4QUpQne8vpIbd9Xq\nKOb3M5sA3VQcS+NB1jcO6ljlP9G7xcT3vXp6Q/3LKxeUmPBcSUVON61+mfVk\nMdpYIVd+kXm+I1JzOhvBg8O8o0A7xko2pl6DPEivXfZEdsDu9OofygS8WMO7\nBwS16i8AZwe/QPvnhxj4KTzFeJwZeIMH+UfbRNYAwK+/+E8DS3FxlprE5Ndj\n/B9j9yyfMm9VvgGB/MYTTBIT/m1O2RWxddOsbKiSRpSHTx79SJ2URg3Z5kBW\n6exeKOLvhRa97WY9NlnvIhj1YPjJnYLh8gUIBd1FVPuBqpMthgveDuqmOpJB\nyvJD23RhouhQBcsYWA/uDoqB+4RdCTFz/1WBumHHUranf6K9KEcASvZy8Td5\nPtHf\r\n=CbxX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCaL42kHvOaVUsSNXRcaoMnvUQc/GvdBnyl+9gaK05DrQIhANrJ3qLlU7CVjNdOfPwIhE7SQjL86MbPSGQ02r2+25dc"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.30_1573518007830_0.2934552121277023"},"_hasShrinkwrap":false},"0.11.3-alpha.31":{"name":"@react-ssr/express","version":"0.11.3-alpha.31","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.31+42f844b"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"42f844b1b98a37359e436944f8268196b9609dfb","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.31","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-JbQw+2TlyQqZ5R6d8V/bjq/bKbnZS3X7/0Ra5AlHPZsaNj7191y2rzyvYCPdBVsUlZcIxu5ll+qegUtnEq49Cg==","shasum":"95c27f18420be3cf93c523905144142d8a04c60e","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.31.tgz","fileCount":8,"unpackedSize":12602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyftECRA9TVsSAnZWagAAMSAP/R1smhDoVcg8VQITke22\nDk4jCu3cN4e2p7Q3qFrRCK2+AUQmmmfrWySPnXkNLtZXe3817uIQQfXakdDb\nFT4s3GliMR5AVj3g0BmMZMasrPAg9uvSYh8TzqTpCU5Lag3i9mCo2cRQYzrS\nkWH3l9LnlJiFZDZF98a7xgsPTjhQ4IN2ob8xLY3bi1oyyWdHEiekXAlN/eDq\nFwzOBbk6e5mXl/IFNgxsokO6Yu7mipgjRFGKl7Rw9veB+mS60pP8hJBscT5N\nSYxE0fBPq01LwrOUeBtTYJboZ/GlXQvHJI1l8x/WOs5BYlWIRcACp8s0MqRe\nxsAHXAc8RXFHiDiH7t3z5pfpsV7Mtk4H1nw5dS6eqmNAEr8XXKTXf+wtpQ5Z\njLCttw9UPv4JcKr2J6dwnz0gjkSecA/hsy9HjV9kkR/dv0ZFIAJkXqNtVGuJ\nV7gErnvzkHfmV5KbDgsHLwjzP4JO/sfo7vBeyuQQa1bluwIQ1dMlfFFqrZWM\nSdfE+9ElmI/fGAN0gaPloMvyzv66tmvZZ5bv8gwGJy8c+qK1SrvFNRdEIrvl\nPAoBbxV98fbFuwakA5Ecj9FsH8jcxjWd3pIp9SXWgKLclCS7yy4SuZBQrPmO\nU/KHyBP9zGSTss/G+LHNVbVcglMzLh2NZqxdmn+lXHZS7Av5DK0h+oIHHUnW\nL45Z\r\n=9ibr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDW7OMe6uEpgwhr48Yf2nBULrljX4a0N0dM0Dn1YL2rEgIhAPMIu5KpQi9UAprKBffQ9adfVUPvB0DUlwhZF7pkM2Ze"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.31_1573518148191_0.3610641436582531"},"_hasShrinkwrap":false},"0.11.3-alpha.32":{"name":"@react-ssr/express","version":"0.11.3-alpha.32","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.32+486b258"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"486b258287b6a5efa672407317530e860fb035be","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.32","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-pLyNb8wTJrI780UpGvpYWpblWiIzFrovarS9slcvsLATG5PxJ3DsqYss7n0QWQ8y/VdojfkrjMBh7VXhcReOTQ==","shasum":"1bebb584b7f443c39c52b384c2859f7323e771e6","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.32.tgz","fileCount":8,"unpackedSize":12602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyfviCRA9TVsSAnZWagAA15gQAJZTxf7f6T0nOGJcz4ca\nZJX/7IOIa5xoSv1pDLtCrKTdOhRI9CsRU8Y1OnrjIXSmwvRGp2Ev9doTAqpc\n25Zc/eY1wWu6UTNHAj2QeG9nBASbnLU6yqyozWczXRU+0huqEqHvxuh09czS\ntUUcZm+M3vhFob0Vc8TVX2HnadTUTi5I3ASxD9chLDNQG4Fsl+6Yrybkh+I7\nukXggLD7rE5L1BCmI9uN6CGarEG3d973N7/QxJfZr01V0bmCTPQFKPJYALJr\nMek6nqLfCN9PlbMEPIxlXnpBoJIM8PsKr6p7tme4FPB63PamHXj+a1oFi677\nD8eWtFb93YMglX1IDglsYGpdFwzqgi95jgRz9jpKxXUxTGmAFVpeUqGpLc78\n4GCXF3UBliXxL9lmMeRJ7SSAxoFLIPx+oglZ3T8V3iWoQ70cdTD2guEgg3zy\nAum4kzMEdQ1Rh0A8P6SbigWpgPuTid/Un9YSesOIEj4wzlSDylCHawnDTF36\nbjlc1s79p7xeLv81nM7UpihSNSWL4tEIOwZpnaHBF6GJdLGZjTIUnl0WOYn8\nMSPGr3e38g0s7JAg3jsUZbEUznTEhPnlXFWnhUKD0iVe1NbTXAglyBQp0P0H\nUMGs+3bjvu+3U0+1WzUWCa/6mam+G1+gVepDxhn5zzSucdywCOD4HA80qcY5\n0RzT\r\n=fdVN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC8kNrfY23xamT7Els1ebzRdXDUnnsR/i7bPwEubeHmAAIgD88cgRp3p3wwR2Py2Mc1WN44pMo6ocDppI+HAwxC/mo="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.32_1573518305726_0.5004443207184319"},"_hasShrinkwrap":false},"0.11.3-alpha.33":{"name":"@react-ssr/express","version":"0.11.3-alpha.33","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.33+c846eb4"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"c846eb442b98db82b089b26f354645e02a21ec52","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.33","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-YCxkhIvYme+YNpaO0bF+6fL2ffkRZGRkOiGpVYUcF2Pki/HEc6npy1GtCX7keUhQtx7l8HeRVhrObmzFqS3dqA==","shasum":"ae9aae668eb6b7e4e3e2fac892efb991b2491d13","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.33.tgz","fileCount":8,"unpackedSize":12602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdygA8CRA9TVsSAnZWagAAA/8P/1eYbob1zsFn9IsGi8xz\nqWn53Vp3RmaLbxcv8AbFuHoPSg/qI4uKj9gIkwBjB7NP+Trv+NHf8EniAihy\njMh9KigmF8QcLqAMKXT4xrE/tusb/Yc8bMWMu8xvgHEhtT0aGLxyXyhQRR7h\n6BSyQZTv1Zz70aLL1kY7QtpvOnlbzDsAaq/mea26//rr1d4oZfaqDXz2z9Bd\nJh/c4iugXxUG9LQG53lXe45yBeSVEZn4WJ9RAUyKrhvy2qI4CUuGxsWlv5Iz\nxp97ZfaJvCqgpqWydFEGgRipiNO/cxeBbwnDvK6Vpo7aLaVC1ktO6u1j2lD3\n5u0ZLLF3EnytKj5jZ9Sm/hej7IndstgsSnMCqlYohY7x1YBxnZVJb3x1wISw\nWWhiKavnLximlmJSr7xwC+ppFVcLlz45gA7DTsZnv3OsvOftGy91ndP7C7J9\nl5VPzK66Szc/7o+mSsGIUDLWUFsCevJvL0oKNAMdnA3kxigYrn4tG4DIU2Hr\nZXOuDhjQLsjdN/w6KOxBCm1J1R9+V8cN1Uq9IJXbhefc4k//0jEk+8+Cek33\nytneqZcmJVrs1cVqaluvUTkQBf9X6KTGFdg8Kkus9GwpLnOUG97dlCAbr10K\nDZef2ZSLbj45c7q36BozcD/H3YfqZ9w5eRHX4mjO/faBSR70G6V4TTfm0GzR\nFj8d\r\n=Tw/q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE5TmyZK3qOnRzPx4An+MVwh/f3lTLYcVkJw0VoJ1S9pAiAz2oOXo8Xul6cQmmswZs3PKuBVn0ShJzbvHWL0gIO8Xg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.33_1573519420338_0.5142445505440874"},"_hasShrinkwrap":false},"0.11.3-alpha.34":{"name":"@react-ssr/express","version":"0.11.3-alpha.34","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.34+7ff81b0"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"7ff81b05370b517372e69031dc11f0b3b3e85dad","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.34","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-zP6TVhC9WPcdlla9FNWNcjgRGtE/XJt8vjrWLHHvsIdKGkLM088Za5cVn/m9q+iBUSY8HSmalMoXqc78Fr+pew==","shasum":"bb3b797335fdcd8eeff643d249cd5b2312d36bc7","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.34.tgz","fileCount":8,"unpackedSize":12602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdygCWCRA9TVsSAnZWagAA3bIP+wVcxoLLJC8RwM/TtYZw\nWe9MBbPbGhbpIeXVtt5bkwMRV9EICW7yK7nmiHpqJwUSLJArJWbuk8WRcwaD\nBAjY+r9WWGqp5zWUC7A6QoHaevD1NTJEpSbSfdC7XKyw8Uvj5D9LGEM5hXZx\nrYouEsprPRfvTKa6jfsA3nVJhOTCnpDfklfC8trcngTdXsctMrws99WICTos\nBy86fj3exeX/jJmx//Rs6JXo38gTxKQ/Gq4fTdok00g5vPEm1K35LnqimnBX\nWd8gJUHHswOR4SpXDwDdzdqYOS/Ha/XnfuLp38VhfvzE/KXNEyzURKwv8m5W\ndeJo1iwscJEAkhUhJn5cSiMxb3ypXYg6UqPPQSfNgIYqfYNtBQf30IwPx0sH\ngkKd56VG8L1nzG5IZHywtG3RYFMsR+rFAU/teaM83FMlAiRp/4gJ8wcvTYR/\nnHff3yZKLi4HubqGn3pyQjgSIoc08sC7tzed3VJqJN5C71HDr8EktZtB+KlT\nd08HhIsZxbnRTL0awwggxT9eeCleFb3cvVufDTPHPAZjHIisdSlJKLm+OzGQ\nod6Xj2QmuvV2uxPMsxlJcfdEq+zpYBpZTvnzYg9xXarXSRuKchB0Q2WJiZb7\naVZ8+8XjVenY+zaqjqQhiNzt4IU5EIUrqXtZUninDffRZyQMrVcVD4s85+RU\n6Xyh\r\n=bczh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDMlZfg6bc50JYDXsXncF2CL0vYhaV3MNWYbqvDNhJO6wIgCaqJ7akW+DNTjtnLTnZj6gtXndAScTFDGh7qaHQyjTU="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.34_1573519509685_0.2525674143003378"},"_hasShrinkwrap":false},"0.11.3-alpha.35":{"name":"@react-ssr/express","version":"0.11.3-alpha.35","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.35+6e059d8"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"6e059d822830fcb08bc5bfafaa3c52ef23485cd0","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.35","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-uab33LhSLV5Io/dezvnYdeK/jue7J7yrdPHls2LoOGUkEUm8b4Y7ZHGERnjzB3xOUBCBmGVwisakZskBVsmvdg==","shasum":"71c1139eaff9daeb438da2ddc18b8f64f267f9a4","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.35.tgz","fileCount":8,"unpackedSize":12602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdygLiCRA9TVsSAnZWagAAdd4P/RMkIijOEmEwELNGEMHg\nACO/ghqSUOVq0lAAM7N2m6PvHp6l/oAkKgKM6Bxl2o347U+aK8oR50rj7ud8\nBW2lAGHRdcSVBkMA6R2ePSabyNrA8sFCp4hstJSpzAtqStLzlGOLpWI2YGej\nP7rtXW4vOOcfCvSBYwf3hjMSgdPwJsZdTy/Urm2JJY24h45Tjb9E3zeXUAZm\nAtuGxA9Iovy2fPD+JcffzRQIzL8XNcF92UjOSFCSbG0Q/jWi9P6GqybHbVDG\nw9spMXny7IHoi+EjPNyAM7VOxZhX2nMy+iC/CXyvg8H9NB0x4ilfCQ79EWjC\ndXZSgSB97wuYpbb5SyPSJfIAx4+c9No4XWtVMDPi29CZ7a5Eb812P4HkBfyv\nJDrnKNi4ebKicvB/T5SZR3WQaB++3NulJb/Gmva4Vm7rQyhyZZREaivUiZyc\nBxOHpUGtrVw30up1f6cQfO35q2hUCakjfKtkmR0SpuHIK++NQSApD6Y5eIWH\n/sEYZucYSucB7OLlGkxGowIIIM5o6Bif4+1TtMxdi3wiJFVZ2bIrT0I4zNzG\nspG2A9O7U/7KbSgWjuL5MGqJRsaJ3Atdy8LHLyNL0qU0LHhRkApim/yS9glv\n6EiIY7JjOi7vI2zHlf1Od0iqs4I/tIKTP2ForNCzZbdMHAAgIT5uWA4GIxm6\nYcai\r\n=Mih/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAjuGsqN/+mUKvb9IIyhU3EGsJXVNmPax233SZQ75ceiAiEA5kh89Ogb/+rW4KATtH++yoGMZYcmp1B6GAFhDx1X+08="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.35_1573520097644_0.989060121077995"},"_hasShrinkwrap":false},"0.11.3-alpha.36":{"name":"@react-ssr/express","version":"0.11.3-alpha.36","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.36+65b325f"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"65b325f2beb8643108a59391bf36726acd267269","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.36","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-F+2bw9x07lSS+9yx7ujDhpbkp/h5lDPT8H9yFmCgzFHIUDK0uyQ4EJlMrArL+2WF0/udOVBqE8qz0G/Mibov/w==","shasum":"6c7bd2e5c1e91140043069dd20f1ef6afcdb61fa","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.36.tgz","fileCount":8,"unpackedSize":12602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdygS4CRA9TVsSAnZWagAAH6UP/3LqcjoYrljMBM9Aw5S1\nrOrFioHrf0aQUimEjkEuxnNxVveUAPNGBsMP+SEj+Sg+Rs/ZGeIi+k74A/Dd\n2pcB8YnD41czGQVKQlBb9G/BEXSRb0XdvF43h3HazeAap8Z+16a845Fcu/df\nnNHMwHZntIUxKfuY3/aOuSoIn/czsu/wAdCPi1JYWIP3kWy2fudi1UsAUGFe\nQI5Zl/WppBUGNyShSPxzdg2xF4cOK2khhgolVvFykApjdt0hEGJcuJsHhAGI\n3VSuzW6NEKxQccrvqX9PlqySGwo0vZg0Vwi0bdU4MkkhU+F/968E69WRUIpT\nKav9K8pKMBDSa5Kvwj7DlVFhQPj8ZYQUGA6INqBNMS6rc3io+eh9nbIVhjIs\nBg+UqTtLLDVMiD/h0X39CHdmcsAzcB5f6+vnzOhpfai7eWoLJuJnrepmVrE7\nRYS4I4ZJxPNbISaOtJvYFe6dZ2a942hcSFrp7xrFXPROOxFcjKskhkN9r3pP\nmDfHiPbntBkrfv0hPjDDIu9J/YtBGDC6NklmKow0OVnfDrKMWruYXD0w4P1q\nkxUcRGnG5wOAJw5t9S7FL4Q6qFQa5qasi++TZ3wVp+x1xG+H+Ubozuk+4jNi\ndfxJRSiwdxd4avNOHYZXgVtmWSm44QV7Dn4jmwF5PaZoXuNYncoc31GT3buv\nLYg8\r\n=Q5ML\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD49C+EYs16ctoGGRrnpGf5GToc/J8zl4duFOBeHndRSgIgcasWVGm5PIFTQdAaMl942OJ16xsCaI5+q6qkz6MrVOg="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.36_1573520567759_0.9743872737512858"},"_hasShrinkwrap":false},"0.11.3-alpha.37":{"name":"@react-ssr/express","version":"0.11.3-alpha.37","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.37+be6f92d"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"be6f92d5a2360d992b2bd507111e20141384eb3a","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.37","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-DMcTI0yuRdNWlfvWKvh3jJjNempRkVb0dtQdDdnYOK0CgAscX8kxfuAHtP7518j14xyiqSsFu1GUy4lfY0tfVg==","shasum":"39e0d735ed3bf0283d065a57770597699005f513","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.37.tgz","fileCount":8,"unpackedSize":12602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdygXxCRA9TVsSAnZWagAAuzEP/j5yflAIPTpys0zi9YtC\nvaWtjToTQjh6aHS2RLe/CnnwsXxf7zmQeAtGnqqVkzqPAyjov+cyNWjvMs3c\nql51CXunoXr44Y5XIECRxm+il4PPlw5cQSZZdvpYj2u7yEiQj4QBiInyZxlE\nl9vJLlyt9e4pPR8Gfc1OGm2nz0+gipflbmrCNDJmPdCssUUHW9v4oD5UxRz5\n8uZIX0eEqILtIMiVp+xEG2qZVSsqq11QYPtf1zmF9OR00xG/7PieBUphxFVg\nVsb2PTraYGPYUY06Q9YWNLTyBKz1IruY43+x7HapPGLI/ziuhpnt1OvG3ZYN\nhYmXTCznzB7DccpMaFJixMuzsm0blW4dNPZHWrsHFGATIgDj/eCMOUVzd1/0\nul8nteOIIW+cwL3AVjNi0/iiTD73FTfeDA5EWg3Y1fmbhoL5VN8KYmQaeTUc\nEEPsodtX1oM443RIVC1feE+Nsurcrvatr++V7RZO++GO/zcsu7Fgs5RPEKJe\nlkm/z2ecErFfy8bz+/TvyRWgarRdoff8wT2C68gaDJu7u2SJuvOaI5jKxVGt\nigKCmH832FJkshpMhu1cUjgCkkQ6SEhLSeyppRHudJjxqyoPtA8j0HDkSPk3\nXIW9ZU51HTEedA1NgTp3uopKFhE/0YPlKE5d7UzMTLHVhWzs594dtI5z55C/\n71A9\r\n=03+y\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICqKDhcaUgeFP0uSgSWK7hvzYeajq8HQM6H7vO1Ol3SUAiA4QB9wH5GbzcAYNJ8+PHhnLbd3p8lP3bhsnjlb63etVw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.37_1573520880584_0.19551053782616568"},"_hasShrinkwrap":false},"0.11.3-alpha.38":{"name":"@react-ssr/express","version":"0.11.3-alpha.38","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.38+50e48ed"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"50e48ed94008c73a215cd9bf9f0968f427217983","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.38","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-wA0xPlkWSQRMPWxpqzGONkAyDz2IZAZxbEoBNgbpwukO0AY2pB5stFJajh4uSVR5LJq7I7VZ3gQj66nK9nrZJg==","shasum":"ff0b54f8d100179e9e9dfb67597e36a973e16f97","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.38.tgz","fileCount":8,"unpackedSize":12602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdygi5CRA9TVsSAnZWagAAUtYQAKDBFow8FYH9m388uiW6\nPn9pa7IptKGnSg+b+ti+7gCk8vuYo5NTqTwFDxpluoVT9wc0gnUo7VAKdWFK\nYrKZJmWYmGWJXdWnSuzz+CyHcaCgCz62GjAJfmUhlyuJmPmIM7U9rq7VPgtP\n9FYbZAGpJRvp8i/8htEyDuiaSfiRD6/h5j77Xi+v0/v7gb9EbDs1lrJrAgtW\nC9m4cDwucECN/ll4OAFXyH7WmEPr2TTUXuWPVl3dMVW8x3gBFuDHtq5PoZ/9\nAx86QuvWXc2Zt0WuFHAsTjsOlutQjBJDO60OHFCtPijyqap52FldCII90Hv/\nJIYUJesVMxlu9qC+tt92niKBJ279U6yzW3NES4Y+8iTcsV2yiHRWa+pF6GJg\nLhAOmBm3AJGm2I6S8enZMRmxDNETJ4EcdWNEPNoCmtbWOR5I8FDxkbt4iGW6\n8bpKYy/szerkky8t7rbxlsYrZbTPCRaih2ErkB0QilsM23t+CW1E+2eP4fFH\noiIWJDItndzS2jJFtuOlgcpPb7Fl1SgojU+4klxou4XLNAMpPaN8k4ti03kR\nJYTmnAMxf7S+kTwSKdW4lTqBFZUwjEgQq3+yRk0muAONNaDp2QsfkVXiIOuX\nZrSF1EkN0zfe9/P4GW+DRMVgzr+9qwhtPGACt1IYWzQf8RKEBi/Yn3mKDhuy\n3P8t\r\n=yjyV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDrDky91IsLghX3bNiGarxWQqwzLCU6jhfoqNR2KQfdngIhAPQiA1vgeBIJEbFboB+feKyx+pxbxpE3/R82lSmYIQPv"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.38_1573521593200_0.9231201838263372"},"_hasShrinkwrap":false},"0.11.3-alpha.39":{"name":"@react-ssr/express","version":"0.11.3-alpha.39","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.39+26f6f24"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"26f6f24967d0f559d6c8dd1f4e8ba77cc8341fa9","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.39","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-acTJzEhM5+k6aLUv9il2PIXvE9W38thNQm36DGXmMmsGIu20HiTG3lbmjtX5jqkHKENdM6Qt37Yw7+D2BIVINA==","shasum":"36017dbcecc90feeda70c91a9dfca2d0f9012290","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.39.tgz","fileCount":8,"unpackedSize":12602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdygkHCRA9TVsSAnZWagAA2QcP+gOcJuh3xIzmMOF7XpQc\n7aH3Xk+PlXbrC/1uOLxez4+OgIBsG1CIPbJe3ir8Ba0gD95FLu6YgxTA3qye\nMQhVQf3FW73Fxje/Y9ZIgJgZGvjp8/N6lBUZeggw8nb8+vxya3K4Pt+T9QbJ\nJhBvKe0RAiS01Ka7tHToKrD6MVrqFlUXBU+demDSU3shjmVpS4Y1LnsYN1OR\nJUvAUH5YglE+l7Hw6Z9E7k55yA9hgID6z4S8fKXeUHu6Y7y24aiVgwQCZWnP\ntTlj2D33m2QBBmbmbD3IGpFv2YRVkC915qK565bs7nDlJjeYZOZKmjTOiFWt\nPxWorIDKuNEJxPo55JgGyY8LnLiqdo7gHG0iePAS4Yk3Eyp0WYTcc7PMzFgf\nnZmUIdA/N0fJi/GpsX+sLNzk+GcYD5n2QU+7gRbACSmFR5RSGL09o2NseGWn\nKCTr2HmtvPxTFbqe4OoCG8UNDmIU2538EaAYzhldDuXcLlU98Hu0ze31dBC5\nfpYFmtxrtqwHgOexX5CpVSWfbq83IQKqYhN4DggURfIjb+oLjmnsv2PpGWWj\nvGJ15s4JkzPYibYJEAa54pN2FnTrz/T7LwSNc4o7YtdZP1hva6KKcAjCrrJq\nXlc19FYKlTqV2DYdjKK/4Crj9G1wDch9v6SSV3OCAPSplR4Vltv1AKGFe+5E\n2RlR\r\n=8YiS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCslIyFDj2EHLVTefImwmy15RPJIThClqI43XG3U/l8SgIgayrFoZy5beu/lkaHtJsieOIC1S2Z5PHLrDqGLEpXKsQ="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.39_1573521671365_0.002105250759460997"},"_hasShrinkwrap":false},"0.11.3-alpha.40":{"name":"@react-ssr/express","version":"0.11.3-alpha.40","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.40+173f19c"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"173f19cb4a633f5e6adac529fd2d25db6425d5f2","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.40","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-UXf2KNk6q5UvKWOiEySOKMNgoFeGSUyzI9QM488BUTa1/6+jCg0/7RbBNps4aowvXmLul4F/C85+8Dn9qsYkAQ==","shasum":"9950ef942e1ab10095a2973309f8264714045268","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.40.tgz","fileCount":8,"unpackedSize":12602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyglOCRA9TVsSAnZWagAA1WQQAJ4cp4lwO9zTbqS/bM2v\nv9+DG5Jelv5+AoXLvrzco3P5bGSgwKbC6n+I/y8OKHd6yZZ9nsGAEjerWKbO\nTAb+22h5kicRJNGFZAfYSAaKx7e9Psx85eAEJlQYt3z12ipfbpv1DlIaflBX\npYVvzqxzsX+NMHUrpbBng2/E0xZgGnDQYnxYxB4eLBCrf2NH+Hmy97LJeTDX\nwpHlT+goSEJUPObVNGXJlwJswUZDwbAOc6GJ1gXwiPjxOreZ91Sl1LC8uONs\nvwL4YA6f8VpYLihgj2xLETqDEMnRO/xxaiwwu5rxUU3NyBJelAvuTj42qmMo\n9VRV38V1jc7CIU10HYyj5HIFugy2qpYpmV83SFR1rDScvbVCq4C+oy3wvF4L\nyCry2A3JOAtzRfd7E3+dJI7h6WPPskzrx/DxmQ+akFNx4Y1UzzGU3cgRGAum\nL45Tgebxc/EAsRAjG5jKdFWiFRQjVCe9CSQmsCO95Fkz1wez5UiH9rXoIf1C\ncJqGfKD92enNql/HIuWXxpdUT/yRAGI+OAPx+g6gK9igmEpn6uMe0P9zE/TL\n+sgQfjsAKuCCtkZ5P2F1+J/kZsGpxjKt/XycUGMLQ3p2/o9x+ns241xwdxVY\n12WSAAOzNvrXBcsWrHl4YsrpzO+mWBPZuULsAzRW8ECBr7LjlF87cVcovIef\n7BPa\r\n=v0TF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG/Amzx2vHRXBcnCILHFVuD9hm6AfgdfAbjXHTfZT6kTAiEAzwbabbnebre5zOSsy5n5TJu4MZFjt4xdhdTR5iJrHkA="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.40_1573521741623_0.9378240208445512"},"_hasShrinkwrap":false},"0.11.3-alpha.41":{"name":"@react-ssr/express","version":"0.11.3-alpha.41","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.41+ed2cde9"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"ed2cde931223946859a26c086c8b7ab489908693","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.41","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-DFbYOpFgJuQVr6HsEpXuw6TGH6cRx5tvMs6GpwqYx02PJVz8od6TXljylod9f5oDX6h0kt5cP+jL098HZvPz/A==","shasum":"7cfe57dfcae91f02492b9602b5df849391a8c63c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.41.tgz","fileCount":8,"unpackedSize":12602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdygnMCRA9TVsSAnZWagAAktAQAJsDDomYGRgGpVGyM/cg\nT7cDieBoyGwOyQGRDm+9rdHtndIpp52N3slkXYcGo9YvHyQ5np6G9xyC4wTS\noH5dQwRWU/oAUCb8ppmnIeV8n/9clE3/o8HaivVjFMg0WzKMo8Hpjr1nqW3b\n2kEnDjLCBDMPq9n8RZNju+wDplHnkEwkBlqpu8+s+0dKCbqcWxTLAVDWKdpb\n0XDqaoDEHAqUreBa0qm9WQMKhWLW+SZfxIs/bASNrHtACy62msU3QHrJzP73\nznyIg/gmqMmHwHIyAN5htlXM8QBJfsJtcq/ogJ7Mjq0XXORcUT1dDIcqGmZX\nEHf+NunmdE0QEqsxU/pxkxb6jW1OqPbFsC/0zYWcakZUU8oTzGk7d4LeUKBW\nCvbA0LKb9CD+gQr0o6C+SSZkmrrE0cEC4wzmYkb6LHyzDyCYuoreX/1ut+Ef\n+b7vU2OdkPw9ph7CDVpya1i+nOuf0bfjNG42Vkk6735+VhI9sL78omDsZlEk\n8Ps6QBuOF7+402HgoBHICvsC/ajAzJChnRV1QVJYjnlAzd1/dmdFqj3UWD26\nDQmnh+4zC4Mj1+vxSl0DjGVxj7uSJSsliuxEOoyA+WTnijX6NkNdqV79N5+g\nzfy9kD36JBzWW17pvASX/jGjnudbgZvtkLQc3km4ieJJOC72CFL7drOoeXKu\nHBnZ\r\n=z5KX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDAzncayubYxoXY43PyAAN9CQslGv4h+EtZsgUnp/IQCQIhAOX0sby2e1Hp4+rRGj8z7Sqet1Nv+kppzGumnA5BqrRI"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.41_1573521868263_0.9883711564842024"},"_hasShrinkwrap":false},"0.11.3-alpha.42":{"name":"@react-ssr/express","version":"0.11.3-alpha.42","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.42+8cc15fe"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"8cc15febe7abffba5a6c0ea9640c077114c201fd","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.42","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-mWlAF8Up+0OZOLEmkKS87PPH0TwYZMRLYazRNLJh8PbWyPe2Lcy2VEUArD9YbKnZYr2y8JXjf4iKFqSpsVPiKg==","shasum":"eccee0446705b5e6a744179e0dff24b75388b423","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.42.tgz","fileCount":8,"unpackedSize":12602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdygp7CRA9TVsSAnZWagAARsQP/39pwKhM4WPHP515PLO9\ng/VNvcNMCoqr57SXpv5RuRTaLFeKR4Sr03xH9fTtV4dqSBvYQ8XJf8dfq7+P\n7WNqrVRezyHPGVJ4iB97OnWnbh1plx45RIfin6snobEWv0UVBBJt8kikBS+T\nd5vU4/CNRK0S6GenlqNxo2LbaSUoBAyxxno69naRuUa3prnYrFzDFFQVrGjR\ncDd4VdT6m3dLEJuEp1m5DubV9dDNXG+hFguO32JUN6bj1XOLsvYM4A/499Hj\nX9KP30WQoPmw8EHPc8TanStFJIavoFIWbioGIdJ2AL5v7MipKPwLiIqKAZDS\nbxEL7FAm/IQCc1LTvAf3o8AgaYlq/LK/mmRt3ULoOzYpRO4B+gMh+CnVP5Mm\n/NCAddW8q1+/3gA1qP5YpC01q4wJmbV7M7Iitz5dCxT0m89OKXEBLBP9q12G\nq5PKw5yVmARDm11AC4ewvAcbdSl7B+PUwouKov4m5x0LWO9IOWW1geGCksdv\nZTmapBhium2iGQc1LOEF41IxiZ7si/e3iNsCxRZayabDNxw3JZ1H/mdq2YU8\nEoeH7afS0G3/ymrvOWGh1JA9tet+7ypArkLIpLxvAB8jbDzjI8YwDUcFlAlA\nRZ2oRZMCxiRdZqdUZQiSEq67QjR+7czqSAful1Y5frEf+9FZuiOcqabrPXOO\npgTd\r\n=7iAq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDMNZX2cbhclxMDsf+fXcPkstnWdU1U+izvbAryZHw4kAIgSKlp4ONQ4o56DEX/JZ7xlb3vBqlFbLhIbtjYWKtCRuQ="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.42_1573522042728_0.20979359141541143"},"_hasShrinkwrap":false},"0.11.3-alpha.43":{"name":"@react-ssr/express","version":"0.11.3-alpha.43","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.43+386be91"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"386be9167808c2690e4c456ace00942865320122","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.43","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-re6XgtMAg0HvS7Mx1qZf1swqn1JOMWYuMQ4sqFUNMnhiYC/TRi9Dg0PPmtEFuUNOs9HIJ69KIlVUdxcB3RCNUA==","shasum":"3ad05a89e730d2175ab7694a2b861f1874539735","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.43.tgz","fileCount":8,"unpackedSize":12602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdygrrCRA9TVsSAnZWagAAwQgP/09h7+Sscyd2n3cCeaDZ\n4Hs0ihoAqjbPqR9mkr0P4LV3N2PVapZeFABA/2/zANLSJZcjtbqLlg7NP22J\nGE23VRDlAfC2dXlDg3i9xJaQtGO8pateZ/DAeA6jHAlGMHCR2dBv6EyV4ZRq\nettHuVA6UD/+X0HKR6Ozc8s0QE7rwInwnFpvVw1FyhfTwgdmrh3APS7q6kcD\n1wHjugFbHblX1jbrp1NyQ92ADOzeQH/xVSmgHH4LKVcMnos0LA0zBfsN0ElT\nFzs7e8qX/8SnWmGT9Bv+TSyfWC1TmsrwhnaHArfdfkwFYXvuE/bzDUSuBusk\nEyocLnLsJdN2zF11yTav83CGfdkz++fWqkwvKDooB7WJPbXDSChQG9BYRVcy\nrT1qDX9wnpfttD65J+G2I5+IR4Ly9AaYTHqvPBTtUZpeftz85ii7u9gtiT1J\nKQL3WUv1mAUSqNze9GmRy+TeK63dkfHdVFz33U6cswq5PxcqzHMCMmUhCGoc\ncfq/a6cfQCxdBLu5gdJOaTmZjxzN1YAUeMo2+ka7Vjev32kl6HPzQ57NsvCO\nyiXUgtUeKzYR+KrSEd8eB0EcJXzZMsfwx75dwTEJCf7R926pzs1Q/LeAaClB\nZMRZUD3zCKWTHEOhqgNk5+7+008ODhHTv8nWi3Sy6EEPo1a+02/cyV4m/utw\njs0s\r\n=g+Hs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFWJNgoEvbCPwkGHMwVA2hVMD/Xdcxh42dl1iEP2vk5jAiBOUy21iVinkCq9pHJRKeomV0+YsGZ+xeX8o9mnMwPN9A=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.43_1573522155033_0.053102512608377284"},"_hasShrinkwrap":false},"0.11.3-alpha.44":{"name":"@react-ssr/express","version":"0.11.3-alpha.44","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.44+84587a2"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"84587a2dd1a252fb56ab7af41b0deab2c4c07c1a","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.44","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-bvD10H1pwpcR7d1p3yDzHNEILHYF/aDk1bmgKgUfvg/PpksZU1E8omPYaBCIlb2jCyfethTRMNbyPAAla/wyJA==","shasum":"88cd809cf3bccc3386b251d76355f4d4fdab1d54","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.44.tgz","fileCount":8,"unpackedSize":12602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdygslCRA9TVsSAnZWagAASPIP/341HamdDy9hZETbbIOW\ndBQAjIOyjwBwAyFpmqkxgrLpt3mlSGaWm0GkNuRIsOrBI044gtB2beGMuvqr\nXfzoREQLX3veb+Kav/dv0kOUzWyKGYMR1OMB/u8tzkSIX1o+7YoWhodRRdxU\ndtXeBX/e80e5RpABk+VI8id0PYIxK6S1rADha4M3iscBu5rYTSr3cpdhyXcu\nMUFvAQq4R4QLjhCmcTpBTgsCXJBqRWxucO6AubfLRg0oKPBh2+5gqr9raAsC\nxkY/62HPXoNqakPfdSCRdvBUfTs1c2aJ7lnjvMp1OG2FndB61laryBZ/1sqb\nHuZ2MqyRvQXppPDqDbwgVqRr9N271nNk+HP5kGbihmSjKT9/v3+cywyutoej\nLmrG2KHh7ujVwPBkfO4Bh/5jbKWmnb+KKM466VunMDzYcsR78E83gzowtIU3\nXhXGhQqwZ1I+RIswfaUW6k5mq1/MtR+VfnylrenXaYv2q9kZZxsMy2AuSdtS\n6rxjMPYsdx8MYfwYQ5dJbf5+RbFn9kk5yMAhR06daBhBqOFax9JLXe/VrU3w\ns0urSc0OFdG7AwKbWhLRtk2IspLYzaSPr0NC2n0XyjvSytqSlFxtxwnP0ktS\ncEfLFjrW+BoQTjArY1j9qaJuX0ZweK8JN4W7UQNqJzNqfepLeAkBmc32jRlb\nvRGs\r\n=kVES\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHTnM7EIU05nN/UkcJjcK6lsci96fHH8x1ICyQrrkjIHAiEAvYo/xMhX2+RONijP43fEj9O/xzxJy88Uao1l7F7j+XI="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.44_1573522213279_0.15734283825656337"},"_hasShrinkwrap":false},"0.11.3-alpha.45":{"name":"@react-ssr/express","version":"0.11.3-alpha.45","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.45+22d9469"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"22d9469724ccb7741a3d74e71baf35f0b4548f28","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.45","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-jL7J1E1nXIQ1DKCidj5P55koB3ovbE4qIPyfzgVmi6Rxe8Bbq8LRzG5JhAlRal7UZjAgUDz/JIxSlUeuW4NNfA==","shasum":"e9f004e1e6471960ba03a0bc226f4f15ec606fc4","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.45.tgz","fileCount":8,"unpackedSize":12602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdygwsCRA9TVsSAnZWagAAuBAP/Angdx+pVALy8TmvX8Y1\ntYIb1Z1dXl+Ukv2ob1rU/Ra0zDEhh8iVJ3A5EnPnfj4MvILzxCAt7hUX5HTg\nyYGU7iidNNZS2F+W+xzI3E0e38O8LRL08iznOxcAk92O29B1clRY+zrBD+ex\n6uI0pzBm0FflJ7PzIlTn/nSM//XX7umOIVFcFW4sI6jsrUwWWb4icy75Lafc\n0pg3ZaeDOH3nC+H4Kq2BmAzMya2dcozPMzONh9L6suxF3zcGBvBYG05kjOCd\niP790x0LYSdtqizU80EmDT6i1+qhEw/UgRXbZoP+R1d79EbpK5ZaslsiWEMg\nncq+rli0L6hmbI2h7bVnz3eIg7gaLuVf8lxwofAI6ZZBLJKCeFcBgr8ibgzG\nV2YlrgE2gztiGGq9lrKRQ2C25+YZkzAe5gdehsqe/t/BKaRBjFgfvLMkBi6Y\nPzMM1U7XWXA9Nra0tdltY82Ap6Fvi+smTg+g2pUk5R3U7xqm2w1I+8g3a55I\n0U8E8vjhDaMic0xzrv+xqQpewWz0QHZyUxmwORNPC9VN0ON800L2fQiWRaTr\nITQuoJay01XlEDDdS5NTGPV73uTK4SMTuZq/AgrDXxnm1+VoSemkDeHAeUik\nofBKH1GAQGwzHU6QhNi2ZV2mrKYm/R9f4WNugT7sgOE7SiaM8z/q7sPgFwXa\nfn5Q\r\n=kwpF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBLMXzblDG06hN9FfodV0tGPQTuTaRFAy0LMhT9uKrr9AiEAkZ/Tv4EaeilA5evPA68oaXU4H859Qv3vTEJsYV+PPkU="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.45_1573522475625_0.18261091869435808"},"_hasShrinkwrap":false},"0.11.3-alpha.46":{"name":"@react-ssr/express","version":"0.11.3-alpha.46","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.46+2f8adb9"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"2f8adb94ebb71b1712fc870fa1dda71a2d937d81","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.46","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-tlALNJwd/9D4RVRc6xja8gBYk254I3fMsd0NpqccwHrXR2sEIy3zVBcIvQmRh11x02Ce0Dmgew7L6AtVmVtvRg==","shasum":"6d3ba872cde0c1115f60c4b9166d25a56f6a1b14","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.46.tgz","fileCount":8,"unpackedSize":12602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdygzQCRA9TVsSAnZWagAAXtEP/3icgNyQ0I9PFEDE8RaV\nKKBL1CBBpP6ybQ6aoV2eAi/fRDI3UZ5H60d8YTbCtVIjOvZgyvhu1ohZLZ6n\nh2mWuXGhFNJfKcz9WqlGiOOFNx6KCHtFSFmn5G5kB5eCXoH6937DDq4lvWVP\nSSHLzin+5ZqA7D3PNjaTGUz8BHC6qnC7Gxp27/Om3rfbuoepZhhRN3XGNhQc\niAuIKMbDHmSzMAUq/O8/w8IKhqyuRHw8W5iSgqS10M75Hn6gzaOXFr/FW8Tx\nPb1TYX8GJz1/JWDyXN86fixiXqjYEt/nj58nxrcLL7ma0k1ES7lbDH8wEI0m\nTk37YHPyaMSwYDFV86PBmkvxlV+TCpD1V6hB11TtQCrdlNQ+EscxNHISAdsz\nrR1kiTr6CPocNGN9FCc0k9Mi0/WKjCtewAdtMb5w/hWrX/2+kZz7/kUpnjkd\nVvWCNbFaO2Wp2Up2jKxSnBkC0LPngqwk4FXOCsajl60c02DgiHOeKQDMvHiG\n29pGH38oEXx1P/zeCyn4pFPlRD2VZabkA01Pv4m2oO7hqEE4OkcqHp6FCz9D\nFLlCv38TSgknG0GyR6bhLhFjuC2Za1LsUTVoe0X8pHwXBQwD6vGsFvadKGKc\nFrOpeGZUcHdVDHn9XO5cHT2i7sb+WNOjneOzoHB5Tttb0wKgZS6pzwUPaDGr\nwlJY\r\n=LzTp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC5s/tw/tlzsA7qUD15T2GfJPMZRzJ31VQDiqgBDVqnCwIgOH8aLKpICT6KVc6AofU1rSKfyEVedEDPf072Xs+s47Q="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.46_1573522640488_0.023574975035715706"},"_hasShrinkwrap":false},"0.11.3-alpha.47":{"name":"@react-ssr/express","version":"0.11.3-alpha.47","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.47+d8b6cc3"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"d8b6cc35d7cce62c39a5e9d7770705128b83edcc","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.47","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-UdHprImsWA1bl5ylOWlY/4WcZczuSlTGnHpdgDGUyDjWAcX3J9FhuIqpKjjBAS2EltI9Tq7wZ1ANnGwXBAXp0A==","shasum":"8dd8b1ab8917c48b141a40cff11040f7b5ca3f98","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.47.tgz","fileCount":8,"unpackedSize":12602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyg2cCRA9TVsSAnZWagAAM+EP/ji5E1y2x9BA1B+X0Kbo\n9oOGrIO+d8nya4SuZKcE1jUu/0DB7rNTmpzY4lcW02UKwN9kINaQe+IkaBs3\nrW0aj8TPoDVVS2gbNTa9erpH/cAFJRYRaX1GmNS6e2MQ11QwNy27Q79VmKbb\nXbzEFJcIFP/16U09eM/mPjpQFE+peDnxPtsPPWW3wgM2xAqB72/IxTHt8Slr\nakFeinbBeVIV9qKZFfO5jLIwTgnyCaT2kth8Y0yN4Xz0SNl+dX4iucz42fAS\nktUUsMLmz+a2nVM+QyAznZDrFZoZOJZNHMD/ljVuQ9KDj9tY6JUrMDs0D9SI\nKzoZ0MQeJ1hb/ovD2yexeeR1/OFcHG2LKjU9DADAlr7CVbHUPX43oM3ZZNnt\nHveEa3LHaz5yTxrypMF4EossAUCUblFCnUfKiOIU4KboFSGiThz+HV0LvMJ6\n5jcAb/eKXrajTkobVBkuP+Vp317yYDb0nJDe42KrNUDw3t0uW1Q2FWY+ln3V\nbe4bATqVRnQvyq6OtMi50dL4wuNKpY9NRt4TKWehKQucKMfat9/ux/glCTf0\nwmEaQBS6Y493+KjjfumvTZDgYAX9nL8VeGchA1O2TcPYWLiLLQUZMa8Hpx7V\neu7OYWhpALJDz0/49VHYruEhg3AUgtKPo595SZzbEcN01Ds8/6CY7SHIddgd\nW7U1\r\n=R7mx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDv+rg932X4SgnmQVUAd1b6KQbsk26hCZZTq2lMrp07LQIhAMqWjZdsSuPujSa5qBW0iD3MZdu4Gtd+EyOFjVYvxOJo"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.47_1573522843427_0.48156476919523916"},"_hasShrinkwrap":false},"0.11.3-alpha.48":{"name":"@react-ssr/express","version":"0.11.3-alpha.48","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.48+fb3f2d3"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"fb3f2d390da7cef59e206f190797e8f69d4e7b09","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.48","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-ZhPTR83nfEwLtZaIkWKsicHfIwZxBBh4jwn2mslboOKEzdFOP+asES/xHRVg15rEWJH0pPBXxPjd9WbwDCkJjA==","shasum":"aa2800a4597d7c96ee27fbf8f56c8486761d0847","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.48.tgz","fileCount":8,"unpackedSize":12602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyg6wCRA9TVsSAnZWagAAltQP/jSe4pHe5yfRrzbhgYxg\nD68WSh7Jb2FNmnncrjF7QdUq/wuA5erSLY9EtISX5//C2vrbkQCghMw5NUu1\nnMgFQk2VejuGqI+x2vC5SMsxRVgeD/S3LiFpB5TTmBNGGNeWEcCbWWbIdp0S\npJWpJo04ugFvG+rJ7Ntl0t8uNnqpLf0vbL8sSuZ905XeEdd2s2aSwu5pQgcr\nFcnecswxygTV+kaalFZfZTtbalkXB0crKrqpXPitQe2WWwkKH9sc9Le5Une3\nc/p1ASl53BnL+w2k7WdYDa/gJH174hHpqH85DPFstUaoDeja0uooH0IR3OpH\neMyvaFo59FoNUCL4TWZbbzVzxlxtj/vsdwnVmTdnGZwr8t63wBA/58/+K6+p\nKYtiW/BKp8x0js/Cltl8norUizZ0FHkFhDm2g1VBjg1YL58C+c1cHSElBcAi\ngAtd6aC/OdYWO7twxKXvZBsIrirTTqrWNZOopssNnxAXFJrQ9WP3THj2ek9b\nBe0TEk7wZ1hkg2FUeCuItghNez6H/i1k1lIk+mu4xrEbv2wWh0w4Vp4Pkxev\nfRX4/fOzVzzVVf1AnH89vicHxggb5KTMRP3CXTxgMAlT+xi4Gltcxxbbwi2r\nGK+xWFW/0BjAgiJ0N6IQxilKyM/dAKuXWKYfA6zMpS3c1ofM4sT6NfnjE/Xe\naQG5\r\n=Nr/r\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICp7Tuifj3DaOIhNz8Ro57CI+lwU89zqra2+GkhkrhJTAiEA0UvmgtJDH/tPvevWbsmO+GbLIw9nyDyzpzvVCfqJqaI="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.48_1573523120436_0.9335026913874789"},"_hasShrinkwrap":false},"0.11.3-alpha.49":{"name":"@react-ssr/express","version":"0.11.3-alpha.49","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.49+3fb9df8"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"3fb9df8e3ed2733b9883254444c172ae13ea77ce","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.49","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-dVgJgQY0be5Ic5tiqZJrR50XnAbSnEgX6esTr2lieOcyq8gU3VDsKxHpmeoAOVfyj0tNebsNO7Cjz8u96P4j+Q==","shasum":"c0f68e1655eae674340c747fc70c9a0c9aa0c66c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.49.tgz","fileCount":8,"unpackedSize":12602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyg8LCRA9TVsSAnZWagAAtHYP/2VSJ/OI14Sxcx/7SSuC\nMRJ1j6sLOwZ/mrnJtPRqnL2+F+crOd+Y9PTKhRUfABCb7MvvUk9U6Dso6Ktb\nWa5vE1rJxwjBCP0Ibw/5iztayE5TzV2JivJyNP5iELYa3lzNPTjzEq+xLGuZ\nc/z/Jeo1u9M2NxxpfhkbUhHFxwBTXGXnB3Uox9smVf4bkogfb2Ij/Ss27lUM\nv/c+MW4V4w1np6RXHuXJ7tRLSi5uzkCSKe7MMAbkS0sSJsu3AxFz7erwEuHm\nzS7XL/hH2cD/HAXgdAejlgakhaZyFFzMNP/qKMWjk56l/Tkn9Tagl0VuT9jg\nmlJUL7kWPtUZu3OHnqTL1GQ06TXnr/SlWAulvUCQYhdchApOgrLlsV3EdT+y\nJ19GYWenvEznt5wc2t5XF71/6GLGimNRtJSYmO9ZPUSv2V+K1gmlz6+yhPfT\njHJrWDKjON58neMHPLtOdR7TZM97O4HW5mYvCjDrj3ssYYPj8X5OSo+LdWpO\nV2XEz2LeLFwj4mNmP+UBM0de4M2Aa38vBKOhmN8KEn4M/HWSFPBNyCHxIKLX\nPsxM1HjUCLT/7PQDeQjhntT6EBVQG+HYvELiKVUNlDB9c+DWMmMMzE7QpQoq\nYoxkPzz81fJhVRzaGvz+qjWa+ukMhTKzWXxOJXXQjxuUIk/rD0oSnfEMdvNH\n0Yd9\r\n=7619\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCnj3O1m7QV7lGcoJTB9EBKDNmGcta0ho2y1NyfeKGXdwIhAOpVPQJddSQzDwxaQmrLf7KctYsClrn1KRmBBR1syMVC"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.49_1573523211449_0.01703470557527975"},"_hasShrinkwrap":false},"0.11.3-alpha.50":{"name":"@react-ssr/express","version":"0.11.3-alpha.50","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.50+ea37b56"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"ea37b569782dbd708c369526eb57cb5695e6e3a2","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.50","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Dg5luvuhKOFWQPd9s5FXz6ai7ovzdBWcnZ8iL7okC+98PEnRyEyjbVUVZWT01e/FCt3giP9PPUkHi7x2KQVKeQ==","shasum":"571d7f0be0b059058516a1152cbec09d04c9f6b7","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.50.tgz","fileCount":8,"unpackedSize":12602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyg9LCRA9TVsSAnZWagAAZIcP/17814DXBevJgXi+yfOp\nSsg671MnThc8o9DHPzGlkFCagD2bwpjeCbG4SIHWcg4HKU7jGha+TqouOZk8\ngeZsQVWN4mOtM+tUWthODb75UeiRl5D0itKH244OvpD3trINXkobua2Ov28W\nt28ukKE5rDCpPOZTjYO7g1t3/QLUnNElClADxT2EKQ3E8CZWWroMrexkioIQ\nCxPyjtPac9RQWmJ+7dhbLp7wdbCmSSNep5SnjgetfqkW2Dbjdp71inchP3j3\nxzLpAM2GDvRs3Z+W7StTSPWbD3SDeYJpMf18hwzas4hvdhAsJkKnqnbHGrvs\nVhPeFfOMY399kqZbdxE2lsbDTMWjJHjOCSJ6ukhqCIFRmUGXTYanm+mieRVN\nQfKD3eo8GrUFDjtOwjTsCRi7T38ceXYTvBcA38mEr4+Rjv7qcjYCSPtqX45A\nd2OapamLiGgiw2r0Q0WB8XsncZgycRvWCVCeVAMCcZZouzYA/o9E/L05mFs5\nj8fRuQQnroAljd9bFA5XrYqZSMDTxm6IKqZgu0bjINPqZPmzTcN4FaQ0tYTt\n1yXwa2sxObLzXo9cCMBd9+LZIglSCYx9jBgnUrS0+4z5nEzO5LF9pckb1G1/\n+3GzHmM+u0HtsPziju6P5CoZpa9QtX590oKBqwCE2KguIoOi2w48Lsaj5fUu\n4DoC\r\n=sUNk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDAKDrcwv/5LCWrlrlz4lizT4bXc0TQL2QPuLHSMEM8eAiEAvBX+BijikVaA5+cYRsqFpZVGlsVIFct9hC2YpSFP/HM="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.50_1573523274701_0.6176611084966088"},"_hasShrinkwrap":false},"0.11.3-alpha.51":{"name":"@react-ssr/express","version":"0.11.3-alpha.51","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.51+09723e5"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"09723e54aba2104fde03ce731dba546b562245f2","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.51","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-OQpFbYTCjEqc1WLnrWpVeW2aYKau5c6z1hJm2tJ7Nrl9bS7IljchmFoqMougFLMuy/Lnah6cUduUaZn533JC1Q==","shasum":"684d3f627bcd72e411163bbdd2e84fbdd18b8a60","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.51.tgz","fileCount":8,"unpackedSize":12602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyg+jCRA9TVsSAnZWagAAbcoP/1vQo9s5LSKPfFaOvfeg\nNIdJj9vSJrRjp3BH79pwWgVnRoMMtQ9K2DKWu7kzoNff8TNVqc1NUjz40Isp\nHfm5tvte1M4KNEub06WsJ7C/7fK5TNn4tKabEbUEq/1n0I64EmXTRSXEcqV6\n1g4b/7muXUi4UVo6FTyahwfG8WVByFBdJipjk0Gni669UdAHRVKiOO3sUi2/\nemOISLB5LGJ57400bDjcPj8ZUIcAeZjNVFsHZYsQBeAYYwCrKSjc7CQ0OEFN\nXS/pvQ3vtgST10pQJYY4MSaHihANEXcDQw/xm5U9EQRoLRwRqVWkroIimcLA\neU37ScsLYag+o4QATwl4NPPZ5fPvZ9qxpCgu2AFOX/6AZ4gETKmiLWlc0Qi7\npP/h1MprKHb8y7pW2LCl+/GR7bhi7xsM/CRCtUf6+jCLBEy1nK4HENU3h2Bj\nbgGGcpIhJhPM6aofcKaZCfgu9Oik/TBBibAYqIvB90ObG4p1me45aQgxL+AL\nbQkGuN6hFAsT2kWoqmgw/WAAjdNxUYztrM43BxYaUAtkFhjmb8AeK62+KEtM\nKZcg9DNQrXPaMxwuI+CPi2Z1snqCWDRaiORLZi8jqJ1uL0K7tyshrow8fgQh\n2GYkRMBjdtG9t9RkcvaHVP3ex/Nn9yW6knRpk8uL6RhzSqI2sYfspUOh0QVl\nfEJl\r\n=eJd/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDdr9g/9jKljt4xXjVMjQ1khZG/ignGQLBWNNmSlJ4LGwIhAMttUyKbZd5/eYvvKVagW83zUJqQ/AoHXuvvILUXzUIJ"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.51_1573523362646_0.23966952225637383"},"_hasShrinkwrap":false},"0.11.3-alpha.52":{"name":"@react-ssr/express","version":"0.11.3-alpha.52","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.52+70c5727"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"70c5727fde67cbac9724df978f1b2fbd76e42f73","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.52","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-BRL1/V9eRTcGrJ47PcpmzeFW2oTo7yVyGkwebGVgXCnP7qZLitrKMbrGM5MWSzdRPDtjbYJp3K1WtIkZYE0KAw==","shasum":"0453d0549726b7b4bd05c1098b94e03ea9320e9a","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.52.tgz","fileCount":8,"unpackedSize":12602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyhKtCRA9TVsSAnZWagAAxogP+wdH2vp/+1mwknEO+sFr\niJNcLTGsYmK0E+4YqIsAf0jwrJ9MiljRcczFKrK7vUQWbcx/P1rc26TTOFup\nsvwvgKHyf9jD1Izecm5gPbWY7dBxEnytpHIYZkmqBE3Xqe/Qoeiar6GshxN9\nkMMmYiR16jImvNy7TSsE7aYdg7EtG6UBCX5/nAunYBLQeGrVvhcvg6dO/6tB\no72JhrRgZccevdWniQXanNrN0m/7C0QPXG1Cq52OlGtoJzDHpuMh4neJuNqm\nMFfLK1q6MN4ON8ySLSFQekuui8zcuWjL2R1AgFtyCU8xIvMpo//RWE2UeRnZ\nyepZgNXCYo5kKXob2RAX32MCyzZ5H534p83EnXIE9DkmBkpu0WIk6UZp8Js7\n6KfqIiNvDtcm+VRvnrBV/ZWdegp0jaIsA+SLduX9KFriLb1azec4aVP0B321\nEUvdz3IB19uFcK1FolxZ5cr7b8IKIBkY8LaeH3II2YU0Nv6xydVXMGCELOmj\nWAhAS9bAR8aW30nmTjudPkIZPL1sgKpyQebKnkNIyy7gHc1UGP50LdaYRNgT\nnSRIadOzivVUo6ab560/nRP13Gxab69Mkpc8aN7wIo1379OcQIFCKIPp1hE/\ntbh8C1pAae7vWAoEN9AmlFOg8Anz4oWnnWHI5vWdgJUts6drzcjpVW6THEM1\nQkUp\r\n=SVqW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCH2e1DyEorSA28naUs7bBa7ivn9m0yXdSVhJ/STrD2NQIgU2MH/p/qDAxZQFJI06hEkb6ZALhiKYsVNUPES1vIeW0="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.52_1573524141196_0.018019016726459114"},"_hasShrinkwrap":false},"0.11.3-alpha.53":{"name":"@react-ssr/express","version":"0.11.3-alpha.53","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.53+0afbaaf"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"0afbaaf14bf2f66693078b1ee5818eea5f6fd8ba","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.53","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-PcO9fgJxapDkfjtSg5PCzLeTbUAQe+mflIqatiW0jGpMWRJvYhFXU6kNmiMCBDJDf7CvxsSOL8gG+gv7BeNf9g==","shasum":"85768f4bc2a05f70a298a6f4beec97d0c805b633","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.53.tgz","fileCount":8,"unpackedSize":12602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyhM2CRA9TVsSAnZWagAAsFkQAI2zJ032NqX8gRVLSNjf\n+n3Y9nQTxkKyPQEjWORrbnJ4T4ZoLHw833kgGiIIg1Itw6wspRdZy8AJFXWz\nvKCgbrBfdzQDsAsePtyLfgAMOHqOXGr934H5o5geLvrC53XJGD+e4wUU5H2j\niwOPqbjAJwyxSScjUzxpGOgC4P1A2l9krMYVRxFbIL8UzHgxJwGYWVaQUv2i\n/bfsmf38xtcHBAqdbC4VNkp+sbLM0OTYOETjmEqbIhr77qFTVaMGzW2b23mp\necyuZQDoA3FFQMAKrBkfMs1DmcqKrgWm2JsBCuRjwWph5bdSPxoTLAfgYWml\n9oJnBmzeiKNpxWbBETT0yei4gCjH2cQNG/2jGHUxZuxUkhvyMqHMqhQSLwA9\nKEkHBSPA/0OSYkh/U/9D+No2sj60TomNxWIzfBbOBbDsvJkN60F0srv2Lp0m\npPEDdf79/Ml3m3cbuBs7L/T81y37aO56d/4KaN9xe/ZHlRkW6jZhbsAz2RCB\n1hTujXf5KcwbNF6+WZI6lBLN5EyGYBZMzpUdRFSPb8i22twKWuW9OItUJCN6\nEhsdqpRDEGU64N/72xWEFOD3lKMUyNpXMC2Wa/ej6S7cLB9il+CItOf5rWXY\nJQpuDyzvWsJzJJ2zEfD7+07lFW06jKM1gXyQOgdNTZK2ufKH3QIIi4fGBxTn\nAJwE\r\n=S6vL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDGJxhYntLLmyZ7WWF7OslT6dGebxnlriJHBJhZwYz0QAIhAPU6Uf23HJvxw+ke+iACxKWgxlDkULcbgCsturB4i5VR"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.53_1573524277636_0.22190055482792026"},"_hasShrinkwrap":false},"0.11.3-alpha.54":{"name":"@react-ssr/express","version":"0.11.3-alpha.54","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.54+ca8c581"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"ca8c581edfd580246359f2f555618f1c6178a240","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.54","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-D9ZfL8JYmnmSH050OqHiOb5x0prj98urbrR6dgbvACzvBYBDdg0hREkQRHDSrOGu10kIP0d4nFj5mqK3rrfUog==","shasum":"d3fde1df7ea96ccf7776cf29ecc1cab187b97d7f","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.54.tgz","fileCount":8,"unpackedSize":12602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyhPUCRA9TVsSAnZWagAAwVgQAIatQ6PLrU75nOCkMVdF\nmC6yhv20rpSYwoHiDSo9FBlT2Cjapv9s+D8CNcxkfcFNE/O6zFQ7GyYFCXmG\np20Oq3WSCqKnOK+OKprF4RMqY12ACrlotNbWtXH1fEwIuDW4SfhQQHLzOpAH\nxAPzWsEXt7HavWq9LBPAEBHMhZHnqi5gm4g4QE7Zss1gDYs8XU0C9D/2g9I6\nTIwu2FERQmAEuUYSueGWNPxzapanFwqsW19458sqkSRzM+5Idx7ftUVqUiKi\nuxMsUyqFrAEV6rnft1FoKe6hUEvdhgCUU4iOCsFF/4oTLSvdwLhQkV7wbUWP\n/h8tPkLB6peTbVeNml2ufjkueyPlIqRSLjfzlSeq/9rGnEAIe8iRyBnxizd2\nx4lmmT7mTBskgVxvh1UFWogxOGFQdECVNgDphCd5Cd1HzJyGaTbEpCgSg615\no4uRtm8jv9L4DTVFMTKIhZYZrer75+3EeMJ0zInRz+5EfKYpQDynXn3d7wNg\ntY59IdTXKdQ6kyqe+mC6dq3TeLhmJfUs2avEerNnbzKW1ufc02OAexQNrb8j\naBD2JRQZUrHu7DwdhiS2/usrPjgE/NO+ED5IJrwD4sJMq+vQT/q7DWCO1bP5\nini1RfHRKhY5FHinl7EmyHVmo9uJSR7cC5SIV2z+s0MI2c00eEYlstWg8gQW\nKeGj\r\n=caCd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE+KdPRaz9nqO+iUuviURaj2aXYLS9cCEikGYYj2plm5AiEA5pFLS8DsgH6zcSms9FZ845WGzNSJlFZOPWeKHUDjbVc="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.54_1573524436222_0.8153294860371441"},"_hasShrinkwrap":false},"0.11.3-alpha.55":{"name":"@react-ssr/express","version":"0.11.3-alpha.55","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.55+1bc506c"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"1bc506c19ff53bb6cff68910dfdd70c83eb8b842","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.55","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-kUsxDW+knMzzwfKN6UcbCHdh6MUMwpmzJsmriJKCc68DzcXp3bQJGOu7x+aXg+VmxG8Mt2GUqHseOjGqKqnJYw==","shasum":"c98e865259f0a1e52668bb0212bad341edc35d83","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.55.tgz","fileCount":8,"unpackedSize":12602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyhU9CRA9TVsSAnZWagAAu1UP/0qH6AKHAY+z6EllLzqw\n05fRVyW+uPfGCYnoLRGtJ2vFuM3Twg+rCQjtJ4a96rovFdtfClUp5emDhAKu\n7+xC0LVPpBm2myZm61H2P63OWL1OFbQUrEhGeuqPttYK7T5gF/7wmDgoMRmn\nbKLI2tz6tmfXoZaFQJOqM/+AY9lnQHddahJbRm6ydetThxgaDSJFVisIwLER\nI3TXuNn4clJsmka8HOT1EPNHOcMaeO2yuAgWNE+0KDVA3kwBlCyml06K21IW\nV7tx/8wNL2x4tqbQxW2rrKXYcS5tX2WGZjUw39/9WzLTNjvz9HWxB592uM/r\neF35RJuVe6GGMA4RPtX6z/CuxYbe6DSHEyDttzOpqtS+QietdAi/LjoDXtKJ\n2Tvp1jgWmssrOeM9u1C974oTvIOk49q38V7I21gu2Gq1rFn6yZbZUb89/nEM\nyIuKx1letKWXXvrmSASJfo3XJHdCt+YtkjH4jiOrm5Jr+sLiedDRo+4Ah2QQ\nQejkRPchqBfwWSJpL/h35fkpmcykFs3HA6Nv3qZ1sqBRkk2AXR05AGNnVZ03\nDpvgkJqD7QBqeeyNjEIes3po8130JiBiqaDfZC69nhKBr3/+aAJ+jDgcAX3/\nVikpAFC3hbd0yEoo6/85tXI2SfvnIG6vROAyj5aYgNOkhfr7Q6EuomvbBMDe\n3xSM\r\n=PU8N\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDXaw6zqTkyDgRQ1fYVxRdnvrjXxmsbmvcw9rN25I62IQIhAMVLXdit7GCfRxAXd/lSTAMj6kj9AuBQ78cwp9Aiv3xx"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.55_1573524796638_0.8058135858327193"},"_hasShrinkwrap":false},"0.11.3-alpha.56":{"name":"@react-ssr/express","version":"0.11.3-alpha.56","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.56+ba68ca5"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"ba68ca5a1e30947e7d7394634e297bc437954132","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.56","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-4bWl+Gzow7/waWvCBm0EqIpfRX/1fB5Q5LUVGItNZfYcbPpwc9lazi1Pj7fSn+tg9ZFsVq7WMcw00Y1GeWfRBA==","shasum":"f71fee062dee8b9bc894b339d98581e9682c123d","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.56.tgz","fileCount":8,"unpackedSize":12602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyhW3CRA9TVsSAnZWagAAovQP/3F5DyvV6RJGD6q3KR6s\nNJZHslw0CTDAjkTD6PtRKzPP91NsBPko0inlPzZvp646hcYZ/8VJlC0SvNB8\nUEJw4ywz6AbU5vMQs2bJBlK5bzvlJ3hpWEQcYlNANz47rlzICSz1bwWoAUUW\no/ed9EvX1KPFmSRkGVXpAEC2WFzALgisoCACKe4sfMD0grbYtE1MV1cexGcc\nFiSaWVYJepejuFLwB56PLN4UpQ2Ww8uDI16UozlJ6GrhMLMBNDaRK/YiFe0m\nAA7DTlLzUWEzAWfE7sy/oJX5H6OARPwnCrdMTF2orjUD3JBranQ8uWCOHRsz\nn/nmvISjj5A0JkJmlmtqFnfrIX0oMxCjS2Gu1vq8MEZP0l9zoz2L7Or7ZEkM\nUqAa6BPJo1rIU3SIZuYhML94GP63GrMxYBB2De9EkJ+EcV05TOIz7L9T3Dqw\nTil0rPLA4PeCHA0KeexqyMjhR9em2WirldUdhxNMBpCBIOGudKArxCAdFBB6\nsTFiGb2LwPlMIjwuuHcVQ4BdwrJQ9SrB/+iw7TttjyU9RuBDC/6wLYtBewsK\nV78rs1F4zo9LqNMpm3+rF4Q+PDF2tODwzCdkho5dOBOxnlpTIQNAqsKUq9CR\nN6ZzzbMnEl76cQXm1cpHriO+Ns+X+r4+LBgJMRUGjEMyQIDO+xmTf5SqbRe7\nu/pv\r\n=ayPI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCc4NIyom5aYNA8C7TIApF3uzpBHr0PInr37zffBwv8RAIhAJ3u2o4z2eH5DAc+bYUox5PifhtkK+7svFUAF9ulzgTi"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.56_1573524918860_0.7522026084303823"},"_hasShrinkwrap":false},"0.11.3-alpha.57":{"name":"@react-ssr/express","version":"0.11.3-alpha.57","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.57+02dca9f"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"02dca9f2e3ed8ed97cb1a4f1556ab2a57f75a1f5","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.57","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-IBXZj0haiKHNbCl9KQuGUxM7qdXenlPVhlx+EDr4eIwkzAF3QzrCbJtMOYMKf5CP0dJTVZ1N4H8HfPI4ckIHvQ==","shasum":"84fac58c3dac19c78d53a685cbd4e1d330bf2cf6","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.57.tgz","fileCount":8,"unpackedSize":12602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyhZcCRA9TVsSAnZWagAAV68QAIppJhPWVTCkjLvFXiJD\ndiW3b0n2soUjEaD0wqMZtSvRYhjnKi//ODD3E/JzILOQEgPqQJUoj69KyY/f\nO/37IV+5POyI8z2nggvL2ZbdOyfDAe75/8WJ0tzDPhcuzhNANPNn4hlQWoB0\n7YJOe21CKBucPOkIQb6imJ2b5AR40qPsmUkGQmRfw+iBLmsiP9ppcJXyoTXh\nGuNvFTOni33boEV+yzRLg9pwADuvsTMLVKH2KY2/WIJlwoNOYM9jSauoOHaU\nBXd1U1M/iN3zb1/4xkBCxomagjP6uFkxWJgt4BGyfiXKoJ5s8lqAiWFiuclc\nVkABsUwZMm0tOnOkujtzwF9AkBs+tO56Kb89Rsb+Okg9qBmet1m+sok1miLQ\nzk2RjXl/l7Zfa/INOpP6HOajULzlWUXDTkQfk7ooIRxaGn3J8BFnRfsV4g9K\nDZzHOxOEyj5cgy48Yncdl5uCxAvbXpIxA/LfgUH1/SwmIP3h0hqWIdrsVPpC\noLLR3YhHIaPNb//zjlE+4PHWPNw4iuLp8+phMfBgMK65A206KUV5ybb8xs5v\nrsMS6T8/3xaTaF7u8XnyCc+9wk8RPpf+DWl3pchsf7MRcN4gFw2/MdnTzUay\n0Xlfuz1+qoBIcYoXtVKSpkeuiiMqNcLsJMbeZjKUbpCXfTTSkiZevI73l1q0\nhpV8\r\n=3auF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEPwvY1a6A8xiU7nh8HuBFy6xANUdHz4EgrgsmaRuqtRAiBBcIY7WI/8jhAYUCDt5FIhJmPpX7n7FwP6Avx6wJgccQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.57_1573525084395_0.3325939693039419"},"_hasShrinkwrap":false},"0.11.3-alpha.58":{"name":"@react-ssr/express","version":"0.11.3-alpha.58","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3-alpha.58+2c03dce"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"2c03dce5b9801dae77ff0720db3a59ea4f16cbd0","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-babelrc)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.3-alpha.58","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-kuXopGqYmco7Dln3z0EhFWWTzCPPC7JTGTbQHG0LoCrtFMq0moe/BmqFmMOMjIgfdLf1dqPwlzMM9g0dY9ddjw==","shasum":"5f9c0353f26b6abb25895d4a4cb009f44c5c457f","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3-alpha.58.tgz","fileCount":8,"unpackedSize":12602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyhnsCRA9TVsSAnZWagAA7yUQAJHG7UoBaEzI+W6pu551\nxvP6CD6twgUn98BVXuc78vI6cPIi56phoBWLIJcn51EuiC29A0oHkzGg9sIk\nmfTzqBfIlv5+3axpeneWahVQccZRNbaWSA34fZ/WiEJ18hO/kbdsYVrmzQ9t\nVXSEMvBxA2Dx1eOm/3p8uSpWBmsCvnHry/pkp7IKpGSE2IZuK6Rj4KMcln9L\nZiIvmz61kWxylDkhredp4Mc4U195T26UNzu2ODs4EzvG3tqAVZMq8UfwHBuF\nOVsvA+YDHMwLA+ACFtFDz0U454uKuGX6V9LQJz2NcKCI7YExLagqugx0BBYQ\n87RbMwW9mQPDldeMTLylYBfKeIP2czY1FaKRfuF6ZeaT8TqdxOqnD7maj92U\n0X3IXm0InDON8iKzSKneALj9uTcLbQ+QlSEhKVJpgR/bpld0YvPS1tDenO+h\nhqP8uN2w/HYEL6y/LtVBu4jl3WZBH2zyqoehsFU5V6MTKVqkNrZYnNJDupzF\nK8EMJYtTQwOaxZ2kdsxpKvj6J5btVH+lw89fK4Rftapt1RWTSDSwTqnwRVQ9\npGsuFxZtV5g6E96yzTD7xxzYWuKinpfJgzfm+8RXGGlX86g2oxcALV73XPcC\ntU/7aswf5FZjsc/7GvqOIhkTYV+/xZIfQXq8DdBsVKtRHEaZiWMSjqt+uO8v\nl5qb\r\n=6Uwc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBxTpPwXi/HcBqLcOLlVYdWmQ9tibhu5L0bKF0Zy6lJrAiBZyOAgotXlRYNDbQ41m3nRb8hHuaJ98GvMlpbdg9CWEA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3-alpha.58_1573525995626_0.3511191584436282"},"_hasShrinkwrap":false},"0.11.3":{"name":"@react-ssr/express","version":"0.11.3","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.3"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"9b015f2dd083946b82b6a4f1a255c1faf55b4bd0","_id":"@react-ssr/express@0.11.3","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-6G1f0ICxUUQyMleZjlHcUAtm+5FhM5oTrXbP91c6vzo9eVUbkBAI8q8cEN41x3YDgaWmY+agHG+Qu8HTFsnAGw==","shasum":"9faa36aeb003d1539240cd020657c99a6e82a3d4","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.3.tgz","fileCount":8,"unpackedSize":12546,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyh35CRA9TVsSAnZWagAAMtEQAIBE5ZHWGBO4R3/7Zcr6\nmLO6I6hQNgj4ouNDJEQ4ig7K5HJQ5rz0xJwywnTMRaRW56AOVnimOHHzAyIO\nCXVHKm2i8pnXmkCBkYhPDMadfzbBqhsG7pg1dWUMB2DTVVbUgTShQYXupKpZ\nzpHmCZ/iJiEH9E6+1nCPz3B0juxkBk03HuPnBWPVIBsXp/7H9Pw8KUgOqlQS\nWeqRMLuYMcODT/PKYeF0RjgO7wn3FbFwTRz6Rwh0Zhi8JBoYXyLXGIlakN/c\nPD8YlOdeo2DI2uK3BF7f28bMJlMCe9fA978eA2bjaZQBoTfSZbq1M1Oe+ZSf\nWZZKm/tvIByQSWD9OsWcQPvoZJHbtLSFb8NgabekHKUuO94+KmAI3Xm0gj5N\nwNPIzP9dAoM9PX1L9Y2WoWMNCvAQEFWy7IZqF+p19HQeaHR9b6Y0/4ZcZpdp\nOq43UkXKPtcaSCsVVEQK0pyV8HbKYHITmiHVNtSX9Cm0Td16JjeWxZ1DPbP1\nkx2ItOaJvclVS4NP2Dr2VHeawPslHUG6sXZISSH26fGiUXusx7S/wuOdMBZU\nof1Bs6LgB3mgsWX+yRPTeQ1vWEMcIs+X9vPKyQ7LoIo1OJYjeizltDHlleI/\nOf41nBM8kZSzY7tzpveSQa1EPYIUC5jYNRDUmPy7J5PHri1bVcLHGERDrMpv\ne9w8\r\n=jT9M\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBLwC8H/9OGNdqYNiql5ag8Xs9r6nJF8ozRbKOIxh+ddAiEAuwSf25wc0bjnqKPgUKZzwjtEdhGpW/nrmgWilg5aKJA="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.3_1573527032734_0.5648902494909829"},"_hasShrinkwrap":false},"0.11.4-alpha.0":{"name":"@react-ssr/express","version":"0.11.4-alpha.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.4-alpha.0+d07fc4e"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"d07fc4ebf0bf796042e47e362aa908958724b8dd","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.4-alpha.0","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-nPFe1liFghFjouz9n9XtkSgyRMiH0FxLud5gyNg/RIM1T70Rpj/QDLJue5S09bzJ54rRj9XyPyN9CFgiaHc6+g==","shasum":"d01d1fb904ce23752a8fba0ba32b9b8059b8d78e","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.4-alpha.0.tgz","fileCount":8,"unpackedSize":12578,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdykTpCRA9TVsSAnZWagAAtNUP/R/B49ns50BI/rcpmnqt\nvWnrKduTy/+aojpUHOO8IgjYaZxtvp2qKDSPro3U2s2FRHFg4hEnX/QW4FcZ\nn6kWWRa8hQIo9vntsLNXwt9KJFeTLtjY9m0zyf8pgFqWMJDoGWla8nM7boyp\nbcEpcb/8QpRR4ufZkui8EkM5Nkm3W4kOJ3v1v1279OAlQHPg6zF6TWXoqfdm\nim1at0/XfNvKJBkQeSe3Lx9YtIGkTGEPeSvxJBLhLjginEUAjUU+chTzbrxF\nCJFValvf2dMWvhv+ixOqmZg9ETajdNNOIldSZ+Dkc9atNjmKs/AJtOBg7+Qi\nGvFBYSjESLAlcWyN5XPYcX0aQfOH00u6JRwbmO4s4Iqn4BwnbH+ZkYYTRjYo\niKcFadWrJG4qL3Mk83J5Sa9zj+wNG+MWhqPkxKctaetO7OFPXlZMXIMF1vBa\nUI4+COM0LBV0zYsuLB+0A7NSfi0Xh3O8vx0Z0CGgAK0zeh0ljCKLoSaeWuId\nAGiOU0ldXH5BVBWQVFwBpV2yFGW9+IGNgShG4c4GxTpv1R2q8ZU9pPw+OWzt\n9HwYlmtTnijd1iHsVcK40j0GW5bStDOeXbTztqeAuJyXL8nL6Lej/WKJWAd6\nr9dSlSVKvrsnUBaA2gQIdfxwNnPccqgBljlY8BDeihkNRGof5UWj6r4xsFP6\nLuBo\r\n=gR7p\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDKd4U34k4fMMJ4rD7Sq1sBfejeo5gCBSOHs+GIE+vtEQIge41YYvwGwY4n1QJ1wr8AFgO0IynanSefwA6rm550HL8="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.4-alpha.0_1573537001001_0.22244189189241514"},"_hasShrinkwrap":false},"0.11.4-alpha.1":{"name":"@react-ssr/express","version":"0.11.4-alpha.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.4-alpha.1+2da96c6"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"2da96c649131b126080fa738e7bfc6c6a161f612","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.4-alpha.1","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-VQgxp7kJnyCsEKPADCiRgLbqz27rSLlkVTI2VnzLhegF+6PMrw64AW8g+/4MmOndt3bQqtU3xOIWdzqRpMuXdw==","shasum":"9567b0f703a4236466a24905cd3ebdf339bd471a","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.4-alpha.1.tgz","fileCount":8,"unpackedSize":12578,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyks8CRA9TVsSAnZWagAA/JcQAI/57V8FHF1q6Hx8FHhS\nYZPdFPYjTE0z4OTubEeLzi9PCxn5kJDdExeHnxhjX/2ImhBM904suw4/KGN9\nietF6GP2I50nRxYpliADCvxTWoQKK8Pru5sb5m3fALxOojq72pJiW8Tq3Cgb\nXSXKk5SAzYjxeFajyrbB6vHTf8nLPc2wAIfq4D4JQgI2HQcWVmFZBsdQHjd4\n1vWmrC+bbreY9T/s+rMVVNYAY7cjCjeg+A34IvsXNWL/HSLS9eYkWdEp2XkD\ncivWRZM2eLXHnJSu+2OWMpzXiUJIzGlE86A5gajhihV1qp6hqKLm4EHGIjWu\nBZIA5pqPXV0PMJSkEdoEq/aGciXpP+Lhfnls1i58kb42XKdx5MMFXKVLMZuM\nS/bsurWqmN5TMOdy9A9rFDXT3D4DOEU77fcvHXQnFcVJzIwlQDTK4DaCEDFR\nf5cEatdrzAnjPwhL69MerG0U2sTyggLbn8OpxmN038P1ZMAYexp1wZ3Ufush\nfPs3wOqkQ3ilvu4sU+FM6do9yW8O/jRSVnUpXBJOGKifYIXkqEPmayLh75XR\nP9xvyGvf4qqfObv5kO0iR9ZvcBM3Jjhclzt8rkb3QhyWtm3O9PC459C5HB7O\nHrPLmLNH4rU1gRR6cxlfCKM7649nemMkWIRUkkayA7vRGmp3piSgRPSAIDSz\nBgsg\r\n=iBqs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCvaf/HgsTP1fwKHhBiQ/RHRYWmZk6EO30WpLOQBQcuFgIhAKBEz4HVg4+8lsy6t92NDrBdztJEnzGln7BN51G1+hxQ"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.4-alpha.1_1573538619741_0.23923885570510062"},"_hasShrinkwrap":false},"0.11.4-alpha.2":{"name":"@react-ssr/express","version":"0.11.4-alpha.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.4-alpha.2+c04e551"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"c04e551f3d713464e4ed4127ac37dd36cffd0426","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.4-alpha.2","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-ejnvUCV+IDAOW9yxNsvsBdhGZ+gvXRCAj5X6GWValvtR5WJ1HkTnbiRe2FdwRoZYW7NDgbJ1A10Kv+yuWA6UBQ==","shasum":"31f992d99ac55a8a098821c5765265bd8c01171c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.4-alpha.2.tgz","fileCount":8,"unpackedSize":12473,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyk5UCRA9TVsSAnZWagAAlM0P/2vb5QhD7OLQSGjnBDp1\n2eeWoD8EkEkvyaPxSl1KSTRJ8WUh2LJ3mFronqc4Mjdi1MKJI8LI7PieaZWQ\nJP1PHSHm8ddAhYZ3x3fO95fxDwPBnmsRIQweeFj0boWp9LQtDwTFccOELzQG\ngrU0y+0ZkLMmT2vG40OTU96XPDgqMiYYVsCj1pOpu/nq9aYAdlv68eJFD96X\nuYeCTPbwd0iUxqq4obFhS3Vk+OTNulFu2Uq4FoKfoat+EHif4nBwY2udMySK\nG6XocWcG6r7mjURCv6ENSBpJeLOgIGZNVKZFI7ra+BwVxKomWqUOZzm3NDtq\nhmORCOEinGo3CasmSs68VoKQGlOAVggSgarIQ6FIgpTkUD/dvwtHa0aougWo\n0vSvszqbrCCjuIeKS2wBIHKcrKAqHtaCS1Lqmbz1yR3lhmHfl0d5A0pam4At\nULCG+tX1w+4njYEN8pSbGmU0bVN7Hg+9EMZIV/puIVdH23chPIaC5VuyS1Sv\nvjgaSZ8EVj5/q1SVItT0sbPtpm8zm9IQQRZVwdXxU4ST580eP2/bMfiUpvww\nyzcNhMHpmBPzwGmIBRBtN0DRdCMzhW1sPD4K6S7IWfz/jcWcro+M1cOKo/a0\nq+xir4H8cW/nkLb7u8Fz5zCmpyubhLrpoamO6tbMD9gWFTMhF/OgS1UrqLPl\nmYSw\r\n=iJuy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEEWUd05Vc2kR72uJWEoyHsPaiBVkXDOTgz4jrMkmfYzAiEAsQlgnpGNbwE3/9JpBslvRjVg8FuBc0oDY/3dCq9BhMs="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.4-alpha.2_1573539411944_0.31468318747419466"},"_hasShrinkwrap":false},"0.11.4-alpha.3":{"name":"@react-ssr/express","version":"0.11.4-alpha.3","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.4-alpha.3+a134020"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"a134020f11044f30a28d7edb0fa1da8e62e18fc6","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.4-alpha.3","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-R7CAz6WBK1Y6UT4Ucv8gMXZgSGQIdhjumeUoLMj/wTJRgpPqyLshBqEiCOOY6Ss+rG3XYDmvDB6rDtApgyC+Sw==","shasum":"80a4b8895987c5442c767fd3277e7a3fcdbd7092","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.4-alpha.3.tgz","fileCount":8,"unpackedSize":12473,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyk8FCRA9TVsSAnZWagAAUQsP/j2mz0KUFkzFcK+JqGPb\nuDsivv1saWwE5sb5StqZhimzF91wrYFjtxO/AQKET9fckLMgNgkvsDdmi1Yk\npcrqBatL1xRJt5aCkg6z1jYyo0mS8PPv4vxPRdS5tqT7DuTKfe07b6GKfIXB\nyHEMpOuv1i9xwuWfsMhYZShu2/Oe7O6iMVQkIlokeryLQJ6l53C8oyd4IIuG\nrFrpmeGCvvKdDWDmmFOwRb9prQN4IW/OrYRbLfci4SOb+2cGuz4B2dDrjSHi\nZ4Vyl3a0993uTT9/gNSw0KHk4oYJP1f9b+Zje+x6kgIuhyW6sVoF94JQ66UX\nzKdLqHimGXbvXgO9hEefinQ+jusDswNO/K9mju90frLQjzEF0Ym6oJpGCz3r\nMmHqNH0opxOAX/cfbH1aGPaNM6BsO9fYqem6lUaIBAmpPCfEu35UDyMICDlj\n287jBTGkmakJFVVjhRqyi7bBWjTJELgUlmk5W2ZoK12c6DPJHKvZs1G+BeL/\nJTM6CYB6cqo1Ed2/kmAglRqCWO3QMR3bG1ycn+Zx/KrCPsozY3/D5BwOcsc6\nxBVNMQJ3mLZjvDyOBNGl+chZY2U9hLWHwFuniQKxSEF2iUqhIaUrdL0hRFJn\nvG/t7OvyodjfnoDojmRY3RRcXF4gKUdsjxJPAIgC6eDM3UNy7D7AcTt/LRUg\nrBB6\r\n=HYJJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC7Uad3rJeyuTh76BXZGf9B7V7wZFuYpUwm48TPK6rHQgIhAIAv75n3Gm5BdUZAuV1GIDycu3RvFS8kR8eavgpO2WZl"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.4-alpha.3_1573539588556_0.8484264141171312"},"_hasShrinkwrap":false},"0.11.4-alpha.4":{"name":"@react-ssr/express","version":"0.11.4-alpha.4","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.4-alpha.4+2b65920"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"2b65920e8fa821f5157758ed60550dd6f16d17a9","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.4-alpha.4","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-W9ieuuW7aUQPjuy7UdZyXcyOcizDKekE057j5xevrQR2yz01/kJ6kOGgx7SvLThNTnqlYMa2D5MVIwnJBlKXiQ==","shasum":"2918a9831d061203ba5a666f217bf10654101dea","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.4-alpha.4.tgz","fileCount":8,"unpackedSize":12473,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdylHZCRA9TVsSAnZWagAA0cYQAJtmVcqpVZgE2ExA+AjZ\nFTKQN0UDy+jEfNa/J7YHt+dJtZekrNyvRqXUzxKWtgoLq5UWHaEwkOrMc41K\nMyE/3DlddWaBd2F3WXC0FfqyxiDmKuawhO+c9zr5/qi4JXWfgHAQ2PzV80NP\niUS4KOv4Y8DckHezR32TfbG+PLFWu/1ZGfQ2CMlZgq7tL5NSlMjdtTqMj4NI\nUiZsUqlJ2rudv75Do/4YONHeThihR7KrdietImaf5pmaeK0Hu+7nFFqOlyrs\nul7DiETTAapUs721Z5HNtKNQGiQDLQCaL2lca35mDZeV3+8PZKc+uvxYI2N7\nAqVsKOemq5l201wtdP6TJSkxiaqDBSn7BEhk6Wv3pr8Ppw71IPZSqKA2xekN\nEBrahFiZYfP0BWHJZpM2E+5u4f6ZMzg6k7zk2TTmjjGGLq+hK+wt6RrC4G2N\nGCuRLt9dcpfLohepRGwNf2Dim0mS0earlDL9ksswU+bYnXO/YKvrUv27ti0v\nFnes/H7Qwk+XYaesN+ysGtvU4RRwv3+Fjvm6pGVGTc7ia62j1EbKxP95ObXm\nE068oTOOjdqoOno6zDoO4xHD1vfAIzGwq/iXit618RBdfW6yrU8dHkEQ5FpN\n4lLu0wqd96hCbZAP8Av1EHogedBgGHUkrnOUWPwATPeiqXdQVVCJY41Enmr4\nWizJ\r\n=Es+5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAK/NV9azjzz0dVRR+eY59bgQ27fiK99GLNV0HKBB4vtAiBuEX22G4gWcrwe6yEZYTy710RsPImuZNm3OYb184+1NQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.4-alpha.4_1573540312678_0.7663766176957421"},"_hasShrinkwrap":false},"0.11.4-alpha.5":{"name":"@react-ssr/express","version":"0.11.4-alpha.5","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.4-alpha.5+5fc8620"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"5fc86201ed6ce8c3a13330d2913d9ac4d6d92b90","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.4-alpha.5","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-shw9gl5pFJLZDaNK5BxLJe+IW2W7yeYZZKAqySD+LByxAvem+9gJhlgQN90WWN6MHtlcRmPAKceSbxC317cDyg==","shasum":"dd5f54f1cf2e7e329f7d521a955ef5dfde119fa2","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.4-alpha.5.tgz","fileCount":8,"unpackedSize":12473,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdylQ3CRA9TVsSAnZWagAABDcP/2SFsQsTQv2ZdA4//5CM\n5b6nDFIyQ8q7DvuMYlOwZJ/tkqidlUB0OESMOXXHWSTEEYgQfwSKPWzdiOlT\nPeczFX7xofmBjMZzXWLygffscVZEgepep/hv9Xstd6WkNFwqP9in33deBZHs\nVKHsrsOcljb0C1K3ojn/FAt1nTYkurgQTuJjmJ2Kcfp/qlKw5FdrQU7zroNs\nSxVvxV+2xvBYXgy+ANMazm16fiaGJtk15mhrxsVyEObMDs/2ubciwMV8vRgF\nmMGVhoOqybRHtVrH5DtlkgMo/2pvAqZ5rf/2hZUraSMX6AGhdANR5M0NX04c\nWKC+4Z8tzmIv2Xq+3EJG5uVyog8UpQexajF8DudYME3MXu6QJPXFpntMjc5Y\nqLNqxN2fRoZUeSQbB6ePVdoLRsX9q7vdC+OikjN2o1rw4WXZu8fewJPDYFuy\nIn7gYwj1MMLuTYNzh631Ovgs3CzJxKz/LHdqM03YRWB8BD10O7CnrluAqP9S\nRzAnC88eb78KfJ6N22eoqHKci1KQkSMypd/ZmNtiXLTDPVBLNyDwpSLTHFLA\nOcvVfnjbsFSPKAfKzLKsnCS7MHMMpl5m5lIK30BOBwcEio8kz6+wOe2LIBt4\nyMLaix+gxpmSxmEb9HLqa1VOcNVdR3Xq3l/BPMTi0sh5RJbE0f66dkVYsiwz\nP8wP\r\n=PswU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAjBT+OMcp6x1jPH3JgBvUQxRkGWJFRwZBxjBJtSSEBdAiAQzuHw/NxRQCRBQXaY/lz6jRRJKOOrooPVwjnCGpOl8w=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.4-alpha.5_1573540919421_0.11613437225637724"},"_hasShrinkwrap":false},"0.11.4-alpha.6":{"name":"@react-ssr/express","version":"0.11.4-alpha.6","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.4-alpha.6+1f5d442"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"1f5d442aa20e9540e365be79cba223a77d0710a7","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.4-alpha.6","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-6Py3lT50AyEgKpCZd+kAC5OZyomWKcqjs+7hw7SvtPOocYmbDiZbD+IPzqyt5WHpCIwIETqUA6GErywcZZoPiA==","shasum":"a33d18837122815df11ce7d21ae730b005fd561c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.4-alpha.6.tgz","fileCount":8,"unpackedSize":12473,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdylTeCRA9TVsSAnZWagAAmZYQAIjtSiJ9aeSjCyn+L/cv\njYt/M/ddYNScRt9VqHAJTr6ZXx86V0oS1ZTy43pAcSBPXwKFui34XXDgEFka\n1DcQ+fzoYo0rvHcig52uGgutTR6tK3CW5D2LZ3mglGhQuTnJYk74RQ4C+AGw\nv2s3fdM6fqhz8DWJwl1sncZNTXQviOg5QmIdIV3XDzarC+eSsC5vb+rrGx45\n+tZxwxoxH/Lse3OWA4ys7oxWzc/MsbTzBIVJftoy2kyMRJicM3r02o/wL18g\noJW8o3ae9WvY6Zp/bex/yHwu+egYz48R+/TjWIEx34W9iilfVWgg3OP0B4cl\nqJ0ImuGkQkVxt0/guSIjBPyz2ETp/OlHCPY7wopFnY3LksS5Mozq8Bi8ilU4\nJM2Qs4bM1f+K2aTBVXaWh88fpZaYnksAeacSnoiOl+vEiQ5+BSWltn8iJYeS\nK6KBZvTka9/wvKwouUG2ELBVaQnzI0qc6DROBhfQGEHEbUqjh8i0SlbhKrio\nw4ZTsbUOFe25VSJeGnNbg3K8Pr5psfPTyqc/enQRi5HbL7XgYhp7cvsEvZBe\naPGzne1QTj7N4A/MJk4mt3et2ybUrTEljaeb1ss96OWX99c3o453YBEhMg2N\nUxLrwREHaOuWICrnftM+pUJsu0Mi7SMHrcj8fiScuPU7RsovSunGu9nlBByi\nCEKP\r\n=UnPp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBJW8aQUFExKLHQTCUb1GOMgFUMrBgs6aDKRO1gpaXPuAiEAtwmAqPekOOrf7sKATBnf9aLBhqIH0yuXaFn2vfrcfHE="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.4-alpha.6_1573541085631_0.9976989982428572"},"_hasShrinkwrap":false},"0.11.4-alpha.7":{"name":"@react-ssr/express","version":"0.11.4-alpha.7","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.4-alpha.7+4076a4c"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"4076a4cd52a4e23034dd9739c20bc729f66f7910","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.4-alpha.7","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-sMy33SA75BP2ssSfGWMxvCJIwiAJUdQsg5v1wiOPuamDDXP07Rfk7ajQElag/3drkVs9p0SGBABK4sSFokBhKg==","shasum":"adee5435858e6b74f5d4f2f023c4d4001861597d","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.4-alpha.7.tgz","fileCount":8,"unpackedSize":12473,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdylWyCRA9TVsSAnZWagAATSgP/1ObukhhcWkd4TpgdBpo\nQLtgnKfyC2MfxUN1IFdjVVS2qbbpSeysZbyLEKOC81VqtH41jM6TNGNvYVfD\n17QSSSIHzLLQ2AE3iHtqf3Mc9oJw2BVALO1LRfz5WjSO1EZn02EzPD1gFkRC\n/+JzqfKx1vW5uZsTXkbS8aOSBmqC3DGNfClxWto5rTOAaKqmRXKYGIyyj6lS\nIyZzDCTWj/8y+t265ggnKxZ2hF+6gkrlCc1u5mdrGfUMjzl2ZM9DLKuD7+Ua\ni+9Hrlj4N7WRPQNRhE3yLd2/kt/dryFbXRXFWLgsXi2g6TNl77moZ6rjxJfi\nU+2urwbFJJB6pN4ZJ4bfQC5KLtgBAWUf0WsK+UI9YIcht54CEfcRfCsDra2P\nv2YPa+3v7EOAenOzHoKQ3qOtDUTNxijNIgjwmQJ4Key9q9n5H76psA2Qjzsm\n7mio6RIb38qcD0IkNr6UHmYAtXvZSzKZVNJkAmLsCom7m79r9xD2K+oVHBwL\nKDYzzJckwinlP9RmJx7GeSRtXOKU0wWVEXKDOiw72xboj9cRug3iqFFgxOk7\num3UtDeoOHIBxyMpO/INV0mTxpTgLwuxgQnJi2mQzxKVcaPmZn/s6LwGoksq\n3Jb6IIEm6TUZG1YpRv4BCG06/xyxQvsm+RFETi/UQv+g/lfXhY2c6GQ0seWA\nq0Sm\r\n=Va1t\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICUWk/0hGvj5wk0NNUYFN/w+YPyWj4lqrc5TWWfTo5WxAiAtnCNgwzQujxCOEXwgqeb4w0puKrVHhmpspfhkFRf5Ew=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.4-alpha.7_1573541298147_0.18093988261098692"},"_hasShrinkwrap":false},"0.11.4-alpha.8":{"name":"@react-ssr/express","version":"0.11.4-alpha.8","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.4-alpha.8+3c80a7d"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"3c80a7dca80567254f1849f4957524d3e7998ec3","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.4-alpha.8","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-LftsqIMMmE3RkY/HNMwbyovF85dAuJZAdBCTi1dFQhF9jwpRn+NyChvRIZBxE8wbBWkg7VNm1ctSQlWOyhTQSA==","shasum":"4a2f7a99ae902f75c61f5045ad54c23ddd04b67c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.4-alpha.8.tgz","fileCount":8,"unpackedSize":12473,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdylZHCRA9TVsSAnZWagAAguQP/A1wxJm4d45goARLNrMa\nCfxJqnvIMoRvphHYn661a2aGXaVxYugTEHP+hDYpe08Z4c/Ik1ROOxvZncSM\nVZwl97KLb2vx518WGT5lFT2zMPpjmlLlUZ2HlHdN6anOC0DF5ndY/vRjAazi\n1jAnruy9jz54RX1Qgu0tJqwLwfFiTACE0VrW/SwjUWFj6UT9AhyrGjxEoS3W\nV55CLD/kyD44+oqOGoyGy/SXg1SqR1yqw8xIIarLGZ9uVBHp6V2Mwyrs/0bs\nrBKHy4QNJRGdtv+dOaeIv2EcHCJW4rEX4WGDxAMLa/VunBZSCW45zAqWETuN\nVTn4JBdodk9qztRIsWig5ElrRBS9VyVkaNcxs8flM+HOsmg2yJrtualeGOz7\nKSB9cb/Ye1PYI9chd/GsBqwf4dEWQ5BaE3Wsrc6tK5j1vII8hwy1gb8+RwK2\nYCCBWWbjlS1jcFZP3Mdw0UB+WNvclB0EANbBiK6QK7b1neDHY5bQBHFCZW8r\nW0E/Y+yydV2dWD7iOj95gAaz+Mc5wMGCDLMrtJqZaRops6s/I8wADVwH3Pi3\nW/4mJDlPxkYdnSfWi/u86pZ6XRDByZqt66CApmFHZAjgv3yy8ySdePDkavbN\nGCE0SwOANsklD8qm/1DtqXqjS4KXQFOGm0gg//kzGcpIxeUEBfEOjCwQVPa3\nAN3m\r\n=7+rH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCL9hUfGlcoocl/4fTJxpC0+qUSw2pF1UXRbuu8d8wNnQIgWrnUeGfFIS5cMbZTRdfyHRdfv2ZA+1nGMf2lgn5AS7k="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.4-alpha.8_1573541446429_0.8023356654792095"},"_hasShrinkwrap":false},"0.11.4-alpha.9":{"name":"@react-ssr/express","version":"0.11.4-alpha.9","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.4-alpha.9+c482cfa"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"c482cfac24815d42bd04fc8656c306be5bb71f81","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.4-alpha.9","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-IiiRofs+W10eYbBoWppOywtCKSxKPp/ZVF4hyG6002brfcidedbacWdu0/H3e2+lFqWgf12D336eBia3cftx+w==","shasum":"67189c133b3abd203424eae2024a6e59da782de3","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.4-alpha.9.tgz","fileCount":8,"unpackedSize":12473,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdylbdCRA9TVsSAnZWagAAfLIP/iWOElUd/80qW5lMA+jy\n78fnKoJuCD5V7wlnvuNJ7ZakiszQqLcYsNFePDU0ALE+O7lvUJySCZItDxSK\nHz+o0INhfl2JPmo+TAhJGIV3Yt3LH1GNAcNQpiQEqAhaqgkCnNkO+d6jpVkN\nYtpBo+uetz01sr8qUYOti1s4dhX7CD/CIT3Cj9R0ksSvZFFuxcBsFyX0FU1y\ndoOgDi1z6ZtfeBxH59HninD+e+q/qFVM3ERDkBGq8rYg9mNXoirXLVGjZE1D\n/RNJU9liskglJAaJQZK+T18Nt/M2PxNBibfvD3ZnKFKNZgqmbnD7oaGxl9JV\n0jdu0x84XQDVI7GBa/h+CpSw09W3Y6zYbLip2WdEZIvyZGk6oHL1ROi9Oo7+\n6jXMFFSV2XwoBbbF2Bulx87Fct7lnaPK2V+OfI6QEyrhp5gJZjTh+GV5gEM/\nXnzy0Jq4uki7YQE6RRuqunkugpMwllWn85W2D5oKp06hf5UrqSz7B6Oy25e4\n03H3Pqv9txXBg/pUD7yJ2J3e6tH8Jt20IJwlvYyczkPJ5RGH7I5k3geOmMF0\nDyDoeD6cx6LTHmtzilTbewxeNiYyIrBKHLMBy0XJKG2U+hq2tAEHyPK4WM8k\ngRU+p2BKoiZXfQlMhlz8s4gnwQlXWuZAcqjx4ulggKtjTRi/zT3eAkgd0sGu\nV2+Q\r\n=2941\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAIoel86XMmKKSQalA7MzUHcTDh4D6tDD1aTPoV4VvZOAiBaW0p0PrrxpZgHweJNnsQRxJWRBTmV6gziGMGil8C1MQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.4-alpha.9_1573541597103_0.8957567846353387"},"_hasShrinkwrap":false},"0.11.4-alpha.10":{"name":"@react-ssr/express","version":"0.11.4-alpha.10","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.4-alpha.10+afd5e7e"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"afd5e7ec9ecf6bbf5a3f6265b5b911c89e324a89","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.4-alpha.10","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-I3+JuWHOea+3Pt7kGdVQB7V8eG5sV/GlcW4Nktv3yMP//XU+NuC+FwjBmnbJvu1L9jKpSlKzLkx5VY4mVwMCSw==","shasum":"9523715e191d71e4c0c79f5b258115d29f631e41","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.4-alpha.10.tgz","fileCount":8,"unpackedSize":12475,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyle9CRA9TVsSAnZWagAAguUP/0tBmFLcgWLy85oN7tsN\nw8zcM15RGul8q8BeLTVHdx6/J3eGJKAOzozUr7oVZxHCWRYQV0pWQf6SdjBf\nI5UFunVcFuwWBY6vv3owFNt4xhyhaP8qbmgrdi1zeusmlQGjtB5Ct2FVlepu\n9nt1DcXqFxSBQLxePSDSDgMFSFJLWCKwogoZGu0aWqlZ7vFKoHfk96nN2iqO\nGMdtpb8OL1uZ9Tqr3qFKvWyvRLTdqN1NArFaARa8sPBSB3vY16VqFzeGGjsB\nkAxSrTIS01D51LnuZcr+6g3Q8yZDv1PRVvcnda2zPOnylXeBZw8HSZUaQccD\n9VcFtoalsVjUmiiWW06cget63I59awJ9vNkHLXBgz6+iYGYImHVviQBtGyoK\nU0Hpof3UN8azCVGOeN0XpCr8EIgeOP0QuZD0z314JCOLWW+gneN4CHFM7E0N\nCYvHNbHOtJp9mix7GnrJ8YEiZP5q2rckkyI93VHV0skUdjMCxwGbH/EUzNPV\nfPz8IyF5SQ6XglD3OqiURv/6aGgLNaWy1z4cSb4TcaJsvV+jxXSI++fjXl2/\npbnO3fOT+4ZQLxzcHqt4DzWGKUxK7+VqOzDis1ABqhujhZDruCosXAg5wL5H\n3StFnLP9a6WNSpVljVh5T61kd/8lhjoznePOt1GBZ5IjJx46eWIOmutbh6DH\nYWIw\r\n=fMtC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHZGVnb//buiMcP3E0CbNqqutF/lqAMKzZlHM4votETXAiAVA15OT1Siiwu+bFvC+62zy91HMYQotWE9rSPY2LXwIA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.4-alpha.10_1573541820880_0.6179287553962503"},"_hasShrinkwrap":false},"0.11.4-alpha.11":{"name":"@react-ssr/express","version":"0.11.4-alpha.11","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.4-alpha.11+c8e2bdd"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"c8e2bdd6fc8003df00e59bed10da62559ce75bf7","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.4-alpha.11","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-jQJZXwxOygfGMv+cajw0o3QCNA6SCJY6gcAfyK1Qhgn4acGLa03ZwiwE8TypyW7Ue9P5uBbIq+sXGmH2Pd40+g==","shasum":"ac350f7b35c49e0625b26ad942d7b6f37dffec8b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.4-alpha.11.tgz","fileCount":8,"unpackedSize":12475,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyllJCRA9TVsSAnZWagAAhfAP/2ImMyFpzzf1o3s7dKUl\nH2c3icUR0pTVZc2uTr3jTIi6Ttl7UzH5yC6BiTp1ImzTILnkYd80NwbKjKAa\n5PY/Rd2+jYSCu/+lMnNg3QmjhbgCAV3fnuh+0R8B0NQkOkPYVtUmZqvBs23E\nKq1bU8K0ml1VmGfGek1R6mOicifuIDMjIO1w9c9Adp6vvNMByG5m5oXS6fL4\nRUtKqNxnjTe7+tTAyNO2Lye8dCGoWGGooDZwgMlerPIyIodkJzBrXXjeI8zx\n5q4nUCBrcGhhApnhYxk59ZUnHAYiw57fGDPQjAC3WcvLOOd83hi5u8AxFNvK\ntUE1b5eoeNp01+Aimp88KWYoPhLNSbyqkpJIr11uIhazxeCw9tpKcbqelu7G\nqbPF3eLvPZhEyoHfEYltM+WTpQvyLQhpFDtLzSuHQf153FjZeFRN4ldN7AJw\nh/ov/9xEMqtoVK8iTA6lQjUUQicKN9R3jw6C5/AG7OCmBnJngpWthgCHdjBm\nibR53R/vej3XysCwiWAZqstZS0GnulE/w2fuvaVEr3w1X37tOLk/kl2D2mzP\nOn0d/lGHJNnk5ZWcTPyMEfo2MXrMxXfLfqdux765MbhDGRqlrI/tIaBw0Bot\njUOgmQ12Bw7MS1ni5022he3iaq9D5EB2YvDtobWq8O6PMuJYYrUG5Th82MSp\nPeB7\r\n=4XK2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEGsExPM30FNqYCrrETabnFLhtewfm0Sv4Z3kMp9aQt5AiEA1AHJLYWgPB0ekIDyivUkCYo2AFYcAyRs1N4Afvu1gFI="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.4-alpha.11_1573542216899_0.8497147466526138"},"_hasShrinkwrap":false},"0.11.4-alpha.12":{"name":"@react-ssr/express","version":"0.11.4-alpha.12","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.4-alpha.12+03ceabf"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"03ceabfa839eafa85c702f5f872fd7607bb87293","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.4-alpha.12","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-heRYuV/cHEsbZOH0zNT7j4myH9CkcLdoqbnXeb4e8ZocC+rOsUkbZgF+rt9pFOe6Ju2tn7GEqKJZSGTdpLr0tQ==","shasum":"ea3d1019b5bf95682b6fb92b7eb90eed93b29ac2","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.4-alpha.12.tgz","fileCount":8,"unpackedSize":12475,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyloBCRA9TVsSAnZWagAAr4QP/jnnEnPAa3PVBYvmTmw/\nn1WkJVI6knb6HgM9Yd/dhPUUvHxpWDzS6HNZxI019hifbZ4jRelkrwYWNgtb\n3yat7WkIisZJl2ZUtTeI3FUbMdducipqfFiNcke3jOlpT6gzRYODNcztbFpx\nLlNzbgXlkhYVRmO03pUzjq2BJ8iMVlx/0sBjayFevONXdDJHWr4oaWCIzrFO\n5Vwn3h/iOIqQ96leQFXdRZzcfX76WdlrXrRDRYiVH3rlm2JTkxzi/6iTZ3jH\nMhVWtj3RnwcgPaz+B0/oAUeVB0OAi6N5zErvAYFdiA+3HzmFYkil679DvcyN\nCRVxHnIbh6tvr/dD3GA2kw9XaOZK/Bmy+woB67zJbtTQ2X+UXlOFPewJFW9L\nDfvp+3Y0V72MJRz9sQ0E/dCxXHdXzWnW1ULti4Qd17WbpDMEqnqxzxz/wr0a\nG7PDtl4Gjswv2+EKBTlruAyFZeNUgkoZji30eNEvF3mAchsBNryRjeuu1JwT\n5m6ni7bz5ftmir+KFkgFhI/6n643P6Z+9i/O+TsF359fqc76Rl31qQSNoVaV\n+flIawf3OUl2jFqQRnT9k5ZGgyfUwe+PpnpW7ryo5zoHkn4HxygkJDl5Sixv\n02+UsAjBJbagATfMxB2zdY7oW7i1gagaBDdkclK0i4tkhNteIudR29UT+IDE\nc9KM\r\n=bGGT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHs/S3dfPGMT7MzJzx7CVfTvryixjwxaSE1SyPuQkoHgAiEAzn+BAWTYM9N7ejvXqPyLKc2wMHWB1JBLUYl4MMI1gqc="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.4-alpha.12_1573542400981_0.7323805283094993"},"_hasShrinkwrap":false},"0.11.4-alpha.13":{"name":"@react-ssr/express","version":"0.11.4-alpha.13","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.4-alpha.13+9c0425b"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"9c0425bdb40764cd2cad9ae41253f57433b265be","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.4-alpha.13","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-96xqcbimZ7e04suyMWiD/CXULBVFbcQ00DpcaH4QfJ6WiePtWsN9vmRUvmSUQ9hKLQV6n8D+Hu01KkmlMGLDaQ==","shasum":"07f77fa7466f76839026e19a4c0f6a037ed6bc3b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.4-alpha.13.tgz","fileCount":8,"unpackedSize":12475,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdylpQCRA9TVsSAnZWagAAowAP/0Dj9Vt+C6IqnMjVHN8Z\nEAWbg/BEIzEBPNFDcFmwzgcO4NLKHdXXfMB5ZTjuy9XwHRJrcrgB6NY1tGPe\n7Bj2ciyi57xHlnQBt6ZqyPg60bIo+Sez6B7z6RgxZ4B2jFrJqAZec77cMBO7\nHAyGMAftZnzO2l/7gsRemrCfAaKwR6RzTKdOM+ZgwWy7He0ETn51r/T9Qual\nG/+i4LDVRQlPow9KL/KtkDEqt2P1o0Z1/eLAxe/H26qnCxg/xWhVwsdQvDD1\neNMRSYPzb4dGAOiE0Cm1qrPree8tjVI2ezcFdqNxA9CV53nUk0zos7/tKQtj\nW5hfNRjTVrvzxt41O9EAUUlUP3P34cO6ZltXsR+cevK5FT2GB52cizLdT5jz\nfm+Rdyn4wNybFzXq9nTu6RX0ok0H0wa3TzmGL4QvDGiL6xDqTFTWF2rmfPSV\nChmIVkmR8h7qK+KyuheCAQwzkYBuNYRQCmQHCF+g9DuzxJEIKaf+2yCSWQsy\nX8yo4YsJ2bhJ0DxHUPkpwXJ0b8wtl6v4w98l2CfjGjXMQBO01XKl+1EIQuFF\naOn2DrGx4iBd6JTWpeBIGS/08wxoo7ZJk1pgbjpjpzROZxaU2HC2xa0Drb6/\n1c/jlkQBr73McDG/S/Nb6M67thxMWA4pHkoD1vW0AJEP9MiSTHvjgvyxHaRL\nXcpt\r\n=l4hd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDO+TMMGLP1kZT4ESMOACgEK3gBs/GI3Uk06sWnjQN3xgIgO4VxXZ6EwviW0YtAfx26gDJfG560sb/r/89XdSWaFMo="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.4-alpha.13_1573542479677_0.649483217452896"},"_hasShrinkwrap":false},"0.11.4-alpha.14":{"name":"@react-ssr/express","version":"0.11.4-alpha.14","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.4-alpha.14+59795b9"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"59795b91746b83963abfb6d8bbca187953e82359","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.4-alpha.14","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-yPPX9tekLiDToF9CgE9+ZOnGSYsYZkVve8Ll/+TYLvBYEwXEpsyM0eSxQfL8O9pOSGAJDTG4seQtWpaqYfHBeg==","shasum":"64e0da6fe97773bcba68f009a8f1aadd843ac8f8","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.4-alpha.14.tgz","fileCount":8,"unpackedSize":12475,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdylttCRA9TVsSAnZWagAARPAP/RY2BmthZst4Ijl0cPNH\nzgyt2TV+xQXM+BKRbjlMgOSe+M/djtq+117XoLCzhNslo3aamZg+EWihyB2Y\nKjfS0GFNzXGpGwfoHkiYbwa9fU9DZNDg2TEo8w51bizC67f+co3vH3s4y9xd\nY04jFmwnx8xVtLBrO44T/fIoJM3WRSwOekf+SDXQpmXcm4O/ujH/hj985tj8\nvORoV9KBCZYvWRoxkfpFGf429rZo/jrC90ga81rqA6IVLe0/dHke6R/p36Hr\nsttahs39WfmkURwwrvuVnu3adB4vClOyajZoA0rVs0pmSe7eRKin/Q9soXJ4\nlGxJmVaiFpfuoTtKMG3njKXDIKCSz9V9P86XEkPMS7/VBcHEVNSAKyaREz1q\n09QPcknCxCMenrM0lESGbm1K8xhajEhD1g1Iv41wRVWAt4N/tvQ/rPB/FbFT\nNRER1PbT61bkC7TLWKpTQGEBOu2H8kMhOoNsbz9z8VuGvMsaY/D02K5QGSPQ\nzJH5ND5RZDYDvNIUSWpz7Sb3xvKfvPOhI7/WcKYFPPrwyCx8vyZkekaD8SWJ\nVet1PeSMdhAglsMpByhBZWWbcIr5d0ztWxKmMKp6POPmXsMfxDUNMTUBtqZO\n+FmtXSS9Wwbtsrjex5bdxH8dyztQfbkOf05JkfGlCvs3O+hN9d163c18eItR\nfJ1l\r\n=uv3N\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC5GTwDoY3SNcLOj6tHyUnCBzDYkIANJj1bfvogAzBkCwIhAODcza5I2Gr3f8uhf1FfoJwilLu34aULu9/XXdUw+XFh"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.4-alpha.14_1573542764845_0.018647061921640562"},"_hasShrinkwrap":false},"0.11.4-alpha.15":{"name":"@react-ssr/express","version":"0.11.4-alpha.15","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.4-alpha.15+826fb7a"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"826fb7a9a03196bd902ea6f692c22e34b479e32b","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.4-alpha.15","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-dGUyZIouA0Ik381Q5vPhYVzqECEiXTc5T+o63cWtiw71UUrU6qnPKJ90y9XCiMmm5vRdciC9ht9sRBQgrFdZEQ==","shasum":"ba2682d7ede2fd2b434a0d0b5f316473aadfdaa8","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.4-alpha.15.tgz","fileCount":8,"unpackedSize":12475,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdylxaCRA9TVsSAnZWagAAJckP/iAifs4XLh+C9IM5MbjO\n/N21D8ZdCTL/BSJorSYP6FfoPbE+8Iu87bvwG4xv1Yzpdt2vqZnlomPyE3jp\nxmc9nx7I1M3iwvPGH0ek+QCzJEaLfxSGIkLB4VrP2OcU2yTbijv174l0N/iU\nUkWYirccATXZAVKZMQLkuNcH61SMmRqLah0Pp+1y5Y9ehE7Mu09GtweS/N7v\nQe2+Z6hSGv+YrPdKpNYatIS9cniBa7acaFhpMpP8khsjLGeVfBqgYFh5BF8S\n8NZOv9LscHn6GatRm9soI67rlqBaAxSN6errgMduJlUwjyHRgmilz2ad5sgY\n+S/VtLu7SY95Y/LYQtMBewgkRgJObXKiWeCI9JDgr1dAk7EY0LgcvsHQYk6e\n7HJKQtRAwEqUeHv1wuIWCu/+aFsgx8y4VPr+5KogJPe+e/8vg960pA/vxlw6\nMRmlovEOgjkGinkYrbSBQFWkn1dspHKUh2qzs6ruoQr30DS7rCAsmDBvc291\nrkTAsByBszamKSY7oTxxgKzwTxWYMN6M6bgOLPuIrHIcWoGM9C9rcQ4gR/5Q\n07K/0fWqwU7WH1VzvocS/LrrGASNbftJcXvMptfSRFwiLbXutD6QYMaz2AyP\n0ydE3FfHABq/Xc/GbkjqwN2ukoWCcmP5l/r++yOTG65nvMkNTsXvMOI274Wl\n5k5K\r\n=SX2P\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCMUeLNCPsaBP9pOr9Md/wLNEbmzuvsaepVZSs/2X2UigIhAP8Zkf+2l7ahO9QZPjEB11qeYGRVINBDb/fr9xTwac1u"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.4-alpha.15_1573543002135_0.5409148670063197"},"_hasShrinkwrap":false},"0.11.4-alpha.16":{"name":"@react-ssr/express","version":"0.11.4-alpha.16","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.4-alpha.16+bbbf8f0"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"bbbf8f0115e77e89b8ebe3ae1393369aed1f1258","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.4-alpha.16","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-uo9eUHmBSB9bIbSSAlxi6PjZGY0ERnwFdtTpbHN3PSY19jxBVuL38USmHNnf1IhweOafJPkgnUm+uatTW/iS2Q==","shasum":"f07efbc4d9a8dc9482ac48350c82678ba643bf16","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.4-alpha.16.tgz","fileCount":8,"unpackedSize":12475,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyl0QCRA9TVsSAnZWagAAA6sP/A3PXMd83xxlb3rXCxDl\na0oIxmFS4/NMcZ+tE/ucu4mTTHNtsO6NRyC/502ZRUTEqlMIz3QXXZ1vvd1R\nn5rIuUpdgJAMu0nbNhwa76hlU3wJAsYhM7ZPG27vExs/nM18izaDab0ZsLC5\nUINOxGjY3YndtBPUe5Nhoe2q/q3YGfkaA37S2lYWVQs8gHRW3WCpGkv9ChP5\nJ9Wh3M7lYBsnNyKspDWLo/04M/TcBD9QKiczH2uPKDTtE04HSspU2NxD8oMn\n8/7Wx4lfGxRWZaiLSbOGpTUan2nG8dAcJfZJVBbUmoAXti2BWoGSeCYQa1ic\nUYoIN/YKs58/AiW0YAlq2fxuda/IU/y+f5xWE+ew7afucOXCvkrGrdzto5LY\nq5WwEPdrXdZuKEE6P26l29BahoP2KOP3PNFNvi923gve3pM3vBXQumOfmlzN\nZnM7KLXR0Ah+ZtRkhr9ETQPb4qXlmxUv/Xr/ABHVpkSXRpxKPCnmc/IJ+BNz\nUhLDSAJBxJE9wPeqggLobiK5M82YsYrOZyqdottT1wZqUARtZPPGLUwX9/dc\npJ5+m4RLGEhdd9ZHgbA1yPT2GWcfSgwP+8cHmTlNkyETLq2P3Lux0eARa9Mm\nCCwSyqkwhjOQX+/lkWfhmtQ/bagP63v5B8ByYmW5fxDMY3vY9vy3AH1BlNIJ\nNAih\r\n=QFni\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCFfw/mnw/5BNy/hOhlEEIocUDWVoGOYrR+EfpfP/X7qQIgPq7EP0Z1/VwwZtJhOPxJTgfpo579DHWtTHcyQy3YYrs="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.4-alpha.16_1573543184322_0.7424816356029402"},"_hasShrinkwrap":false},"0.11.4-alpha.17":{"name":"@react-ssr/express","version":"0.11.4-alpha.17","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.4-alpha.17+04c323e"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"04c323e081445a3b392e4601511bd248caef01f8","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.4-alpha.17","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-xX71F2ILPoBLqqMYtTDl6NxLvArDebL4gPgEIft+MUMUU4jvcsYBrQldncVmtKcbz6227mYH1inA125LevIf+w==","shasum":"3c2d7d88dc28b52d249a0335c5363fd7e9ceb98c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.4-alpha.17.tgz","fileCount":8,"unpackedSize":12475,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyl5oCRA9TVsSAnZWagAA5gEP/3r1RgKrinss7qNUo3W8\n24TJQ92dAQbq9n+R5UVpDMcurPlu9Y3GG29T31/Y8g2ruYLv0Qlf1oaWXa/I\nnMkPTMp44ulzAAN7iwnNQeR5hhAvgf0pocGTZifCcfX0Mrz/ZHJQX/Thh4SM\nVuCMnq4T4cpw5tz5X1/Sk2QtEezS7tU7rKj4hU6P7mRUyURbJaSFhjLlN2mA\nme4xb6qCglChQ3aKQOgpRWeRjEWFvz+l65Sl22b6oUbJYz2X9bZCMbtu/Y1o\nhOI63eHs9wBUGN6WDkxZWzSIgATW33TTXSNnoRSJ/1ftfSZwEG61FecNyANz\nWPsOUBbbtPpYPke1PtaYvYeYHaITqYLJuVkTtl/FCDB/KMG/jYisKl8qRQo2\nLwrYDOWiUpUgFbt9L1MNS8OUqLTd2oMEN80H4WEYc8hPPQUGxYrb0ztpdrbr\nKc5a9BCAMGJdG47u+ajt+oFuV0KswCkM6FSoJjnBgQCqvQitTj8w1QpTjVos\nTDFR/oxM9UUX4Ldfsaq1nX4dT4+yOKEGnigGOYpwSF6IIFZobEwhDkbhzyT/\nraYMpusFW+kJW8slC4LWUsHFjVhfFeFAVFfwWhMF/BwTQNJMhJzZBtbDrr1j\nllOkkKJLuEgBQymdK1f9gYcURZdMYMyMh0slBMABb+nzej2N1sq9SdA/QW6t\nUm+X\r\n=itnW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCwQ7sE3IeCcaun7c95HKISFA8Z9AdkBXIx24q1Ih01kAIgPsEM/hRNOL2fgFWBYSYy2PJfZXTO89vxXARn4BChWPE="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.4-alpha.17_1573543527991_0.7873173555164026"},"_hasShrinkwrap":false},"0.11.4-alpha.18":{"name":"@react-ssr/express","version":"0.11.4-alpha.18","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.4-alpha.18+0d8558c"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"0d8558cf1d813c4d2801ec01a8aff7075e655c87","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.4-alpha.18","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-1VayWcTnloBuPkG/qk5dgB06W3rc40zLQDPZtuI5lIk/6D9jVoU56R9ONaj6U9beY5/+9x9s1k8ci48g9j4JLg==","shasum":"68083f5e8918ef4d56cf5abe21122d9d666c684a","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.4-alpha.18.tgz","fileCount":8,"unpackedSize":12475,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyl97CRA9TVsSAnZWagAAIQgP/jQlOTk+zlkgxW8Ac328\nIVINYiqC9FMJSO2UYZwhF3nlOTsTl4oB8W0wqAFXYMxDkUOuJco7oQo/nBAI\nrYVXiHhTeZeYEvyKIZPrb35aAm/ecTvjGGe9+IF1+bSKQHc/bfnJo6EXOBCK\n2die/SRl9MROtKd8oJkmZJ3TpgGlXrwfVM1JGoursphndFYaUBHDlWy2mo8m\nKMAjnzq1fkwP2s7/8e3erWehGOe96JASEBc1XXu864VhbSv6vsz2iOvc/KDt\nqmJWE6/Hes0KQDcCb8eVjXGIAJQF6NTdXuEkfWjZNvpH2f4qx/eSSGxQKLOA\ng1S+5wK+/r98D0TUnOYv79Ypj+glY32Jg20QYCqBpJA40ZmYIYpkIgwkUWov\npotUj7TDFLWLABwwXTKT/FUUr/CA1HZF3sbdEo6bMhYpQxkuINQg9GFgs2B3\nWV6OKWBlqp2Ky5EkfUm7Ln2FdSOaBLciJQU6AkVtBv8FueKWqtCk7JBWkbFh\n/QMa/a3bvMdflFq9DZOCseGxCiLRUx2ST9Aa6NFR9CjLv71kcwU2jyiAvmjG\nwY5Flkj/z5mVHpArH4M/wJ8upe9zw0hkCmP6wUDMRHM9MfNyw+r4/EMe3Cg0\nxqmvWhpmu855iNXK8FPYH2QUVjP/TQsse5fX1/FOZ+HagP9GPZRK25yrEgH3\n44iC\r\n=Zx3w\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC/FyWSAVqPCCyxR0nIzoQ7uhfc0hMQn//dZPnhyAs/CgIgMLhBl9pOctW1HayApyXts+xtTNPCNTfXbXNxwmj4SAs="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.4-alpha.18_1573543802793_0.23990386075682668"},"_hasShrinkwrap":false},"0.11.4-alpha.19":{"name":"@react-ssr/express","version":"0.11.4-alpha.19","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.4-alpha.19+65faa73"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"65faa732548fc247bb20be0b0253366b155aa684","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.4-alpha.19","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-nQ0BvOsQYAXLFfGeKUaP1haS8vK4zz8wjZjawMf8mI4aoUuFSQseVFh00SvpMPAnKg8AITK4SBO+fQdblvprSA==","shasum":"d3ced18d2f89317e2a7af3e05eebc6d2214cf046","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.4-alpha.19.tgz","fileCount":8,"unpackedSize":12475,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyl/+CRA9TVsSAnZWagAAKJEQAIjSGkqlF/FFBxIm5U57\nQsMa7KDqr1/FUhqUhit6TcyC4nQDuDdTrEiuDeFuVxe3MuaWmCdaWnw5l2JU\nbOE0L+BwRcQfqrOSU0pBmsh9KqiQB40JfbO1Ewg29vFqusQ0AeLs6mxwW3YM\nYvZ4mzWcubtoG67c4KNwep9pgv0UBr35DM5hXrfwoPl/PHUcZssFGMl00Kqu\nReuqIVHYjzhu4nY8VYzkG0dJrKmo43EMmIsgX2WehZ5wyJQL3YaDGG2xqVHJ\nZivl0FN5+YO+JhBZ1kUZMs6EZPraSh+bwJwliuYUYlaMePErdmbmliPcrSGf\nT1s1Gr6v12Fk6mwI+00zEzsyA3jKt2sfY+9XpzcBYISwcJEWVLj+4jis7Vf7\nZde9Plgq48ScMhGDALHCkwlQnhv7S9z1g07ppDbyPGR58C/TnrsVnu0RcAII\nDg5/3OiBRm120wrCl+MnJOy0i6J1K2R/wJHu+iq1l1UZefsyJJGBefbm25qr\ntAxVhkmop7PsSgy+eSRYLrpd+eDCjYerK3v2094pLSX5HGxn9kVXtfwTMRxm\nsdcKoHkPxM3/IiUEKxWsLnOcBK80YgQ7ebTyJxUgJmBe+K29IMn/fzgg9dhS\nyo4GC6VWA0khrMBHzN1GiZhsDgNxRzvP1BtNuJ6vK6Kg0epLpVN29iKx0Ua6\nq4W+\r\n=sQQx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICis5/lQLCxy/lXR1nW8ikmINpDjyGCK30uyPwi1qo9IAiEAo1ZheQmaRP9eXofv3cAOHL2h6lZZ4Pedh+/TatI1+kM="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.4-alpha.19_1573543933793_0.7028625393650829"},"_hasShrinkwrap":false},"0.11.4-alpha.20":{"name":"@react-ssr/express","version":"0.11.4-alpha.20","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.4-alpha.20+21b4c9f"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"21b4c9fe524596f9f14daf441cf6e599a0684660","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.4-alpha.20","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-wO25R9lYeW2OAA07XTXFOsigStLLK4nhsT1XosBIptr2NmNduxmcBbYXe67Hc1ZnjxI+PpH9fH48lhuM18uXoA==","shasum":"e4b4d2f375a5f1311ab9775671e4557526ff998c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.4-alpha.20.tgz","fileCount":8,"unpackedSize":12475,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdymDtCRA9TVsSAnZWagAAdb8P/ji3SLzFTlJsdB871zcU\nt33ksfAK3cB3d5j7BW5l9CQTiHpixbAB8Uoe8D/gIqls20lg7j6O5T6kgXq2\nrIIvpqipZKZUZGZjRzYRhO+TZYLPFaJt6n3s4GRnng4oAtgGpBO1Ey3TKkza\nAj/Uqr65138EB6JZSk6J3YIl44piF2wTN0RzL4h4z5NmSMuerO1Oa5fGr6jr\nlEm9K2XHW0K1uxPezuFrqXnTYO+Y1u1GPr5epy0o/2AdPNkFNmU/wagg5gY0\nIQP0VmtR4YmOfsaaJNwDuydK9fWjGqAC2Na2+GZ6yZpEqIwir3FMPBODgjq3\nF4oAt/3fZC8o35QMLYvnc+GmUpG40LQbxdpfE/Ydr6W2OsvejTIhZhyxYd+j\nFbOZIUDbBQslfMwGRZM3s3bWszoPZe71xtwSedX7HqKKu0v+qllYmxG8+Rs4\nqUDO0I8mJkOuUgP0kaHgzwFpUbF3nlGEOJzzkMs1QE797kCZTV9BSjLTpIi4\nBhEajRMab2auhtT9+/tfHUzrgArBwHEIbQSrwlEwgoiYICDptmVSlmNW6Xa3\n5nF7RQ4Dbyvx9svZeOAKkHgc632bhP9je4+eru0g4AIYpqArh40005jad78f\nnW9Kx95vrYayoqR1wH4zVaoqqXUU0bDyi9BLcP1OHqdIkHv934A6vlGPMDGc\nJCci\r\n=+UjD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCGqTMNXtra25nkYHPWkhAGUE02CA2VSmZ74GZpF2LviQIgdBeZ7b8aLoLuGW+GR/7kGywpXGT3ZHZjU3rcZfak7nM="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.4-alpha.20_1573544172597_0.18156909918419628"},"_hasShrinkwrap":false},"0.11.4-alpha.21":{"name":"@react-ssr/express","version":"0.11.4-alpha.21","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.4-alpha.21+da7dcae"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"da7dcae4dbbf1e15984293fa46431dfb9ba39a66","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.4-alpha.21","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-vMlFxwWBFscc1LSONoGzvtJripuYatPTjk72gweEoA/gGIWr/7o2fkYdps7L8QA4DBwbHkKP2qUn9/cK6mV7lA==","shasum":"b859bfa0f20de1e2fc0a1294709be525b70ff48e","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.4-alpha.21.tgz","fileCount":8,"unpackedSize":12475,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdymFyCRA9TVsSAnZWagAAYBYQAJuseor2/CYO53cdF/Pf\nwf5PQ3i0NX1NiftrjmsUKMr2Ty0tK4g4+C84ucsWnsHhvl4+8xBv69T+98fH\nuRO0JPLSLBmDVytzUA/Wm+1rVNdwDAdIu1ReYn+JZ6AOUZiknWOLLQKXllQd\nuB9FF3bx73tEG9ddEpkr+nHqMdWpxGLxv8Z4WlhFrHyfRCu59l5i3xmEwKYV\nNzIl+kCZMuhxoAzk0gPDiIXtyJ7FdiEbfG9n3Pw+l/evoq+qLvQG/MJ1TPrD\nQt6qc9C3iXNw7HSwfjytQsMDTZDJok+e17Wv168PNWSUH+02fOA1p4dkGPF6\nThLw5dvvoNUmXxL7k0FZc7WVgFV90BfJy66Wi+bpZJvS5hNMlp58aDUdFDMC\n/SjObi0liNFeipSNmsrVEsWwVhpyVJdWrSbBOdCQZKT82bWZw0x1T9fG5FZM\n0Wss1GVi3BLUf7yoIU/BuIHoT9NfRA4GKo/waeuMp/H6MqYteYUHXl/vktWg\nz4HWmiH3Z/1tTnF3sFMHTtwunLlz8E1oNcM8O3w+VQGgPIvTuVNj6VZsqqtV\nmT47sNekyULaCp2ezpKht5SAfG7WuKxgmqY2AxF7dvadIZVNVpGBsJQiJQIQ\n8f6w4tQiAaL3OHje6rBR8Jo+4Dtf1psFxpNpd724J2zfuUHXPQOPWTuflHlt\nDq2f\r\n=9cY0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHlz8b/ZpEMgAETEGNalPqJdKN8Z3eFSjAGztNsS48yWAiAuOYBSz9VBhwyXjRaYxrs95/U5wymglSZXC7aoTLiDjg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.4-alpha.21_1573544306439_0.11525378507141992"},"_hasShrinkwrap":false},"0.11.4-alpha.22":{"name":"@react-ssr/express","version":"0.11.4-alpha.22","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.4-alpha.22+f376142"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"f3761424dab13d4df8203de4ca4b1a94952b0e0b","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.4-alpha.22","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-/TII2OAshHcVI7KqxXAT1naCbYJ+ORbeSbk7PhdCBuKeexIchcJiMy2SKBAJ2MakpDddfb0LGflxvuhyONN9QA==","shasum":"fa069271a9e245336f29f16e964d12a4e0f926f2","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.4-alpha.22.tgz","fileCount":8,"unpackedSize":12475,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdymVRCRA9TVsSAnZWagAAeBYP/1NZRw8sfQ97rBYNg3iM\nySjU+rXEzZ4KJHLOBGlKekHOslx1HtgMjGpa9HMrIZKkeIGPqj7PPUN6psHf\nYD/7c4p7sD0QVrvVShasCjeZbKijFa/Dpw0rh7jiMsljx7eVp2BYma4irTgs\nOBo9NZAZMw1L8SbDQ9W/tGRdtl8yCLJcJq7TV/zUbrCeW6lk2i3gdxQPUVKn\n00E2u6g0LK290HYemDNt/lsYXbofaAN3OQMIVt2n3hoerN1JXW8Ms6HggIua\nYe1hmMDCfBSLIIU2VDtJllH1G1NrbegAWyrrfZLeIQ+PSyE7MPKT4UKp537y\nLEwFoLmoMQ6Xd4aIXOnAlvSmILq05Mtu8EtJwkb5KxmhIE1ywHH25bSFBAF9\nBh8FvCfc2oJIldXzpOp3EwghYKfy57cpDVClTV9WmIXptEc3fVud/onpb7K0\nY96ukw0lkmFKpQ6CqWJYw6FKk0E+6yCAxgQhToGwFjXZ70u748s8t+tlAA7c\nbmUtj9lDrysZ+12UNyZlvzCjn1qEEkyezYjeSHDrXqQffGiFG1pKJgZjrMzB\nlyXA7MJAgkbUcdclZc1RkB1SzQnLKoE1DpXadcFk+ndHp1eYCgwYRwiaYDHq\nfMltyX1bmT4uaY+o2t9aT+r/C5n6Y1M2JLyOFUUhA/yBXw5fgD9g/ZCPKecB\nAejA\r\n=Xgdy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBAjVZH56r8LyoZBlieeRRqx+aKy5maQuoCgMpisF8MzAiEA4rl1ZsTIM8rFL4AMFUr5w3r+i/QnUkiVYgPyzzpVw7g="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.4-alpha.22_1573545296957_0.24241703762411726"},"_hasShrinkwrap":false},"0.11.4-alpha.23":{"name":"@react-ssr/express","version":"0.11.4-alpha.23","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.4-alpha.23+0a005aa"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"0a005aa799d1ef01b81a13f2629ca2574e57bd48","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.4-alpha.23","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-g4GaYlFmvQogba+fD/FcAM38bcV4oNQwqu/8i1087DnmEolrmcad4r4oSkYwa2B/sq1sZ410fHqOPNxhmCMvDg==","shasum":"26c33b65befa8f9884fedd497373bd5d1fcec98c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.4-alpha.23.tgz","fileCount":8,"unpackedSize":12475,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdymW+CRA9TVsSAnZWagAAutgQAIOF2SbnzbAbIk4r94Hm\n85mTmpjU8rWqrjqBJtdyMbeqrG9s43tPhqUvX9SuGYEJNHAB9Dlfij8r46Pz\nZi2xPINtTCsSEtwWSraTQwSNf8l1U/3mmjN+aLsFKooRgX+5E/rFtY93Nivw\nx/QyI24lh05up35ZTTPhglqe1mMD3pFSTpRxxvOREwMwgebo4ifr4TWof9F7\n4t2fTDhxNDK+VPeppZKy5xOyk8+CZUUjDwelrPH1a+3aZYnrveV4WE5qKluH\nmnMK4nGEx8RFsEdKayJWez41lPCBb5PcKXnEWRFdinxWIVUXC8aES5V170H6\ndp/9nkPaNTW3wXaYlocRIo1Md507jTkrJg3FbfTt4/0i+Ljwh2eVlXhIf+5m\nz/pnR5N71ZAbCcQ+1yUMVy8TWUxGg1SVXHCp2aflNfAtx4v4QslFtXE5CtEC\nAGUE56XN7QBCGn2pRlIxrf9o6MILrB7buSraQtxpsOmFzxpDe1WGyv6IJp7r\nOQfuKPm0qup3XPsh66RIGO+JC+arzae11UkApmrKb6iCZTFI6o1BjaS1/pEE\nl9AKgAM9H1RSiDfgo+LaqpffpQNQ3sMlH/xzGvg9VD24A8GDyNNYtd4FFGjd\nOkgTww6JrnNpS5cn+Y/qxND8BzxWiDorWhZ06G7SVeR6mYzDCh4S+FDyURIY\nfu2B\r\n=5CRp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDNxJuwv6osrT5MzBURq4nDcc9Yp6S9G0eCF3c6sKkggAIgaBv/Fa5/7QiyV5DBhWQmj0VW22Tg6HK4u45GIEor0QY="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.4-alpha.23_1573545405970_0.12860698194353914"},"_hasShrinkwrap":false},"0.11.4-alpha.24":{"name":"@react-ssr/express","version":"0.11.4-alpha.24","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.4-alpha.24+e32bf69"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"e32bf69119e9d8e59f36f556ab26200844f2de98","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.4-alpha.24","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-I9coqVULtNWsk+shA42IH/0nxapNU5BfHekMalaXHBApm6wIczvbQcoLw1qHBdGlrDXlCft1D0nNchd1PTb3xA==","shasum":"eec2adce8b5ceeb25578bedc29faa82f01a334f1","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.4-alpha.24.tgz","fileCount":8,"unpackedSize":12475,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdymZnCRA9TVsSAnZWagAAslcP/2cre4U4yTyaYMSlclnM\ndE4eWs53kUZK745QYpWS+SO0KRCg9X7aVgqWjDC58qKdoKpKJ0pSp/Ow1iOD\n2urY+TVDvibn9uukEcfqfBe4U6OsE09S3oeK4Le6T2+KEKiyumZ5Owm4huNg\n9Wt0zcSDiTSY9e/56zwAbvDTJ7Yjx6eB6Mdtb3HVknh4scdu/NrA/x56WH5P\ng+MI9EdypD/u1UOA4VeufU2anDU0Egjd/3sP4Ht6Gi1wddwgE0Y3ZeoQhxu4\nc6tss4x0DBNOyI32fWt8WBilW5Zuo4hxOrXkHKIA0DjV3/V3iOiKPhReLeeu\nji0x3dG9XNaUKh0kBOukzry7QNHs4ujOIqVb9pxZFU6PwMrAV0bkCM1rnu4C\nC2FZ/xzki7taxIGOwqmp2YQG015biknd2TMrYZPc/ctEccUPhwk25kxnQdty\nwxan2iVbk+29qopFhOwYiuDWpNticxt6Vj6cQFxRoFen1MIJEq7ZqtOHmozd\n7VTJhX6M3At/8Z48HlrFhciSO9Io+jx5APiZMZmNGHGTdIaU1oY9EeVruyqj\nACDb9zGrGd00Nsza26aNIFN3whnfOuU8U3yVienVqqwg/XzcZV9YThrGeVsq\nZg3sTBRlqDZI8ozVGqGpCNDU26RhjgFj80ICunU/0XmRXSfuRxUUXktFCXoR\nBEdG\r\n=NlX8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA4aG6BGV7ZaRqM2H7xAf6nnySAMl0ARe0u/FzD+cKzNAiBT1M73LsYIlpuSK64SDZ967hVlnEojA5DPsTgOjZg5UA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.4-alpha.24_1573545574643_0.7107113230210269"},"_hasShrinkwrap":false},"0.11.4-alpha.25":{"name":"@react-ssr/express","version":"0.11.4-alpha.25","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.4-alpha.25+0549f55"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"0549f55b891f8ebc7a1339d031d69ce56d4af3af","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- Blazing fast SSR (Server Side Rendering)\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n  Script,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n          <Script />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.4-alpha.25","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-26ni/MC4YFL8/AONluNFpiyYdRxhXCRmlo7ic5pXLUWLOmrhqIT2nTWPPm3iEWDYA29tQcVcsQUaTO5t+gUAGg==","shasum":"934b409ea2107d52ff8b0062b532dacf9ee20d8f","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.4-alpha.25.tgz","fileCount":8,"unpackedSize":12475,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdymklCRA9TVsSAnZWagAAk4wP/j30362L7V/JZsqnXSZT\nH8jn8bh6nfvXSZKGov0D2KnLYdDMA5sp08bGOnoA+H7lQV9KWW5e3pyE3Hdh\nMAY5qMSJWeX6AkM8J4HnMjaUpg+I/HJDIwbddLD0Gex3upQUw7gNqFrv4CfC\nfGz0ecvIgjXlFbRt1deYJoIBYeLFj64qvDv+Ss/gWZ5Cfcl/3wTUsH36jaNg\nEmNha3F+UlPRKN90zz3CNi7PJ2ueNtZQR0ur04OEBTNH+zgvV4Frtg0o2aFR\nxQA9aKPvR2SYGCTSUOv2A7X2k0G2TSKdlAUfmoc16Q447C4GQYABxRS1DjEb\nnz42TCyYeyIcg2xTNx9qYinvHjHO061GL+6lPvj51crAmkmhjRueaOGL22oO\nA4psNQvrgROyVLMmwn1tkikFSy/ZqAY1MqnerLFwjNXgy2+wFZbfDApTB/Q7\nWdYvNFV63YmzmOPsa86DHkFsEducCTkRgn9EoaTt0Qewe7qzOr5NqX7DfBiz\nJOVENtl8djGppR9z8YSOLy1VhwVT+soDzbYA2CQ0wpdoUs9i1Wzu1fr6ONO1\nVEDfwrekDhbgLrTa+vqGFKbth2kTPu05Qn4Tx76/2a17XLmvQLGTnOO22V0w\nUcChrvWbdtucJA6MlL7eyKv+5vrAsVBQO23HojnWOoRDn1LeAvuaTKEtnKOs\nWIhz\r\n=vwaX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC9Wrl00ewYzcmiyWVWet1c71Mh3oceeAMBriAfPJqMsgIhAI31+UHHU9ocMgLO18RpeAZOO1eJ+Y8aSf0NL1CTkYPk"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.4-alpha.25_1573546277311_0.5056959667298209"},"_hasShrinkwrap":false},"0.11.4":{"name":"@react-ssr/express","version":"0.11.4","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.4"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"ec108e8e80294f6fbfd519a52bca1329b7ba5d48","_id":"@react-ssr/express@0.11.4","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-dK97HXRwM2g6KEld1w7Wl6A/MfeJolY/1E7UAXWj5KvmZJy/A/oFYPXG/h8HxxnUD2cOtvyBfLYPyyZzyMiLIA==","shasum":"34c9a0c9949dcc0ceee036e92c726eac38efa067","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.4.tgz","fileCount":8,"unpackedSize":12423,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdymw7CRA9TVsSAnZWagAAo0MP/iYFo7o1Z2NnpjoyKgl3\njgOYYQgZgeJr9yYyVMwgKtQfmzHRYGMU321G51GfCCs1c2cvPMuMN9Z5FzHW\nawN808kXAqX/XxCZjjqAJaUZpVGuSEuMaO1gxsEkbG/iIu4pww3Yl4rqWAHH\ngJo2w4xGjAdDRxYvxDIS4Wwp3//52JaaZ7vaCsFpBF9mfTXFC5guss0qJEcE\nfIUNkibKBdH9MMrbFOB2YarRDmJgvvbEY50OOiz+vOmSTGuwo4RBsRr5eE4t\nF38XECT3Mksbz+OHX59YG0a/zIAO/T6BN90BuQ8k2AVM6GeiSXDqOeQK5wi6\niRQSQL+mFRpxowOnGMq5RnTdTSl0TZOSoz5/V1t7oZFlqRzpcp1GFoooaYgZ\nVsaCeUXpQa3UoSp9irDnMbeQ/igwt7RyvsCsanuouA6yNOS5sTUPQJa5xxVW\nQPyRMz3cDd3aYvgkriPKCA7mjjg0z/WVGfvH+H17mgrfgi0kVe8KGzKYOwpK\ngh/EK8abi669cYF8NFXQN6RQIKRhZ9Vd9VXkwVFdmW0JcvuxKItP622kvQ9F\nVmgDevGqrO/tvP0iv2saMrXFksyb0lqLa73Y7GypjGrjCspKKQRTleHxPkXK\nDlcmyeSDdecd3CaVqZs+6ELMwvdIMT9h21oZXBn79cm8J4Ju2o+Br2fXjPpO\nqOTd\r\n=QvPd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC+kMAY8/MHs8aLzxEhc/rlsfm0Hzgey8bbW4nEu+YvlwIgXuJbXNHz+K1oc6bmoEdZe2CI98pMzUppxJhP0pTt9J0="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.4_1573547066577_0.01360213208318961"},"_hasShrinkwrap":false},"0.11.5-alpha.0":{"name":"@react-ssr/express","version":"0.11.5-alpha.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.5-alpha.0+7fdb6ff"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"7fdb6ff435eedf613f75a97304a30655ea8893e0","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.5-alpha.0","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-+oj6o2lVQOq1XG/t7a1schSpf1xK5t0RCo1zapWqRkEAmLJFRYX8/KNBiOsRSIm9OWVwrY/Lt1QeNGm/3EXFbQ==","shasum":"794c76bf63b59bc664e9b6a7d311b9a4c86c965b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.5-alpha.0.tgz","fileCount":8,"unpackedSize":12455,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdy32TCRA9TVsSAnZWagAAK/AP/A7P32eR9fElaY3qAgFt\nkSTbU/ug0mwdPHc728Ia8MipCruhCEjlx2il/fzGK2Cr7MzCjHSS0ppgga1c\nrqcW1cNQFx8RRvOsebdflz7VZJUBMrnwyCIBHqsI1vCohykW382tivpV2IaP\nm77eBdpHge+VNzZbM+A+Saf/c6enQIFUhCNyYSeXAARzjRkLQEGXOyG6zsya\nAzKDkXoxQ+E0VmW0mHePxbpbz5xaSWe8VjLTGejYpMJh5DskcJ9AqlUR3DqB\nNwb2MLdhH1tHf2WoPztXduP2bMlHFkZqxs8yihRO0gDO6FMJwCNmeUfJaS36\nqEV8kW5RDKUmnG5HSAvJwQT1klCEbzL3hhLZMBEnNVY5h/+6P1a+bnKDq0jl\naPP6NaMN1NnJACshEHrNs6KJ7XMnvSbkSAOIfgWrSSe9M7yQaCdPPoxzEA+E\nyLt7ZYB+SaVPS3TKGBEncGWNgTrsICZHgpjTN/m3lWuAwrW7gkHiMo24pXbF\nwr0xfiSsWihHsN5Uk6w5hOSNc+E7PTzEQVS8hLlSHCk0vNn5d13ZrDer0EVJ\n/soaNBl9zpj6XbROjLWxvD+hCdy7VDQFBn319B+Oii0kF6v4rCTuk9FZRxkn\n2wF4wPrufFB6wiJ+g7aaS8Ssag6iVxJYmpHShQYXJVijPPR1nWYsW9elIIs2\nXYF6\r\n=HehY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDTaN+HrEy+57Zwxpo2xVjGMhOKRNo+Cd8a606MQvIAmQIgbWUqfIqIybPHjNfkLYb7KonLbGRDKXNYzuG8qwlBi9Y="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.5-alpha.0_1573617042928_0.10567356469747358"},"_hasShrinkwrap":false},"0.11.5-alpha.1":{"name":"@react-ssr/express","version":"0.11.5-alpha.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.5-alpha.1+1434ceb"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"1434cebd26db5989bc98111e534bba48b5c34f8e","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.5-alpha.1","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Mjou4NzMvGTw6tvcYyWEaNIKYQRI5R7h1UoA/OjUrhdYXkAOpqF6SyWDGEbrfcO3YN/quoDjkxzcxp39KLaluQ==","shasum":"721e1266d1ba75419e7fc699f5ddb6e3cc77678d","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.5-alpha.1.tgz","fileCount":8,"unpackedSize":12455,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdy38YCRA9TVsSAnZWagAAzzwP/3+6vRfqaYyVndsBdUtX\n+a9nKah7X7ki5HsbmwyY2w8BQW5WgZhUfdebIlLSGvOYCeAfLD+oqWoovjLE\nOv8/AuO1wksI1hC3sVDbYbxTly4jQQif4dHFLhq0V+ZUSk1ApqZkhhLrF/HM\n5hIgnZmVFGJHY64gHyErGHpq9e0Y1GgcQa+UETwl5qx4P3oSq1xwEG9D4cf2\nNkBdsGsK9Z+vaWMVPOGPXSocEnGeS1daYs0C/kKB72wYCjOWkNBSpicb7WE1\niq03YrwijVT7tyHEvxD5iUVKFulUNSBw21iji0BI4hREdPTILkW1PzVrkDTd\nLyRrD9VEzxidinikmWk2YZw8JBkbYVGetp2EUzt9EDCifxiKuBz6oaAhnXBp\naXqDvNzj/FwK1YuKGnbNtjOrsvrJcZ2bbvUBRwwBQnm2nwqagmXmG+Gb1GTZ\nT0K5RjKgWeArlnkhMRaYAV5o+vJfeSx6yk0eHYT+rq/amtLlPGYHzZNTY9uH\nMswAk6iUlIQKGVDwzi4pZMB9mHtWWic9qUx7DnyePd5xmp2vlcfVlfytUe6Z\nWcoH2p6//onBMGlJIG2wS5ogGsyzae73hZ5lK/bMyaS0Kz1vpKZ2s/RdQQXk\nYN4ikrb7be9eU16hpRlTKRgtShtrE+4bzK4Tm3eXM3E4EEkor/v5LhaVgiJW\npAMu\r\n=kLfQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCjAX1YR1ILLWBHMkxe+jUNxwWu7R7dHUDIfCe5VjbEiwIgGAi9Up1ZLd/0R9kYYWysnL6h/Rm2GfRKganD/g8lE5k="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.5-alpha.1_1573617432490_0.5672773572774978"},"_hasShrinkwrap":false},"0.11.5-alpha.2":{"name":"@react-ssr/express","version":"0.11.5-alpha.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.5-alpha.2+cf72b44"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"cf72b44966615e554942be0a03a73542fc3fadb3","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.5-alpha.2","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-ixBHz5Kxlz121oTBNG/dCxUxJ8A43l17t6u5bU2e5P33u7kSJsQ33IRoI063aIi49gpzw4pDAkalFBgaa5ZEAA==","shasum":"cfd580ba8ba4dd5e17f0229fab8db768e6cbdb37","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.5-alpha.2.tgz","fileCount":8,"unpackedSize":12455,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdy3/HCRA9TVsSAnZWagAAfUQQAKT+NjtojzIoVcLSNvhi\nXhYvnY5zCv3guc0JDUFKUW1caH84+fPxRTVNt3TrXnFqE7BNiPuDNgmHLKcB\ncDqCWsqc/su8q2TAwV9Y0pWSWhWnmoFYJM9b1sn2UxQ2TwReqc6N/xWK2j6Q\nivg3Yo6PdxE7n+uelwmVnu1MfMrqfZ4ky6nnW1y5SNstPkWOH76l/ijsLJYY\ngHjNav/nEmS6WvL4zlXb4DDaiXU2D6aKmMmf4kStgYABn4FZSzWzcpgQG7zT\npyjsSN6iYS/djepJrajZFezC711cSzcis4vvBv064Pc6ih5vcQRa+9FePiDg\nluwSo+gRgET0DAZBzLg4rFzWlCeQdaGfu4VIj5qUW2f1pVOsa902fUGTPN5k\nvzGqE0n7E6sXG/30GNxigidQ7AB9F4dPE8k6Ir2dwiJxJrFZLLcEBF/tNnNF\nO8811C6yS75WcotOljWBMgRtakPPa40erv7wCfzf9/4WjHOPKfyrwLEljAlQ\nI+WxpozpPyGIjXBNCrTzYlrJn6V1KoOPT8DM69AEHx8FDrWVLuLdZEau4IPS\nYC+Pu8RV9SPsUQLjyGx3MOGnJqtCjrBsdCxvuFIncas8wQAv+kG8/m7+9Vg6\nfcOI+9VTAiMBzaWAS5zMhEE4D4pjXbvBy3B68wLMyVmpyI63X1teGPOFzDaT\nDvG2\r\n=x6tb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDlhr07PZb0ZlWdAXL5QsDWTIQucFhA86MpQ66VsirswgIhAJkTjNeJHPv3FwAQpXluxkuKsgyPpp7M6g6NAkrVXALB"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.5-alpha.2_1573617607477_0.7721338018621822"},"_hasShrinkwrap":false},"0.11.5":{"name":"@react-ssr/express","version":"0.11.5","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.5"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"eca9a447c87b88262cad17aa143f5e189ce7dd1a","_id":"@react-ssr/express@0.11.5","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-nwiJ97ESItGtgKyuADWivd0pBNqd24gkV8eEfoIxN9ukdlSBVD19oLOP4gGw5ekLcMrlRTGCVQXznWpkoLJQ1w==","shasum":"2f043b0001138758302b18a3c0cc07fb29db0460","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.5.tgz","fileCount":8,"unpackedSize":12423,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdy4GJCRA9TVsSAnZWagAAyW0P/jICVsv++4/lr7/uIA7B\nqmeY7OlYPmPcTCOM+2nXIYjL2wOl+FsCRK8G8x6f8arjfhFa6WW0RpCGOHNW\nGhlwdl5r/kmCXD+SBLwF0meDCr2AzJ/pGlA0NJjSu8IC5NgqDhXJhYZ0VgRW\nMNE9xeFJScb+YDbdcTOp0OzRmb/WQqrfrg4ZSAShWll7xUIzCK942w9aoX4a\ngtE6If3k5xeS7F9alTpI+8v9L8yPqnLyxzOols5WP0skF1eNBeoRf4Hpj3kh\n41G1XqeCFmmzC/X6WfdOoXN2IGXuMbl67z1+aDC1tQqw1v0neh5P5inYV96U\n3Se8ZGElNQMMEFR0WlodhQEX8peMiCAQwAM8Znxo9ya9hSTnzDKKpjjtkYOM\nrQ5DphvdnYfUAqWuCdIRsigt+lEZhMatGCZmjaogDTGK17nmLPCCYAG9AM9f\nN3BMFbO9Bds97mPMyKiBhd+MpDbeme0dBTk86KNwC41RBy97kSP1QOWrhgIo\nZhlQNrRhl8sH4eHGAQzWL0hQ36L4T++KmCs8y2CwXXMfUxiQoXoQ7dinjWIk\n1S6QYDta5Cj3z3R7Z3/A3Ag+jvQ++Jg6HbqJguij7Wkr2Ak3IOxPSlv4hzCI\n1QD3Ix/wmLkl0RZKRA6PaKRUA76VJkUJu+YKlVghSZfQ+5RRwbkBabVenEZ5\nZKoy\r\n=FWab\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEjQpq7d7SnINFsFt9thIe4LdCCYNlP9c5l29j8x4OwPAiA+qzIsgNIfNqMKVWIDQnbOF9vzqmIrp6I2pYLW1zVdjQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.5_1573618056397_0.9093545198271653"},"_hasShrinkwrap":false},"0.11.6-alpha.1":{"name":"@react-ssr/express","version":"0.11.6-alpha.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.6-alpha.1+8ec1ad1"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"8ec1ad144d52edb0ecd9d492c8dc11e7df195e9e","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.6-alpha.1","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-4Mgecgjdsw1pRZ4elmLFpHyWx9v5a+93d0umM5/fqyC+wu9rsPHrxIF2FfzU7uyktEMVPrKN4n6cnHRVDU9WBQ==","shasum":"bee75424faee4ac8f4ecec0f1b994c449f6c8001","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.6-alpha.1.tgz","fileCount":8,"unpackedSize":12455,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzPlfCRA9TVsSAnZWagAAg2YP/11jeSp2UoCYugk6Ejt7\nJwdhAmKmtSSbnaokRxUz0YjMAhs38BJ5eFSfuL85m1eJahW+ogkIUczv+lqU\nxETIISwSk6A90Trkeq23jginFkTWSj3e6OCyPXr32LHGUs3Jvc8AaUQGWLII\ntHljgBcURNuMvFE10qboMsKIfypu7s0HAzOQiDeeltXqN+4e34sp2lo6tqJa\ntSK6DbZsubySCzbY9xaddnk/ELUjcA4rY1fP9wUAtuvpntqwTSCEPRX5G5k8\n2JQ8Up/tdWulDdsPRjixvoph3nIdAJpAHCM8E7e5ygQGKycZ6xvGDhq/N/r+\nnYN61moss5FforxCNaj/wq1o5ZM+TdqZFvDxlxkGAHxTwIz+8fPNJoWKo0io\nvfTCEE7KZ921HB1eRw9uMGbTZRibSxlwSrjbc5YMXDjt9XYYX9JJP2guBMS1\nm42Soefbl0mwT3s7KXVpqagbkFWaSX3vRagoMNw0AAjvF4vn57VO2gd6X1L1\nE8FCP2gKiLJImvvfwQG5pfp/cmk1/3aVx3uWyqYSVtCbGpO5OdgDS+2ym2xq\nQVZptbK6DoAvV7S8fPh8rThXkeX5VuP6Mr53AFX9TECAvIvlPENoJnARkf3P\n68h02/sx9HbcRMbDCCZmrVL2E8V3chhATd7D+5/GWEs37ouIrz8DJqkGH4Si\ndnof\r\n=Godj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCp7ZAbrAih85Ff2O5qMSLk05VL2FeWLNyKjcq49qHlxwIgPrlDj1zE42Fs/E5Fl9bH2qxpU3yEV35K6dYWMFnPNus="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.6-alpha.1_1573714271281_0.9629768590280945"},"_hasShrinkwrap":false},"0.11.6-alpha.2":{"name":"@react-ssr/express","version":"0.11.6-alpha.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.6-alpha.2+9d133e8"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"9d133e89bf545eef42c257c5f42a31ab7384f3f1","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.6-alpha.2","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-EomXL/rsyAbW+Oo138bkNmr54N7MM6BcCUvdTKD4FPffdzFi3lURj4v0CdfN3sq9wJ5gaPD1Rr9h+x7eIVwIxw==","shasum":"89ead1c1af57463b72d5a5902f923bd229e9fd30","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.6-alpha.2.tgz","fileCount":8,"unpackedSize":12455,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzPnvCRA9TVsSAnZWagAAoU0P/2pj6EKDP1rZLNDanywi\nj8Ite51Qt0iuH87ffCRBcIaWRpUiPG5gUg0lRJUGVlaMDY7TMKBYfgdSzwIW\n9WwHil1P01hlMctLVI9mY0mJtPSNwB+sj3iWWUYNvOiTNEIISmJIhnM5n2FA\nBDXv3DUBT43Vmj1hwJUPf7UzsxHD0pKH52wlohL60uE4GOT+yuzBjRqmudZn\nEWMPz+igX+licEGIAJW76usB7G0Z1/uHXUwWpd0g4chMy4KEfmHda0HrkfCB\nCzhGCUIuJsFTi74hFglI6b41BDABqumy6S7O5zGt+dH2re7jWgbmmgyqRA94\nOyHmSB1OabLQmwVZgk3kgmrs8R38oGvM4yX20rXZpBMb/+2Pq7l7FHWjNyDK\n6lRuHYnXB10tbfz1SSb15nM7Uei3mYz5n6ml+wY2Q9v7VD9hG/wTGiL0un8i\nsn2pqEm+bq+Wyh7NfZDjSQZAOfngLB6oR3psmqwSn6gXqp2aRvF+a0iWahTX\nDlZpkaJ1Tq+4ScqY/8fA0o9WwOnLf+q4GDAT7OoPMO4NzcQtdP9PlVtS9O/E\nu1gmXfEykpNTvR/Jwn/OuVT5jpFGqcnk19aVRVOW9JHVhTRGD5ULdV90GesI\nqfnJu72BNwVRc5eo+D0HnzZBHWfG4OSKOfvtpwalmeSA9HYPUbrJ3fXsocnK\nUETJ\r\n=eRC0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC4mT5jw+uYaDiF9UIv2ELBU03SqfMc85k5gvGGUD+uRAIgdTqgXCySkJLxroPnqBVLGpSHvnASL47wa8t8NVM68q0="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.6-alpha.2_1573714415025_0.8617210779286022"},"_hasShrinkwrap":false},"0.11.6-alpha.3":{"name":"@react-ssr/express","version":"0.11.6-alpha.3","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.6-alpha.3+6936f52"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"6936f52b107fecc64bdf35fbdb41bff77fcfd693","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.6-alpha.3","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-tNrSSX1dClOBM0TsQITRzZClF8c+3gH2RI4cVTfq55vr/2vOnuS1O7K99n7N/ofngMn5+CjDB/mTWsdjacMBnQ==","shasum":"96806d699393c7ec92f6196bb69050c1741f96b5","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.6-alpha.3.tgz","fileCount":8,"unpackedSize":12455,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzPtcCRA9TVsSAnZWagAAMBoP/1M6fmjaMGDH+2ftDt2Z\nvSZ2g1evmcEIcv7IcE9o7cCs0mbHP0souKiXkV7B0hy5wGs5rksLTb3GpSvB\nReryTZ2P6d13DJTP2R/WPdx9AzjrMlhRsbNsGQBZ2vKG22MN3aCnDetKdGDK\n9KLByS7PyPHElD0H5FYVCzpDNhC+v1s8eGEi1ucXnC/mu7dLzNMa133o/fd9\nAVFeVSVmYZiseSVLfsAMyX/mUQn3eZFt3/MGSP+LIJDCsum1TFYZ8kIdomZ5\nQxurqDXycgvrRYbzWuO4zS9cImxdQ0HKT2sc7x7SfwBtScpKJGiwseflfa6U\nzUZEBUp5fvgNLU0fegrqy4MUHfNd5K97rZooRHLkcltWk5vBwVBteWnq3LUD\njgnjLIvQE+perG2A+Cw6tusEYyXYlrPaWgf2vSPNy1/asAjk04EJ+ryXyiJG\n4ISS2cJECJQyTosyfRhlf+5gHcYj4bAjYeu7zVJEZ3rEx5b914pW93AYPKqY\nI4fK/frifcgBBMH/AhK7TFey0dcj6Fw9f56hBlRyQRyGLhB+N5TI/8P5t4pq\nr1gj+AHVgnay4aCSXhcjijeoyC5KTHN8xG0wbkcd86nkQw9tvLWM8BEqXQWr\nXhI1PHzhxbJujU3phm59YgbBFNXZNfrjoD6nMD+b2D/FNjMfyKwBGRzsresn\nBffI\r\n=6SCg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCT9AWO2Ora7ydVgBB10NH0PDanwAl2C3CP/3NLX5JE7wIhAPAyaWkWpB9WLG/BATVHL+e8lVDzeqfzZdyrDNMojYIl"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.6-alpha.3_1573714779706_0.37168369121775613"},"_hasShrinkwrap":false},"0.11.6-alpha.4":{"name":"@react-ssr/express","version":"0.11.6-alpha.4","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.6-alpha.4+dd2c016"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"dd2c01666a2136029152db9690962b8e27c93f74","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.6-alpha.4","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-DXIPP2jiTFWVhCwdd4JTdSkixOl905ZhyXm4isCdxBqCDp1yv3S+bTO8Y40wWq0/M7Uoj2jWDuv/ToXp7gzKZg==","shasum":"87f4e26d2edf389e8299a5fad59b36a63f2a4ae3","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.6-alpha.4.tgz","fileCount":8,"unpackedSize":12455,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzP8JCRA9TVsSAnZWagAAOOMP/1+pcpvOrl3xAuWJ80V8\nRLiu1tbFPHnwIT2IMCuhQJM3zPpzxc4hHQmn2PSJOE1udTa1OO9Zi0aj77Q1\nj7sLSwmEKv8gfHeX5MG4fBMxiJU0TotSZI+WgSlZpa1VM7ghf4GG3LulvfoM\nmhnuVpX88lSC/QWRkB77a2duzfDml+y9jLKybchg/+GAANt9jPjffdXcxKQC\nPDiYo4var0cX/mVQCovVXmNhmVIoAEecyObZTVXIa/CODWt7AXqGy03eKYNu\nLwR95QTo7ud6LfXxlHMNiHwTUz2ALcIucFMINWkkp4sEkYdXeXEEJ3HCnAby\n+uupt2YGtXKby+CqfnrpAiKxzbmE95JUb/3mVT1uuUTd4I4XSf/N5a2jmR/P\nzU+klmdorUwP6U1X9kbRnKd0otlBjsFi4Ksaal357ztqi7ukHdBGCD132LDp\nywH2M+bxuLKGh82nIo2GpeUmtG0+ZZH4XSwtc56lKRVjDiPcjUF/DZJwombv\nv1k2SVUSOnIXfq5+Q6csyGmCl/RglfGsj6yRiGFze9n4eQFR9N1Fv/+lfjyq\n+9gIrjCANobbUrwRcGLzjr9oGYltSMMm5UeZp8uu2DsDWCwRLUX4/s3ogrCN\noLl5qeqkZXlyM7HHzLZCA7od13VZcaH7WWshg2WOfU2De7CLLyV1a0mgm9Js\nLQLU\r\n=5Kx0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGtebohWPJnoNH2I5KNEvtz+SxQY91ctGblCysUdVL7rAiAo9MTRqn59hG6HQe49JVGsVEpn8+qd3mjgoRhNwJs4Gg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.6-alpha.4_1573715721084_0.4027382740825609"},"_hasShrinkwrap":false},"0.11.6-alpha.5":{"name":"@react-ssr/express","version":"0.11.6-alpha.5","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.6-alpha.5+798bc39"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"798bc390a1b9914ec8c92a590f424e335b24f402","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.6-alpha.5","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-SFmEI7z9W33AXdmWaFYPI+e73QFe3o9ZmXsviRtfYXB2g7mZ6SdDfHwvVRMo+zZnzJJBJeP5p84vjK+0CXjkMg==","shasum":"e6b47c8888d4374a7616d23c265530dea330f0fd","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.6-alpha.5.tgz","fileCount":8,"unpackedSize":12455,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzP9yCRA9TVsSAnZWagAAfY4P/2OSD12kaXIfClmY9VAz\n0aeIHpETNbs5/v2oCydwUcB3gY/eSsknNEJhhvP1KRu+IvD4Fqlwp/Ze75Xj\nTFCX1Wmxd4FwEsZueGQjEK0CYGwVbZZc5zERDZY7S/KDUdcWp+cXzfwaLA/v\nPrA3HDHBYs+dO9IYPJ7turqJM2djS3yjCBLMhMYCt0w3JkpMTNVLDasRSb4d\niwCSdSIJxyLraVyrRr4X7FPlUc+oN7knYvD9dxvt5Jl/57/aWmF5LzoRW5l8\noAT1GNSkVXbTLbbTiHLaIWhITgkQoIcWpwcC4rUZqUjLCIBt9AmrIM6TN/PG\nxkmr1mqtwLQMuukzll4nkWy/k31NW8vAu69l2ilJd6LN0AtO46njBqEFh4nV\nLz6r9u/sDHtnVhLgjeiq5Ro5LPGlppzuQYZ5ozALcVk3hcArqM1ETzw5clwc\n69XgO2oBRPIetV5shVQwXFwLNQ8pJgKa3RPcZ4DQB1/jAz0VD4fOJgZlvW7g\nfAtnt5BA9cDnpR2OcTYpMMSOdP3B7dJQHghFEykmiEzDTnJyIRMm7pRjo8op\n4pXKSimTD+6zMIOfY5pomiC5uMmt04EqdMSjnQvb/UGqhZkyEc468F/t5f6P\n8Heb+DzETcLOuXT8NEcdkzV/Zl/6gI5goXeo/MFCzpAFaq+/ldbtaX0KLBjK\nKlAy\r\n=WFIz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD7pcgByP5E/LMHwtd1p8zQ/m14qsUl1KVYp005USqU1QIgSmqj4BkEeHDcl8v8ub2S83nTG40u5v3Cig9VLPlIzw8="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.6-alpha.5_1573715825570_0.8124383729112383"},"_hasShrinkwrap":false},"0.11.6-alpha.6":{"name":"@react-ssr/express","version":"0.11.6-alpha.6","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.6-alpha.6+c6670c2"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"c6670c2842a6d34c271f71e197a354bf8e7361ee","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.6-alpha.6","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-8v0PMjWIkzFaO8gZwWsftmr/kNpED1OzUG5JcgCjSUdmXDWc7kh+XXcOotVV3HinlXvx3NJ3FsZaZxepmZugpg==","shasum":"c5d4dc67b3864c5d39af13602a702fb42cb613a5","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.6-alpha.6.tgz","fileCount":8,"unpackedSize":12455,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzP/RCRA9TVsSAnZWagAAolgP/3w8lv4W0czfPUUWfW2E\nSQriJyjcN1Cj8y7t17POSaiHkS91NEz56+KxVnyj77t+6drmoi16R6luqbFW\nX13+ac6Xorzb7LgcA+To2ik6iEIZ3fsdodJje075sNGLZQKcsH4i/zK9lDKt\n5ClUwvg91iaQpS5qkHmSCzEV4LP1Aii1mAj7H3XuCj4t0HBs1rFzX8JFTilk\nrXmeHKN9fbL98CW6ahzcRbnYmwDWF+JmbWJVDf0+yonR0XeGMZz/ewCkM32R\n+IoN9YX409gkcr7qIFJ0Wm9DJjK3XfLnb+9sc9KA9STJDa4JMfKG/6hDTf+3\nicLwFT61BjoNc1uynZMSt8Yf5EsnclNBaQcZ3Hb3mtX/+9QAMvwgtaAoBG4K\nUh9X5ZZzT8ZYzRHT+/a5VtGF9UgUuxOPx/ADK7nScTdI0GDyZdAums9aP8xl\npTx64TqOO+53uQMEaUNBJIJ1D7m7b52eBM+RBTSXASPmf2z/ZlckPkvn/sXl\n/lR2HesO8dUaWD0yoQn17ivW0lTAtp/D333+GLnJEO6alWF3Yh/d971Do22q\nEWFCKHHDwul8aosmMqt+NHfXm6sPCPC0QsGVB6J/AATatBcvcu6fUhvGCBtd\nxEYT0YVgOzj4GimkAQmCuiRy5U3PyYMGYB7sYWj1sA0TTKiBJGkoelSy1rB0\n7UNa\r\n=IQAw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCzk89ubha3uYsa620bSBQL96HN8SLbwtlLZhUWAaYUpAIhAL784AtEIsVynGhhvsbP4Rgyc2IzYvjPUbhn5YB/gWeS"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.6-alpha.6_1573715920753_0.4668911943704057"},"_hasShrinkwrap":false},"0.11.6-alpha.7":{"name":"@react-ssr/express","version":"0.11.6-alpha.7","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.6-alpha.7+61f60f8"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"61f60f81e08c4e8c017d34872e5322a39ed72ec5","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.6-alpha.7","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-VnSu/ijp0DtPBQZD0wjgru040GqDOihynjZxR7ZrWiI1DhD23cDO5MVYgk7UDrMl1deAdJlLfFIVmaB192bZPg==","shasum":"185fc46636e36dfa3b406fd3542f479bd2713ec0","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.6-alpha.7.tgz","fileCount":8,"unpackedSize":12455,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzQSpCRA9TVsSAnZWagAAZ3cP/3imHgSAfndvfsaVeb/i\nyLY9dR2gxFA3JESe7E806AwuIAOyztahQNX5YsU8kCBA/E99NvtVfwftzrj3\n0U466nZA6tvQHhW2UN3T24kT3c0ThmH513+Husgsw5RSHZyM1bNiobKjNRys\nV92hdSWHYuAKK5t0PYszaWiJmb3xOOqcskhaqyCouAqEasXjQUcZNYr00IWD\nu9I9nm/TfwE4eo18BXIN/FozlfGgsljHbxFKsfKisDWpTSQZiOtlq9FRNl3c\nqoMEa7oZm9WuesLrLKzUY2YTkOeNfYWU2SL7tPnTspjbStT7X4OmuyXye6Xd\nhwBVTInm14t1P3H1MVgnBO/SY3wdBdLIhfSRcQn+0ya/UQER+dl2+QC+GLgJ\n9j+8xy4QHKNYzAEo08cksLjNj2STR1cibTPVjy6zq4sB52OTc9A/Lyf3TP05\n2+0PBIs6PAhcmM/JbFQB/1JPhbgpCyqaJlo3MXoND3mroMGuEROb9uQUA/kX\nlL7jLoFa0yVPIPi1b6xRZ/FXAREe5HlqvRBERAb2IIuuQdhEYjX+NH7+QwXe\nagIVfSkfam2wS7Yk8J+qEYFXtHE6DHejLloXn/KcCqepdbb80cZW3DKjkp2i\nEswcU21XkWRZoC/O4Sf8dTLLGJF2cbfo/+VBftPxffwBkXMhra2iIQMmgXr7\ncVEk\r\n=4lYQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFtYRx5sKOTc1py64qi+HK3BDveb7KkUNH678G9RA2RpAiBP3mH6am0EFW/rp9GmCqg7dx8SRG1jjS+B7vYuTDr39w=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.6-alpha.7_1573717161464_0.14032947009988428"},"_hasShrinkwrap":false},"0.11.6-alpha.8":{"name":"@react-ssr/express","version":"0.11.6-alpha.8","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.6-alpha.8+e9025e4"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"e9025e42e8463bba34aec250c52fb42d7ae05b7a","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.6-alpha.8","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-fOAGAu8Gjl9+gvoEL+H9F0+OCsn1AKoCl/hnOSEgzOP19XkHIKsITNh1QLtWq0EJPFjC5SAqWSF5OthkZG9WmA==","shasum":"2494ce9aeefa2c4cbd009c3b5a277bc0e2f39b74","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.6-alpha.8.tgz","fileCount":8,"unpackedSize":12455,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzQUDCRA9TVsSAnZWagAA5CEP/1mqdK2m8eJIF1Wp2HM5\n5TazP3Qy777Rj68ufNsVQgUk/cBcS6aCrlHdxgLujjYLfpLCSmJYrrWRhHt2\n4mFT4iikzcZnPwCM1SrjHpbkOzIJxFhNmmzwd9Pjb5neXDSry+lfofAsA9Zr\nmQOfr19nNFUFuv986CVTZh8Qtq4VWosJoM2o0rCWb2A8jbJuuEb+o92nCd3/\no11EuLtFncLYZI1+32GR942P6DsKNCPCMwk0dcyN4MuiaPAFJ8GJsEZZ9F4S\nT/c+ldRhnhq1f34UsbaHRU/sFR7lmJHEaMUpVNstCRKB5vV0JVF2FVrhiekt\n6OelX6XH6MVadmYN9j/uUY/fT28QfF9b8M4waMgAdEZ2TOe7OtNF3p62wXfz\nyn4wvGBIChl5TD5nEDkWZQIWwhbtXlflthZkS43uHoKC/kIO1T+3MvcRYVWK\n8iXa/pJk/FFhYUcPuoha7jEgnHx9Z4CD6M6avOdaZxd30piNNlaAkBacrtjQ\nsqHkvtWfsF2flpE6aaW9L1GsUcijZJSQSRYEF6zGrkn7swoOKnU5TU5Wbc5B\n9amujVtyf2nDaT2MXE8ToDhOdcaGx/1AX9sK7oC0uE9o+vGMfnpfNgeJSEZ3\ncCQOz1uQ0LdpyaVQ7DnfM7mpL0lwW7cF0MLauC/yQbdd38+tDDeAFS1okXtT\na02Z\r\n=BSMA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG1ds7DuXJ5v7g8YdLDEwdCKoRdCt11IkjYu4zXgLA+CAiEAjyPQQasHBqmz597dyMskJ4gDNUY9CxKG0BmXJbEejss="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.6-alpha.8_1573717250956_0.6760348382043424"},"_hasShrinkwrap":false},"0.11.6-alpha.9":{"name":"@react-ssr/express","version":"0.11.6-alpha.9","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.6-alpha.9+7594c38"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"7594c38881af44405d2d13787cd1fcba68c9eaef","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.6-alpha.9","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-CjYsJCqhuqj2brtbD31MqMi+yIU4+SV21cB4GUAkNyt9+Vsk9LItT0huCTgbaBOtEZGZFkQDEF2gjVJgJMblbg==","shasum":"3c3b118278d56e8100855d21259252b25398a26e","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.6-alpha.9.tgz","fileCount":8,"unpackedSize":12455,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzQUuCRA9TVsSAnZWagAA8tYP/Avcx2xX1wnsSFhCLUOT\nQrs1p4b05acpeSR4smV8ZnCDHicJdPxe7U9vCZTP1rUpIkFG9ZA2xGuSqvkA\nt6tQbAlb3WE2vVVI7C5Vtrti0xCpyLQBwAO1wk5EleDJUUTHj0gnsRwEsoGH\nlm0Wkl6u7LRFLymuTC9eZCvm6XAxQLiMSlzA8QCptkcIcUqNCZ5zLD2s2uWN\nhdVRCso+E/hZk31t3PVo9T69BBv7tHKCiR5z0IOMqjo6bf0vnqqA6IKxhlWv\ncHbmRGLJP4TjZ9C5tl8EvYKzmtVU6N1oyrc+D8kDeegVbTNO8s+CW02N6eAk\n+ofi2sR+S61dGNBl0Iz/F3P5xgCFRiLVC6pwGkxH4V+LZJJYpupdEDxZCWB+\ny3qdTyFCUNDzC4EM9am/fgCkpfxxzfhdkmroxqTxtbTcy+/RZ6nYyxjFoQ5R\nirmIFNuAT9IOpLnwP0NmOFcSil2jYneirhNm8/q8XEqpKpIscIn43H1AA7Bx\nz1hTILMKSPnaLEZv/6WKb1C66DyRzU4acqSkVFohvG7tX0lhqv+5afkXbRBL\nGrmhytjTYaNncIfRl2ukSCPjRr320iqxekAO7V8Oi1dOetaaA4PRwd+tMPCf\nLT3Zgk87LpVVA5ppBrEZLe8Aht/C+9HzrS4IXWzHQmkaxWKh/3MV0YZuwxIG\nyr0j\r\n=pX5G\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHE7PMpNSJynq7zxmomNybK7yshXm34U8s61LxjMWRGmAiEAwIwk+ZaduUU3VwZOZYIWtsMP0wMwYyHqNOMgHfAMTUI="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.6-alpha.9_1573717293947_0.31241772491726283"},"_hasShrinkwrap":false},"0.11.6-alpha.10":{"name":"@react-ssr/express","version":"0.11.6-alpha.10","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.6-alpha.10+dd3df1a"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"dd3df1ad821835b5c73c3cc1a6e757e69adbd598","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.6-alpha.10","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-eBV2a+k0OusraU6/MqD7jsogbwgIgCH9zTTLfafyh045HaokWZIQtHXN8LHUtWkUI4sNLRBJoh2vkvU34znRHQ==","shasum":"5b0f651d113bbbf11ef127f8f175b1a4de0dbc2b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.6-alpha.10.tgz","fileCount":8,"unpackedSize":12457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzQWHCRA9TVsSAnZWagAAtZcP/3mFhDqC4PzvBFUvPE3F\n8N6+VZvSequTcK9v5A+dOzKRqBav8HZ8OqKFDbKCX7CAHbumsYerW6w/ogMg\nP9nPx1KTSnkmXR6LepRwXnn7xg0LtZJv0h5RlECQaWqF3XqWD5KLbH5y7zdy\nhNNASDeoIg/1heZCwKNul250OnoQ1igHtAqQ5DPOX9+ZUie8J4i0aO39QOaI\nwy9oOCBrinRIsT3t94MaXaPte43xLQkQ7RS5PAjFKjf32XteilZ29RMlhGid\nNZ2rX3uK39dvG3eJ6H4gSAe76dYJ5Ngyh+cFa7HUbTclqd6cddUykeELF3nr\nKFdJRxgqevDbMV4xLizZu3g0YE2N7Q6xgbxwYenNDq9TB5rWPD8I2Y6WNhol\no++zEJv2DQOD/gAuVSFazM3huKPQepkPHLYzqeQWCC5p1ltU7syZNu/QdgZ7\nEbmL/HcAhzAsrC5H9WBMNBgyZIII6qG1qqaIBb/z8giLgGjzhcMjNAen4aKL\n5xiPvmKYIM5Wnw8VaAmTCAWgG2/iSH/IIMOEW5EsVAZPoKR0UG7WtwNMsJAN\n+T0y+FdHnEBX5OVFe6937BYrmcA16YyLw24WyXeYhb72L4DyzbY7bd9nIufI\nA/mUoUZ4VDwT+i2QS5Cl9x6YZeKphNeLhLA8ioQVZAEwdYGBa28c6gQY+UTQ\nFj2a\r\n=gpqs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICkctAeAKjHQ70TMgNqEkpsN+62tWYko7QcBqR2kFZNbAiEA3kszInBuMB/Vuc9M0uVZSCKUuu40zbl3IFA7UJXhjKM="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.6-alpha.10_1573717382735_0.6802012594014855"},"_hasShrinkwrap":false},"0.11.6-alpha.11":{"name":"@react-ssr/express","version":"0.11.6-alpha.11","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.6-alpha.11+76c9790"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"76c9790bdab3cc46461af95bba1e720676653888","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.6-alpha.11","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-/GlZqHbhgFVskCpQohEEGHa6KyI0a9j+JhhF2pqyUvZ1HRIAEUBLRXVPG1QBtB+d7aE7rupMcXXjCX3kgr8w+A==","shasum":"e26895c465834aaae0b3ebe60c2a9e85935690e1","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.6-alpha.11.tgz","fileCount":8,"unpackedSize":12457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzQXcCRA9TVsSAnZWagAAkEwP/3Wu9jYZZQfQcp/pGgGC\nG73faAnILvvhl+Zb95dFIE9CpsFFjSNdMnjEhOTRC33uddXVzzJ7zfXTBc9V\naNCwTvy+UjZkfwM2pbnWlqbB7fBr6gOVthFIhQagPKSZFnlR/+SuHJJRlqc6\nS0kQtwS1qhYRafclNGcBhKCvW0Uxqde17ojuII5DOQAf9vGt9lGHAa3cWxNi\ndyNU0PIDN4OHunrz3rYP7ejP71knB5j114cpzRMRhw4dOqoQMjBcSN69K52i\nctO5WueG8DJqy/WmLdiKP7YdzWSt8QbYnTaZPU7ZjHA8yasJ89AhXsKSsUhZ\nBvij5/q7EpnNSCaA7tO/AmxY0I3H34Z6s88+P9852IWW6F9gfyXNWJLUsKsh\nG47NDbfbBlxv8xCZuNv8aQdnHkMmkIQxkkYWBtKMu+FbG1iJq/EOe4s/YwfT\n70nm1LACopkk110kyqucg60C6SjFRkqGT5kh/WZLo8qkFVDPo+BZHvdM8uHj\nAd7fULNKVdYuGTl4lLLcpMADSBJXPKO7jJ8lpdiAHK5IvLsql0J7BLYjPlKI\n5E23PVbiIN1MLFLMIVUaHmACVh0hKWzKb81asEUSNg1p7ANlO7VEyW0fft6n\nZiGuO8no2LX6a3VPBZ3R0s7HMx/+ssNPFD8aj/6xuREFfiXKRxf0h4td4xJL\nbQxV\r\n=LGF/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDpGJr+tHGzbnnvVsyJ4/pncFQDDea2eF8pv3HIxvEowgIhAJzeB4mTmp9a/BXKJSNfU7FgkJ5jFRaCHKlr6CvM2Tbm"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.6-alpha.11_1573717468005_0.9937149082576344"},"_hasShrinkwrap":false},"0.11.6-alpha.12":{"name":"@react-ssr/express","version":"0.11.6-alpha.12","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.6-alpha.12+3e31a8f"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"3e31a8fe5e12b3ed405feb6b2d0bf11bec83968b","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.6-alpha.12","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-At52NWad3rS1E3ajI0TgrgjDj5BDO5eqv5u+NE1APZcTxksKMcTsOs0Q+mk/0VWF7jqMu5aizK4ng99t9KOLLA==","shasum":"3ba53b0a5f83b18d82d93efca78f7a565e3cea3b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.6-alpha.12.tgz","fileCount":8,"unpackedSize":12457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzQaZCRA9TVsSAnZWagAAmxsQAJBm0wJmr6YD+9gH88lo\nQIG3jWX3uwTGM+yCE8dBjhPWXBOG/R+AdPXmfXkuYBcNbgcZEMNTuKXzDUxa\n/wxScyu0Xs6upLoe9NGD/+Yu7TwdLhhSkxAqFUe8AfcfG+iDsbzaJFUiqj6Q\ncSfY3uXlzB8aiySIE+l1SeJdH8DDgJ8hCNMbYdKLhnQyY8nyR3mm/N/8pV9d\nzbK0C5BBwwO6D/G2CS4R3T43Q0WUeFjZjVeCTUjcj+lUCbSt2O1Y2t7Mpo5X\nwqLW9tbj+28nrW31JGE6Y14SumJMb/hZiuLG/rhyQv+O262rZXON1Jd1U6an\nd/D9pipELltlb4dUfny2T9+mn21QRCVheKEh/4ALJtO4L/G2eLYzXKMFZ7tG\nmagz6nVAYZ5PS4l8LrjUpfPObZOlwG5M8QWOZRR8yxKiapMzeKXo/VPG8LXe\nSvHyjRG5e/XG5mcx+N/RRNJr+tpqII14qEmD3rn630ug5ot3qdzI10DpQWbq\ng8dJroVAc3HX3RIPaBTz8InPg4JSA79NRoc11J6z+L0bf6LDtSbOmbAuN3Ya\nLi2pV7Czv84xMCALpgNze2nXtt/NJTwCR2aANNorRyb0Gczbqs8kBBnJO/wK\nfGY9glt2Y+kFs/P28RHB2efRpxnyW1W4H+fBqtNzC7J5rvYgdB/GZnWDrdhV\nOlX/\r\n=weoo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDyfrd6eV6OgsHTdEH35vcOzB2xF1bfUV78Mybm5rjP+AIhALqviJ9g71TSIlvRsR7O3ybvC+VTsiQmU8R1D7mTSrX2"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.6-alpha.12_1573717656514_0.17649377044671977"},"_hasShrinkwrap":false},"0.11.6-alpha.13":{"name":"@react-ssr/express","version":"0.11.6-alpha.13","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.6-alpha.13+d2949f7"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"d2949f7b904729c4d9eaeaedfa5c5ba64214715a","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.6-alpha.13","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-nhIvld2y80CkDD2jL/gtd8lR0X3ETnInXqEVC+I61ck4fOKYu2wumSvp2ySWvAwcE7QFPmnFEAF97Oedr5bRqA==","shasum":"5667090b7d056fa8defb0e33bb0e825754b5c288","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.6-alpha.13.tgz","fileCount":8,"unpackedSize":12457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzQbvCRA9TVsSAnZWagAAORoP+wYEu0Z7ruuGa8+x4twd\nUIzdQ6C/zeGOeLA8XlZROLZEtXK/NweUW5EgsNImNa2AHmDVu2UHXD052/Ig\nodhHzFhztgp4vzEtsKzw8KGqI19nvOB223cYwAU6cYGDoIlGrOlMozFIQaOw\ndt1Cb4w2OV71lLVussunPeGUwU2DMLpEPaT/XiE7LVfb/oJ4J+VLGtaToe3N\nobeocVHqwAekTTzkVQQmpfyLmTgBfbYHqmeVIAOgZxmbE7oQlwykMyN6BxaS\nOFCs3qwgJO1vcJLubfr8bodVS+Yd4cMqhOlTAIv0YMA/roFrE/9F7Wr9KLW6\nezPy1BXOLs9A7Zeg5ihECDVlwPufiN3wDjwWFu94WUbYMmLITsPzXr/nzIlo\nx2slQ5vYmtp5DK62lyCbYxV1cSHjYWm6IpaVb6u/cuni796uW2eegX7wjLj0\neWNHVzegqE+prUR64HoQwFSnXK9ZJ142nmdxlwEUKybObIw050wh1nj36CSc\nHkikfnx/TB610h2S5qkPxxb9HQzkt/KLlKsU+ybe3IT3UJxozalEVuX3lFly\nytR41mlaP/t6sFZ7IYoj73QluquZ8rJprLEyWIbhh0kredsIZDYURmu+z1Gx\n6tIWCS9g4rlenEp52R9f5Wws+73abNa4TnJXUyniDQJ+6OGgKW9IfcOhRjvG\nmYKk\r\n=DaNj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDmGRsRYT3M2M+NtS8tp8pllD46vmGF6QZNrYRaGonVSAIgBxrtsqBXMITY8O3uNE+PU1UtR0tUAt84fer+6t3LvAo="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.6-alpha.13_1573717742844_0.2734884932416739"},"_hasShrinkwrap":false},"0.11.6-alpha.14":{"name":"@react-ssr/express","version":"0.11.6-alpha.14","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.6-alpha.14+0c5d863"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"0c5d863c2c9a001f14c920c2026064d67cc3ed1f","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.6-alpha.14","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-+OcP2fl3JftsmtUFszhh9w4HLhTiOydwuT8Qd/EL+O+NHKXxXKSDrB8Osm1k6fqM5/aaN+FJPe/A98hZLYbqlg==","shasum":"c9c03a559b28369cf74b8338a422240e8dac6c34","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.6-alpha.14.tgz","fileCount":8,"unpackedSize":12457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzQi3CRA9TVsSAnZWagAAlisP/iLWyvk8s0wcIJCRqvhz\nCOT0fqNBAhs9S5kYpKlKbp7yg2ujgDQ/meoBg3SNtZNK7qG+nWTvQsVd2fML\nWwP7XvNQ1Ia3zPRJnDcnt3yOWulqbv2ngqnzSPBaKP8249AMNkC8gW98qOz1\nOmxjbfyNx19skulZ1fjlcecDBhx/QlKnEfFEobq1ADnh2gwNBhADq64IvmPd\n2jmGSySKMMW10dsARjbRxqkTBjaLdaVL7RfxgCw/QNOOO47FInJM1fqvdoH9\nUpRyerGIuWQkLHFsvcwbY6M9onZP7LZfpsaMZgH6WCH8O0H/eo0sJZypDAjy\n2OroK6gIfI5Ik0Pl2AKW1N64BezUUBf3fuSYmgvBRS6QWHgX3s/lBW6qjb+T\nz0ViMoHI8PwgMpBgqUtQGQFrJuEEpVHTcnCtORs39f6k5mZ/DjkIdoZ3pEGe\nAm2v/cTDwnabz+ot22zylcQEyUtcAe9t3bQLiheGhrh/GzVKL49hUU4HlP95\nlYP1uqJ1Newl71jHztKmTENL5JiyIwGADHe5HQnDVMXXfyUZ/g6YAeuzXOfu\nTI4JAn5t0LZEuHyY2k1Bjyfw3IWvWzKza/9zg0iZcbEuA+DMjDMsMRFtmC+0\nTm5T3zzfS1olBFvCTUrfLZaByyK1MqhXexBkTIlleqZxWLeJ1wmd+eZ1EapV\npqZP\r\n=tuPy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCYIh3/1ULdzIgzxgGgmJoXepg8lWKQtUzXZtah7TiiSAIgJ3vi1vKJavl9050xo4w2Z2KZH9GKsFYSxwBBQgNo3NY="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.6-alpha.14_1573718198548_0.9551352035682161"},"_hasShrinkwrap":false},"0.11.6-alpha.15":{"name":"@react-ssr/express","version":"0.11.6-alpha.15","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.6-alpha.15+4cdf821"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"4cdf8210e936681926537d73674b7b65560152d2","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.6-alpha.15","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-eQ4CZZ0pmRdvczuhnGpKSeVzmZwAmAtYKR37mfCqsZWRoa6QYHrocHPmwzWBRnivk+aFKSbmPg+lzu6ESMwFrA==","shasum":"3c9af30300027c7fe8a06ada133ee219c4e39258","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.6-alpha.15.tgz","fileCount":8,"unpackedSize":12457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzQk1CRA9TVsSAnZWagAARUoP/AmIl2FbrBLpwIX3Z95y\nUbOnsShu9JdDsKNt7h0/2+4YxMj0l5C592rWz0Hz1wi9goiWvAvewYTTeDpR\nIFOvhGe27uq2rFxJI1Lkxdw/shcQWbEJHTLz6UKtEy8V0RcPQiqpbW98/eif\n5i6tSFTkdVBmADrdW1MXFlcyad0eJOnwsiOf7MCzLvEjrn+AYBh9ZxY8MEJ1\n8lr7oxrKAdiJWmUpuKYZw+fX3Xd29AFDJZfECtC/kAV3pmt1HeTU9eig7eOh\nf12Zjs+cxgKSK73TP5fpRZXQEUvigAtOZ0fGKG0rPmx8qx01pLg0k/7c2ORp\nkzNShqmgv7OjEqqpIuW3pRMn33x4BSwVhzQNEd9lpoa8hHNCGOWLfn9ti7W2\n3gVofzPxRgI1Sg4QCLlBFYXuZgrts+/vubjyWoCnV2K4OsYrqg0CNgLkZbe+\nVO9t1dgPvrYZw8vyalz82GVqW0yXjUwlKYn9apfzeoT2khmJ8B6htyNahYmi\nf8tBTYhAq70SQYtTFMj5UsOIUggHne8P1gmsnWsOPRKAdO3gpVRryJ/MYtAo\n11hsUMIf9TRwAIrag/c5roY35RPGpo1AysI+eeZKReG4mo3zJ371rcUDBR+n\nW+rpi+trBxnvqfHm6pXwyS9tc0D0XUrNvPiBbpcPk2q9O3shcoeItUCrU0x2\nLnN/\r\n=V4gO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGwGgOHj502gOgYGdkoAC6fcv5zGfXM9ZVvCGutqv/wzAiEAx4tZxkAV0zSaSD1MnMVl+LrkWoPeSI6xEd9twaOnc9M="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.6-alpha.15_1573718325331_0.7045403829414811"},"_hasShrinkwrap":false},"0.11.6-alpha.16":{"name":"@react-ssr/express","version":"0.11.6-alpha.16","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.6-alpha.16+5108258"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"510825814fa07309e0d61f41d26575266354f3ef","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.6-alpha.16","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-XHkpTEdChXoVzOY15puWxUlt5izTHPXV4dGVrGUzoBo4L00XRB38zk+672ULAgJMjppARDP7OlMP8cEZDE+JMg==","shasum":"aec183f063324084789e508492a696245f8fba95","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.6-alpha.16.tgz","fileCount":8,"unpackedSize":12457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzQqICRA9TVsSAnZWagAAvWQQAIoxSlP9eyHhikDm3hJJ\nZMzBDT8fEhVvdfwWcGYr2Yk8GcGQtVRCj0MCDp5zilq586qhUF6xFqaUzfik\nmPDVn1Tp1R3GhRfvsHUiIsVvSea3j/jRePm4caAlCXpKnJapjO7h6r9NcMAT\n/Q7rdjVwaLvC07i91oS1uoyVIjmiSoZ8nbBm2N1gOuSDbRIvoVk13HCXkyfu\nA4GA+DNz47Qmd77vwoGS+zI16eg7LIPbs9cw+PAq8D4mzNlEJ1CeNg6vQicA\nsMxixjTTjgnZPvyuBBAtVS+wmEZm0ESK9AfbOQXJlaNvLrHZiMxVt1UIMHcj\nK6qZ47p6yj39qU1L94uez66WycGSTVfoS4X5k8RmK3izmKuVf7+YdozvZJkX\nQDIjDe+cdbZfywiaoUTx/iYUR1293JE/6slA+bdBHeEpnbQ2DL9i2swC0M23\nm1AtxG41F8KEd1P3A5NxH4Si55RpI7mSKh9riM0BuIkIo/lMI4LnpEUTEGG8\nZ0NvbdEOGDj7+v75ACkD39fYZ5AXjROP4MsUghXGSiONNnhSqAnIqQlAdFid\n7DoLm7bjNyS6kvI7R6olSM21nfdG2/NozXDB9NFkSb+KxNiGC3SYPliay0sT\nwcorDQ7avew9ghdCl7x3CsgUDtaunsbJ71IzOEFfdEWxouCuQ+NcnRcwomoN\nw4Rf\r\n=PlMA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC2EOb1Q/hW1ie8pQzs9cSMwWGyLwwJGwDaWAZuRpHq6AIhAMxrrk8a9gYL2HkR2VTgkJDBgSxNvv4Yczrg32VmdXTM"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.6-alpha.16_1573718663880_0.788160200297789"},"_hasShrinkwrap":false},"0.11.6-alpha.17":{"name":"@react-ssr/express","version":"0.11.6-alpha.17","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.6-alpha.17+16bf2ca"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"16bf2caa7c4a52c4a97d9fffde0a23fde96e4b74","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.6-alpha.17","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-z2jYC6pxO7NlqNsjaJvI3SNG/iGb6GLiuTi21SiesW5s24WTw0GVq3vtvl2ocppOqrAFIs/XRe/mKweS4w3R/Q==","shasum":"00f674c924d881e61c13a967f1f3058626822b61","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.6-alpha.17.tgz","fileCount":8,"unpackedSize":12457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzQtWCRA9TVsSAnZWagAA+YMP/3KPHbaduwzYW01UkNSl\niac5M5gH8qOqJOLx6ViGCdgDb4K8/CRRWrYQzOV4bChosFUzyHdBWfIuM6i3\nZaVE+lgkyGSK1BLWjPriUQpRrJRyau4taujzEfKm/zQGziqA/IXeMJ6XnOUZ\nLLW0pq3PujG9c2bXqqctHT0kV32i/GrCz8uTnXq94Qu7ipgpcZQnml76BrX4\n7A3ZcOsSI5EQaLLn/gCqBdwenauIILDNGXV0zVrcEQVHtwErdCHPYNuS9EOc\nkoRPRZT/xaG5tZxCOmHAk5b7yvg1mSX9c0KjE9d9AyrN1jkLsXXqaoI3bzCV\nsKYcqS861tP4qOqGDUCfZsJW4bY4XJz+qCsuodbeW5JHb8he8D3aG8OQL2Q3\n5YxvIH3xmc1eWX3avSjogrNHnd8BDVhZ9wjC4MibnnG6AGwxkn9Yk63WZSQl\nR5dj61MR5NQKrQfnpHYTwiYVFluko5wVqEY5PYioP5aB4ocGmRs8Z0YZ+M2R\ncnWcWdJLkcfRRy1viE9Et1UE/9egeo6PhUoSdxG2lMQfKKCGOl9N36LmF2UJ\nP46Ab8bYUVuBNHsbNiyKCQNQ+SsgFZrEoZ8hu8JZrvUvmZEZ51VvsFdA76/z\nWDbtPPa3Ok3Nl1cVm5nisuCSURjNajzHCbl9J/XeyWD3FhCzrmcgHT1LEomT\n4Q5Q\r\n=A8w2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCTYjFuKq4PqSIl+gWFD2H0nM/lSQ1yeWm8d0ICJ8XkuQIhAKvJxN1pz2t2/h1uTHxA2BeotMl3Iq3cJJg1M1nNVBLo"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.6-alpha.17_1573718870422_0.3308797335328444"},"_hasShrinkwrap":false},"0.11.6-alpha.18":{"name":"@react-ssr/express","version":"0.11.6-alpha.18","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.6-alpha.18+24486f8"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"24486f8ad05e449dc237b4945823ac4b6232ad93","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.6-alpha.18","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-rl5f94hkID9Cqbk99ge5gpfxCNcbMIPmDtWY11fnXl5gkgSLObmPORbyJH6m2VIEB40GohqgMlCXyMRRib6v/Q==","shasum":"319741576b3fc91ef1bdc48b3887bf0dcf8d8bb0","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.6-alpha.18.tgz","fileCount":8,"unpackedSize":12457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzQvwCRA9TVsSAnZWagAAzhIP/jvM0MEKrSyvK/zpjax3\ns8ddNCuAlwH9/E98tsxSMGyvfb/MhJTXlgzeiEtpCzWkknv7iDLa4NZbF+Nt\nxX2yQGRshZ0boX85F5Ph3qAw4fyy90BgznZncKZe7A8t1l22Sx0aJ8uUN8/2\nVDtkteDJiEq1J05jCkokzg7awMXZdaU/0xoFghirBU4H0oxyCtBWuUfKXhKs\nhdJKpnJ8vSEyEqwYa88AwgXqAhuK26Ol28uHtK26lln2RFFSu8GHdfmvzQz2\nUy//x6shD9Yp+Q/loCEwWqgZ74h5piXN+PAhfKVuWFv0FUL5Eeq9fAj4mc9q\nuYkebKPOMftYezfmX1GnT/8abSHncCyXiMti1Y4Iz0MsZE0HB6+J7Ujsp4B6\nWwHY6HJ4EKK2m/RJCA0A+dl8ysG2hPHDFhBhE/xgA9zaktWbUUSpo1L+LYiX\n1KE/3Mf3LxvrDk1suhd2byLNXB558XJ3tFHyTHzyr4tejn9orRB+uBEzOeN4\ntev+kuEfG4A4oI+FzIsDIeRd+xPDN8ZQ/PTBNNLMoS0fU8fYaPAKSYZcIK1g\njJjEr+m38IUMwN9oJDncVI7bmaY5z1disEYc3nSiKKSfclDxU1Wau4ktlw26\n+p1xN3NC87jycC8Smn8ZbdfLekdoxBb7DwmsyIDVM69Xmvc7LyjT3HJzzHtR\nxXBd\r\n=S0bY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC0J1BOdi5g0/0cpz6hkIxu1vn7YXl3rzkqxoOjDpAAHwIgNH1biZPDghp8TTU8N100t8toB3YiSBLgXigz23T2Za8="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.6-alpha.18_1573719024204_0.8054621557567365"},"_hasShrinkwrap":false},"0.11.6-alpha.19":{"name":"@react-ssr/express","version":"0.11.6-alpha.19","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.6-alpha.19+b1e8a35"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"b1e8a357b0654d821a61cad7b12cb5cfc4a68eef","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.6-alpha.19","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-9/ZxfsHDTs20yaWrtCUOOSFyAvR8qg27BiAdZM1il5xIDeZgg/a5OBQ7uTu3+E/KGTQ6faiESiv9Ie8Ma0MI2g==","shasum":"4644e8595cb5e73c535cc076a3c2cbe2305aa225","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.6-alpha.19.tgz","fileCount":8,"unpackedSize":12457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzQyzCRA9TVsSAnZWagAAaI4P/20R1agCROEmvejcmA3L\nmgvgMVei0s1M9byD31aUpSHyXZX1Jpc8xVaNiDLTX+a5IA1Kil8Zlgcch/4Q\nJfssrNoLvfEZoNI+w8xVpQYRt9qjDK/JWNHUeLeRd71p4/pCE0itzs5oCHrg\noeiZjTi/GDP8Ftx3DoufYZpnEYIvgwt0QDWzZeLFB+YiP/UOa0UIhNqBKF/r\nKc8osA6Qx/17lWPfSuhyf+Rh2kUT1ZjxMGwJTtq7lCKNyqwBlVGtUmffxwLI\ntXFNxOE0+APjkUx4hk90Q+cwNevLS0UNuMtxy1lkhA8+0TFB1gn/ZXGcV47R\nPug8PtK3tV8XSi+R1XjgNy/yTRlhot5gNTL3pQSpWUw1pvjTe4KjTNVPUdRE\nlmLla4+GDPLjmwpNmBzcWbEPINg1vrdeEk7ZdTGYh3b1rf9ktqxM/8Q+WQY6\nD7aWcY5qjNODS7KoTyp1QeURyyOKlUKA+AU3MeceR4KXkEcMyRI1HSSZbbGO\n48qBJWbmEqzx5yQa+dibFnNwgX9BFb+Ngxv9VsE+lwxPLtfNpeA8CShqZ8SH\ncugsdBLI1SkI28SsvEtDud18mmj7BL7EMSRAVSFS3kssSGNae6E+PIoVGqT+\nHx1cb1ISl6ws5F+hIIkG37VHqW4Lfoxv73RfGLEKBh3M54YiDGlU+QPld49G\nUDzn\r\n=RBhG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC5KE2r/xhqdkIRstweOKRE9BcZMjh8EAXhKWWUbGIJRgIgF9ZjheDSvXMXMsDimkbiY3+QHf64p0YmfmPKT0H4F1A="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.6-alpha.19_1573719219370_0.39251378151234895"},"_hasShrinkwrap":false},"0.11.6-alpha.20":{"name":"@react-ssr/express","version":"0.11.6-alpha.20","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.6-alpha.20+ac223d1"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"ac223d128b7ca9998c770190828349629dc216e9","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.6-alpha.20","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-7BUynau2SwS6ks1p4Gp0m2Vo3QN50RgtukJzb/BBZPBqnq6ttgI7GeS+HiNc6fF2B8pNVpiFFkQ/67+aaSkW8A==","shasum":"7234981b7dfe0bef6beab3f5f31e5869c31d58cb","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.6-alpha.20.tgz","fileCount":8,"unpackedSize":12457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzQ1NCRA9TVsSAnZWagAAPJsP/iLrYe/IH9Hu3rLGajeK\nXlp+XgES579NGN4nFpg54u6/WRRDoop+IvENpeLMwvMAMefgZV3Vd490Dln8\nHlFodG7PlOLT4I1O4Y58QuaM8Jencge2bavdU+0JvXn0joeoQyxFtVbGXDNX\nCjnPDxbjBADHa4Zb2Gtyv7ioDXiW8ey6/rYMeatvcN1T1RhdTHX0l+gCFWoY\nFYnG+f3UKkGb7z05pP5niUNlZjgw9nQHtT53y0/2kXE/9UIRk3VUv+V1b1od\n8zqaY93aE30arU11cfH0NUzGXRS5bZ6jWN/2ofCx8VfQ79yPXsOgQypUTVJF\no06TlBsmVKALcfYRtU1tPv9PgkNp8dGjX5DYuFT1EpnwnIF5EFLR5EfvW8xE\nFQ0QUzmSCGXgQPcwuM3kKcs1+uTCxuEN7C1NhNNMYmMZxU9oSInweFSTVkRM\nPv9jSqRFO8RIQF34i1m0FS6uKx/nTUVxi7ONBRI+0GZ0PXLNdfKS/gQYfU7u\nAOp+XjMeONyZOYztXji2b9g/6kqemfwEn3ax5EiRVpoLnQ2C/iydt3XhhlST\n8EtHh/RLS0qBUKiPxICyudHI/GAcDHCkIw/aS3TT2BeZjbXvOldUn9meEZOc\nMkGpMSAeuotph8KuR6SN9rpF2GsfIK8gqDl45tvuWIjdDtOfFT+dhjfUf5Ya\nQKFo\r\n=iSbU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD1/LiwVm2y+RaFweVo1KePZLG4RBFccYK8TnowCNFttwIgPy/vOWCxkumfP8x/BFhjab/F/6+gUvI2tCYnS8W4VlY="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.6-alpha.20_1573719372836_0.38697787161335806"},"_hasShrinkwrap":false},"0.11.6-alpha.21":{"name":"@react-ssr/express","version":"0.11.6-alpha.21","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.6-alpha.21+f97fd98"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"f97fd98f295d44e11eb5b92553a905d82e90c754","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.6-alpha.21","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-QmH2bI7Pp85dtxqVCkTapAsd2cRIQtHFKMmg43Um9L+pxckYOQIXdT/SFP601ABPLtreWVexgPBIrbycxtwSOg==","shasum":"21f3cdc5f3765b021ca1aa39afc6bb8e178b9994","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.6-alpha.21.tgz","fileCount":8,"unpackedSize":12457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzQ83CRA9TVsSAnZWagAAofQP/0sQq460FH8l0QFx5cyf\nnMrkRJrkfc8nrNqiJ4XdGDfq0zxWt24vuCh7P1keoYykeQKezr4fCQRAtT5B\nmlSLliEt41UbbIU2wPqIPjSmNK2zGIxUs53fEEpjmqTnMFJAJcRSYj6k9owR\nyYTDyDd54gIYBO8PGmlq91QLNnCRSwGhG0WlfVzyScoDkKb632ABGnIR79c+\na/tFF2JAucXHHU6Iia+2mS8PW7otQeKhbehpSZ0XBo3LbJGi6jUwJvf2eIdw\noVSfZ+BKwI03NifIaQBiyN7rnTyEN9Pr72k1hEzQxA/aHxbiLIOC2INT6RdJ\n2qy9nXfM81HMVmlsPAU0ngT31hMZE5WJcHau+sy1Gzjh1Vfuc2PeEcpad41m\nMYR3dMuTdMT3He8lKST6RPeR/5HrLwLIyIx3Jjexg3hts/7emjoX3+oxtJlT\nR3bqmbbX/zbZW0XYh1VNAHdC1lYA4hnuaYh306wlIRo/vJPoHDwM79bD33u0\ns0Rb9SxcP/FVCwgoBREP6pTyBTnkHszR07Bl8ZrdXyccvAtPSTVV3glLBx/O\nubT9R83bS+nWKSkIDj5oDEb9UvLCZeU9Ef9n2RYkdtsc6pl71cy9jFnTaK+7\nshUa6ef9sabemzmr3JJYfV1H1G/W1ZLXvKWvwbflIM3KwssGHPJH673yXCiN\nb9qA\r\n=FEth\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGA2K7kwvSmGQ5FwcEEebcOVoZJbY3h/kW3Wnb5B1eKaAiBjiQ4lyc5vdtJMDvEphsOyFTV7yoXv+7JuStFbGUKsPw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.6-alpha.21_1573719862497_0.4887751291561835"},"_hasShrinkwrap":false},"0.11.6-alpha.22":{"name":"@react-ssr/express","version":"0.11.6-alpha.22","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.6-alpha.22+ecf0af8"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"ecf0af84119d7da948ebf24d0cde2b0799452839","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.6-alpha.22","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-aYsG9swcoUJuFimtV1Oe0degx9z82l+rCZhFbrKdgGSXU7sIzc2GsWG385yFGpdjTCM2p8SgOD9sYIAfzMlQBA==","shasum":"eb91f7424ab110b8376bdf078d118bb3a96d5337","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.6-alpha.22.tgz","fileCount":8,"unpackedSize":12457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzQ/DCRA9TVsSAnZWagAAQ60P/jOTo6NTsWcxQ7VHioYq\nxiUAHV3ukUsFI0tf07kSg2C4PgBuYu5DXvjHP0l0v0XvG4kuIjfrFu8SPQMO\nLqBZCvTHuu7ApP3zPiu3V7aSACnb0B/CsxtQeAjPlESB8DxRG2n+8ELYBVl0\n2WYPvVC7kmfKkxVTd9eoTXozCK7lWVSupXGJfs1xC7fXvt0xti1rbzyfnp8G\ncJcegDR5xc2X+RflbhmGfDlvgmW2EXm6rnAVBPtkX4jVMT1EzN3+63t3GBm4\nttiTm/S5AB3kTE7d5OAonYj/KI0XY5o4waEa2HjrvyBZLgL2m5S/wGDcoVPQ\nfQoLnKQvAC6YmJ9D0X/2bG8GqSLhsuCFTjTiI2RMlsL9QmyE/iyDs6kUw+kE\na0VOr9+T0QydE52vXA/T2r3jc6g2kn/js0PpsCdrHr1WM29k9BHcl8CygT+V\n2Pcz2A2Hjwx/45HE9NLS9tfGRsXACOvf1qsDdyXb8sjDw4Ko/gEUaTtbm9Wm\nEf2Fcpcy5JxIWhWwSxc8r1IpCzkMiqX/fBv5jysJMk8UwldbJbU8xZ4zUYiQ\n30iOtB/y9Bm+W+kaJ9OzqT20lJEGy5JbMD5W9/86f8XwrgG2/WCBP0tII1Rp\nhlOs8La5teIcPIz7dWKLQdNKEsKWBc3CAZ9B1bjz9Z/rrREiakI62ngf7ADM\nyOTl\r\n=tIYx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC64JIhw+bkBjtDPPMWrb1Sjj6VaFfralR14pwIVLm/VwIgWIeR0TU6tPlXIRDOZJJhzG1j51nDXX437OB2nGTDPmo="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.6-alpha.22_1573720002975_0.03651507214931837"},"_hasShrinkwrap":false},"0.11.6-alpha.23":{"name":"@react-ssr/express","version":"0.11.6-alpha.23","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.6-alpha.23+6230457"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"6230457c99492896be802300e8b759d519d4872c","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.6-alpha.23","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-TVXVLsGR6Wky+M2j0afOlzXhrj7q5UlrIE9Ek2IgrP1o8B8xxF8Xdroxc6HxkfkETA8+Qu61Co3SepGAThZkAg==","shasum":"ab41d4197be5c462de57b704a201083caa262d41","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.6-alpha.23.tgz","fileCount":8,"unpackedSize":12457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzRAWCRA9TVsSAnZWagAAQrkP/iPkFre89fNeu2ScYHGS\nQSp3PR5t1QfE9GBd96YNAuaUVTTvyHGG95D0f0ULf4MOg02cpBU8UOI1/V3a\nWUW8Unb5wtdw5rG45AWSUNx+PvhDAsziLO0owH4AD9yzq7dweht2On43rEIi\nK4IItdCsuc/Edwb1EVl9+u481u4kB2F5FfwvlmeHYPRXPh0f5peU+SnKemuJ\n5HxGmTsx8i+MGrcoRLG5IR09unWco4V/o3DRa1R9vLeBntnx6INfuT+ce6gv\nAkxxCsih9QHXbsB8oc7Y6JdyT0sjvB7f5yawuFA8RAbZr3z4dtYjF1qujg7J\ntCkFQEmIybhR9TCFcT8zNv+CyRkPNwUgcmtq8GK/iB/Ay7nV0Zx9RnT+h+fL\nBoknPg9C20vwnjGqn+GK0ljdvB8CtLRAzsKFVHxMiQY9vAyOBdC/RADO7JFM\nUit0PrwX0WEQlCb4Er5HQIxDHGmMW7yEQmG7LRObxK2urHeBckuBNRXW+tYf\nLLQCzR1iE2pZsCfMEpAqvS7EAu8K1LjtffxugdKp09vd3Aoog+pVKzSFAkbQ\ne6oZRZfF+WY0OyI3h65fBBqfobT0mApBs/uLECMU1YIsO+bPuwkjYsvvURTd\np4qMtFsxff/h0vE3nyV/JAlDbg8fVkwUPcq8M9prY8fwlz2AohKQNjyWJpo0\ni1nA\r\n=pSSI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC7RAMNFvamGztDGFqZsjGz0aqJQbcju9mtaY570/AwMgIgDKne7CEzemE8KH5ZGYOWNXJUFKB8guVFZlKLWkHawNE="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.6-alpha.23_1573720086104_0.478357449104885"},"_hasShrinkwrap":false},"0.11.6-alpha.24":{"name":"@react-ssr/express","version":"0.11.6-alpha.24","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.6-alpha.24+9e7ca9c"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"9e7ca9c3d71740b97b9b6827d086b5661b585519","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.6-alpha.24","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-MhJvwPAZdY6THu3VsZIATqlbXZC2D5Y9fHb3/gvil3EviMnpOxuDH7pkt1S25bpQJcGmDBwHR/QiH2DOa/aUvg==","shasum":"3ff4878a1eefe1b8f633d8f92908c48f8ea87811","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.6-alpha.24.tgz","fileCount":8,"unpackedSize":12457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzRKWCRA9TVsSAnZWagAAYcYP/3/rFWzwWQ/Jo/ibbZSI\nGiSrSc0ofQ1s1/EHEcmhmEEHZx1C9q5fz0gwpbXY99RcQtzv1zZAP85kHZ/q\nXWfYzIqeJYQQKtDiUxpw6JQZeEwuup+oyFi9EjvFMqCN2LDc4H5bMR3tVD2M\nQXMCwkNcfLFGvAGVfe4YNDDT+eu1rw8BoflLiWAyZaNUM7VAatNOeDb6fsTY\nMDWo6soMBgm2BUMzzRqiuOvrvATPBNyieISPfoJAHqx5aHwkRzwuJvTmblN0\n4PiIbUKrZcutbHslABbE51Z6/ZWaWz7s2gE8Taxk0vvrJe0HV3XrUhWueWQ5\nGaCDyFIk+urCcdJ5+syKIPGjUhmigwd/tOYcUwghsEj7y2icTrLAqHcl2AoQ\n9U9P42hv9lY1toC7ZCJ7t2ZLyNt6LBMHScisEsQcVbBaVLhSibnDDyOUuJxr\nPP4Q2SiMUN1dzG+zXscOH+MUg86jxdtaCn6+bPiL4encu6yQdpfN+xjc0WUe\nR7v36bvKi828dDvis6VV6XXeIsi9YgXIfjsZxfZVVGobqzOR+n9aFXbI/5dY\n8O3AK5zC/yxhaHDsys66fI3CgRWIf3GR0WZMgIyS5lH1Z9w5JLLkn+SagU4v\nXcoITnsMY5uYTTw3hYoPTd55b+9/C8WSvKN3k4mDFJg2WZUDOhI2Va9vMCNI\nBHI+\r\n=WhIN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE5ClejG3KvWQMfrBknal/OFoSEZEvlFbGOM61xVjYvlAiEAmyaFeyKgWGdOpRZ7AsURsTYi6q6xkQpDOKoT54IXGCI="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.6-alpha.24_1573720726398_0.6882637195343917"},"_hasShrinkwrap":false},"0.11.6-alpha.25":{"name":"@react-ssr/express","version":"0.11.6-alpha.25","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.6-alpha.25+aa62743"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"aa627432c2448b432d192ccc792e0c100a20f856","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.6-alpha.25","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-KrtZpXAshj4HtYgoaWoZj/b8E0trqcO7P6itUQbq4aesrAMYEkYi0NfuIxcfcX7d2i4V7tV4zds3MyL+d/X6FQ==","shasum":"8bd9e1adb7388053e8f0f948d0ac5329327d6134","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.6-alpha.25.tgz","fileCount":8,"unpackedSize":12457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzRLxCRA9TVsSAnZWagAAwq4P/ipEtpKInPA0595g59BO\nsm0Yx1nHAy754kb1XeC/hcHF5nBE2mibWfDutMTMpeZ7Yy6hr27ZPa1LSQjf\n5T7viyG9KyEKpA+OO814pnO/gR/1QeXV/ozg4/DgRWMJXvGn8vkJRMuvhx+3\n+YWSRxLwG+cmFRmmeNgfMHMceNPtZhIp2vWbPceyCOWwGPGu48ftrG1v5vxZ\npL8YpjqgMBKhJOKTC5HZQYD67M0a2R0WOZpDd3qRX1O6a+EgYgvOu1TxptBW\nG7N4OHyJ5/2btzB3+XdTGzgBOQir31OYo1lYZc7eOtRhu2BoGUhfk13f9c8N\nKNr9bbb2pf2zI3g0d2s7Wso/QVjiWq7P58eyUyhITHfjwXPP35gWzL6iACU5\nhxNYXsf65QHGJkcJZfJ0EB1WZ9CN9biHyntohpRJPEKik6H41elyttM1YASO\nYvER6xkwSiJzoZ/T2uJucvfnZIrNkmIjD9GQjelLysrOiQDkznHQY2w6b4kj\nnO7XjVwDpS/+c6j6XeF0fWYSfNJiEJa5S877z70tI8ygKELpQ3yuyAHo4mHS\nVnfxHDtSE3vEOyrwa/E3WxtDvr8x1LgyBb2XI3CWsZ6hao7l83FDYO7+whzd\n4cjN2aNghPN/9SmkoN5xxuzePll+iNoRa1ruFqoKyLaxE9/USGsnqz5pRopo\nbqkb\r\n=jxIk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCIWfgQGgNLG/HkNoPcSvm/Ytf/lH+ItpkpPXqxeuwlCgIhAMSPtq9wEblRHAsYXcQnLmz4oFW5rzOC3k3uoS3XNKtt"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.6-alpha.25_1573720816715_0.7304301837475162"},"_hasShrinkwrap":false},"0.11.6-alpha.26":{"name":"@react-ssr/express","version":"0.11.6-alpha.26","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.6-alpha.26+6a72e8c"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"6a72e8c732418dd1bf4ad073aa2705c87d98cd11","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.6-alpha.26","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-95P/9d100WonesJ9vJSDTPTkWfRSDL/+NsDPGuHkoGpOoR6Uc43CcdHMkB27pJGipJCmvLfZL8PnlsOfYpWJzQ==","shasum":"dddf63d3946146d34d6f19d2a82e4c1930630741","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.6-alpha.26.tgz","fileCount":8,"unpackedSize":12457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzRM/CRA9TVsSAnZWagAAHAYQAJKNeIJQ2LNHxpgDeUF9\nGlc7x6iiaUyRIxrdF8EYKldnL5Y2xRFLCfzVkrxm+clfs2fw6Z8oLDLUGq1B\ntKWeO+ra21UlNjjuSDrKsXozul24RBH4wSYIiso3OoMrUKCzgq2NoPoNFAUV\nVxPMAjGRP8tTJCKuZccWGZqMXqVmnLT1k+U4tz9wIaWz/V+9MmQHv53yJFle\nQiTAQNmk7kWmPYERDDhKqJBphz/esqP2uExg+NZTSd8hleecfPbSbzOJu8U1\ncYwNKToebHSkHUaMfj6r9UZNpSc0YkoKn+gKLNqT4HITfi69A6Wxx2+PGW+y\nvYU3wT8HaXGCTecwLIFfvlK9vVJndMtZamJb9QDf4TafK/XAYnYoZ6sBZR2B\nsm5IhCeNPtPmFWdZTGCK/TzpxFmrl7ZeFy94EoxmdCmow/uCPDWXSiz/r2C0\nk4dUJM0uf78vpjCnlzmUUYE95T3rVV6wIJFLqbA+8OCjnd5GRafOsxn+5o6F\nO+JL47CYOvHZBSWPaQi0m1rBmqa4BVXKpVTdZpomxSyYpRFiFOPAr6bZAfjJ\nYvmWM6O+Su19AjtRPcigOJ2V6xpdagViSbyDH0FDcOQh8l4RW38IYSyqVcEc\n6ynvEicGLQwYlm11XPANNEXy5/gYORX4x5DkskYTMpxAo0aZjgEh8eyjqN8d\nHjRZ\r\n=nHHF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID3aR5WaC/hJc/XclGgcCOCpAMwtfa7ndEgNNy4S95wpAiEAgud2wh2+rtBK1ZRS/0KifO2u6eeTvUt4c5r6r6rF3BU="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.6-alpha.26_1573720895329_0.6600487659797885"},"_hasShrinkwrap":false},"0.11.6-alpha.27":{"name":"@react-ssr/express","version":"0.11.6-alpha.27","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.6-alpha.27+18a9be0"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"18a9be0847ca412d5f549e929a6f80ccb2b580bf","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.6-alpha.27","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-gI8SQCnIjlNYXw9wk7tDJp4TQD/zTm9B1Q+4UZaJzUXtyooWdi/uj1ndlYDvluSwnmL8gKkkBaBhMdlrRz1PJw==","shasum":"497b5f1b759a73e1613a00249f0d87f9ca49e368","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.6-alpha.27.tgz","fileCount":8,"unpackedSize":12457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzRPBCRA9TVsSAnZWagAAr+kP/3OJL3f2EemZN/AasncN\nYHoWNME00VqCg0v5RG7JnM7NcDB9fcfskF2SvMKDFL2m9pVSZikt20nYy1L/\nWBhllpMDjt2c3jCUe1O2rlIpXyvaSsWhYxkqWXPHAS1pXmcw7X8e1wXvUzWl\nzr/mBuiD/wuGARaDnu5D6Fck/atrw74GjX7tXLXIgFZb4j6r3qS6+nTLOykD\nxx5NqRIkD/+iaYYgZRBOeUyhduszis1y3ZeKel60BcQk7traEblq3TKB52yc\nAimdVSajOcF+mBtyGWiFc8gUFkIXgTtgZSMeBUYZthhJPJlQsuBloT8vMdyk\nRbOIPURdRzHGNjMM1X7KdepC4rNNUhlUGvVW7cp1j7t4vEhmp7HgYE+bx1ZG\nthQKIwc0IvQtkohcHHYTJMhghlsatvCDruXEE1NkeUu/xd9IlLldxIiDNo88\nbBZXVtEGZuTiKcwCESc/kKQlFNRLSUvTU1J1qC9pY35trqAb+8vsUtOjfrvY\n6sRpltnZWqprZ2mXQ7ylOmkENPvGiKU5Nts5rY5FSVoglnF/CHP0PT1+7sqa\nWmV9lqmZRA1sGtlzZPgmCcbmJT9xxaMHTEu4k3UgnVdFQdX5xrePJ4FzR5px\n2QocfSpeQIRhOK9gNFVSdYwv6DQqb37sqXDsF0JY0Z4oaDYrSVryfEoYZHMR\nLPM5\r\n=ORyg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAEXJ6YPwmW2iH5fpngJiXSxu0voMlO0mmzi5J2szXeeAiEAqDLKgOkZDMc5Tyw7criSUh0hV4tC9PPApHOWxs2re3M="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.6-alpha.27_1573721025273_0.8439705388483887"},"_hasShrinkwrap":false},"0.11.6-alpha.28":{"name":"@react-ssr/express","version":"0.11.6-alpha.28","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.6-alpha.28+3fd28e0"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"3fd28e09f78171f28be8a9c644f0c22a5250acc6","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.6-alpha.28","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-w7Vk34ejV9geGXRIxlSR+7ywapWdNKKHL+FKsNUEPHBu4+vDExxQrAdbC+hvNupcq0D7VY0vl6kz0XXhTtTuMA==","shasum":"3ccdc96ba87160262c610e0cfdc5a2205eab72b5","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.6-alpha.28.tgz","fileCount":8,"unpackedSize":12457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzRSVCRA9TVsSAnZWagAAaxQP/RzkI//rkEnT5eZg7i5e\nJpL9RgWEby6Y26mj6FjoS5DWj3hO+HkjZyQhEXddjanuwVyOV2VxOJfjBo1t\nP8T2eHJuhfPTVirXsTaJiULYIop7HNaD6Jv2KzQG+WmrzjluU7elBV14Qd1A\nK6Zca+WWg2ckUnYn7EKC/2PC4dCb/PQWcBb/yQp4xRUolPf8VvGG2rnzpfT3\nu3rcaDYZJymlGw36eUs+US+10QI/PVxWOXwEiPQKY4syhtoiiRnGwsaEpdLH\nz5TFxsP7qc1CDpA7ndIlkjy1IvI9OTEbVKzcBzsRcrfeGX5B2QSMOLWfU67C\nYXDUQ3KrqG23VeDh8Ipf01FD5+0zarZqCEJO1xOMFMbbK8ucWDHL4a3ffwF7\n1tBA7c3zIHJww9gssYq0+oD61Rs9fyPxHtWoW92jdaGBoX1L7Hcdttm+Men6\nnbUds6Wy/NIkp+Yw5ng9Uoy9gtDBtgu9Hmsvfnxw//vEk/oVrklepL/XUCKu\n8JfZDO9CcWeF4ew/vp0XVdoKrjfBj2B28raNQD6MWzLBJV4V2e/kNA409FAV\n86St1YUGCVQAZq1yR4z+ZsXgoUFnWRXJAh/HFLIZih9WPAci8Axv6x3rJVEj\nz+mh1srqzwgSNwrLG+AvN/ASO+f4uHHKUaQ6G2RvZr0CEh2N9OPdUQl03hmM\nSGxv\r\n=+XK5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCpNctLjQm0GyeyT/JQ6tVbvMDqATkbmQF/eiZHr9DuIgIgZWDjAZJ5jc1xCsZgggLdeGTEg/vuQDxx/xdgCKJvxZk="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.6-alpha.28_1573721236616_0.19320469401165985"},"_hasShrinkwrap":false},"0.11.6-alpha.29":{"name":"@react-ssr/express","version":"0.11.6-alpha.29","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.6-alpha.29+b13f22d"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"b13f22d32b69041cc0dc0b9a938a06b10316ebf3","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.6-alpha.29","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-sgS8jqNJPRUm49q3e4CyCELAh27JAPEAGxNpnJoBVs8C43DwX4pbwYN+QzEAzNWFOfhDvOWMO6nuuwKdD4Q2zg==","shasum":"1a692ddda4824160e42448026b142c21c216da69","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.6-alpha.29.tgz","fileCount":8,"unpackedSize":12457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzT4uCRA9TVsSAnZWagAApVAP/jmnaCU4smXTHmVA5TlX\n0P6vjcneRT38YqHlRYwE8X0Gy7EzSB6vmT6E8ihkvBn8aEbmsvDrELSi79jF\nZTcbMmLNfZ8kkqS0APPam4iuStolZyfMx9nuJTF1+wBxFFozUK4J94c6E/ps\nw18SnW8KYuJz9tnd+GfICA29qeHx3OZtK+ss+tjDje0+osXONff4qfsZUYkS\nFHjR8NubvgmqGfOEYpLP3/dq3ibpXZIt8u+sbXxLvdM87/myTWu9UW6GDfmI\nb5qdmV+O1cSZk8kTHz/Rnj+hty9JNrQM5wPztxjGIsVmGIk4inx8Fv0gPPpO\nUYjlK6v0K3cj5AOqRtTsbq1fxe+6dHFSGZF+NfsW1pJFzypYiaIbkwKyfhrt\n4DLp2zR618qYpS0Tn5PREfGzsd/glsxemokbxE22hsgqlmonZOLl4ic+a4XF\nlnlAAntl9g0c6bu2Lc77V9o7iFEjW4Bw3D91t0jo1nfdxxs1mpynxwiQGRFb\n+i1efZsjpqybs0voxbDCJ0EnGrqyNimKml2dQoLrTtaxff6QYok7XVXqnono\n8RChFMCwDkkmD4AmAQtC22otu2ZAw9TfbARw0ULOj72gdf967AEmgUoPpeaN\nsrK3hdsAYNhlB9mAkBPAZAxo4hCTLdGld9qkhZZfQDjXZ8xT29rts+NoovDa\nsUTt\r\n=4F/1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCo4KrK/vaGMdBMF0r/uCZRKMoncVE4VM/9jz5dJtMCcwIhALgbT2IosoeTajp+4fwGq3t12HqNEgmQlyCSiZS+Jou8"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.6-alpha.29_1573731885926_0.42580708241041654"},"_hasShrinkwrap":false},"0.11.6-alpha.30":{"name":"@react-ssr/express","version":"0.11.6-alpha.30","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.6-alpha.30+267ed3a"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"267ed3a4444c2d12de2a9a317c10e30ab493c00f","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.6-alpha.30","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-lVfN8bYU9LpDoXN8ZS6eor89B1QtUw+4fGw5BNkACcG0wnOGq7ryaADMs3pngZr9YolP7OsdzL/LRmGVJWjxTA==","shasum":"21e58365df7ced52ead4dc4a644b80920ac89570","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.6-alpha.30.tgz","fileCount":8,"unpackedSize":12457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzT79CRA9TVsSAnZWagAAQfAP/i1feMBXFBLqVCxJRMUG\nOzK3iCtnLbUor1rbbClCah7FELV6C47MzV6+91hHQHRRM/6g7bBA17hv/rvh\nuVoI5RAEHOT62TRf0FWz+J+Ci/R+iOwGxts+RAdcJ3M10ngtyl3ZG99ETCFx\nrpSWqezmoiOzeoG5QnOVe1sGHLDAN4Xfd+TYklhhZ1AYtE0YRoT9QemKjMoE\nmWHQ+e6nZLmz/oRcSzHtBG1jUYIi87uc4YavYV6O0C/nfFHPvQX7wR/GabRu\nr2W5va6Fwdnd316QUZw6gZV0XJ2XGzf3xXU/6RFuFiwbkv9/4AdiCE/OfWyo\nQsj2T4QT6CPbP3by/ovDKmREPEizEhDzFJI0DHUT1OlA9ptwJK0JGmXo9WEM\nmEWVqlI7vJVd9jamBadS2/mnKCdyCn5BWY6HAiQemhwgjJwGsvBViFFR9ykg\nbbbiW27UbnsuYXvWh5CeigjMMU/tPz5A6uBoOGSgRVjLkBV31+fFXrdTKvwD\nrCZY8JQ2Sk1i/9nZoHukYy5i/vmkhEfgrRS2aO+LQDg8RfRJhVZNoTVSlRMc\nT9iy4EmwrFDQvcGii5zFpqm4GoYNgosmXqrxCDvoAHhm8aLz0l6uuVeGlNwz\nX40GBbNQlMUV+eGj2QzRgZlMUCFAFSpBIKnIaRo0nk4cmUtNOJCnaayf1kje\nY6G6\r\n=wCAT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDbak1VWehYnUpea6LwELF1y6xk/CZbXXpbjDOvw0CmTgIhAMKRslycmI4qQN3uYiPoSOeQN1N7DxzhN/iCor6ogScB"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.6-alpha.30_1573732092675_0.5214223563589802"},"_hasShrinkwrap":false},"0.11.6-alpha.31":{"name":"@react-ssr/express","version":"0.11.6-alpha.31","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.6-alpha.31+1ae8657"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"1ae86570685efdd8ba529dabb4cf9252223f10a0","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.6-alpha.31","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-JBTSCoj77m7OvW5xaGP3RsobZ6pOd4yHA6F6KwYgGOHebFB2v2Rxs93xmqPd08mDgeJ3OFj1QJcVU+3xnju4ug==","shasum":"c764ac754889a70a91d3edcec56b4eef5ecc9d5d","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.6-alpha.31.tgz","fileCount":8,"unpackedSize":12457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzUIxCRA9TVsSAnZWagAAF1YQAIvyaBT1PjaiS0CBj0fw\nrZl0COunARQV4Rm6EeYf/vtGnk093tj+LS56KHEfJV6Th3LmKV8her1uZUDe\n2sABaKXUf5tYCHBbNpNJdAieiWU8xOWquWXvLNXarKmTvyR+ggZQD8wJcHK9\nMdIY9CmlfA3UqFue2QWPBD5e3eHwvAdTqv/DaioG85cjyN7hK2I0aPGcfKSw\n9l0YqseLxlnMmJia5JlX4hmMm04YjH6UgsvLNMFEWS1P5Xn5PHgPcVSBH+Rt\ndpNPG2gykLF4U2+40nQNPaksjMESvg2qpqU9dH1wzZlNgB7l48Y1vkNAExu+\neyBns/5QEUNBoL4/9oRtuq3Bphiz3CA9w1HIFdg5ADF14JqvS3P988hO4O7x\nHtHgW0KrjHizLiZXRzspnhoXW/uu9xGk1Xk10VBEG7iTxEpvkoJKCWOp+MBv\n1e/pJN8igJuSmSmpo+GZxz90OYSrZVA/XR7oNrAjFRsLvG7DD293W+4RqXVt\nnnzLExn1B4JieLhIjto8x5+CajDABKIiqszJtr8vHesl9droH+j4JDq7MI5G\nwRdzAK45CS4FnzEs5FRiM4Vdp2Y6iG/ZG2XdBTp6nUIHvSdXyvhEIlYDwFA/\nBaZtPmQGO5uhYx87fbiDo1KCq0+Hzi/syvkodhpSXaqabkFDehkE38CfpFMQ\n/tKy\r\n=8ts+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBlyX70BI30egL+ily2fGhxU2D55cGHYPH0t4HvjLaGtAiAhvqQ+epJC4DyzWhVexTfcua0ZKrO8ZDaJ78bSPHGhsQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.6-alpha.31_1573732912798_0.21108564532993745"},"_hasShrinkwrap":false},"0.11.6-alpha.32":{"name":"@react-ssr/express","version":"0.11.6-alpha.32","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.6-alpha.32+230a5d7"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"230a5d7ffcdf3edfe979f29109c10d6c801fcc43","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.6-alpha.32","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-jboSoHIy4wveoPSCatXxmFzvF/YwrSvRgk2xlXG1r9nvuBkwxatw477YglbM+hH3YwIzymq02R8NaoldUKDhgg==","shasum":"9bf9fdb290f9968f5193e04717afbda1ecc5997d","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.6-alpha.32.tgz","fileCount":8,"unpackedSize":12457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzULmCRA9TVsSAnZWagAAHN0QAIquSUTTd+zXxmFUnEBG\n6B2JPiiczkDX48xKGec2o69HchbnLYdsArMmGW7SPMf1JRYCy82QUFuNwZoA\nxapJMsVx93Co3ixH+LAhmJVTKHjm9w1MNED/2us2NsJ5VmMP5Vj8AFZuHJ+5\nG7o3RDPxUJFzhfsjRdVC9hllfoRklzw3NIi7XapixKH16umPQNL/XVI+4OBp\niIkX1jkfNBF+THi97rpBhAzuq1prx4BSj6KQ3wvoQhtVx+uZdN0seuyXjo/v\nafRhtNE9eWSrjjwZ7mUsCQ7xRQLu+3Tway8cSKzmjRY8wFswNTM5DbyKQvdb\nu+B60s8pTPUo9Htnp59lGCi6kqjk4GTuDEzQF5maUpAsmzPKPLbePewLyKQn\nqWOjSBxNidVu8e1JUrzOaHruLPzZ+4+vU6JKY7+ztXr3wqmqlqxRPb51Sz8o\n64MjCmMzwfdjyOa/qvrjJiWWuaXp6WuK57m8EGiXTVhA7p2Qzh4pLlT0rFDT\nVs3/3WurdXx8YMtomN2IHTBD/AjitAecHXMgtmscXNwG9qlPqMlVml50COhC\nqQq64DXCpx80KQtjJelJcpmuJRKuo9j5j6wqy5Y4oeGycEVDfhRrydAa5Ndd\n82qUqvsw5xXFeqAoUMf5SJAeQpVSpZsnZmDeEb+NXFwvgxIXONgOnh+OQZ4l\nI7s6\r\n=Mha5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDJR8dv8Iksky2E8bVo8X2whdlwavYgZvhxKC5zDjHq7gIgNSQINcAU2P2+5UrtmFuN9yKEjhsGNiA91uVnfnX7R28="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.6-alpha.32_1573733093639_0.836032380509893"},"_hasShrinkwrap":false},"0.11.6-alpha.33":{"name":"@react-ssr/express","version":"0.11.6-alpha.33","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.6-alpha.33+89a29a5"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"89a29a54b8acd8b3151863b7f7f172fe96beeaba","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.6-alpha.33","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-mKy6w5uziwI93SEcOThNUhSY7oUrcjl39oPlroIJ6mOM+iFvf/upGbzLQdmWRL+7vJrd7VQ3m3cHaSjCwLJ/pQ==","shasum":"1ee07a73de1f9877db9815d7606b3b3bf2eb5fef","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.6-alpha.33.tgz","fileCount":8,"unpackedSize":12457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzUWSCRA9TVsSAnZWagAAAloQAKRsbXLXt1uxW56d2X+3\nMwXQctE+S7WGn8GYO9QXqs/vLs/gq1rHNwKucjiThNC72y0hNbGlcysk6tce\nvkAowqfgyVFVB4KMLPz0gwixNn0dfIJsu8Tl88vTJSywzvlPJTPQPQtegnKf\nIMrmpLpi6OkEcHkJPC8aF3NVwlvMnR238BGsxvn6tnOB0Ky6Aw7+F/lx2d/c\nFOO5+zD2KcMDcjk/anLLbU5UQUraeb9o2zG0MPxJ98i/I+M1aNZqO+J/Q/ux\noGIfEZGBfM3w6Tbu/2txMFc8nIs89J5CDs8veQThraSloD209xdK+qjAZoq0\ndbC1JzkwTmcGDj48XGTgquaVtSIZm7mdW3AkZvJ815w06LrISre0SWks92Wd\nn3ecw0NchGE4vF6l7s0seIcbLH9wo3AOQaQJLwEyo6YxPHjJwfqbs3uH28Re\n8I2K6UfMS6Ho7Iv0DL5bQOzLP3nxp94ytC9BRGWVbe9zm5gqRNOvly0Ge98X\n5EGUku1qPqQ3dgtc+VzrAYaBmIv07cJRk730W+6BHVCYtLa1X/Rld1/xhuTb\nDwkV5k7rsEX/43vjvD7BqTodGSyWXzMdL3Jx4SPtUJycPHyM5qtVWWPgK3gN\nO3LPld+b+YV0gr1SnEUPWRtkYxckS1hJzlO9S0+WRSsWMKx1SKJ0gkTAPFPR\negQ/\r\n=6mOy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHh//xA779B08cwrlN+c7VbBeW/11ROexxgzwVoKxdYpAiEA5qjqVK0VIlX9sAn83TEGx1cA7En+Ihij50Dx2OrnHSc="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.6-alpha.33_1573733777850_0.8738905236501411"},"_hasShrinkwrap":false},"0.11.6-alpha.34":{"name":"@react-ssr/express","version":"0.11.6-alpha.34","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.6-alpha.34+ae4bf0f"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"ae4bf0f2f195efd6b72259f5227d915f3972bf76","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.6-alpha.34","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-C1mBV2w3xXostOXW/qs5Ne/pEd8GUGH1Gp3ri9pgo1cmE2CtEgwJfD4DvvJtIEYimIIpZYjzrVj3SQmTbnJYfg==","shasum":"d2f40e6f74037826a69a48d0ebbc8adba3d4170f","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.6-alpha.34.tgz","fileCount":8,"unpackedSize":12457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzUXyCRA9TVsSAnZWagAAwuEP/2RRDEimABS1w4RWXkix\nCmWzNeYmLQ7Qd1xgpXBw4bm4BObynhSRfEro7dBIXF8EzyaBzu3Pg5ysPPz6\nb7y9XQbxmDMjuS3DCeYa8vi8jzvlbZEnVPIZ8Qvp+U0Risk2HDLRLSXrfo89\nEK4wi1uNd7WmnGblBtXdM43r1qHx4xICG5C+SivtTdx8biqN7dUrv1Eo/SA7\nVaRahV1WrO3dZosM4/1tLIsGpuBFnfG1Y3oLQGRl7EhypBsmwNYJcu2kHBS+\nU9AHvxxM/rhlDGBAqKXAFyYpuo1toAofP9S+nkeVvodsid+rFUpBl5r/zrFC\nPonWdcpZPW9fNpvFGTR9x3JVuCzTs2GSk7+yRoz+ZUzwJ86DQ9oFJL5i8dtE\nwAek5qqJRcEjbIKBTzY9hBd7NlLvnbXLKSGEUiO88oTBz3jtyzvQLCVnfPQz\nQAON92mZUp0WzoUv3LgztbQCKY2ZQzjSCFCaN3tynK0NMFImtbMn3zLisiqR\nD7lnL3gs6OfosWk3jJ6WgiZiiggb0f/Nb7PDApX4qI7nzQlFiZdWVi6bjGWE\nmlocp+qICzAPaaPRFhh5rih33R+S939tHWFe/X2W9Kep9WChaOfaHiPIS0fj\nqnu+8Uhj7VThqTieb8hDSLvNL0uW2727zDEXFMoMvtc31O5suWmfJaeC9gIy\nTZ+y\r\n=FY2P\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG6KGn1rSExv527fwOdgVhSHkXmfCRxJCQknYzYsvd4CAiAvVDZv7U99nxF0f8XJF6G+rwUqxUoFbZp4fOn9vf2NiQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.6-alpha.34_1573733873494_0.871715812471876"},"_hasShrinkwrap":false},"0.11.6-alpha.35":{"name":"@react-ssr/express","version":"0.11.6-alpha.35","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.6-alpha.35+890eeed"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"890eeed7b4a935a7ecf5abc922b462d1e030f6e4","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.6-alpha.35","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-/V1rYxw2cqqXkPXsI6Opuv39K6NWAghoq51D+37C0PT2QvmuEwLag4tLbquU9GnHSr+2lNwJWEOi5bSOM1abdQ==","shasum":"741397b12b1d0117bff71770fb2ffa17fa677396","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.6-alpha.35.tgz","fileCount":8,"unpackedSize":12457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzUdiCRA9TVsSAnZWagAADj0P/jOd6SVQexcaOXOPUQ6n\n4UAJ9scq+6fPG+6s8/3n1M6ggWeV6bLHp+YsMy16Jv27K0bym0WfnBX1oD0G\nKc1HGs7gk8v93Axmi1DwxnjLBlpaplUVkOF6UoX0XmTtW0W8on/4HtpXuDnW\n4ulrChAnD40cJwnZym6DFZ0face0ffwBeHlOh76uIzvLrf8zU16jOxNOvued\ngBI3UUNdz+5kI0ltd919randErwidNEIjwvIH+KDcLn9AZUZfoKKey2qmCy9\nHt9nt+befGn6lV/tP0SYuKLyXt/ej4LWxWqeuIcUzpH03SD1PKqa573inTCF\n7nwZuHgHNQd6L2IhXSgcj2Fxph4/Yx/ZBSngY4ig/LHselp33Xv9ewkIAEdn\neU3sJGkZ5vxnRTJqgYhYSq0mpCXPXzLl/SAN4gyQmgRlYRXOAwXTbLeAqhie\n9L/aW0iDqj8pmwf05fRWFdWTsBtqav/PzSWQffQVg5QyLCQANCHT14y+c2mt\nr2asDUX9xOvgEd2jhsLtfK+MA48wjl0Gyg9yqJm0BbXDDMGlYTUf4Z0wT/2j\nakHB0q/7q2K+tZWCezrH5LBZpTjQJIip1xdSyucvK24oZvXJJkg5BOzE0uX6\nHiqNm+1Oxd/WV16eiDhbzMW5bgJRV3rrepp7HJZJIvB1+xA8eE/2i28u+I3L\nrYiz\r\n=Zaqv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBXHUqXhr2JNFuxkxxZoBU6yS0dbNc69KS9xir0Oi/15AiA0aSVHnV0U2UjsbZPXPnW83yKitoDEUERMe6wB7BedXg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.6-alpha.35_1573734242492_0.6219299808787249"},"_hasShrinkwrap":false},"0.11.6-alpha.36":{"name":"@react-ssr/express","version":"0.11.6-alpha.36","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.6-alpha.36+c77b5fb"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"c77b5fb8d64db5dee7eb4aae3b0e089b73338455","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.6-alpha.36","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-wGhg2QcVtvbhjgqalipQIWWEu32tzghJfcQ09NiXlRFoZMGTz5uSM19N/uLR1nTINMrePmjAvnhlqc6iC/6USg==","shasum":"ee590ef0a602f1c706a85378d2ee281212396bdd","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.6-alpha.36.tgz","fileCount":8,"unpackedSize":12457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzUgcCRA9TVsSAnZWagAAoDsQAJXl7+Sao9YaYLDa9mGB\n/1Ps5WYsXncI10rkSTOD3J1bhozM7OABMYPF85dwSJb9bMYTdU8xcx+N9GNG\nZC8kHg0rPOmg8S0iHZWJSBDN+IvJ060TZvB7zeDzU0a8AJn9LVd4TrKiRrZK\n2HEaSwKkFi4lXQ6uFo8pnYqmTJs4eSoP3nlrSZ46SUxplaVJxbsIXsOqvgv/\nsz4jtAotpZixDAo7iDLw+KfmPMRGjWhf3+lGWFeQ78+UeR3q5ZI3p/C9MxLP\n1gLYws/HGqTxL1fv8r8+mayfhxiEUkS170R9wdNQbHw8kNWCESmZRccn4uy+\nfk2ueKu8BadEqJwnss9qWivENb+7p+j4RPkCJkbdQ2ywzeKYgCwBGOpW1m7V\ne/M1gF/Vgd6t8kY38/PwMTukkFls5nYpThVdJGteZUns+9PpuVus6Y4YHhYt\nJ/MNrexZJzQxiL3kaL0N0YpFNViD/pSr/Nm2vxXnqO2Qvgibh/gkbTG3sgw/\na58JEvy4Cqx0ekZdHWdLGqIbBrWkzv/D7271a3Db/BqWV86wDGR3HfCKwIZU\nFgbk0XdV/9bkcMze3AcJy4Jwcp0ikx7kiBsAzc7vBROqXQhnxWpZdXVe97HR\n99X6IRcTgBczoBCVJBXdCMGBX9xwKQkioC+bmk1VoAilO6JuVgMgg0Ozcvj8\nZVJm\r\n=JOYo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDzQoTw2PNOG0ztsg1GoGvB+yleBn9FaQlFf8zzjwD3nwIhAJtf/oJZVuNLil3qUbUgRDRwneqOvoov2zwaEZJTO92t"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.6-alpha.36_1573734427733_0.44682593240086543"},"_hasShrinkwrap":false},"0.11.6-alpha.37":{"name":"@react-ssr/express","version":"0.11.6-alpha.37","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.6-alpha.37+68da1d4"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"68da1d478499cfaefbfa0ec9952a6f14bbf5535e","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.6-alpha.37","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-KaxWnrRXKIp/VYxO+vPV2/I766oQbZQ+4aoa9YCJEOU6RdHsw4EVGv9u/3SUFEoBfYjDzfvMZwRtNLP09X2UPA==","shasum":"ad040a70a876f07e4a1b41d4b388acb796c4be15","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.6-alpha.37.tgz","fileCount":8,"unpackedSize":12457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzUmLCRA9TVsSAnZWagAA+SUP+wfXhsZAvj4r99Axm/sz\n1b1D1XhP1QaYuA9c0LcyqxOsS+PwUvFuCyJpmkEbfOTlUXzjB8LfTtFnUqq9\ncyXzDXiA+yA20KrvcMf/UEUhks+P16etSHPHI+jq1yM9W7Y8GdhUOwWiOGRm\nDHGrVJfFD660IYiSiWTZOuRicytE+fmOJQ3URNtnnCgUt4e1DBgjpt5Z1ZRl\nICGCJ+oZ2IhOgyJ9DmQL5key/Zc6EiQ6QvZHMIJjzuVVDLeWtBPqomd4s3pX\ncMt2i7N8rxXk+6sGL8oOE/d0fCwJP1QoNkcxhEqDweft3li3yjM3inWzDwr+\n0QQinRZFreY6N2qVN6GPa66wHq1OhrsZD2ABXbpujqnqivZvRX1bWZcE6bfx\nYwFDISFU5IzQlvkFLZqmxKoXdClblNOHILIwvneZnAiP3VEa1ISGd41oplKo\nChEOyU4XS8OR3uPHyeczwAmwVn1LGvQQTbrAZv14Dxm2vo7OTp5d9y5k17Mc\n4HSDhCxtd+BtuAAT1BCmyhAw/4tRd3m85lrst6aUdIfnKl9izdldh3cla8eH\n6PC33mtTzY7uMTkd25VVAgfRNEU50Uz0F5YbFtWHttBr49pzN1QYg8b75pcb\nggyagmxmgUBzEIJvmky26+YH4kBWPu2MOj9m1/59kwzaWRNblP0HMgmotqyd\na5xZ\r\n=H7EB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICc5LQMOJJmrEsz9GvqFjuz44DTSKbdw18xornm5VsJLAiEA5FLR5T3IVnS4EHBjh4AxHYkVGrABSjNGIKLbC04cwJ4="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.6-alpha.37_1573734794466_0.7797987917411033"},"_hasShrinkwrap":false},"0.11.6-alpha.38":{"name":"@react-ssr/express","version":"0.11.6-alpha.38","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.6-alpha.38+40d314f"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"40d314f27cc83b0190119e792048bc0259671e76","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.6-alpha.38","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-5cvOdaqlGMBcMbHuLsj5obkKEywE+B0nnhHeTq9elnotzr8rxXWYwpeFL3eKtj8CemR7RaC8kuUSRTpXnNnkYA==","shasum":"6dc584a36e85b27b573c679dedcaf427c1375967","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.6-alpha.38.tgz","fileCount":8,"unpackedSize":12457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzUz3CRA9TVsSAnZWagAAjDUP/2JkkmrpdLHpSNp+qHaB\nJ+RxMejf7RiU7+Elk/PkZmvgUHRGARql8k+iRDqQSXJ86GKfz1SR+KT6Z+OW\nfabq0VWrsgSjrzKdqhuuNBFjFwMoYso6RY9djhhHSflMPGJs0OIQK4qS2W1D\nBtdfr6wwT/mxdS9xrNxsvQhTvT3Wa37qMJlgg3QHnIardaXgwHP9Cn5Jy/rp\nqPzOPdTxnpxUQxLfWP9fB5l7+Crs1OiW4sqJuntO8Ui4bKFffD/jf1/vwHSI\nnkQWOld/aT+QGONNlwsLX1mtCqM7mgos/BGmOU0ZfazB7wcrnoUkXO9ZW04Z\n3VgGdOkx416BnB52cNctjhWQ8mWkp/fTmSrvumTb/k+YC5ZFzjvsT93YuGIb\n4OUBLaUaS+WR07a0d8Q+S1s8peUMHF/cskmK612c7//FFoKg4kV5YcY23bZu\nLj0K1jLVtMKzg5UGAJWwaQHjvAhGPDymATZ+9qVo5pe6XJV0sCGWKXq/nlEJ\n1bCKYTtE4h58Y+Tb0XFqrDrdkgtzSNZbclcRI+BSIi2omxbCu+uKONgzZbaZ\nWAbsI5+a4NvXpOqGfYiUPKyoBHZrtaDllSVe+kl9ZIF/pYDTgLxNnFL8m/Qi\nE8mJoQEFwbVS/oLQC6HwGOosYdkBlRq1hiDjlBPPTGBE5AAUtYbytqK1MjIz\n0oAk\r\n=06Th\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAjReHSnwWSwIAvyVt8h8QizJ1RqCM+JfIdqBc84Yl6LAiEAoSz5uDTAcsYu2TAU3ENWDimtjxp5APnRda0JPOYB+nQ="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.6-alpha.38_1573735671558_0.19877280356401217"},"_hasShrinkwrap":false},"0.11.6-alpha.39":{"name":"@react-ssr/express","version":"0.11.6-alpha.39","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.6-alpha.39+a813b97"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"a813b9722e66ae4e38126ecd6b45b1f64d06a73a","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.6-alpha.39","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-nH9mqVWkHM1HIFUcqNSv/h+8vUmhxYYol53Jb7NXqW/yMxcx5ix6gYqYK0Kat8p5/MkkbNI4BDUtA02lNkCubA==","shasum":"0dc4b8ad8667495ce5cd3596520fa187a2a020d1","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.6-alpha.39.tgz","fileCount":8,"unpackedSize":12457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzU3BCRA9TVsSAnZWagAADLAQAJYL7O5wX9Bgk/VPC71Q\nHyo3yJBW3+VE4yW+TKRajW+aUmU3NqEGJGtOhQ840xFhwrTSSMTmIkI6FGuA\nHAXimjtJVyYPa3lzCiXb9zihYJZXI5LYnDS1VTP08Wwj8GIXyqE2a7N6YFEn\nnortokb0QoJLchrnQ4UntBvNYC1mHUIZMh3lxtvuQxn+j88C3L1VH/jXfhtn\nuWExynFHSojYsfqOwshsI0dPcxg1dXGnpigBtypXF2Tp82MVNx3ulineLRbb\n1uJ2lBt0aHUEe8WgWycmFOzJVMGGJwFfR7X4ehVW4P7sv2mcIWKOU2pBgfdY\n6NGzefTuQ+3VrGlLNnGX+wleNLo/0G+2TZDWwdd/KCy1d4KBsn8xioOqOQ0g\nA5XxAbRVFe49N2ibVraFom+OOJh6KZc7iD0hRFhgyCZFfXTiwoCu4Vtx3uH0\nRgcY+gAFq6HU+DUiUOgySxGdIbE8Y1hQMEACLWnj75atXGqH2PiYx/cy6OKU\n87bzDQBFkiEI1k+UbRnuqlGaJPzUCVStmi+AsjpBmC3Hwhos4iJjgoF1cKcx\n3hy+wrGjAfcCM9lHl182bwYXvLSWGkpmxB+ZSo73iV8P8tFALDAGGuARyobt\nrAk/YoRbKTGahpxDHeLpTKZY17e4UvNSq8RH8ZYz1T7XI676IhFXPIMLHm9z\niqLr\r\n=rD1c\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFaxMrfAee/IRCy+4NII1KitJCF4rFWudGWzypXzE7WYAiEA1L5bByk7m/oomsu1tl20EunFR7uXS8Qn0nj3q/hkFrU="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.6-alpha.39_1573735872903_0.5035416171406866"},"_hasShrinkwrap":false},"0.11.6-alpha.40":{"name":"@react-ssr/express","version":"0.11.6-alpha.40","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.6-alpha.40+770adbe"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"770adbebec2bc2c9008e3167e25659c1e2ed39f3","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.6-alpha.40","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-nCu+7EI9slnQuWlrjU8dpdRgUfGuRZlKoYKab14jptbkbBPaJndYq6ZgRnqu794V45bErpmIKEitTslDjvBwRw==","shasum":"24154fc6856246400c57211b0c6bf7c9250bd481","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.6-alpha.40.tgz","fileCount":8,"unpackedSize":12457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzU7ACRA9TVsSAnZWagAAQ8cP/1QLKSwnQJOap2Aq+a5U\nYiFyqp/79rAtYTog9LgyxJr3xHCEyNiYAUHRgkF3qMg8uodsF1WLRURqXhEb\nDyt1/E7IJI/DDcUCh3eGwFuisPS6eqyeHui+vE/8FHxM2xHa8+UMC8u27QBs\nJSlNP9O7nFX0sTdtLNUP9g3aJ7x9rVbPOynyKd2/+bkaBfCGh4dP3QiFL4TS\ncB+/StkU3xjqgfvM1ODD5AZS9DXH9olF348cHEGDz1uLAHpc2vFBrN33SCE4\njByYgt7rwM+ZQAU851nIZXzb2EFquuAxDJfvQ40COYLblclWQo+sIVIYuCE4\nlgZ5E8HCTjKkLvcb4Lj9hBh9V9XnzRx89fPCdl1pqQkQxomv6XCkagt4YlkW\nDws17uMk4LJhXtTq94HrbDYS93QVvuyAI41LI6IXQbcMjUxNgIZ6oYCCvpPE\nV7fvKOa2rF6ErB1XflW3i2LbtmvwPEW/drYfq9zVi2fkJ1tbXV/p1ZPoa4C5\n2HkZHUc48QHULCyY8E+Feg0iipg+QoZy3RCEV0QrtdEJuEwh9ucXbIx3suqG\naD22EmwzuiJNv/vO8VoIHXeqq8DKreUJy0mHP9UH/9m+wFCy+WBl1Xo/r4kx\n1N7O8YFGN38K5pTW+U1DGs8x15lwnte9ZlIoZfaXyGODFUpNORzJbavgrKb6\n73iq\r\n=Wr87\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC3Dzxaka8vCy+rzVL09aodMHXaewotg8wOh7LqqqNamAIgPVCO0A8iZNcRn75p7aQ8RVz5Su4mIkzL6FUoAaSb/m0="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.6-alpha.40_1573736126929_0.7485253208711671"},"_hasShrinkwrap":false},"0.11.6-alpha.41":{"name":"@react-ssr/express","version":"0.11.6-alpha.41","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.6-alpha.41+3bc6482"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"3bc6482f66e0e7e4683d070cc9aaaa67ccef4bc3","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.6-alpha.41","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-DOuSWNnC8KzpPcTgefgqpxzU5hT8KHfoAa5sXULzeGAET1F+uenAkgkDtguCH2DQrsOsfX87ZjvNxyzS+jpXEA==","shasum":"8c4ad7f747057f984f4c2e3b6cbdcdeb52701c54","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.6-alpha.41.tgz","fileCount":8,"unpackedSize":12457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzU8nCRA9TVsSAnZWagAAQ4cP/1HtqQ0sg1UWta0imVvO\nBP8ETf4mwGRF5NLYBnfzlBqV8NK8d9k59Xy1BFiixVU1xmi6JupqtlJXZZkv\nI6GeD6ginT9KatF3Svgr3Z1eO692ipwmeeBcF2kDya8qg24POvc7Yx0qzy0A\n9Xe8R6IBQfavEjJhshKGZTCprzFuWhmJehvgBk7eylrc5y0jN6byzVW81qJ/\nSUQ8DG2z7e2uTEtyXrN5kqs/cTULB76/n7Aj/pdRQgXsrm9zE0CUmohG7mwz\npYi1ya+hF0P+XSbpzNX2PaMk+fsZKrMAs8NgP2gulZPvei90ftqB4U5Opg4T\nxsqO0Vx/k76KRUQYh7TtLCcJI/bLvoV0EAXYLJhH8rrnDV0tkY+zxG7YkPMg\n+iqT3QJEK+RFrpr3pacIgKs4BnBuT4wB9a0uSvCQDofX4EOFFc/5NuMwCh83\n9slNwGSmM9Wr55zdGOOQXWPuYDBw8f6VQ61pIJmfeFjVHOSed2aozT6MnF96\nBmNAN6QgdZ8xiVzbfBmoRRlXv6tcTKgd3sGFEv02dSvqKbFStaV2ErvDHBDo\n73UI0YrXxHIjxBHDx/4D8p/cd8goCXO4nmQLsElYrfygNZQtKgY0aILeuKvU\n+UkuMCvwFXKcoNtwVtpGA7JAfh7NkY6yUrqaK80apL+TuPN78e/NwP2RqBRw\nablq\r\n=bseE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDxDkzQXHW6zyBGXgOMEcTMQcJwAcPGAUWn7vIyOzLOKAiEA6wl+8bZlXyjNSs7h/BV0oRUo1/MrIIE+4/ed9bDmaBk="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.6-alpha.41_1573736231169_0.4851714722851621"},"_hasShrinkwrap":false},"0.11.6-alpha.42":{"name":"@react-ssr/express","version":"0.11.6-alpha.42","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.6-alpha.42+3174c8c"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"3174c8c59f7b9e4ce23b2f383cc11144033df5df","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.6-alpha.42","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-lFJtkD1CI0hvuCC5hSaTG21dlHgS9GEwKxh2b+zyCtWUqqPqVnBIJIwdZwUwN8atRa01rHh4YNlj+CyR2xTUtQ==","shasum":"08c42f66f1f4d297811db999920a2be62e6a45ec","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.6-alpha.42.tgz","fileCount":8,"unpackedSize":12457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzU+xCRA9TVsSAnZWagAA9YkP/0jSGSh7eV98ypNAhAPu\nGxgQtB/5HLNlVn7gOIt1Od86cgsRJxndbRFxdLkU6dXYgvH0gjYB0Gva9lAl\nzJ2OkPnDSPP4slCFJf9z4J1vryVXI+fRTjzUcCDZAFxoQUNDZG9Q0kqjrZbj\nSJAxyJFLaxMTTH48vRm/Ms4z74y3bzfRfWQyZOVcl6pxgRVTYSGSWqLzoOG0\n2hOMIkz7G9rCpsT3YmxyGuUV6jsUJuBOxGHkFIqc2rsRdKKAuY+z0uo8v89U\nqdaIiekjOkHSDCpF3XmZRjWRU6drmz3MeZd0nBxIou6dsW+NA+GjV/oO8Pls\nAr8JOkd/QpzmFAS3ddmFQSL/WDp+cDSR/581+cvUta6KkUiwZCl1mWqw3n4+\n/yMKldiqUXDpdz15+J3BgtHQlCdAOPuC+CiBonAvHCiciDdCV+J+EXZ7c1jR\nfmIXuI3IOnTjvGVhNUXnhIKMVAlKWNrSfTbSdwGebCEZFd0W57eRedckQbZ6\nrjtoGGC05MDvfaXBz70j0XhwpWfiasDGhZaoHIXAy7cazNp+itFnvkkTBaqr\n97qttpDeKjpYioT4MnQgRHjkn7AurMcxxf4hsl2db+yMVFoGuyrvyfsjEj4B\nJ60Iy2iZ9gVyYKIebjCmxyc6Td3xavxCMHIBL0MUhKdnFoItzWESj6/Iumhp\n4ghV\r\n=hgdu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAG6MQjJBRIHe5EISoISmg3K9Na4/bw3VmJvg/8PzJFaAiBCRXe/BYEv0BQXbCE0sZC69Tg4xBLdSJqAukrH+pAXXA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.6-alpha.42_1573736369226_0.9250714541390028"},"_hasShrinkwrap":false},"0.11.6-alpha.43":{"name":"@react-ssr/express","version":"0.11.6-alpha.43","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.6-alpha.43+5b8e5e1"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"5b8e5e1dd9a765ea731fe250462cfe67b23ab441","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.6-alpha.43","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-97NTG+YEQ8w9YRQgxFGgwCBlcFWWYswmG4KNN5LAT9ZL4ewF5X3Az8VKHgHqzWpxV+wCIbDflSL5t+t9frM6hw==","shasum":"a9197d4e675dff99228093310e2161a2e2ec0f02","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.6-alpha.43.tgz","fileCount":8,"unpackedSize":12457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzVBECRA9TVsSAnZWagAAkw4P/iqFxdLFBN175HmnNGEZ\nMoghutAfk8j0/nQ7yfByy9er8djju5sW3QlmyBI/8+0RGnYInmAgjEGZpEBQ\nP9WWRbq36vdNZ/Q4P0d6GprIg9lOAJfbiYrrkvLgYvY6uWvQfQmBE5gl928m\nsZkvWOsOpIojNPQrvaHm7kF4D+vJ9jqX3lpXZhcNYFkps60EyJe2808YKQYK\nUoRLLVeRCJw2cpHJiom+wjMGrk5bGXlkh8s5EEmz8obURPd1QPD/3IeBXVh6\nZZiwnCncPf5Se6Q0XAe7PTX3q1xI8N+omqUk0Rigz/k0a7sZgbUn0myqBxBi\ngcEPwC0RwuL0/9BdQTqs4A2z+l88CFpsuciIdCTe+LugJRB9KvdKoqiRzswv\nJRGPmvAWaGxr2D6mTHDhRoDm4w0k/qTRD+B2XdygzgjAZcG8Odlb532L2N9v\ntC5H0uBBOQ7f3jAVeMVyLxPqXnBqQ826xkdMExHmHJgW8zhgS2Sp8v0wrria\nL7+sU5GLD6uEqV05m9iQms3X7Kqcay3otoQR0nTKhwPoeUHK7+dY7ZATpgLJ\nRUy6xtKMVeSfh1PbDktdH5Tuztr0aQs9wpyytRTclsMbaBUrTKFmQ2Ug20Kc\nArw/2o+d4v0kKwT1dPq62xnrhafThAlB23ewOwPIZySfzaVlDUfYef6XZDF4\n5zDm\r\n=mpp0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCYxtnDrtZ1JANYgm/U6cRvRQRIYHgV/mTBhb5zMJ2qlgIhANR517wFsJmJDSnnE2uBtbmmk5ky8k/n1jExlsJzkUBQ"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.6-alpha.43_1573736515647_0.11993260989508703"},"_hasShrinkwrap":false},"0.11.6-alpha.44":{"name":"@react-ssr/express","version":"0.11.6-alpha.44","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.6-alpha.44+91d04f1"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"91d04f1625f29a5112aecc763d13fce39fa77d32","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.6-alpha.44","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-25Ve5JejIztTVIu1GkBfrYMv48DLkc52dGnAOoBIgnI9KkTo1uZe/kZ1MZhryQVz4TJ2s/6RWBFQS2bIFIpQew==","shasum":"380eebe65fd21df7b127f1b29bfb95bf5924f138","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.6-alpha.44.tgz","fileCount":8,"unpackedSize":12457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzVFQCRA9TVsSAnZWagAAfjQP/1JYNfP2E4WjGJuCkG1H\nvw8pu3W5n/kyNWkXPps/XAjVrr0znyOZN0BPfM51Pg+lymIJFA3G9uhVeGLm\nm9xuzDT1vXSg4iVjdISpJklfSFMPcYogB1BEizmRDrxJ7M1b6utoIajo3mSt\n35vlauQVK102Y0gRTjry7y5o3jxYJh8FAbP3qoRwu6fMHAuPmZmoqX86Suhc\naVo5HMdye6e3L16JFvXvsHfBIWW6ZwAH0/7Snb8NI82ABpKmVcANQ+I+tdNF\nZ/pQUN7xu2wlJcCL5VpF8ppzryh4h/KnW1FVeWEkO+exEZZzjksLoHpwYg9q\n//N4ex7/TuQww7XtaL3wqDpS0HKB2Lj/Z1pkVezfp139tZQDfZdyJCp/PtJ0\n6KmY1FbKr+yRtynZw2y5MLnfQdJLewSOEfMh9FavEwjoEyM4va2wvxoZyqLF\nvMu7d0lOBwXF8bsJjSQO4/WLF5z1CIHRiMa9KkBJHz1xlK5TgC9PuEw4btBB\n9tkjMOA2otaPDjAEuUy8Sn5Zs82KEtdiOpPHQl2NAX55aME9RaA4ASLbGaQd\nXrpoP7ieqr54hCnDnSz8XV1lTt8cqkIQjltFw6gb4wSpCJBRGLPKvGX5lZOG\nm72vxSugM6NtY7Ra2EuIeQ+5l2Cx2mQgbK7YQqUhpFt0p1mafdchnMYW12D6\n1Mqv\r\n=0ik2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDzT20yT7MjuPTjFUqvokpf+V8WXy4OOMJze6s+87DZBQIhAMC8wq8fkAhpoY8WZ8rfY9J8LuPlX0Hwke8M9V08alNf"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.6-alpha.44_1573736783893_0.7209419196943645"},"_hasShrinkwrap":false},"0.11.6-alpha.45":{"name":"@react-ssr/express","version":"0.11.6-alpha.45","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.6-alpha.45+0005f02"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"0005f02c0eca3e3acb83ffa2e21880634a97453e","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.6-alpha.45","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-xd8YpTs0+WPcnpmqJNJaulCaeAG3AdbasH/vNKziWvNk0QyojUgLn/PtDQqI4y2t0ddb6POGkDAEVYIUMXdIzQ==","shasum":"801989af5410c4bdd9421ba4bbd3c42462d100df","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.6-alpha.45.tgz","fileCount":8,"unpackedSize":12457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzVIaCRA9TVsSAnZWagAAKykQAIv3lOak/YzCX6ptlejz\nhJYND4qNSLcANicM9dKqZR4mfC5bkXdJ3fyLRlMI+Bss5/gWrk+ePJMXeTAl\nemQrsGORlz7YIga/la5zEAVlXACKmb5Fw2F9QHenRvXuCVxlHAqtJg9XOntu\nFMt5fSPx4SL2JoTnpjKMH58s6DDsuL50ZE2kJoBhOCpRS/SHjpKz/btmxsmY\n/nl77wM/xltuJuLOzvEIJqPm6Nw7EKLh/cPUBW8WhPQIBjYdZ6BVjaV/QoES\nVF1Rh3BKn31x+WupiMoVyrPxcwf9Q5r82s1B4RLfofOW34cOoPEvKLNTziZQ\nCUgGWF4/U6WA4ppJyD1EmWyhwdXQybMsThDOqzmenrRnFeKHF6Bcp02XiqWT\n7O8iIGpt1I2qm3tp3WFxdn111fATJ4VweOTFW9qdX0J3rEeYZml1k1oG4RUc\n7A5g1w22w2Conz9LdjaD8rlwiHLQ1EnFWg85i2KRlvN6fa8LtnEpMuLvn4yf\n4kEOgli9y/oizljCuBc79L9T3iAjXyXzPZ5fdVqn+u/R1ioWkuvhBr+ToZnq\nhVVQw4G6Gr+DYU8KHanevYTBIVGxYma+ANrOhlCbWi6BAS/kG3LjCbGiKmjQ\nD3ZrWWu4vFITeV+Ch1/iYCzNxQgPmTVO/Xk3tkNG162WkdVQ3BvddK7tsWAr\n8gdz\r\n=Zh2s\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCS3lngqxd/+9hpFoIn7PRpKZKXuROifPccOMcphaBbRgIgRm8s/xgN59nALkkNL5e30XEDIzZ7FCRdvenwoojtiyQ="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.6-alpha.45_1573736985770_0.0533371921533532"},"_hasShrinkwrap":false},"0.11.6-alpha.46":{"name":"@react-ssr/express","version":"0.11.6-alpha.46","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.6-alpha.46+36e7420"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"36e7420cd4c4aced26b5f3fcc983fd09a06ec395","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.6-alpha.46","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-ovFHystoUg4qBGHHGN3fI2MUZR06gjFmsk7aPanzkxWOcwbKig2Oe3hNPVXhA0mwWSB6Ie6VEDlD7Y8GF+6u5A==","shasum":"c1c4d17355c9e271d239fde37df146f473746d73","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.6-alpha.46.tgz","fileCount":8,"unpackedSize":12457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzVKhCRA9TVsSAnZWagAAzSgQAJCchN8ma4H5Y3n4FvQQ\nvG4yEHF7uJxLYGdCAHVMgRrh6sKlit97MTasVdnfyde8ww1u4EAXDJhy6CdR\njnWRheasbtQ3MOiQmmue4N5ZPWOgxs58mA2UstrqEJ63zRvTkkmbPJp1oYiQ\nNpY/aj9B5H55idbL+t1pTGQIVowY0HLZykowi4NmxFwjc0QjG+qfseYDKCKU\nfRlWP87x5tXuiNqrPuvajuAJzsjAenM1C8oF02boYwQejZW9VQjwjueydQ2Z\ntYIoV66Wg1j7fUWL2LjnGlhz3qV10sTSSYHFX9zlvrkFxF7pvxOO1LWLFH63\nKB4a87b6qF+Z2PIAR9DyElLDUM3j4vOAmG5I/lopP58vV6hM2puxzLyK8FFt\ny6ADvsr6HfH+9DZRQ+D5WD42bnt20hh4o/agS73tPSu9+xHwwBn+RpsUzYrB\nt9hHWiXwllBvy9LpdSU4dCwvSx24XtAHfVjbpgiY6RBTmRkoK+mg1zcJH2lO\nZ0uTA3GAxZMl2rUaDOv6HRTKYoTPqnxkebSexBtWzE2qOldVbfBCwpvfm75g\nOiqRhdOiH4EFvYlmeS4AeKmEYWBVzTUH/EMZ2CSDWrSapfT5b6H5ALyuPoZq\n91hJbKLLUxOZsMwvS8jzFKXmXIq9+2tfSPqzvXCuDmY8mE8IIKgbRQpaXZQJ\nWVpm\r\n=ybGJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCVWeXktJZybqysa3wfwD+Fib3pJwKORBqfeJH4KsJpHwIhANB5HbLLrxHiYM4KaNcMMTpePu/6UkX+nMRs/ujkCQ9/"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.6-alpha.46_1573737120725_0.4273263149416471"},"_hasShrinkwrap":false},"0.11.6-alpha.47":{"name":"@react-ssr/express","version":"0.11.6-alpha.47","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.6-alpha.47+5fda5cb"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"5fda5cbba66682e4b501273de0f046b631840294","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.6-alpha.47","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-8ZgVxblJ2XY7R0CfAgfh7sxVNYyMvmMPcOJ5lKjpPS6DyBIU10CzQsO5NsmuAYJTuvh+KpNhjyrAGGLUlCWPSA==","shasum":"cb12b0b9efe32404c0d38418e459450ed66edc3f","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.6-alpha.47.tgz","fileCount":8,"unpackedSize":12457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzVMWCRA9TVsSAnZWagAASLcP/A6GrE/Do3x2C+S8ZGKe\nTOQrV6u3/tlUrHPP9JMs4q0z9OdgIZwlhw9pyGfcclYKy8m00d2RyQWYIqj5\nF0Erpaw4I/fY+2eh8WZITjwHg8F9++GiIXmZPLpB1MQ2Ax+fdlv9ThxOHhBl\nqftWedD07o6Vek1GnYI8/hXjJDCNLcTYZ/6BXbAh45Pl4ntAUHPNsXMWlsSS\ni4xujAc7i/8vSEyGU3tzJaBNO0Ab914aToJj76GjdAAX6+GNSKVvkm9Mm7Iz\n5tkP3+PcaFRFStvzKDJeIbJDOdynx3gsIy5GhJ7lFf3F3MHnfdj6lz5dZVto\nyctCGkn2M1CAo8sotI/WQeLUttx/TVn7AmqSEtXv0GZEk0WfbuG0P0q04OKZ\nfDTNaZB8NHP3QkArah+qoD1TMfSUmGAwwvzMPbrEYn9wgsQxVJWhHpkuBswc\nxuIx75Qfp0svNzkO9rS6+tRo2yuc1XTlX46drgTJJc/aCf4Qg8ZyGDg629i7\nuau+6X5hA1hlK3abopH+RJrLwx1Zy3+hYd7VwOad/2gzzWUNVdGhfqu5iSQi\nj6zD/6+u4E7a72aKSWoTkPgTi1GI0Smfk5Y+TMCTJPSShbLgiTUxdqSswfAE\nVovud52vfXAWeP6QlEe+0oYjzQTsBHdvFOaEVreseBjrDuCxLa0zo7FrRbI2\nPh8T\r\n=u3fW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA+erRQagY2c3eAluiElrAY0SMbfA9YCGQizj5ypYXlEAiBC0ieW/MNh0z3MmbyZMnXJidxwb5+QA4v25hMvxhP+lA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.6-alpha.47_1573737237677_0.3018793606688377"},"_hasShrinkwrap":false},"0.11.6-alpha.48":{"name":"@react-ssr/express","version":"0.11.6-alpha.48","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.6-alpha.48+85607a8"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"85607a8dbadb61ee3d6e677041dc169f61d4ef5d","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install `babel-plugin-emotion` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.6-alpha.48","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-U51b/zN2DlqPT0JBSPoRFHXeSAhP0jJc5mMH2De/NrZURWkfBYI/50i0GBnJXNoQbdro5t76viSG5p6PnQtlxw==","shasum":"cb742375401c7be6fb69e72e90f239281508ace8","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.6-alpha.48.tgz","fileCount":8,"unpackedSize":12457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzVQICRA9TVsSAnZWagAA+V4P/0zvtyMBcklqjraGUSjh\nJkRozIUiDs08dHRpwl4RMyOSh5jStXN6eJKAunhEwppIDlmFHz4EwI/M9c7t\nTh9uNC26sYb2PgAjz0RPHxRLmFMcNGrWcsPvpgAEOX3WbGcVu99/FZXcZ86A\njhWSi626aqgPv2yFILCCUJB76wSqLse5XPhKrqnl35I3+0jnQEJnx9eQ6tjA\n3O3+YRuE32dIL+qLDsUshZqsZrnyz+ni63oxyhPZuK/q3EZdY6oenS9t91Sr\nqgWWcPSmbovsLU/TkR13GsSJeFUm8vuQHOnfTR05XuUU/M9uCu/E7ONQyzAl\na2JOxqUUl8/svYX4bjwyB9t565bqqX/9+NsquEX0sTn/NhYJ+jhplqd5QdoE\nZq4hbrt7wDTnB0Ff7ySyMnrE/p+kStQkLtWMr1TRUrha3Qs4AIexKMGWbmNt\nOSoF8s6HmPGLQzgRu1EPFKIIyDeb3ja00wDSEbEujFr5YV6e4smGHUJ9TFz2\nMvBiY3lLUzBSXwrPFEY3n5RZ5zs73pTfHyPVFBegq2dAg58+10O7zcOrPdli\nk3W+iJxI4UR5YDtNfQks/hPcucpdbB6cIkE9wxrN3UkgFWE96yqikwqFUgfg\n56p1CmycvlosZBYtpz4ex1XS1+wUw9q4MbsNJOcY0j2SMgy1OxBv0//q9twJ\n6ZvD\r\n=6/Z+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDUDlYb5jEuc2VVJuAeYfejTcgJ8zVOiW4K2YyPATOFgAiEAg59tRaV/tN8HGBA9FZhwnXWmYlqGz3prapp2Yx/p5V4="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.6-alpha.48_1573737480433_0.6515770145734545"},"_hasShrinkwrap":false},"0.11.6":{"name":"@react-ssr/express","version":"0.11.6","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.6"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"3f0045cf0d0222be3490f6ce29b9c6a87a59b7ed","_id":"@react-ssr/express@0.11.6","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-8sRUGDRyGCHovE5uqeaWelIaqLJT/hTbLDRGC0IZeGwEfWxiGTVZqMG69kfpeJmG/X2jM1psPgpkckZ8woEfJQ==","shasum":"066805a7a5f396c47c47529038365c66c197b46d","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.6.tgz","fileCount":8,"unpackedSize":12632,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzVdxCRA9TVsSAnZWagAAZSEP/3nk6l3W7XMKMEiurvkb\ny5zW4KA8Ts//PoNPfBfU/46RKo3q0rVJ34Npf8mCaSWmdjO4HMecJ+JRiW6M\na3yYlsuT60oGHwOCO06PQxtlcl7jgg8qBxm+HBOouxfxaNEqpdi8KzkJU5XT\nGZmETUP22UQDVx3D+MiB9OwFV+JNPfQM8P3uiMhBTzTzferuDSCXC75wI4Ns\nWA8TCFkjiljnbrGIjox+ITED+7TY5cK0jbv/ibbI+ssAasUbdrFoz5wSi3kw\neNgY8TgT7wtnsYAmW0/JhIHinbJddkCd/D2nevbrLDsmI3fN3KJuFCwScPeN\n46knNK3FbTrNMtzznjwkpez8QZ9P7U5aszoI4HDXH2RjoQ1F3AiqS6aZUhOs\nof6duwMIILHs4ji83cg2qwqge+BzwKq5/Odt/qC0gjAdn4tPxYwbR0FpQAAg\n5TvwzCk0XvXYFPn4q1Hg5A9BcRkXZs3JyMbMfIByAa9XsV25zYCVLRuKf2UN\nRGSFmJ8/a/lHoBefYvmwpxIc0xoFQCOWkZ0YoVqCsU9QEaKYfXkel5VmpAyo\ncPUE5/WmSRwG5dcVp1Ykv8TV31xsSMcMkQgrvFUhDUDTT4FVRQEKuLD09CRR\n0UDjGKKZSq99PtH9pTZtvLF69CofZn/SZm7p2J59xsXCch+5w5aPyIIif7fb\nKj+e\r\n=fge7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBSMTYZfANpsAMLd5k+Y39dx20CweEo4CiqUi0JCvREbAiEAischw27Nbx3ER5ly9kS2VkIcntIxDk4f0gDSRwc4D/0="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.6_1573738353167_0.3911796922577617"},"_hasShrinkwrap":false},"0.11.7-alpha.0":{"name":"@react-ssr/express","version":"0.11.7-alpha.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.7-alpha.0+3eab5c5"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"3eab5c515a36144eb532e1a22b189f028e39ef88","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.7-alpha.0","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-dFZdatpE2S9awCtE9zy7V+ntcYvHs2vwyuaWQ4c3IBjr3O6E2comU+gwMjdwfOoMQ2lt25jDGvNsa3mqczgF4A==","shasum":"2455d12f9f4bf94dbe6f432d6fbf649aa3a8824e","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.7-alpha.0.tgz","fileCount":8,"unpackedSize":12664,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzV2UCRA9TVsSAnZWagAAgjoQAIvzOZhIoDBCzAtCpHse\n3PNihrqAv3KSo+aMKnfudfynVq/i5Mh85K7ffSplWYlro/AU3+WUmyqTFV1t\nLQkG+OVZAGsLlwl1apIqTmQ8aD20EZt04EU8NaX92q80fh6OoYcPZRHrhMG6\nUoVakiNSHbc3Q+6KAFuJdlu+50CVdFkU8quaqRNPCptkfyw4SGLc/XHv5J4l\ngSNIs6r6iRIHytKGOfEqg8hQ/BLivPeijaqUJ5TLdbIz+5H1HwmdgAgXuxpd\n41VCQiSqPIrStsJjb5gXbLB15frI58tCE30MBWLCaNHdc5IqBxyaWR1EXU6Q\nSD6kXuUCfP4vWPSwm+Om6FNxr0IWd3OPEz5JIOAPC0yw95ajMSvJMI4N/pNd\ngu23Ke/afFQ4mJPtg3OGKCl9cTTm0aACWuONvNJM2mv3HRYxJtIFwqpz9BgP\nsIwPTjAKrcrxrSxWFWTGsPqArPx2SnSvdjNVFvcfBCsgwOu82i7Ayb5xkv9S\n8uJHJZiPa1UwT3KiVR+L+4EoqrbptAdqPb14rzPqlJKQ1y5PjznG0NhBzb5X\nvhR1dAOV/V8vTtMgcv6gNW++5P/4XRg+ebUm1ck+QTQ4T8QASz9Sw6p1d9yL\nvmqbaodhIvzGF6l9JSEGlWnvNXxKZy2u9vSqfJ3t7iZPI5NcNmVxTA4cBssm\nmTpd\r\n=3WMH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHpGhe5VoZZ4m93KD+/SMAYpzrPoyq79kP/Jn+0yBS1WAiAizRIlxk5tvsFsM7hYXnIlYaFciR8qTNwXiQb6lot5qA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.7-alpha.0_1573739924335_0.4672458173782228"},"_hasShrinkwrap":false},"0.11.7-alpha.1":{"name":"@react-ssr/express","version":"0.11.7-alpha.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.7-alpha.1+01990d4"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"01990d4d518bde2865d35b4d6513805b0ec10e0c","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.7-alpha.1","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-XDZA1qQkCaf5N+RuWRDDm+RBYzQR9dtsHYF5xZFSNQdvx3XmtbPvk+xQxnJ8A+G0wWUiP/DH1qr5XJxLZ5Fxuw==","shasum":"a9eeffc027cabe2c9ead95652cd12f1f241bdbe3","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.7-alpha.1.tgz","fileCount":8,"unpackedSize":12664,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzV8BCRA9TVsSAnZWagAAnyMP/0rZzI1nNIvB9z6nos6g\nriWXq9eEZ7hyJ1nX/p5ONbKa+GSO3i1Xb1oFMl0FKnZn7SRlMyBsRPRb7CQ+\ngijOUK9Fh0XPGNRkboIcW8XIcucSiOJeQsnVUY5StG7Nwo3fmVPwMiLeD415\nF+ExwQPCyof1ZVT5L7PenMpDKgau5L4tXEw7Ur7Y3gkEa5CTZVnuQOtmeaP5\nynK6uUak3YOoGymgju/dljgqE2zEMTO7mEgqAVniU9EDgenDX5JHnBcUWgjR\nj4X2s7FA+t69EESmBsquK75YUz2hgQQcU92dVwymAiBiHvvCNS2K4dxMwUTD\nDR6XTFxbjNSnZv79hgCuBuOhh7UQ+BCyiSYmgvC36Rk9lIivuirZ3jFEHCuT\nOMttl0V0MW9Ibu45kn0bAdDu7CDOdILswERwa81mfUAKe4I+WiYLAu5+9TqG\nwbLeHKIakO96V3sMyJTyBldquvJO/swmlxsLNBhfgoXBse76ErrkRoBVS/9Z\nBd6aezbwm8CSb7ZI7TnwuBPcZTSQlH8PLmIjm+WZYChh++eTFYfcfJyUAvLS\nyvaYbDOx4e/cDh2rgVDrZWPKs69cnuy+qGb9PrCS9NxAEFpPNzeQ49xyeNAx\nAN/TftZH+WUHLlmKQtxCU2satxDj2BKs0SOsneZt/b7Z1yF2xZ0E14zUY1L2\nHWQL\r\n=A51C\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCFCLaE28Nt+VEusoiWZFW6vt8+9unIALT62BqVbNClAAIgC7BBgB/Xo/SNoWwXiV71jVDuhymPoc67uyBT2sX+tls="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.7-alpha.1_1573740288980_0.1568719483622012"},"_hasShrinkwrap":false},"0.11.7-alpha.2":{"name":"@react-ssr/express","version":"0.11.7-alpha.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.7-alpha.2+5fcce6f"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"5fcce6ff6d22350db115c6ec83068281cf90d947","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.7-alpha.2","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-xcYmPFrHPTSYBjRaW6bxXVxfjFYbjta2SvFgaTHkAUPQ6gvm9j3OA/gtYn1W7UFoPHzxoKCMnmwsPJ0GEcPtMA==","shasum":"ba2eaf42a45c973fa2d22e576758f44795fce9bf","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.7-alpha.2.tgz","fileCount":8,"unpackedSize":12664,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzWNkCRA9TVsSAnZWagAAtwEP/jdFeLk242MkoMlCWUca\n1mZnUbeDI72qLilUcMXXand4jiKDqUlLj/HKbDzVAn3e3I0QI8hUeo6kJnhP\n+xY2k4ke4fPjTixqk1VQg/kSrVqyPHmX7i10KiqIQDSy7JuH6sBpqi5WJgIb\nW9j1QdWzgYmyUocd1OgQVWzajTbhSDXgKC7y4Q8qZ5avRUrozPR3/KGkxz4q\nI/QVEDQt2nifpcsQicAUwaITr3hjxSp2lMfEFAeG8Vviwa+qP5S4JTr847fS\nO3/VvuebksMRHbJDKXcNA20OTVhYnLZpPchvW6I+xwSxcCnNTQUMh/kWtQQB\nRIbKIVMaW2fbP8zPfeIvRXzLG8zhEPdi42wHcC4tmgtDwdhFX0gpzKytn+Pc\nUS2QuQTgrBg5OTpdVk/vdVtnWTfwkX6p3YAwXf8+cy203ogSCpM2aDfDLdCz\nl08cLcUW9qh3q375nnZL+ylXY02ZT3qg4dixVLuWxp2WOTE4kr/cx0Cu6rqF\nkfOVhizlIoxtKXe37TE+eAT5c8A9bl6vOk/hwF3veTd328BESX4CmNTh8iUU\nwTYdHA2YEtmdTaSMkBu2PzwGsvf1q5PGsHU2wofCNqvmfULsGEUUgOpqURUB\n8kZny6HW+Xf3n5i0U3GncZYHQqp9GP7uIxb/qLcrpSRnJYam5SZV22m9jK+E\nNIEx\r\n=8+j0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFtoroMw1LTsHLRTdsxVDbh91eqwc07aO+ZZZaPj/zeoAiEA5RhWQ1OPVO01zU1k8lpmm6ze8+huaexP2RnTWOCyWn4="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.7-alpha.2_1573741412443_0.4671274779034682"},"_hasShrinkwrap":false},"0.11.7":{"name":"@react-ssr/express","version":"0.11.7","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.7"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"593619755d9764b7ad8cb70d9eab814ecc1952d9","_id":"@react-ssr/express@0.11.7","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Cj8Fzop1Ay9mwdhe45N2djBTXBB7EfNxA9lT2ByOBuhKSXrOhzALZHwTXodK/+KP+eVlC8wyKhS4ULIbITnD3Q==","shasum":"92e391fa2798639217b913a33849578ef4946ffa","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.7.tgz","fileCount":8,"unpackedSize":12632,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzWPgCRA9TVsSAnZWagAA+ioQAJmEKjQMx05b4KYIBV8T\nczYW9rSBn+z0Mk4tPc42S8NQfJWrfMGFk2qrR38BKV5WQZ2yCewewYj6XA47\nl94IhwcLYT8lO6lLo/zZF0qxz2BuiDQ7177F1NXws7EWKeyDfi/ajNuDPG9O\nVkA7LFu8vnbSiVZ4WhvH7w6ENUwbhba4qUgk68MO/5gCI7JMDjZLrm9c07Xf\nN0k/tbD7NrIGVSLeeNpQtzyxGCNleasn7kVnKSUZOhZoeRb0u5WXN2yzu9zz\nhGUPm2fgEaPSjRj7lm0ZWSwN5u75jJ5b/Ph54L73KvL9SpYMNDHLew8VgSkN\nn1KJ0qDpgQE1uiibUSv6QCVdFsbu8JFCxEkLp9LFuwcTKhT0w4UFl1ilvAwM\ntMYwjjW+GtjKBrfucP2GrGB2BNWvlWqYyOSp2TgbWPKxSqCtWzDLRhUDmO7+\nVX/qxTKUdWiIsMd/7JN/NY+1ZOxmIi3zEm2xO00iBnBSQpFguLInDS4bGUuW\nIdDPTYJH/IBDZL6paKpchRatagarAkl/8CzLqjazAb8X27hdOQ76tx0JH41+\npDskv8UDEA5BjN/h6BsLkoJa3+4thbwyctDiJS/HgTizacJk+k+Z7zQuPRH8\n2axXYoreNFrcS+Kn70NLyL2qGPBGALjVyiZuRtM1A23PMuPTqqjK/7Vp7oB6\nCk0p\r\n=dgwZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCKK35ooP9EefVhDFjG02Dm89MqOBRR0YVDy++lbXgnXgIhAO2Qf7Q85Jr4VfwitynvVJ0Na/+SBUUcBRXAdSFSCkxP"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.7_1573741535907_0.3395172369236146"},"_hasShrinkwrap":false},"0.11.8-alpha.1":{"name":"@react-ssr/express","version":"0.11.8-alpha.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.8-alpha.1+9bb953e"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"9bb953e15573baeceb72809bf3a2d8f66dbc4ea0","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.8-alpha.1","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-hB4QeXzLlMNIPBYY0OO04Z+oZSbnp6sMtBI+isZ6Jt2KivELR5bYa/jYhHDEntW/oJsZXPjWRuotzN91u2aGqg==","shasum":"05afe0822466348bac721ad1efef0c8ce6630e0d","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.8-alpha.1.tgz","fileCount":8,"unpackedSize":12664,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzaUDCRA9TVsSAnZWagAAjIAP/0q7nKHdeeIRcRFzWkfp\nTCt5fnam6Kn3pq6hyYuoQiX6rnLD2kiKaTsjC/KzKIg8A3HdTCk1WtlnMJUR\n7npmN2rAIYiueUY6wTH0hR1jDtUCxblu348Y/5PyKR7Khttl4OaeK6V1GDLp\n3+AE/mwOEWMDZ/bu4q6rCr28HKqUDsC05bllFdR2Pv2fipnlp1T7CupjKi6V\nk5aN4yf98i8mG6VMU+dmIIELexqAY9uYB5WeBxxevO7ETrh3pmUe+ARqMir7\ncx1Ha+HcBBIN/cVxjkUnZD78cOYrVhdjHN9NcrQeK7oSnK6jxXsiS3THmIsV\nkq1lMk9msCts4PzI493yRR1zcP0JhdxuD0j8mGCh0T8zxGIJOwN1DM/5dQIe\nh54X3M5HTlmxYccMx7iXoAAw6h2+Gdx8Tj1ETCnslNVNet3eJ2HefXVvCT/U\nX9cvL/VqvO2X8byCLYGSvvoFdViT9I3tfSpGpC665QcceH2WXmcXRGwqkarm\nOkNtO+9cIZsXKByFyqmTHt9LeqJjDxIagFWWOudIuydhTbF1nGEVNS9hxKU1\ncUcwRtfcPdWYk4APTe8jN/uuS+e5hCRbt+2K+P6ZUE18tf1zP3AaYGBq4B2K\nveFS6oUHlhhY6o0Tgv1bAtzL2twH5CUbbxkLxSsds7rCWF7NAD4ZuUZSArkc\ni+9D\r\n=zZ06\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBJLhv/0cyLutPv9dQfhBQk2YONySEi7oa88xQ32wImvAiBFQ31BkxyzY27wgwD2v6KMFHVFOZ0v5zK0iFfSjxP2mA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.8-alpha.1_1573758210898_0.5452487721286445"},"_hasShrinkwrap":false},"0.11.8-alpha.2":{"name":"@react-ssr/express","version":"0.11.8-alpha.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.8-alpha.2+9aec603"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"9aec6034c61c1fbdbc77eb08d52ae544a4f96a77","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.8-alpha.2","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-nHkmv92HGsT1ZD6Pyokcfs6TbDLb4lN0FRyoiDm910dobxNzU5lBp89LKTABa9cJuUsffNpe39pFiaH/zp/4yg==","shasum":"24f85b4756adcbb0dbd1cce08249c31af8d34037","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.8-alpha.2.tgz","fileCount":8,"unpackedSize":12664,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzaXWCRA9TVsSAnZWagAAB8gQAJe/CGFkjR4tQrdCY+dZ\nL4Oner5wcEYy5w9Tnm/tSXy0zCnxzIGYSrp3CxtZiXnAMB137UfK3ea5uGY8\nUBH5yyM9FH51tbz21Nl39N+D6MiiMEo+NEqQe1eIAtAuwPoRU3PqcOi01Rfa\nm0Fb/RvSUHIqyp2AB0yqid26XvWyP40eU1XqfORec+SBc4zRjbUCKUDjkroz\nuRF5GNMFnPoBJKizxfWN07jP9KjQVMUlsLd/PJp2lnPRMicpb7TciVez9kWS\nVPD28oQSRTcZgf7u4jB9CfeNvJQvzcmsojKCW+Y3GOOijf0Pi7ibkwnuEPxF\nNOplrA/zBp0rGwdqs7wMOaD0P4vMtOCGxt16BwUNQ61c/CHdGhKlFvNcKW7L\nup/e8PIcDYag2xXpfICtwNkXKmtn9wXxg+gNQsYL4jGru3+ZOTjEvOV+Znf8\n7OkT7a9iZQ2GJn/wz+ubm2Q6VJsavlR/KEg6eq2qcsk1NOYuyL671Xn7Iwb5\nOlFclnqe7UWWJkSBCbbZh1aVagzGqUn37c7h+fJm2LzyVHV6JBUhrN2pRG8p\n+LmZeRFk+N2Zup58n9sLaZVcFj9MkDCnRT3BkyHaTw4CG1BHr4pT4rSKB6Hw\n0qsOUDaJY/K8vgNsbJo4kYREK6QwGjiKh4myW8MGKKDjcwlmvEfaQn25VtqR\nxf9l\r\n=uZCk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDqPgrgMDBL43PmRjXYgW0rm+xBRQ6KjQkGYB/ZvUd7VgIhAK5qYvjFWDgXr6DPnPnit+SrPtBOJ4i7OosQsM9aiupn"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.8-alpha.2_1573758421772_0.6911896818865495"},"_hasShrinkwrap":false},"0.11.8-alpha.3":{"name":"@react-ssr/express","version":"0.11.8-alpha.3","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.8-alpha.3+700eca6"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"700eca6967b4ee0e2cfd745917b50019dce7b0e7","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.8-alpha.3","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-LN4iEPX9mmelcTvYxYv02NkgfJWbeliaQ9XvhKZxvwKsp5b9sTAccFFdFZh9ij7NcPgkREpomYdyAoh6Dq/wlQ==","shasum":"74017b2a27e07aac05dd486358cd49013ec95f3a","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.8-alpha.3.tgz","fileCount":8,"unpackedSize":12664,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzauyCRA9TVsSAnZWagAAw7QQAJBVBYaoxuh0A6594m9Y\nzHmWo9WR+2hzTDJk2Q481bY1/Vv+Oabqqb1s3j4u6HlFQ8ondJIFZ8GV5LK8\n4Y7REFoJRJgFSJAuTclaai8VP9gWfOBgl+7mnjPv0+auYVQSIqp1EfxmIMO6\nJ+0AvEbvhrLIUh35Vbe1MEkd9prvNhL4TAALDJ15gbD5K5ooOiDhG5rKFGGg\n1xQyeXFEhOvwsPx4SW5zTZ/jV5DPgDCF0ExAztL3Zt5m0QInw8/vThh9sUDU\n1r+8bC4O8tmx5RqSCPIfI76jqGpUaunL0QQ1MFUqbpgXGHIJy//Ig6uUqUzw\nmpVvWCDgZ0elcmG/PvbGqqUMsDSwP1WUXaDs99n3R9alwlOdp4/nxwOCo0d2\noXvLHPsRAuXH6XUvsV2mMRQ7JNgl48zlxTd5DVWYOPFG1HYub1orZOPpvpoR\nxoHbNlu9u8qKoTCc0yKfh8jN9Cy7VBsD79CB07ScoQ9gtz1JfqDCqFsmusIG\nT8fOFsI9Zqulj5px2BlMWxN4TdGC09JV4df/Slsgzgw8VnpfkXA5gm81iwGY\nyV8ogAqi375PiXtbPaLUAupVyGL6R6tG93sYV2efWmBEQO/oLhISp+o/hUu8\nnYMzvidzNil00pBZu9bD1xKErXbZPWl0PS5L91wiQHKzHpfHCtS8QJnR2nIZ\nOrsy\r\n=9Dn/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF/0sMPiLsejbYXHWDWSWOA3uvncT5Tws71S5xDynEnWAiEA8yfotqRmCloKqfxoqg7n+CpbHdSZk55B2PMg65YltVU="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.8-alpha.3_1573759921816_0.5090246790435886"},"_hasShrinkwrap":false},"0.11.8-alpha.4":{"name":"@react-ssr/express","version":"0.11.8-alpha.4","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.8-alpha.4+9f45d90"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"9f45d909d23080b194be097f6ec51b57133f917e","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.8-alpha.4","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-/6A9FAi03EJdH18AJ5qA0oViXbYCGYud6lR1xsvDmpeopiCtizBlqYFY2NLZGvcP8fr78wojI/JUNjMSug6RzA==","shasum":"09810efb11f34d45b20317deed4d64fc57addf8a","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.8-alpha.4.tgz","fileCount":8,"unpackedSize":12664,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzaz9CRA9TVsSAnZWagAAxgIP/3OdtBcv3d71MuAVl4fo\n4l7SQAQIo/O9P4OFL/Hfj48Bu6iWD27vAkQRpYOYuOsMiKGJgouxUrKravwV\nr30+8buZynO1pHF8iRiq+vbzEIfkUC9AEjLbB04kHWHdK53phqSEk4fLTEOx\nyrZONGhj6JPBkBqDoT5RG9J1+3UBHLERlRdmAY8bowMhF09Q1ZtPJKxv778I\nydIovyCw0IGTGPLsPW9CM4gnRGfAiBzKYNGpcEUweVd9Sidcy+E0M97TGEnA\nZDmzcboXWr3jVD8sXUclaDjf7HkAl+PhyDLdW5KXqb8UyDjD9Nb/t5HpRiFF\n55v/m4VCiMGgcNtaGWqCMfQiE3LQ3p4sb4Epne/n3lP6d+5rRX3xtqshJjpC\n67GHWKPMlqp9GUXmPgE5YgTVWudfNghy2JNez/Uj/V+7QjERlmtgxvaIczhX\nh7v8wucRuPkcpo280bBg2yGlkCF2FintMahKKYgYADvjUF/PMKcteDIAaGFM\n584UhVOKYDjKs6fHzNgN4DxT/Lpx8+cNwjTQbZonIqKQsTACjt/Rh3LvNV9T\n0M1MAsiviYqLX7CO8uUO1vau++u83F15hiTRKIHTz4sHoFBzrks0m1YoI+yS\nSyQvqb2zMDiIaXC9u09ScqZTtziGNIECPdwOd91Z561wAea2vYxetAJughQE\nx1Ov\r\n=3Epo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD8DertdsoacmXCdKOogeYiL8K+RVNNoXmKf4ekZN2dfQIgHMwgXHHxLlGf1+SP7YKjImg2NMWE40WUkPAHlCR5daw="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.8-alpha.4_1573760252593_0.4602432896737447"},"_hasShrinkwrap":false},"0.11.8-alpha.5":{"name":"@react-ssr/express","version":"0.11.8-alpha.5","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.8-alpha.5+479212d"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"479212d2950eaa2bdafd04d2ecd620651f51ce61","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n\n## Custom Layout\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-layout](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-layout)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/dynamic-head)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.8-alpha.5","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-tozHL39T2uiCVglueKqtkELG2u4oIoRBTNYgSrkm7+gbkh8ZRSeaibHP4NQKebKBSna5F8QJOFie0EMpjsw+UQ==","shasum":"1952c54127d328016f7e6162fa2ed94b7ede5c39","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.8-alpha.5.tgz","fileCount":8,"unpackedSize":12664,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdza18CRA9TVsSAnZWagAAi/AP/1Oa7HJvq9ZsiCuTJHLq\n4wMJXQiHqKM0LUV6eTnx85mHSxDyBCxBQw7ramOp3frGNCnSBVUVXz7tf2dO\nHAx6kAkD3SRM5q7NAyhyjKN5xku4fagesOZScI2bQr0fX2lWKIqiC3cfmiNL\nlNontqoDfJP7fDoDtTxyOx2wuj9jYpyzv62n+elT3E1cVJ3Xa7L+bHCKfxQV\nNcK+dtczoeec0L9wpPXwtSXAYwWJpaDioBBggLkNR+I/G/YUlrnvU1fw3UUe\n9YgXQYGYkSodkR1PQC1uWMXzTJKaDeX4KkMRkvEaBm8oC3uciK7iFzAbO5yG\ndkiBZithFg2ofXVNbBfFiit0A0e7op/jwXctvXjo2Not4bii2D6SDU9SDLm9\nlwxtSVyKxD7SN8bXy6nnDklgoNt5YaLIrld2A8Di4htGyy6O+H6Xcg6AlPjQ\nURsFFrvnK1ald8+ZQ4ewpnYEhVdiq2pTFFdsL5xLHEsYomK07KJ/NAEjdaER\nVCPOnclV8/W0B6G/o5kuM/6Aacknk/Q4+DHKfdQsKpt+Fre9VrEGBA/1uFh3\nXw+XGLtsBQtOgVYRlYvbpYXAqjZezfJLdgoinNUOnp5S4+eF3iJ9gfurODP9\n147BGV35oBkG8hSKBkNnECfc56lSVg7seLjGn+8tt2mvVC44E4zgvWAbG2Ep\nRk5T\r\n=/xE+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHMN9pU7alu9MS7D5aCERfn1eC/4jVjTtk0XJjadaNTlAiEA0moXNY7GIYzBZ7e5KvERLfQAEaabEygugChm7Ha8tKI="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.8-alpha.5_1573760379509_0.5640537229199551"},"_hasShrinkwrap":false},"0.11.8":{"name":"@react-ssr/express","version":"0.11.8","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.8"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"9b87e32b485cfb1d32692cad0d1260f9bf68297e","_id":"@react-ssr/express@0.11.8","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-waZg4sxxLfPTxcKDV/m0edt48hoChZif4j5q+QSxYNz5fge8JH1W/JQsQGFHaGbuZFdMDUmOLrRHEcRtnaoLeQ==","shasum":"2a4c7e7e1f6fdb6403c8757e2502472d9be7adfe","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.8.tgz","fileCount":8,"unpackedSize":12818,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzbBWCRA9TVsSAnZWagAAq40P/2ELOvLzR7nVmW01IPqJ\n9KDRMf6Gl9PYbwqlP4yfGOXiYdND8lWM/HHZfrP8Jeh5YeJB8IIQFFNapaGn\nwSzRKWFRn9u8BjEm8lJAsjVZiXS1nyomNj2MufTQ87KRSX9KNErKrGtuGel2\nbhQHaFDfB3HMWEGm20ILufmAhMLOFzUYmY5GKfg2V3EJZqem+Qika/nIABfP\nmGu//DaJ3laObSAIzMJz0jHiOzOeg9D3JuHB+yit1AwXXqckwSYEEdIZZffj\nmFSKOpWBAPptU+a0znFrGNpBIwo/FEOjpe7ccXv+OvcXDKTQMydEZb3eGULn\n2V9jn/Zw2Tek5tazqX90J74mihmPORLgGARK+y/SptfAw0i4MNWxgrkn3zcT\nLq05J4tg0qUj+jZGhKmy9fPFEVw/Q42UfGMaywbr/sLB3NBt1P3OVZ3DDMEK\nx+8DunSb2RLx0PcNXSitsZ0LhfGRr9HQ1mqr8wm6B/tsNlh7vvmgnI4azlx/\nTSlktiK1YXGm5YGb+eU0A34+g6cctqSDwL/5ZrAL2VDaLtcywyWp0xNOr//P\nmBJqHmvw6C8pb3d2FWIPKcDKeI8zTxbuBPXLQnAo/vRj1rI/2MusaAc96+U2\n3YwUMk0t6om5A2C4tj+fqx9bj5SZtgM0H7jstgMzYjzfliagtFTbXVIUKySl\nSTXF\r\n=35Mz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDl3SxOl0TO/BIdEOb+CCohHihyJ4mIhJVvGF24e7DCPwIgUogIFQIWHuB7a7tVWnW3JNwS2taWnzCI+yWBjKyU/O0="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.8_1573761109519_0.7028814072228893"},"_hasShrinkwrap":false},"0.11.9":{"name":"@react-ssr/express","version":"0.11.9","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.9"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"9a5b9091edc93c0bdac96d243d2054418b1f5210","_id":"@react-ssr/express@0.11.9","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-ab7oqWUfTYL0OYL8W0R0sRY3Oy3qRVUhBO/G32GKELiM4/nWAFZAQfaO/BiNOA6rbcQZ+x6hMbZFmhvhAzC/8A==","shasum":"26598570285c1c8d74f6b903c3cff60aae12ab9c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.9.tgz","fileCount":8,"unpackedSize":12880,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzbceCRA9TVsSAnZWagAA/2QP+wYT8iXy9GkX4t2X2LoR\nJM0EnfGRBBeL6B2Yxhxm4xl8nueSDIgElGL2TNumzILoMIAZq1RB8inGJQ+d\n+wsxzwvRPEzKgOdcN6uBMvVzgkSlzOkp7uZuKkMC4Q9lS0vd1di1ztKvsvVg\nnCqIVtDACNmpRC819gxPm8OFMpZ1JMpARCQ8MpyoU29XbSvQjx6CDOWEFaZc\nXKxJjZMcUMhAgJjKyPp18gCH2nLQ0loqDV/GtUKOiXgZBuKzk+t1Z4kYq08E\nDV3iCgYBjbKwXK+xhrYfR+j1jPWOTmiBa9BGEtofVZQILXEpO3QFfkuV3+PA\nFqVLsamlFWtL+W2liF985PWL0G8Ult/QJGhIyOKXYKbDrRe0AZ+8URRWZX/p\nJb8jONUWENEe13pvu+GUyspn9HUiXTDASy2F6XtiAFwnI95erTwGDrCa0MvV\nbY0lJsdyWmU97LlOE4PsuzYP38eFrXNSm0A6Cu0v3NV1vd9SpwkrAVYV7rRO\nPhI92cLiUN4pjFJdxWA8Sp14X9aK5VVwfeRWrzwZgiFVUrxgmVTXwwPWC9do\n8SOudZ1WzaKpo9S2yxPoKDURs0vI/XKplTNZCFMZrgluxvwS075GRCDqmWJu\nUAauujTV/hiu5IVaXC74pO7byh4WFOexGwlSRnbiDHZP5wiInha7I762muOb\nzUoR\r\n=7xfo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFkCR5TLv2/We2Lahk4FeYRH6/o200T92QvIv5ufG/VrAiBgV6llkoPam2TwlKgSq9XHqQkvwhehsjrT0xtBE+jj6w=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.9_1573762846292_0.9520078814803488"},"_hasShrinkwrap":false},"0.11.10-alpha.0":{"name":"@react-ssr/express","version":"0.11.10-alpha.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.10-alpha.0+aacb390"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"aacb390f9144898770a14353060ba5465394b04e","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.10-alpha.0","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-LLk36r5SkePIjKEei0oenwHtabkwObaTeiJCvX/A43TL6AYEg9fNVLxGYHeaBNVszfZj37QLUOCBi22H8FUJiw==","shasum":"4a4a6ef87f98ae3d83f0cd06a2f721d7425164b5","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.10-alpha.0.tgz","fileCount":8,"unpackedSize":12914,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzgDsCRA9TVsSAnZWagAALpQP/3aTJZYHddp4gk1LryVY\n+oc6A0EQlmEmfSEtaqIr3gblC862lEHq7C0tS9x0osXXOC2Jv6PWJVXkMTS3\nNU74CIb+umSciCjFTqD/vz6gdsXqcmLpLyPf0Pm5aWKRdNADaTpGq/COM1m6\nNmWxETPL+2clDwp2ESloi+2EQfxU96ocr3qHp93zqipl81pJ5fOm5zle5ML2\nDtoFBfF6R/9S5nb971J9xcitcJh1kPeighR4RBkTOipZ7jZHJ1lhxZHjPt0+\nzROQLvoYtSaEWeUzZywQmUgtzb3UzANVcEAN8Y044Jw6SsfY4pBL8hT3uzux\njVg9KOSbGdK0Krq+dTEG0JNmyIkNsmwUeLX7KLYAnc1w63JaFbiVas057n1/\nwE+ezpobxwzdqylB4vTgdaFm1/6kWgbhrSofJNNgzLYaqDxVSmhc0YfFNPvl\njAyqeomh6NFnkgrHfZSoqa0ui9IU3AKm7U3GxjC3Ec81zOByYyZg2NA4iXoj\nzPvycbkDWDa8h9x51ZhjULU/TcDKYOSFoVJplDp2vqC9Q0lVovikbu0vORUx\njgweE+aQISUfNhZYNTMnShrgZE6Zetqiw69yNTk2/8Rxjz213gS+r048H+YJ\n3JpUA2sghEviizefjqcIsH0T484aDDmWD8pIXd84J79PUEQD/PhMJ84Q2i1O\ns2Bo\r\n=wFKT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDDjWYNYhYI9f6bnACKqfWK3FFSKJmXT2cjlXCjZMRaywIgeFJldgh43yrODJxwrgW6iD53yg13VbL42AKiwYg/mpE="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.10-alpha.0_1573781739853_0.23980699389390558"},"_hasShrinkwrap":false},"0.11.10-alpha.1":{"name":"@react-ssr/express","version":"0.11.10-alpha.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.10-alpha.1+56088be"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"56088bed642abeb79fce722a7a6b3326227f998f","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.10-alpha.1","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-pSz/LFJ83ayFr7tVWTYwr0/g4PTZdgogVbpKWCg0SbibCJHE3pc2RncOtuKJeE8t/ToXGAS6LzwTEbxCv7+xYg==","shasum":"a173db258d622c30b7710781f5efba253cbed82c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.10-alpha.1.tgz","fileCount":8,"unpackedSize":12914,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzgJLCRA9TVsSAnZWagAAMvYP/2JkNO8EeXQm60mZ81iO\nG+piJdYXckCxvovq0v8aoKu1D1IPv/7uXjaX1mGSH/KRlfBJw/QVoDd7uPGa\n7LkuS+zoOJcPxX1W0bvJ6QUAACA1Ryo1qMyTNqDM3eFQy5dENsm9Btv0hUI+\n4dU+WLW9HBPpsjCyktDR4uUSmb02vMrLeHAmimdl/HmdYk8J86mLvHPYfrO7\n+71Zf5jYp+cNwlqx8rosqArd+4am4WXq7BxqTuh7LGtkcxtSB4ZK+RQJkTPa\noUrnITqB2xcH7KBpeIp67dNERih2MueYexqAnnOIaplcrF8giKmlo1DiJPID\n49gI0OiBKjZqqKPEwjA3tlF3VVgLIZBanC8G7zHhCVngjqk/4Ab+mTIlAOJx\nTNL0HCyx7FsPLmdhXSIDAZFF19VL7pdL+7GIZ2x6lI4DIdFdrnQ3gMrHspul\n5z6tx/qJ0H79ubowz3Hhvs+qDdTIrh5OT0wYcoleV+vK4BU79tEQnSuLSsfh\n8KwNsxTkklFXTs4WACDzxiIQHOozbS/OOxPUhD84InTeRkZciAS2Ary+/9u3\nYh63oaB4bxJkRquR9QYSt3hFfZjI8U202vgthqayS6j4owarZvY77yE6318A\nSKIM5+aipvoNoT1PamkurpmzCb4wLsbPoT3/ZOQo9UOPkfeGVeVYN3ov80jm\nP642\r\n=bhW6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD8P7i/V09ifdRkiv85bv0xI1exWEA+VSEAIcaPP/n2RAIhAP6uwNzHRkPr6LP2DW+A+Hqyd7KVxGbTU8qgZVBHbm2/"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.10-alpha.1_1573782090979_0.33875519163861756"},"_hasShrinkwrap":false},"0.11.10":{"name":"@react-ssr/express","version":"0.11.10","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.10"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"e1bae8bab745dfbe7347f2127f8c854a8811857c","_id":"@react-ssr/express@0.11.10","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-HYJUfSmaIvZpAlMjKGV/1vHUYkBa+2gjcmLgkktETgNHZSUsKXyjrTmFQ5p8amsZX8YEf69MNZutBnPv+qIqtg==","shasum":"5c42cf92543d2fce7f4cd66d9eebf7b610276c5f","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.10.tgz","fileCount":8,"unpackedSize":12882,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzgLlCRA9TVsSAnZWagAArhUP/RqREjFKvNhD720M1C1I\nf0MKtqxZGb9wZK3MMBpPFLcVc+WI7DTJ6cof6xjYRc+Tvb9qXHrMbwFD+Zx5\n9N1/VRtxt9RGQSpqf/yLVGfq0a0UVkh4bp+Q6UVtA3dWxRdqicOMKwO5J50o\nfABNXEYumrdozzN9RSH1jmW55j7rPjV6kN10gUGYQKT39LXaThmcTAL5KozU\n660rt0JDYr5rWzV7G+JI6eHGlm2YgHm9jVc7mCNNbbzpCALLt1yPHL8AO8Oi\npZnW8i2eG5Ck2V5OQuobsHc3YP3rRgnkC9mbiRwmR8PpIBxckhWFWLD6zJtz\n2IoM1FJkdUu1Ts1OBQtlKBpWutJpm79+ewa+GIU/GrbSFiYMIqgHNPpv8G9K\nvojB9fZ6T++BzWB9dKNOU8lnMTVFxRRPP97WlpexatIrqzACIq4BCJBlmG0C\nSVm/vuoLM6xDPoTwBoCTiDUDvovaj6dho6YHGlBqHoduDMux7/Q1t5DJ6jD1\nsgnp0ZfAMM4AujoxBhC1saJ+BOHekYca3JUuMwBwcq3IX4yvtxnuMlEzq9Sw\nYsZKcwRW1wyPq//vZJUptuEWONMyG1VqP6idslMI+Q725K3Ed78BAQisSTI0\ntrxuXWwY405nOwdksG23unOKTxtVtLE+peqkhicJh4HIy/EC/2gU18r5YUmT\nnvr7\r\n=WUHo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICmCcFcK3SuSy4y48OZGUfeceYbWoSGfAsk6pbBETggpAiEA0qy9qr9xVyCaK5NrRSTj+8dUo7tFbfX7p2kOAIhd6KI="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.10_1573782244847_0.5899877801039619"},"_hasShrinkwrap":false},"0.11.11-alpha.1":{"name":"@react-ssr/express","version":"0.11.11-alpha.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.11-alpha.1+0045699"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"0045699cd5ded447d153ab49affefcb6e851f170","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.11-alpha.1","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-0dlHnRK1t+yOPA1G/GdbYUaZQ2/ZPSgBqrJQE6pywIqFOxVdTqewaGmisCZPSdfSLfOcZ2m0mDOsPmVdyRwqOQ==","shasum":"e1a8548993d40d7e4937b9ccf06eede2a854d6ae","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.11-alpha.1.tgz","fileCount":8,"unpackedSize":12914,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzgpyCRA9TVsSAnZWagAApZoP/RQ/jco20WwQQsCc/eu6\n263VTOG9rxcyYuskCiVsvQhV2BHp9g6UEq5xAwYhUWzmWT5WqUTFtff94AcT\n5Bf/lAePnd9fO/6LYGESDOFRCnRrsSyRlNL1vAbjJVSXKgtGK9i7aH5b4p2H\n0/dBoFObE+TcP0UDKZ2SDVd/+Tt7Ck3GRLN6PNOtmFMbnKsNyvCXvFZlGHx+\n/Efd64rgc8mWabLFtQHryJvuRXeqE+CTz+DN6FGOGF7x4cqBwDjrsv0GPChy\npnoY2aRIV1RfLccbRi+mrZYYOrSVbLHe+eMEPlxk9E78YdLqX0CQ3oWw4DOV\n1h2PguyTOAYS2ugVQQIaRRcfvDPPHM3gHgk+phR39HVvzYSzfLaHRbgeiVmG\ngo+rMcA8hRx1FLGUvgdoprC5w5ZX3+I1d+bvQWmweTKbH9zGkGKQqYO+udZc\njp6f1JEH+yd2Kj61ExZx6bZ1AlubIGPi5ZYW2N7Vz8F55l22lhiSg58AjbNV\n3omlBeDZ6KzpwSBnKiEddv/KubmIfXoTBxtEYUHkcQ70j7LFb6ZqeChAhm0c\n6oNIyY+iD7lf5GfJHG9gnhV/qmz64nKOnh5S8MSWgU6z1bfI7HcAqJZqQx5j\nrMc9SwLZDDSxQK+crkXyh4hbXr+Q3ew84JA3x3hchcSFv6W+r8l6WHFhiDQD\nYwsl\r\n=iMXm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAxvj93kcaDGzVeTJBQxa5EtyyO2xPO6B0AimO8OHmRfAiBe8sOUEDF07TLbA74oSGMc1u4QUsUyyGY8DsCTzMujBw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.11-alpha.1_1573784178527_0.15589187448678032"},"_hasShrinkwrap":false},"0.11.11-alpha.5":{"name":"@react-ssr/express","version":"0.11.11-alpha.5","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.11-alpha.5+fce044d"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"fce044d453294ea0d4ce730fab1aaf3b440d4304","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.11-alpha.5","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-OoxSPCUrhvJv+rZ1e2AOfxPuY4cMLYu8Lab9/5VlTr1HOOJyb39OMQ130y/EUSlUpqV4xxrdXu+W6c4Tmp67ug==","shasum":"1fdedad9a46cbe134243931d90dc778423f25c35","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.11-alpha.5.tgz","fileCount":8,"unpackedSize":12914,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzkeWCRA9TVsSAnZWagAA3hcP/212XEw0iO7UO+WZjx06\nmb7w09gU4/0g443T0fJ4r4qLvcqQqRXhDoa/eQFE5YjUDcmnOqSAEtKPaIe4\nJEFhahiitUY7k8RJ0IyCXiZ0jxsv7njEzTseMsBS0oN44H83btbhWr993e6E\n/PfLn8jQ6LF5XDCKsHKQcNe3rrVdz/SnyKi9Adw7DkAYUbP60mbkZ0rIIjgV\nCvRiEIgPkEYSAusnv0HQk56dUJIxY1x56Zj+bHNjEW1RmuR5/t2xXkDgzYZt\ngnlV98iJ0d+lADGF0Fl3e2qvh01DFdCA70htmQxNqdRk0OKRymMRwT4ghgNH\nKk2TgGWchcg1GENDMZ0IpqgF3SF0fIKBkmC2FkOJ6jTVSox15toon4OqbGsT\ns73vNb1jvzR7DsOWZvnoUl1vmnhDUrxYS3V7SXfas0NOavUCA5fuoVYBgwgq\nLLTMum+vkx6Aj9RY8TRSIrOmJ7W1LG3tj65TjRTV/iFvGyzmZ04g2W3IdO1I\nkKB/DV5CM3X+MASFGYo7a/82ImzXdEhV8kp67NmN/kE1DUpSYje6gUDuM0eI\n+/58oHCg6oH/nutxVNSEFLPtuSec/khhXuY0w2aL0aWJ2EQtjHPm0D9llx+l\nOh1udewSf72DgSI2lAXuhVc5rcT15V1ICzRHdTeqVIY5Hgb5tDRIjrJ5mR5N\nStmw\r\n=nKAD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDSn1C9D1EbzHnPsfrniz5Do7x4QpyXtqNahzazNZyVxQIgUrvmoKZGSbsKb7M3rzt/nFdsFPTLomQZIPgsmQnUFkw="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.11-alpha.5_1573799830146_0.0015156286485589199"},"_hasShrinkwrap":false},"0.11.11-alpha.6":{"name":"@react-ssr/express","version":"0.11.11-alpha.6","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.11-alpha.6+4d27a7c"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"4d27a7c203f2c5c21897bde3b162b1bb8dbd4b0f","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.11-alpha.6","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-sE2upDHwMLRGRDOviP42x0ags1xF1xS1HrrfR7cYB0R+vjUJ5TdhtjuTmdpcLCnovBTJlALu95hNYdM85NHg1Q==","shasum":"adceb836304a07bc0cbac677ba4039424091f22c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.11-alpha.6.tgz","fileCount":8,"unpackedSize":12914,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzkhwCRA9TVsSAnZWagAACUkP/jYUsyQ43ihzW1P8NTo/\nNnAerhG7z7idPSbzSJ5KEOKNPiw3wHQAaSqQ6q0xrLS26GcfPAaulDsHy5au\nnWC70UGiyJdtktHtWUhG/qysuCUnaA1zvDJ764ppE0SFJZgpCUKJnuUM3UvR\nUp1Uk1fiJZKSvf/wSGkRU/rQUQPmDf/vy/cgi+HR8/K4G/MLO7jIAt74kcDL\nFCPHTNZ9j7KzGcV7fWGfhOnya420JiPiLZu2qe8KDNDdDpvhjBkTy6s61LzX\nHtTPahs+vn6emg2COIiE+XcOwR7P7sUnxBZLkEN2P6CbsoXHqG2O4tA9GfxL\nALRKXnr+M/nYEnz+WOOT/IkDWvSjNnQ6t6Kwt8n2MYH4j4U6baeWFKynwHaQ\nn8cBiJNvUJA7x6R+/FZ0GSJ1qVNF3Bcmm2+rZRUEfwKqD0qLsLI8hgNRZDxf\nO4bHydorSzRA9WLswCM99ziSqIvMMZie7nJB5eGwFon5oZ+zPbn5fGLmqA7m\n2Rj1sqEegYA1Yaqyghx/gL2bBOB1yXsZT60TkuhvgmZwKLbx2BqrWg7aQylB\nF9XByk9MitRPKDhBei2LgZ7Bv2cWVWmAeH2vXA8mmpkicSV0v9JwU2qa3lbZ\ni/9YW0Arr0Ry4vvCRjy6EOYKBY93zeFbVQUSVg0pq/eYAKSIxm5Czc0lx/4d\neDvZ\r\n=aByS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHwHwTUG9XhVv0RNuXNian2nHqCE8UXzh350KCsgDizeAiA5Qf7Uc0TQi0opsn85jVGYVkaVd9ATJoTCBwAX6cXzog=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.11-alpha.6_1573800047741_0.47204975145932737"},"_hasShrinkwrap":false},"0.11.11-alpha.7":{"name":"@react-ssr/express","version":"0.11.11-alpha.7","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.11-alpha.7+c80a5e8"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"c80a5e810a29db5f9420f01fcb900a39c5bfd684","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.11-alpha.7","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-wH5ondkuXkYsvt/2fZPOygNIAt8iXR0HruDTT7QMI/LSMkfViO/aEjFCrj9xF+yOF4XDXaFMPZ9WLItODjmB0Q==","shasum":"762553cd7e7910f815cbfd3e82ffb5c29c655b01","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.11-alpha.7.tgz","fileCount":8,"unpackedSize":12914,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzks7CRA9TVsSAnZWagAASp0P/25vfqs/YNT94wOXl61g\nf0FL3wwKmLNEfJnZ0OIEsorgWJwoTPOos/miazlLuJrXjyjsmoyIfnkvt6sb\nRqZfqC7GyIqoWDNzGDSEocXbeRwF/5JeX8oMLny8MC3i5RqBmwZ4hExrd9/5\n7wZ+EUBcYDcP8G8o0/RR6VW6jRGEAxiCZxxnB/SvOvqqEkzDH3EYAYIn3oJj\npmVhh6SHe6GMoroGgc/dvQiqaSXjy7dEaDtjXGvazI4+pV8Q7llyRKsLwCXz\nxaSKMnitXIdP3Tpi6TyttglcPpxDKkV60s2dRkd4UUOX3tpqrtAjNnh8fi/d\nJ5MRmHjvSgRjk7IeWehcjAgdfASs+jzQki6ujB6BFOfBCJOFd2vPZ8bn3J5B\nXbw1wkkX1aOX+4nrUd3r4x2qsJuXY4pIbHiBwbHds/vpG+0XzV1gFd9I4LYZ\n6mJqxMJ5ln0Z3vx/55/QN8XQWrIEPcYm8A/C3jqfw1W37G6Wgy+6eIlT2low\n4OzA/2dABbGIFuyISgS/1kLtOsfT2UK7vLYT+W50O2Q83Q2RPCjRKeg797Dp\nvZ/++no7lHACZ5bhJ4T7z7R/23SMuvx7O1ophi0DQo1oOf8EBrp9M3zcAj/t\nzZ6cdkY543/f/Z4ODtQp1b9xoSJ1kUiswjhAfTPEOfyC2dn0cI4tQxW2gu87\nsUE8\r\n=lliU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHxDDZMRxGzDwqNGKnPyVjYW5+Nbh02BHM02HiXlNZrDAiAkN7tdX1pxk8AOu+RFaxCGwigPZ97bvESBAZPzpNLGJg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.11-alpha.7_1573800762746_0.7042242623335864"},"_hasShrinkwrap":false},"0.11.11-alpha.8":{"name":"@react-ssr/express","version":"0.11.11-alpha.8","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.11-alpha.8+5f97533"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"5f97533634913e8d90647f37123894a62b4c8fd3","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.11-alpha.8","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-eAILgnQ9UomhDnUKCbI3Y2/Dsppzzgbi4g09haSU3dS4QNJhu1Tl3b9BJW8CAi84gT6SOIqa7CqH+ol+twvn/g==","shasum":"5835e1fef69c4a09504772ec92dab56f8d4ce545","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.11-alpha.8.tgz","fileCount":8,"unpackedSize":12914,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzkviCRA9TVsSAnZWagAAIR4P/Axuqs414FsGcd069UZK\nVD3sztLV5OwU9VoKmroRC/VTcB9F14wVfCqFmQ9/bsmL/4Bmgj6BNz+QFktO\nomqKDMZTacKopwjo1yxKdeResVRAqQXIX8tTfa7yPCmJ6zh/T1WU8NMZeMqc\nqMpLd6DZBog2Sr+CIJ/bBzjivP1IyolC+mbDO7ax2tuPqSRclopi3YL0gfAU\nTC7xGI9OnsBA+WH/zcB83tiMU0PBlZxyVkKvYgb/chFbr6mpZTfv1JY9b19i\nJNb+RJyHL9h0viEV7R4dwJ8dpHgcWyrUvcvVQAho6TJoMN2vIIGg/E+DK50l\n2KqOmCJOyumH8na+RLZ/nS6kj5NYPx0vi4pV8Gd4g+ntVorpd91fC19dz3Q0\nQWnWHxEvHBsJBgA8yonuWC7fcs3xaNvi/vpIxuatSJJAFp8UqVVVCMy5iRGl\nxuF6TMFQMFWONhmvNlKoHDdO9RS3TMCtKJTig1yEP0qdwAqP9vVazwBBXAmg\n7T9+GamA9nqdMHic0EC6moVUrhp0PXVz4TBroRQbCf0Ss8WeqpMpNUKLmDdy\nfRbrJco8vfYQTc09jZk2YStjLVaCxQ8c3RezftvvkiDUlg6MGM/bbIKPUYdp\nHvbhj8QTiw621ccwcGwc782HTvOyOFfh67vk5ToRUj7ycmVNh4gycT6EZK3F\nfSzV\r\n=sP/9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAJ3KefuqnHkjVMtj384EhSolllqLHphlIGLmg+ZbIWTAiAtB2sgB9PRY6+nkFYqk7NWo+0bier7Ca1vQtPi593vIw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.11-alpha.8_1573800929786_0.5241189377277953"},"_hasShrinkwrap":false},"0.11.11-alpha.9":{"name":"@react-ssr/express","version":"0.11.11-alpha.9","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.11-alpha.9+2372999"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"23729991547dd53d290b45a21042a4076325d759","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.11-alpha.9","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-NxX3mprrFKfOSCFXdqPXLg8pgKmWvolJCVULeFAYC7ug/jLbB4cDToahpUn7Uwskj3zdtdODVLWk9pGY2Jf3sQ==","shasum":"2fcf960940ff968ef8b6b22b1e1bce3020424faf","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.11-alpha.9.tgz","fileCount":8,"unpackedSize":12914,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzkw2CRA9TVsSAnZWagAAkaIQAKSbn51/albjiCGdgAsY\not/2WbkZprySRn8bECaRn2AuvpdGVS+9S3nbO3yLvIxlx86/2r5F+CJOezLE\n49eFwS8yDy2wFGZ0f+A6Cv26nuO1EfNcJnWA9g/jYatcw2PUPySMFkaOp635\nljnvU2IFiol2QpSlCPi0LsPw0WChHHQ0mJPOa0FC0xrlSGfA0u+JBXdYzwGx\ng4mzLZpIinZKEVBHmmlprXGlqA9DJlGGXjwcHnxSl682osDJBj4Q9jBIP2Yu\npQStOzfXUhj5bzPRtA7sPON0gSuvrKzyXdK4cXwaWy6p+MBIz8hL6gdpHD7Y\nTFQhK0cUjIh1um3f8dpSdmCwokKF5F8G15e/oYf4m8+DRI9tzAHRfu8MMXV9\n0V+em0aNnhPmllB52h6BRYrfVnvoRcAKQvnQUguIPG0+PgKzTSAlgKA6HllV\n+aR9s9qvwbGKbZkjVWoHGKunXDz0tT43MWWVRyvQvNDtJwkTBsVWs46vss42\n78ESMCnfhTXlTAiVgPAjpIRH5oVqbiNZWdDW+RBK5IS8iT2zFa+FZyfiCKgg\nPTSlrLdQ+H/zIhQES42dPb/i0WDm8X2mMz3ZXgjlVhp/ahgOedbRbY05/AhQ\n0swOhZwrJaVN1QO6XpHrmSAzPRoLLLHs0hhvHKesNlbheEir0fLb8CsADMto\n8Vhz\r\n=46Fs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDL1sBzDE8MZqKGOPd2C9t2DW8lNJLXWcMap3T/9bj4AgIhAPA7KfR6A+srVKvX0JXfGh0ume6eazylIoZzslybkFni"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.11-alpha.9_1573801013897_0.9891228250830844"},"_hasShrinkwrap":false},"0.11.11-alpha.10":{"name":"@react-ssr/express","version":"0.11.11-alpha.10","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.11-alpha.10+7e1fe19"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"7e1fe19e0f8d64b52ddcfd33c8dc87d54d7dde0c","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.11-alpha.10","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-lVyJ5G7TLglABNwBrXHRfRr/DNf2clnRcbMd3whLjIPtGSWj+LlK88kIf6U0QMVa6hOpUyIXUwJ8diRP5TAInQ==","shasum":"5f45356dd58fdd7272f5617c40a08f295c482c74","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.11-alpha.10.tgz","fileCount":8,"unpackedSize":12916,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzk1pCRA9TVsSAnZWagAA79wQAJodEFh95N8Vaq7ZvsYB\nn6iwhAEx6vtYH444Bjq2ZgBK0NXbkH5aPpu72adW8dDR9F0RJW12B5Nta615\nVvZKCwYcK3YgAU+IpTLj8xONk1/I41A4qYMrmL8p/lWwAY2EiaryYORmO7cr\nt7xz1QI1SUw+fPvSiwdFeZif0hjS9VnnrMuuzM+zCZ3WQXSKjuVXgtyESBjK\nwZxN8ZCBAye1y3ztE7Gc+FND+2cfirIo2p1D5vYFHrE9TvGObJpbrP2fKkKI\naZeJQt3oXC+dlGPkMakq+0bS4BXll8Nv2MO96PjQm5haaMVcMKg1HyRsF/+R\nKTd/MrF084jpVvLxq5NIDONVnwcj08jgSOSUAXUt4rFTyVn7a1aasOjg+GFb\n3Om+hp14ZS2APTIzRj7hSuj59xanlh1JYZdQuqNUOro4UhaRV5PTmCxWzJnb\ng1BhPePFLrroVTeHRMkvKfFC/OtmWfO4dxlZB4IdUhYftoT3uOLsaF5XAX1p\n9LVqCs7aYp7MJhCILrJ5GH4nB5aFNLFkm/gYIrZz5ApXZTxeteqVk1BsjbTr\nmTS4XHUVY1x1aVFUd5Zi57oSTtqXCue4u2205GHbqT3yZ/wFM5bkN0of+IhR\nPRqxAG+CQ1e912RWns7nvsJGcVtewMgit5jFHbeMkX1SFP48tuyK99mxg1h6\nBpYd\r\n=nouL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD6i7Ey0gC9bIqsFKPaJFmafotWYzb4VSpRCp8K5p9Y0gIhALcfR1eM4eX8eDrOKQ5UNd5m9LWDuDGo7WrpgNFKOQOR"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.11-alpha.10_1573801321363_0.17099638760761282"},"_hasShrinkwrap":false},"0.11.11-alpha.11":{"name":"@react-ssr/express","version":"0.11.11-alpha.11","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.11-alpha.11+2b12305"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"2b12305441975e24ff767519d7fd0c9cfccccf6e","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.11-alpha.11","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-mjogBXE62W23O48xP8FXB0DnQ1Rz3swMGmx3gm64h2HJvvq0F8OIEkC3mit61v/MALGPJlgj9/joxeOyybZErA==","shasum":"432057286c50c2506df9c427084bfe5cd4c8a462","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.11-alpha.11.tgz","fileCount":8,"unpackedSize":12916,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzk4xCRA9TVsSAnZWagAADYkP/3dv8T6n0A5Zz7plkJjD\n84d37FqObnEDtfG8RH3HCmblhzzg84J8plt/VLgFbibEDxRpjkzOGgRqTcAs\n+MhEI/xf6EIUC9rBbnE0vgEr0JxiPx9tnvb72/VAoca5d3ZNWOPBVwRyHRwo\nxxWtZvm4kQD9Kip+LTDokv4Zden61x0LxpKmR4E47dtxYLJNqLSxxbJtijER\nOAoUyrYj6bwMiHLtwZrVRJwNFzt4sErmm/xB93UfNDZwXBmd5bMfyvQMxvHE\n4F3D/Ej5pOaP9qiv0IkFfhhT8/YCt5F3yiWx3CHUCKQGxhOxK9VbGuS6+Qsa\nOFgpUxXZc432B8SM+kffFUFsXwQo/jgGQACLTBb8xHNjmV0peFbxXnl22vtA\n7V797JPnBxAEw7PL+wJ1JYrXoKLNFtviPtHxNU0LTKfLADCb1JR0KCtTS2fq\nCkNOxqIsA87+BSIhgmDl7B17Rlp36by/1H7ox1Ay87C4MLHmqJu6J7TsiSjB\nKdUWvnA5uDdg5V6SOOUelLkvnkXgJNXMeQNaFOmaWVJoxai9Hz8/ik4ooCs2\n7RJwbFEi94NeBF4cxmbZx5d+uHypbBBNqHLEQB0rEninsYq+EgbSqxEWNVc0\njfaEcvQTPitzhJCSUauHvg3egZuuMxWZ1QPTcIBgEpp3B5lMEnZnzvVdIZoC\n7d1t\r\n=FI0t\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHReznu1wGpFUgpm43Q2QbI4gS7ln9YLQtc0wQzhUSKCAiEAsu9dHv9uEKvQQu4Z0ck1ECRhP2uzXFqeDUe7yieh+/Y="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.11-alpha.11_1573801521020_0.8798581476102425"},"_hasShrinkwrap":false},"0.11.11-alpha.12":{"name":"@react-ssr/express","version":"0.11.11-alpha.12","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.11-alpha.12+f6f9d73"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"f6f9d73ef1fa8dcad32106690bfb91856fbc2084","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.11-alpha.12","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-ymWEoFxITnB+hwTRuMnpY8OPkJRPsNFCb4kMAw8cJhCkDIKpcoe7u0kShYwqxjxilY8i6sJcI/H62LTaLPBb1A==","shasum":"13860be769e06b7711651288bf71a9b00abe60f8","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.11-alpha.12.tgz","fileCount":8,"unpackedSize":12916,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzk6TCRA9TVsSAnZWagAA+oUQAJjjK5QK5zZkLKq0WNjb\nJb4kLcyl86Xx/iDL9OrL8JOL8clnx3AuRir+YZ2TVDPukPOEGbovn09MqLIP\n5S1WWtGdpPScWvYQvhzMLlF/M67gShvy2EJpPCotSGPAgPlxbTP//t6wGpBe\nrqgHsr4U/0hlu07utQmoqnzOdxWVsSzknAZea4KBQwmw21Xgq5uoogGk0/1+\nTK+pgHKAB0ud6BjzxpQvq+A4iEoi1NRvhI3ghfeE6LHkKTW36CpQPR51XZRc\n/t9nDrGmg8oYiyk1T7KCmSGyXN0GSci9vpyl3P+M3/GOcDJpyHTp7OXA5gXo\nZuCdZ8kDXgrj5X689UlKdsZGYXlUwfDeiQ17d+fLFnZRU5dRCoRCBAElW7qc\nQBeB3efETjEeRKh0PDzCxboXUBLxUktNOp3JVYpbgRSlP+wtFmD/RrSqt3+3\nlo0VMAhEtvSZn146ZRmf43C9ZNG6QuIgPGV569cK3aMEVjKc+OEYMKU2gVFE\nYcuZhAdPqKqle1oA+hUbG2293gp1VdMZ8bqmju0OFaFSdkUqmgaX2HHULAk0\n+Ho4OcYLAvGZxXQDqm7OmWOwOEZNMmuvkoBpfhET7yXl6uE04hHoIvs1Bweo\nPoi42xf4SAGP4y/gBfXRf0RuKsoWTPsTQCRoH0+5uBmyn5eddHixi2f69SjY\n+O3D\r\n=ZEnD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCvRAwpxiP21oBNMinZeFDFn0vx3gUU9MRUTphchXAPTQIhAKqor/9nku0E6NoHNhlVtT5n9NzL5DP3LLO3v+h7kAB5"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.11-alpha.12_1573801619446_0.1061523957699122"},"_hasShrinkwrap":false},"0.11.11-alpha.13":{"name":"@react-ssr/express","version":"0.11.11-alpha.13","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.11-alpha.13+f0c3e70"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"f0c3e709ec447bc63ca213047a4b23e2fb188af2","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.11-alpha.13","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-DMtFTlvJrhjpq+ij3X6pg+HdLZlEKC8xAg6n1wInr5kmuaIbggpfEdCNK+0vWgK3QQ8Q+MnTzgJxNwts/2RdnA==","shasum":"bfa02ff2f48cebfacd435b7baae20ebeca03ec02","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.11-alpha.13.tgz","fileCount":8,"unpackedSize":12916,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzlBBCRA9TVsSAnZWagAAJ5YP/0KtSwDS0OuUjPynDOP/\n/CaYQBWmh4rJhiAxll9iH78omNL6uSCQESBbHg7kMHaYIfAsPw0UXWmaKZ1h\nYRQjjliKEX4l0sCCkpd22fPP5q5t15f/NXTocGGcVju38YtQDVHxObWs4F7Z\n29pS86eEcQ0x9GKJ9QCgqw+1D+nzmrA5OMIk39O4qC8s57D2/PV7KaxsYnLt\n+DKrNfYfJmL/OW3egkc8LW1Iy6iwgkk2Zgmk1i0TKTaIgWYsyUrGZyNW9BiC\nbKCuw+xWRoQ0ZgK309eHNmZLxMJpa411FJOpHdXVkX2j61t1ahpX5DyQ1TZB\nJsCni2/g7BBGq2Er3+e4BYH7a8Pfxon5/D98qDlIjXAYbseJthvZzbpZOA/s\nM7ikxQJxgfxhvB2jpH1879mme7s5QmzDDCfjLq9UQZlqY5VQaUgSOTn7RwX6\nr648eAMEph/E7Z3JTou2M047eaCDGstJst4VGiKC+r5FbdoBQl8/4CWMd9fF\ntrlv0OMJDcJm4jUE2WWCBjgpOOOy6yUQmOv5oL6nl24k6lGzb42OiQ5CZ2jH\n/avkO0pHEoMjiZSfw5f9nefV4xGA8lbUf8Lr0DWhowRVY2ADwybsCK0w40U8\nruwnVbuUNdId6RJkmqga/kiun0hIMgzcW0RDskCw+q0MACixSnZLIGJHWHKM\n9xdp\r\n=oLVT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG86hSl7cK40++tgLWsntrKzs+BdAX4jMQ30woLOXdBTAiB7I71BC9smhYKpIkqA7YOpfA0bX8hqLmUh9c/4Erz0PA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.11-alpha.13_1573802048732_0.825636170501858"},"_hasShrinkwrap":false},"0.11.11":{"name":"@react-ssr/express","version":"0.11.11","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.11"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"80cff19ca378fc92140846ca75b0cd32a041d12b","_id":"@react-ssr/express@0.11.11","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-lHgxC52V19Alq7fAbLH7hbQ7euYdgANJRypYNUlctaMMhCeuTlzkXIQjpeSgUrSgadZFCe155QaqujZazlqKQg==","shasum":"277964f14a00422b8d6994c967bdc6fdb40eee8a","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.11.tgz","fileCount":8,"unpackedSize":12882,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzlELCRA9TVsSAnZWagAAN9kP/0Cz9TPOnPQLgdEvnXDa\n/zxJW/M3Llut+cdo3IJawynYTBFjMRwkw805Q20FQ3toW4xcW3xcUmf7fvq8\novextxGUIf+uYQ3jHhy/UqsJ+GUcP+ArfiN0fNv9F/R0ZAynJ4mB5woE6S5j\n4F76xx2ZNZVAQIW/4WGIix6jgbjpX2xEG0wPodH0C5hhTLqTW67PB33Majo8\nPqVw2TSNl4KzzvpWpuKbpKWihSPQ4WlvvfnoIA/sQmDOUJdypedvCGYwItNW\n4awADBXN6BmqbIGvn1OsNq55xSJyZrc/DKLNkskeNvN0a+mZWqbAoxTJMm3y\ns9ivMNMSJh0u3fswq3pjqDVn5kwxlPhs5+6RWWLjTNezX7bM0RqS0O9R+suu\nh4mSrUakhQ0KyaVeXOZim4orvegiIJXH9V+KAS+E3a2I9c/SzYKIp9dMdWKL\nqQhgWsOCJl2mykK5eBZSbjIEv029xpmWvq4EZH3S1oChaSEB00gyWh673GSG\nMecUaz+VGUow/T2xBYDPeyEQlFLNmk93+jifypguQ8LQk45Di/7LMqiCXccN\nivWIh7YdU6+DJYFlQ25wHMkLRkfJ+WVN4fKaueoT8J7X73iZ7f1T2fizOXDq\nmWC8Y3F30Y7FWp1ZqdIQ7/kPyXZMC1C/nbTPrNden3Elb4ojovVQ+pFg+7Bz\nLpEG\r\n=KVmj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEoihM9vrPtBIjVSmHkMB7vTr7F9axYGe/jbPp/VdwXnAiEA7YBbYiFJsrGeyYbXgugqaUed+MTlKlmdQtUqPyupbXY="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.11_1573802251505_0.5578281763262398"},"_hasShrinkwrap":false},"0.11.12-alpha.0":{"name":"@react-ssr/express","version":"0.11.12-alpha.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.12-alpha.0+edc7f4c"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"edc7f4caa4a2affa9c2415882f37129179322a8f","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.12-alpha.0","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-9EU+UuoBTHWZoA/kpKDhXA8LqXzwI9p1BPbQluTHe9SlAFWOa7jPjOFnNFTXOglMxeEZuQKAyxz88MO7tXHeRQ==","shasum":"2f5afdb301957c1f850e77518ff1745dbcc4fee8","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.12-alpha.0.tgz","fileCount":8,"unpackedSize":12914,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzlJaCRA9TVsSAnZWagAAvdgQAKT8Uyc46FD27jQCEI1T\nUaNIgRQ3k112ipdPGE7sHZbW1fH7oypC6dAvwf347a3N7mJjIN07FMOQSf1K\nbcjP6auELJ/Mm7sLN0R77pVZTK9kO3MQsQDSfPpzdoNNFR2b0Rspu6um9bmu\n0g6NCQN2YDY5RQCdkm4h2cPjr1WEkupYyMrHG3ulip5P+T0/QU2gRXxXEK0v\nmJ9sTY/TneFwlZ2E+Qb1rY+9k5D1H3MxWsqCqCrPEB/7JTIYOu1gyM5rYp9a\n5X+8dvw/zA07wdWFzwqolwwQvyPxzDutvJVpt45jWLx3Wor44UKJJj74VYLx\neoZWLTupRDHG3H4x1t7vQo+MEkQ6UZSHkZ2jSdDRCSaJ+cB9uHkeuDYsBEJR\nPL/QfMlPE2KEzZ+HFtOq2UD4P462Yyzr3aBbX68IpR5bZ53ThMDZ2kJJf/b2\nHSLUvcjMin6YAeVFA4edvLbo4Ph/1xPGk+I/O79OmFUPSBzqb+wvYmuOKisI\nsufoZ0NrRfNyBTQL03o0RynxFQ/5h9MEib0ZGkemNkihmexQDjK7kT2crTce\n6C+0cTe8elxtdK+iEwNqcULegAWZAsmaeM/uyP7C6nMd+G6KhCnQ0YQ582Ac\nAfDDh+peLt+OBxbAM2PdumV1rCjMpacsMklaeASCHDnAebyBZJAyKh30hx/F\n5eRH\r\n=5hY9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDlfYatx7QCPI4rMftoXxBEBQZofnJhWDW8zJKCffiQowIgb6ovfoKE1etIRknbqhV3TD2kiTo9zq+YxY+v3hh+dIw="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.12-alpha.0_1573802586323_0.1027667232964149"},"_hasShrinkwrap":false},"0.11.12-alpha.1":{"name":"@react-ssr/express","version":"0.11.12-alpha.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.12-alpha.1+44901e9"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"44901e9c26a0f7c0b94cb5b6abc8d11373d1ed67","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.12-alpha.1","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-u9kCdX7lLp2nde25QNQ00DbSzBGHALFfAyHjn+kN4kZEdmWRSAvvLS45tY/3TLZVLwLSfer8Lfq/68zzwd03DQ==","shasum":"94584417d31cef195401c6dd2d342def7e4f368a","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.12-alpha.1.tgz","fileCount":8,"unpackedSize":12914,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzlN4CRA9TVsSAnZWagAA8Y8P/1MotqQ32EyMMyW6xkXc\nMO7tffrLj5ST0IdGdSmnyIjFgmV3DW9Mfa7SOvtQpIxprqJC8wI/tLpfEwC/\nCRFF5MMVjCwKcAH8aXGuwzAowkG+eiX92wFnrZ8JdhYkx1ZF8bS27sSvoWP7\nA/oUmJjWBKrIF3XOtic6TEVxxgZ9ROi1djKeMk6TA4tf40ATgraaQUNpymj1\ng45yCIHmHcjl929YTOXDYR2OUzOjce/Rm3g3D2/cWiwB5/fi6YvkYatQS54i\nPMDJUzRQ0o3TIriYBmnODqYzShzA8tqo2g+GPhjQ0ClrBaDht+V2itUcXbTn\n2/QDsCUatQptDvAxdaIYN04RN5qWH9AWLXpRDUvpg/chss7/mGbSDQyjLDWQ\n2suvQcdHehEUf231NlvEvFaqlxuTFOx4E//1ua3DbjivAGrUdSlCLzqFrg9v\n7Tl35qSF7/ee2lGkf7vGuwXud1EXAWNch6iDGhSQTpfM+PJbjEwB7AD3FC4a\nRhseiI2UhuT1CbaCCdkb+rZgE59GSYf4mNUlUKqBS1ETVwAKoh5+ob292E/B\nfPdHCIH9sMgudtvRfRk6iCmsRgdMRkTJhCVmyhtZ0m8D1Tm6H4kWx1NfyW1h\noF0S4DUWf7nQEOcV4XAg4s94fRVEpt/pGpjOA4fUzCEvkvgSj783I8Q56t09\nTxgL\r\n=Wd0K\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBW7MGP2YFxbq2xvXAJ++Wh4PFSmvCLQ4KTxAoDBydFsAiEAv1a6LFccRGFZEyCOBik7oNlOugoNwaN9DiauZm0qKLY="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.12-alpha.1_1573802871618_0.09467374828369768"},"_hasShrinkwrap":false},"0.11.12-alpha.2":{"name":"@react-ssr/express","version":"0.11.12-alpha.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.12-alpha.2+cae58b0"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"cae58b0196fb8ea9c5b62e70c00b6e19696f38c1","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.12-alpha.2","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-7sgXMbLrka0CgUvRo9iPinVGAfmm32UN59t0tlBETnE7SdauYkFzPpMxKaMwUQb3CkbJnnc/ko/8oYFTjY3JYQ==","shasum":"1ce78d05ebb346646d71e197ed8ce3fff30084c5","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.12-alpha.2.tgz","fileCount":8,"unpackedSize":12914,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzlb4CRA9TVsSAnZWagAAjscP/1H9avD/eRtXPJvmW9y9\nYf+CiPklDSBxRJBzIxyuHQUO4Irnu1kg6DmR9OG8fuidWPihDBeLoa8AAHM0\nw+UhFO8frFc2DOf1Ef0ndcSFmwH2/aKli3/rZ2pPuwvIPoYcrctgpA4sn7K4\nEbT+3jFlQ1wI2HuoVgPddGzuBpNYeSHaLn/2loOFhiaGaxdL8w4WASf2iy26\n0SdHDS/nGQKP6x+OhvjpdUEQpOrDP0Jk/hRiH02wC4AkyRU4Be0nRwMyotlw\nnBNGgEaDzsmCwLmI2ChxPbdoAIYRxlYvSYJ8a0G8U+faMgnXUVxe/m9vC1bb\nKUBWimtV/ZuMcez5JymCk9usR8DHSNPPZXPTtoXmLReq5nrcZ8M/jEGwDfUQ\nozUCq24SrBKCgJ6bHWTlKx+E00ZtSGKiA6JL1R8o40421GaiNw0FfeLHKeru\n/+ICclNUNgB10mWPv7yZJdXmystmZ5v/xrjpQm1iYKVXVhhENUYH2GG85Evv\nq3oqG6cQM4T99K6xSqG1FWNlqPLrKvsPXlK5o833BlyrOEW0Fy03KUMMbS3g\n/o/ZO1X1T/GXAdNuVMyIpp90h79NUcfJP4vgnoG2RAJWiuwudNruGEWLlmso\ny3RL1t9gH+wEqGcZM8jisSU37t79RPSuB9VFKCKfGNSabGYNQbN+yO6uoNlt\nnfpO\r\n=gjZs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICqG3HBbQeFfD3IsMaWamJnrlq59ZWXv6VrLmA40qzlZAiAE/EZWLxI7G0vVqwczRqezqq2WBa4lgXTore5KTfHGYg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.12-alpha.2_1573803768443_0.027632224392730498"},"_hasShrinkwrap":false},"0.11.12-alpha.3":{"name":"@react-ssr/express","version":"0.11.12-alpha.3","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.12-alpha.3+af41594"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"af41594bef09963c8b9b73c2828fe64d5d180a93","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.12-alpha.3","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-GcoIbhywwQPLPRp+E6QpVxqCcS2jhjrugLwjZHG9owKF8joF9AJY10PsB8Vo5XVae10zgnmTwT3P0UM5CdS2eQ==","shasum":"70b4fc51dbe8eae7e3e0b73215d176903f0eb885","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.12-alpha.3.tgz","fileCount":8,"unpackedSize":12914,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzljZCRA9TVsSAnZWagAAtXQP/2TMoCnNsGOlqeA4f7mi\nyMOXhK3SkIg7tnOOFiFdu+nmKfLcyqnTIUA+orGPkL33W73YHR//WqM0iMP5\nGhf3HG7T19ZKOxW6GMDCW43a/Qm6kFM89WcuSLXK1UELkb3K4uX06KelojGS\neLXUWpjtYTaaDxM5k1r7mEjJocUdXUk53F+dmE09j7b3mDadQ31nHwhEKac3\no+qqPQlT3p2Bpjx3Gx24zo8YK2yWm3cYjWBIHBzfZ/4ekJR5WQKtk8lffId4\n4XwUWXZWN++Rt7hzKNXvufOw9BwYaV3po1KftXlN9gSMuuKE/GRNb2VKU01g\nVpputeSrU15wiCPmwrPp6BcQimLg0HIEaYkClj0nEjG2ZjHAC1CdQn9PYbZI\nivq/NDySnImmd4PImtjU02Ns4GfwIgkWU4WYwbmic+003nm4eoxx5vgP/NVb\nuFeH5oyxOQu1pDgUoMy3pi7IQU/8QM6ljuYH7N1D9DklH5gCqrsqhorJnzDC\noRMD3nBHw4qVlZXu+AhlqJCnDcq9i1xZdzTUvJduCbqFcOd5AcAfK/NvLyda\nqlcRFqYIaYUEU/ZgYWvrh8isSDE4+QdY2MGWYlZiNgfqzC41bvi+XtBs/9m6\nS+6JXHI1Dxw+gnam4K+rIeSrZcmGxtykyIzw+R5nbc/cvDexYx0AiNLI14aj\nNKl2\r\n=Ou5P\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBgxwVrotgkHDt96GKY5sZb2VERwM/RWIkeNS7Ahh3CgAiEAoQ9sEr35Fa54O1Y3xj9rVevp021a4sQ1ekebtm31Mbw="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.12-alpha.3_1573804248599_0.9620324545444505"},"_hasShrinkwrap":false},"0.11.12-alpha.4":{"name":"@react-ssr/express","version":"0.11.12-alpha.4","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.12-alpha.4+15a268b"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"15a268b1ad6dee9ad8b62207946b75b975306ddb","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.12-alpha.4","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.4/node@v12.12.0+x64 (darwin)","dist":{"integrity":"sha512-Q1Hz9sBstfUvz7+b5IDEBtIx9x7I/gOF2zVpiluYKko5Y3kFskZOJyG/4l+BCugFsC/pVWQST+X/4xwGeui8cQ==","shasum":"c8929b8a611ed08dff844ca05ccb991b11c34df4","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.12-alpha.4.tgz","fileCount":8,"unpackedSize":12914,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzlu/CRA9TVsSAnZWagAASJcP+wabzE3EnvkFWUG0coew\nmaOzpng76ynEtl1dX28ws8sIvoxNuw0IUbGU3WTSQIOqiSUfCWn8lmROzBoJ\nwT2ANSa4GJ5BAbMVOYJdygSEi4bT7Hbs5tdiYsH6Msu+oknpGhsSLMi3NjVO\n4MaxeuXqKU39IafcQ1cGtm1HV1GHnyBXg/p2nNoFHtpRzv++FAoHZS5crjz0\nQD79+yMSbj+kqxlEaRNMac7trxQa05xQig81px1+sY7rNkDBuT2weKIvHkMP\nDh5m1QtdWFT1ySAAqn5f+Y5aIc7JTjZA+t6JCS2PvXNOUSUJR70ilzk2pNJB\nUwdwRlnvOpZAio875iTwVnarmeH6zRxbSZZckdXWhm6ZJn7zXo2dFSBNqdxH\nusG30ztFoH66PZgkADvtMVyA48FqibUM1/yzjILl+zj3hs+gLeUtnDHbvI5H\nAEDKwzYLvzkGrbhkIwnJscQ8ztSR+U3BtHMePpswNmVCfA7VYnoILCdOWzYF\ndpuEkjI+KNAnV9VGbVrcRDQvkvYc0iNJJgd5omDu0ooIy9YyKmuwbVHjlr90\nhoMchuFa61M+dDuYHAIeTxrm8clB17E7vqlVgGDPAwFi1lINvGEFWsG+ejD1\n1py/BXq+4FSWRDIE14jrtrgpc80AW7Z0fgR+iKM8CElIuqggiGkg006HHK/2\ncDU7\r\n=zJYL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCM8SYBj1vJGOrJE7Uy2WZVBwcAxNdsYLssrJo/5EP8fQIgRIADBtjNEpD4QfY8LR5j9ALWwUcFciu/JxGyE/sT9zw="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.12-alpha.4_1573804991167_0.41543328947714264"},"_hasShrinkwrap":false},"0.11.12":{"name":"@react-ssr/express","version":"0.11.12","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.12"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"9b844e88aa59cffd8267c9469bd74bda6275e816","_id":"@react-ssr/express@0.11.12","_nodeVersion":"13.1.0","_npmVersion":"lerna/3.18.4/node@v13.1.0+x64 (darwin)","dist":{"integrity":"sha512-bEutNq0ZvOHP3tHOhOx1cfjFSZB+C974mWKNYZ0w4V2JhzqOMzRxp85mUliUq+zIgT1GX8zlsuRnb1HLI8NQSQ==","shasum":"5731e29efec0735d5d67a1ea4d6a2833625026d4","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.12.tgz","fileCount":8,"unpackedSize":12882,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd0v4bCRA9TVsSAnZWagAAfhcP/2ae825GpLYR8DHt9W9I\nixHnqexkknv86yxJ/9+d+7cVAtgxxSoaJCNbaTdgiNoRtyvOMaqlBGhJYrP2\nNuN2KUqJDgNETKPl7aa3ZDEPStTXzjWQ0U22uDUOjcARNfaJGenu6x1bkwS3\nhjJgrujI8hd+RStrtS9jGoLEBjF8apAmi4b2pnnDSBwJNHNmZznr5LgS3+JD\nyn/ZPf9GvJ9QmdfVmfHrufRJWWs+5Z7JpTokSf/nka+q+0xGt4Gjo7oPqbOp\nwAHqWbCpBAO/xwyOGKRD2Z7N6VVqIpqL+5hFI8Un1LjGJ+JsuJ2ajoEr2hCo\n6UW6/90qyVugJkRQ/Cp7z9KOBCYyPUfZSFiT56t4R0GQHMLbsxPQIDuKfEcd\n/FQ+IJAYArwpOztky6b/pvAtpERjiwoVLeSC1Oi0p/+8WLxy0HeGZtHF0ctE\nwvdiZPXQa9PrHUe9MkvFjfY9KMKrLzP6UedEDYN8ST+tiygQ3Md1d7+ll0YA\nPPd2mkJi36s/R/a4cELqdCk53Cr6991+nt31J/VGnKdsCQighsHlaotmLHnm\nd5GtwVAQquu03TzjtddPIa/SP57d05yOPA5Zl/fRwAhgEsRVI+vsyI5to9W/\nsvkGYDt6KoEgMglDXa5bEEZhzbxF4XvGX//QC01Rnq37hLIdh547kDsdzTcE\nOrpb\r\n=2ZUI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAyXJx8H2D0T9t//wT6DFYWipJha/VsUcc9YZ+GFeFMsAiBrQx5nVxq3DDNk333I9rNqlQ7I0/zbNJLg11HlhQf1Pw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.12_1574108699505_0.9517483154386439"},"_hasShrinkwrap":false},"0.11.13":{"name":"@react-ssr/express","version":"0.11.13","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.13"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"d90f24207da1f118953aeb3062bd8529b745a1f6","_id":"@react-ssr/express@0.11.13","_nodeVersion":"13.1.0","_npmVersion":"lerna/3.18.4/node@v13.1.0+x64 (darwin)","dist":{"integrity":"sha512-3diemFkdYpTeZyysH3ypCHPiX1kMKD/OvkoIlaK2mdh4FPFMyM6La8RLC09gmChDRBA5vGtHkbzoCAYX86MpxA==","shasum":"5fa49ba2dcfaf0cff22f0195a43920fd5853baa8","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.13.tgz","fileCount":8,"unpackedSize":12882,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd0v7fCRA9TVsSAnZWagAAweUQAIHbRdr395LLb7+g5L5P\n3+KyshzvcrtE2IMJJAE5AxpIYP1MUmMD6zqeJMLKUWGT2kPVIT2hlkXkVemv\nw6Ta44SD81QW0yxkTopNHzmpD9XaLNPeT81RavoKQZ5YpuRtOUlJtRetr1Lk\n0nut7kDKoXBP2YnYtlewvdhWa7P0ySAEWZVtgQ1qZj7Mc7dL5K2az5ikE8UV\nHEtfwM7lfJXu4z/EcVDDri2eQStZs9F/KmUJNM/CE1TXh4NGsg/OWjRxbjqi\nt3zvReQKLViq81WHqAxw/hrIKBERi3B5WlnDvA2gvQDA+BHhA0C10JZQhWHz\nRt0KHfFKgV+CG40spQmxDiSRNxS1c689NYGlgRasQwP79IQEo+QPclixJmpd\n7fbTAFEo2jZtPnFdaenCsaP6Urv1HngTETag6NZYwyzGJBqg7AXNG5nn4iqR\nLBO3hh5GMmdkUjJMdm50wK8U2MwHnfeX3TdTPZqtPYnbSo/oxCk29NWj3V4Q\nzbxMOoLHuE+/s3galLCfqrLud8OitcS3uGZEMyPaSzWxSq7uyGBGbg3Zuaoj\nnwmA5q3Bp0dseRGTiVCbAx3VtV64IlwbVIyV3UYkz6BYMesWGqyh9E/DmNCp\nldr+YfL5XaE2A5dOYU4ghN8eNNl5MENHI9GC2JOxUog2LXHWOIMNI8Qbm8ox\nA1k4\r\n=YSdK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD/Mri0nZosoY+fo9igFTgs1mcUatpLWeCJaOqKToH+8QIhAK6XTA3N0uTj3CN1nrEjxC4m3VCtnIN4h27Urn2JeVmM"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.13_1574108894788_0.25917182572750996"},"_hasShrinkwrap":false},"0.11.14":{"name":"@react-ssr/express","version":"0.11.14","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.14"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"f560e44070b99c0ec8ce828d3979c034d389c1e3","_id":"@react-ssr/express@0.11.14","_nodeVersion":"13.1.0","_npmVersion":"lerna/3.18.4/node@v13.1.0+x64 (darwin)","dist":{"integrity":"sha512-zGbRwN60UuamWxdZsbC27PgGlA2KBTD7W0HdLDtoo9GktuL6dW3l7hcIx1qaf8iHWI8JHR63NJBFb5eYu79YGg==","shasum":"fcf42ddb49507e016d5b02efa517a52f95285909","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.14.tgz","fileCount":8,"unpackedSize":12882,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd0wDwCRA9TVsSAnZWagAAxLIP/REStR78RzfAp7n15Q9N\ns5b+yRjED7xBkfZTyic719AE9w3sDieY/dBzY9v7ZzRDcm+KIz2D6+Qm2jFI\n1dzfxEFXma3TAprDRo7VWlu79+iV8b7Qxppn3lfaZh6tpyqBcwZzfT0MMNFa\nNUQoj+/sm3ELe4ftPM0XgvbyY/3lpaKSm1P6lnwY8UqXH7yqbPHV+gp+UJhP\nxUBrecRCNj48Ej9kbR2BRuG5zA6NEG+35UL6yVksXxJwXBVErSCeG1YNitDG\nRnNrcA/qrDJaWdAMOob6Zyyuez6bx/lAIIH80hB3ujsLimWS2TqZlZYKXy4q\n9+AaY2AB6N5Clkwyx/mKq2K212OYeWsn+FR2giBwy1o/XaMkQwdm/Vs7yKvm\nYKgTB45hcZ79XZtGdJTPqaJRjcfw9A3DLtqe/7A/hd1sxKXc72RhmyC2jeIX\nZ+AYIN4Gq0ZSx5dlFcsiCdTYmHWveqMbivsUCATbdtru6mqExu2j6sk5NAeL\nvUX7guYlcrGgo67PdWPo2SUXt9d3WZ43KlulPErBRalNf5B/YRpnkhtNcOd7\nx3CIi/CQ2KOoNN/UbPyZm6B1GX/1o/DeXAWB8xcwcVpCiGMUojeF9M6P/jy5\nEXrA2wCKYKaQD9UutW9EQJ5u8gDvqTnvTxg6VEY9Dgijdj/Skb9lkf11CPsh\nZ9ae\r\n=IYXN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDIYnydjZ7iQj66dRCLrFCpIjd4KIsQZHrC8aNkSuQzzAIhAImpSqBEb6UMAyZ+rU7c7gIKxP9DnphSzmf6QssSglmL"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.14_1574109423699_0.6233947546416145"},"_hasShrinkwrap":false},"0.11.15-alpha.0":{"name":"@react-ssr/express","version":"0.11.15-alpha.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.15-alpha.0+9ea0440"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"9ea0440c9c7505c8e2db63652a1959e96e0aa0b8","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.15-alpha.0","_nodeVersion":"13.1.0","_npmVersion":"lerna/3.18.4/node@v13.1.0+x64 (darwin)","dist":{"integrity":"sha512-NoMvJ9WZ0u3cIe7Svdf0CQ16/pKEgkQ5U9quYt0Wm8QAft2CE9UZMZn3aA9wkXtIDPtnsfi4U7eNKFAx+108Cg==","shasum":"42792a16f77cff30fc634b6c9f353af8f80f0b85","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.15-alpha.0.tgz","fileCount":8,"unpackedSize":12914,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd0wMGCRA9TVsSAnZWagAASyoP/3kZMYz0pykcSYGSPzHv\n8WxrdMqOSPlnXTbEX6LTOKvSb81M1v/Y6zJPa2y0Mx19ElKQhGLw0CHLTiJq\nVVZJNxbjz0PEnvfeq9RipiroNEGetu18eKvBYRhBrB8KyF/0SbQ2bTu1TxWE\nqVvFnx+TYhKMuU/HHn3tQohq2IuJoQ190Y0NolqvXFusMkBwk8NnlbV/7dBE\nn1+KwxIuv6FMwg7z4kJFPu1GKaeQbQSDfcul113IIFSZsrWzj1tmSH76VWIB\nLT8IDNH5qJ3xw/3mxzVdj0y004oL9GrBAZvKwW7/VnT8jXHhE1bLfWHSPOtv\n/PxCPqWwseodU7Gh7R4kryJzQ71eSoMW5mMeJgLD6lGAYZBzd9BIzS86vraY\nVctsZEDpCTAPBfLQcj8hSddOslSlrb0fCwQpjgzCNDo9R5+aK+T8FuCfDHPw\nn/TT4+kaCT9mNYMnGHHKRs2TMbNHNl37NTK/8IaKeECZQX7xXO9BCsUCkwJ2\nR6PYkw2Hyduf2pdu6jgwHCepEKnrNNwtBDJKnvVgP2gfYQOlImvAlvbU/0AR\nghBzfpJPVCRdQLCTUeM2F2dJL6FjIJpbCKRuqUTX2B4QOLQWsiiWxgjGRHj7\nYz9vCh0pViU1C7OZIg86ccmJ0cEMVXaNYFWfcsU98lFM+t5LLwluEJj1xADZ\nncCJ\r\n=0nDe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEPZzlStEQAGSnyF73W7QluVMoLsjlG5HoB0o68vEUsYAiEApoyWghWtLufqtgzQJ2Z3XaV3qATuBa6Nf1DN0FOz48Y="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.15-alpha.0_1574109957873_0.882679099998575"},"_hasShrinkwrap":false},"0.11.15-alpha.1":{"name":"@react-ssr/express","version":"0.11.15-alpha.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.15-alpha.1+cf836e3"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"cf836e395fa93ec149dd8397c180f80888ddf0de","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.15-alpha.1","_nodeVersion":"13.1.0","_npmVersion":"lerna/3.18.4/node@v13.1.0+x64 (darwin)","dist":{"integrity":"sha512-kaYYECI8xgQ4NFO1TriposLBFL+RXm5vKBDS6pT+2ZD3RiG9sCfjXAoWILBecr30jKIT6MvRGMoxi9U7qI2nsQ==","shasum":"720db207aa7ec5154c498e626f1c466a1d0d60a0","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.15-alpha.1.tgz","fileCount":8,"unpackedSize":12914,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd0wRlCRA9TVsSAnZWagAAjEUP/jONLb1XN+Ajgb8QTnBZ\n6e7jfKfy65svIGXEd9xracp+iovEaQ/V0zq/bI9ENqrJQ65uTZiHZi0FSCut\nXHeDsDstgF1y61p+EnExA+8FqLyB1czrSZVRcV73HxXy5xwH1mW55E6pJemp\nEpAQODG/u/2SYNAetGZ+CjpOci7txx9lPtLfFHmUie8iV7VlxTkvSSXHmb/D\nkCpG9wq5MVqGMKRB5Gf4ZrX2TUwlBnrLWNgsXHX2wfNpvJ069eSXKGBvXw9k\nmUoTEIuLI2p7F42ffblTtJW7D8nyuQhGQrag8nXrC4ZT6Zcz6kPd/81INZf2\nb70zYXlcXzYfeUM8A+XWg0q99KUZTqpO9poXVIvdEKbcL/MleC0+ptaQwfIH\nYuJ186K8DWVrsMB2uRhQW+o6uUAHrAK7NTC3nq4mccFxhdgYapHZsrKvbwEz\nJRiFzEgPuoFqykxPnBM151+02us5CkFjAVjBgeyA7UlyVmhmP36YBfLL7amb\nnzyk3VIr4u+tsjL4O+pYEKo/ziQ3KmBLwl5Iy/FqP0G53iSNeZ390p306GeZ\nYLm7tDNF0wYYCFbz2DTiUBwl4yHMaCuQL6tgx4gIPdoYVAK+b23PiPMm66Bd\nMa9nnl/9hUkmVCfDerrvQ3C1dvm5PWOMolFJ6wZ2ZRgJxhsSPgkz+J8x8TOL\nQBfD\r\n=/gfw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCDNa4GVeMWcmEXL/+7tebepLRT1avszLWLQDMnUt0ExQIgC+szlODo20lq6v3B1dcArkLUQNk7UeIIqyy2OmF4E9I="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.15-alpha.1_1574110308503_0.1615578627576253"},"_hasShrinkwrap":false},"0.11.15-alpha.2":{"name":"@react-ssr/express","version":"0.11.15-alpha.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.15-alpha.2+b44fba7"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"b44fba70e5ae98d1b7dad11164c3458e8bc9d202","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.15-alpha.2","_nodeVersion":"13.1.0","_npmVersion":"lerna/3.18.4/node@v13.1.0+x64 (darwin)","dist":{"integrity":"sha512-cTcF4q9dpQnLzPieu+x1fdEW30dAli9kF+H90ZgySdjrhF77fsxx+J6rjv3tYZOSkBKT1QjrT8XQwWcecnOaeQ==","shasum":"d96b192aeadd377cc4a4b3c0ab6fd98147d8151b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.15-alpha.2.tgz","fileCount":8,"unpackedSize":12914,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd0wUmCRA9TVsSAnZWagAAnDwP/2x+1sf1ffaKkod3fcWT\n0k8s0NpPWd1CtKK2ETmBFLOaLLDvaNMUU9E9MvJn3WouMnBfRijFgeKzaa/O\nu5q4TVUZHG0ew3zK/L6U1JQmkiIxUDZRAYrisl2buVw/sgrKzgbfxMkN8m3Y\nXJLNlqiO3CXr47GdQfIv4UZ2h6QKaiNEx5bcAP3Kv3AbzPs7N3RiXTqPcVRd\nKMx/o6Lj3uHVE9aVF89VQrxcMqNAfOsoxwYV+upJ099QemmMkZrV22yqhT8n\nXHo62r0fZPeF/HF5epPrYFIrbvpTBxzZYdhjtwJ4wws5cRWUJDnFwM8kZn7d\nnY11PUr39NIH4rVkEiSKYIXO+k4pAtIe0e0fxNKMNJl483LnDTjvGmKVKTTI\nZhOOEAAhYMbVEUau8iQFfiFtGCfMKvhTEmlB9a5Tv5jLNJvpM/+AtQ0Vmg6J\nOKmF0bnMpGum1hcnj28H9CCQuJA+mV48SLP/5uG4jE0X0RBsQWLVxhzKpysY\niy7pfksI7bkZyl5Lg3fJ9K9XoZW8wcWIiX58t28GtoRE5BPJKlUYJAzmyS1K\nUJIh6LxH7jcFbFf8jeH5owJJcUbwSi0D8WJngCbJz7VOnQ4bq+3NmuyH1pyP\nZd00vX0UA/pqm4uqpk9TQ3xhEXphMVVa3MbfzIcYsjsStJGTQ7sVeGMKoix+\nlYqG\r\n=caFw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCIxYrWGukz/AGL5GWy8M4lUeUWmZKufxhokYC54Jf6wAIhAOfi/V7ZbyULBTlpQGvtC4Rt1gVHLLLSH9Phj1eOo27+"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.15-alpha.2_1574110501054_0.5626864799167186"},"_hasShrinkwrap":false},"0.11.15-alpha.3":{"name":"@react-ssr/express","version":"0.11.15-alpha.3","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.15-alpha.3+f0c1fc6"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"f0c1fc665ed7cf01eb94e3192093e1d1ed98ed80","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.15-alpha.3","_nodeVersion":"13.1.0","_npmVersion":"lerna/3.18.4/node@v13.1.0+x64 (darwin)","dist":{"integrity":"sha512-4YsxuAtK2+yc1UMqXqXwufO9u4bi7D7BL0fUeZ4PwEZISvbPgpXEIS64H77d0kk/zgo+72hptBxlIjnEszgPPw==","shasum":"8777613ce1e96c64baaebbfda3fa98c141946288","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.15-alpha.3.tgz","fileCount":8,"unpackedSize":12914,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd0wYKCRA9TVsSAnZWagAAbRoP/07wJQBHAa40px7ZOEpJ\nRD/rch+yXtfot49dZ1e0nxj+zkd2kGXu3yvi+qO31rfxJgpgRltgRP7p1ZF4\nmqvZ1AbKpgPJhwAz46gE3KgLXflS957a5lotHUzUFAsCDV02NOFQFTMtHIS8\nNpGG6z6SXw0ILi9I+8QhrlgTLigI3nRIRy9o0LG5c6EgBw12CxiPuH5jMpjz\noqjxQcI0XSuOhgzbNCI4ZMk1Z8QGKuyEqXlCi8weU1ZOz6tEJ6qPKv8gLB+h\nTtNMBqx6z+k9oHhVrDEg713edyvel/fs2BYxIuv3BKwjapdvyXIGYLJIozVq\nzJP+qZZWT7av37qc9VV+Ww1DgBHIubB+5k72lT0gAGdijg0nkJq9Nw6yFZF0\n1V7NxGMqt8Au/NK0t2iwyJX17xoIeoKaI+YTJ+mj46NuqD6p1m8sLdEnAr5e\nUZD3Yltkjc+OsdLmQZH5tGZu7AOPjIL9NwpOe8n0pNaM5o1aZ/mAixetaNbb\nRKz2OM3CM6fKSdOfDw9fFY66xO+6Rwhb3FO8zSo+XJ4dPTJqvgf5rLHN/yrt\nFRTntT3emk34KJRNyUgWHeogamFCMHGPBqVX/tsD8XR7Fcu8bJByA4nIr2Mq\nRD9a/ZFN8pLz5+0gYF6gLxujtIt5BqKQ7B5K63saePwGFS9cDCdF/Tpu4emZ\nMDcW\r\n=9Q89\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDM0qmf/xilFn5s4mz53w50fnB29KIaJV14GnE4cjbI/wIhAI2PgNt8RQJrP+phSIE1t3a3m5JiEeElScxK5kJNs3i5"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.15-alpha.3_1574110729484_0.5404796246854306"},"_hasShrinkwrap":false},"0.11.15-alpha.4":{"name":"@react-ssr/express","version":"0.11.15-alpha.4","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.15-alpha.4+1184d43"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"1184d436793332a35b2a53d9c707fc6760acab34","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.15-alpha.4","_nodeVersion":"13.1.0","_npmVersion":"lerna/3.18.4/node@v13.1.0+x64 (darwin)","dist":{"integrity":"sha512-6Q1+eHtW3L+6MlevAdv0GxGpuonDgEVP7SXHGv+Obppu+7Odogj5m9fe98wgmiPpckS/lswtocy/Gc69UY7YTQ==","shasum":"600e1b567281187cd1aa4bb34315861c3e7d36e8","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.15-alpha.4.tgz","fileCount":8,"unpackedSize":12914,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd0wbmCRA9TVsSAnZWagAAzcwP/1ESCqDAMatxodrUZb+c\nYA2kNXWbPd7hk80GczDNEQIneYq7lJvvB4rKypNFJZTMK3f0kUGmjTmo5Ntm\nnbP+vHXJ6sd1gjGHSsdamccuU7q3r8v0rKgQfu9cHmQjcQ/t5TvC3DlbVOR+\nEOq7boNR/e1occxVMWBfxujvw5aYAdSuBXfmz09YS0s5kcih7uqUBv7Ho2ja\n7V87l+nh1ZJRYJtTVxiP5pl4TC4QuoWYbH23Ux1hEk6URCSBUtTZSlCBZp2M\nLJ/VcWD51gQBUTeiHwJGxqZXiL3TWlsaBCV6KesjfEz4lvwTGzrV/EUlkF4h\noAO+AYn/K9rdeox5gfkNG+02eiVrMZmF8wE0NCobTBxuIMeMu+Vr87JW84P9\n3rsYW62PBwlCQd6webAKwIR8Y2AGCfBzHfMX+aEjGE4G8mOfFx0BAjG/HX+r\nsMNeKl2IcOJDZUcjMqQvTXqQb4gUfWE1wSKwelVHY1a0IexnQIM/2XUMPNQJ\nwV3QjBZxndmXf22hNsAfC65dL/omXDwoTb5lrqPpRt3NuYr+zFj01iFTHmvx\nX0/edEG8Rb5TAcshy7qA//qrsph25f19doz1ytEFamEkEep6D9CrNXE1pKmT\nLqcyRLeEWVdO8WIUtX5276COQTkQRJL/ek0VdQHJwUC+Edzkoa7pyMLJmURu\n4+SA\r\n=k7ir\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHYItDo2A1DmL0Beirt7IMuBbjCE9lM/WOXp7UIdac52AiA0K96oqGz6nHq5KNIyjIIXXCVpjA9u68nR+c3dxyhUbQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.15-alpha.4_1574110950211_0.9731775458162792"},"_hasShrinkwrap":false},"0.11.15-alpha.5":{"name":"@react-ssr/express","version":"0.11.15-alpha.5","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.15-alpha.5+796c371"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"796c371e9207a00e96c15b41ac8ded2d414f8763","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\nFor example, let's consider we want to import css files directly:\n\n**views/index.jsx**\n\n```jsx\nimport '../styles/index.css';\n```\n\n**styles/index.css**\n\n```css\nbody {\n  background-color: burlywood;\n}\n```\n\nThen, we must override the default webpack config like this:\n\n**ssr.config.js**\n\n```js\nmodule.exports = {\n  webpack: (config, env) => {\n    config.module.rules = [\n      ...(config.module.rules),\n      {\n        test: /\\.css$/i,\n        use: [\n          'style-loader',\n          'css-loader',\n        ],\n      },\n    ];\n    return config;\n  },\n};\n```\n\nA working example is here: [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [ ] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nWIP\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.15-alpha.5","_nodeVersion":"13.1.0","_npmVersion":"lerna/3.18.4/node@v13.1.0+x64 (darwin)","dist":{"integrity":"sha512-EkQ2rEM5W3gIGxArFzHyJTdAW8Rzzeixx28s1jddSOxR5DOOtD+xWRhJfgxUywDVXN4Hprj7P1iuFdcooifkfQ==","shasum":"5eb63c7e7f88a3aa7d9f74acb11f9a71dce71f7b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.15-alpha.5.tgz","fileCount":8,"unpackedSize":12914,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd0we5CRA9TVsSAnZWagAAQsMP/i2K538cZSGvwcPOWclb\nhPXE0/bnk/tgDfy0o8tVFwNUVjmRmK5IpfIrb7RDzS2ooRDxsq7h5vJ2m+Yg\nPPR4j6/eqZATkD3S/coxdV0vTGEejK2ntXPLTPMGSKWuPyagSggR5nV/yeHa\noWFxy/yEFvjIL3CWK9PpT0QPaDIzUwCtUSb8xOmht+Uu57N8rEsSv4JBlPdE\n4igQh8WJLeeNcgubrhvBVGg93UoexV779n2O74deImERsgfAJMn5OGZpgUj2\ncUQYiqlF6/mBaqVzSh/vD3lq7DbPyqi1+ecqiUM1bIYqe0amwZLXZbzvmiNA\niF8fH5p/07cpxpiFVgMpC+sBVgr2SH4+dfCEn0oMEq53S91UvtXHBvAETibn\n+szbJqM5gh2yXV4GW/u9xscwRexqeYS9SIZRiPRLP3gGZXNvqELGqMjQFvRB\nKyXBIIIQvWHL2r3iW7Q+27yDDYsL2VgG1T9HM9QgrrpX7H3zt1RPtZvKqTCw\np1oV/Bbg/om9hOsUhOwL+mp5tHWjSk77Pe8G5UyIKXrlf9kzuhDEpLuSnPal\nVv8zexE9BJvbUh7VWuB/s7WJYbxvQWrfYkIR89yv/8UWvzFjiiKoEsyc+s5T\nfydF5CSyrOhwnB7tuk7+IkyU+mKnqmkjiyrlOoUsRqPETxcZAbPq1nBn9Q3E\nr/f0\r\n=Xp0U\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEWOgo4Im6YTJckjjkuIUdZ8Q2QupcK3GuZETP6Nt8NjAiBi8Ddf2nILBSVTwnF0KPlEv8hX783+sQ8FowfFVjmhQQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.15-alpha.5_1574111161230_0.24839236001998"},"_hasShrinkwrap":false},"0.11.15":{"name":"@react-ssr/express","version":"0.11.15","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.15"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"0b3782e57c1a3554628f7d25b98794ab321d56af","_id":"@react-ssr/express@0.11.15","_nodeVersion":"13.1.0","_npmVersion":"lerna/3.18.4/node@v13.1.0+x64 (darwin)","dist":{"integrity":"sha512-LzzWYMwNfYV7F6VkRhufJDJxqd7a/4NVaPXj7vuMDH/rXU77UCAVyYSM7w3HktLraqGVC3KJ/erCQoyx7+vz7g==","shasum":"063053270659eb128a545493ef390d7613961ba9","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.15.tgz","fileCount":8,"unpackedSize":12882,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd0wgfCRA9TVsSAnZWagAAW8IP/11LbNcdTmlH3jJGaBJA\ne/+3FuHQEOO+kYLyVZb8Q7zWaTrzzoASXQJOwlYPk8PPMluPI7vimEEf8R0H\nQ5sZE+ojn183wTTbbP8cditD/8Ey6+7rEwQGtgNyFvNqmPGxFt2NZhaw0mma\nLcEaf/ck4KEOnXmbrWBCLf/0+EPF9gWZAV2f8y0uL0FRvaysr7hi3rE6yUba\nAXRrEhaUuuxKxwXHfXOvecy6P/wKqe7EsBF1ru94wgWPefLti6SjE4RZBhmj\ni+rMT0cG4LW3A+0+6C916KhN0fHIrAAGUUGI4iLmVQOk9Gcpxcs1hpbIAedU\nM23yvwuS9edVl5xw9hvmqCxnkdGaNfbdb4C3QY77ADjLR2b8KHHtS68av6l2\n1el+VTbGhxGBa8tYRwEISzdvyDvVuy+ur9b27ek2E3Vfos6wj47i2Rk9A+20\nE7ElxBr2yY82p4p0u/SxEJ0CFRvB6kzdPX16V1SzqI3M1H9UxqOL6PK1xHgD\nqPGbiI/q+XMXtajaxA2DhAmkdQU+OyIhC35q769Laq77fCDXcm5+FVA+YUtn\nXiYXPJItjh+rwZOuE74n/4Pj6fwAGf68wdDajmh0Syoq4N9tM1th3tvUr2tp\nNtToF/kSkBO5yBMbRGrNcIpdhB9IsVbK9Ul2nTadZSaHoGNZopd96UEXqrKW\nmYuC\r\n=0I7C\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGdLGII23RzpYA/Aqj4B3XGy3RVMmXIv8cWolv0g/IvaAiAkgMjY8xuiQDK7ps77LqfRhkoqOUf9K+DWVQEYpj8W0g=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.15_1574111263008_0.704843140493812"},"_hasShrinkwrap":false},"0.11.16":{"name":"@react-ssr/express","version":"0.11.16","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.16"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"f1c7c06e5016bae4eaf2f3100f801250dd45c88d","_id":"@react-ssr/express@0.11.16","_nodeVersion":"13.1.0","_npmVersion":"lerna/3.18.4/node@v13.1.0+x64 (darwin)","dist":{"integrity":"sha512-VSyGKrzNz4vaF7SAR9wKi+b/EgdAb9A0K7NRWZYSf0n2GFoSayw2sJ/0f6Hki2JK1fv+Cnx4L6C66cbmeb4RuA==","shasum":"63525cfef697092967d481e6eb30d154a836a482","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.16.tgz","fileCount":8,"unpackedSize":12882,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd0woECRA9TVsSAnZWagAAPiMP/0PvId5y6YD5iZgsYokB\nIvtFAf33InVt/LH3Ved1SA7cXvnzPXOZajVJZcWtvQyd6DvF60RopB5rga2h\n7KYyM04oaoaYHC0JgMTZ1S47gzo+C/anI53rUZ02lQZqaSavRhcZqNgFIttm\nrionMXtGfzOqmdT2FRrlZ989Nj3Gy+/JF8mVdKXe6Bkdd3y47c8BLv6JOSNd\nq7n8Ga/z5buxC29UPz7pxGrdQynBw1AVsAc9wJL0J8ppj14ucpI9gSXYIxRp\nvAbZrUnyUjXw5zUyWum0pfpKFFkhfBbmFXWLNEpocI9sB1yoZhY58wK03EMe\nFVgnq/pFnQJD7Fp6iZuUrNZSxwd5eQPzFZsm7aM49rnURFgVeHRuweDJGkwP\nPUYp/KlnTXRW1nOO1kvl2znCoVncjrftIxQDG/b6eNgOT+tLxJkh48Vn2Cl6\njLa2TypuT1oVIc3NYkA2TjJ2+yxnj3on1T9JGZrNii+9PBr/Ly16rd0wx88r\npEOe92aT0dm1ROIxNbLR3puZEJdMcmxJ2PuRQQT1+jESFjrb3oO9dOsx6Nzp\nNCVFZdyko4qVcmTIiD1U/m+eSdvhz+fYNomr9F6qRruW+vdYlT3W84RpQ5c0\noIOMHCHzWw/AemBtFWrUBfHYpyFeYytFDqVmF+m1A0jOEEGj3o5cv+EEswv3\nCRit\r\n=DaRL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDnHuzyTIBkQhYx0+8CGzhZ12mvFyADLpLunTgcdNPn5AIgWiLTDqD09eHrR/mIn6X/OJmGbnTknuZawZAKZlnAu90="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.16_1574111747725_0.6788904991295364"},"_hasShrinkwrap":false},"0.11.17":{"name":"@react-ssr/express","version":"0.11.17","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.17"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"cbf303d49537fa4e6fdcdbdbfecc828ad1e311e0","_id":"@react-ssr/express@0.11.17","_nodeVersion":"13.1.0","_npmVersion":"lerna/3.18.4/node@v13.1.0+x64 (darwin)","dist":{"integrity":"sha512-o/Jxc4luwzS6RqET0kktcHcUPId2uuiGUKk5kSe9/BoX6HZPp90V/6/FnN5g2PtrinFZ0PLVkZQGUKXAMCYF8w==","shasum":"dc2dccd6071691b34c3c9e974625ed6669b0acb0","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.17.tgz","fileCount":8,"unpackedSize":12882,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd0xAuCRA9TVsSAnZWagAAMpYQAIOGc4stqph7xjVNvepZ\n9kO48r+xmPCbdfcnsD6+amwV1Ctze3GC07pEJis2IJI6YA2KvdjdFGGTLnYd\nUIy9zAbwl9dnBu+KxZJ7j9jBH4eWimPOT/V2/G/0pmrI1dQwxrSwpsSLpC6j\nfPFOHzTbE1iUXJJ3jUES+T9jwSyeYOyYy8jjjat0KCK04ox8DOpTIL0KmiOR\n92GK5oFLZDveLVy0V+oEMcACbmWEquSJXQwnr7p/yeLRMzptwEY7+sJRljhM\nz1gVYuW6742vkHwBez9EdJfQ4gZsMyKJhBPcXJKvXU7I2hLBtV9LToHHHhJA\nWO/BXdDu5JydnvB5wqjlslHt5i54hRUSVPm+GyR3xpiIxInFAnG/+30yvDAF\nrJB4qndizYRIY/UK4atxb6ByAZ7Z/7lDhJDBzajnIAcm6pDsHVbuUZf+n/W3\n55AnjvDzDlphsiSM5bAGy0QZQPPmapxI9yg1cIk5bjUK/O0gSsbOTC15dPOE\nlTESNE3ghMiBAfxNHBdGuBkVEnOqTRwtpWoRImOSkzpXOTQxOAhcOxS38cmG\nzZGE/6hqZ0UmE0Taa2vyfINb4j/oxFLMFxgiy8e6+5IbJvM5R4Nto48U1BGX\nul1jHC/76tYytkgEvYGXH/UL8BXAp0Cyfpw+6AzxxxbXBHE7FLjZ/Kao6R98\nOY9x\r\n=Fh9m\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEHAysbKNSl1LKPT2lHCycnaCGjBCp/oB5HSkzvNGZouAiA/uQ3d/ELXkM+Jpb3/CqzOa/FC7nrufp2J/BeKlIahKg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.17_1574113326585_0.6703844403314747"},"_hasShrinkwrap":false},"0.11.18":{"name":"@react-ssr/express","version":"0.11.18","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.18"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"2979a44f0558aa4072174b3fdb8aff827f78f74c","_id":"@react-ssr/express@0.11.18","_nodeVersion":"13.1.0","_npmVersion":"lerna/3.18.4/node@v13.1.0+x64 (darwin)","dist":{"integrity":"sha512-JkFzFwQLz4vj6N5a+ic5YzirPoIG4NR46ZTAjanxeT7gai2XbDqgKk5i7eTU/Q7T5tZuZZKu9pJJ1BfthyJvRw==","shasum":"8405eb88f898733097b0271c658da462ce2f457b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.18.tgz","fileCount":8,"unpackedSize":12740,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd00NiCRA9TVsSAnZWagAA970P/jUIZPs705x0Hby5pjRp\nE0nl5BqATm/Hv52rWEixVH92/rIdD5tLjawHVfX80SjqrG4kdP00+4tqgR1v\nz9IGT4Z+vKVlPT8JF18RU1YNmrm7nVeNrmOjbzRq6yvAR2mSWWckCsHNT6GY\nA3/2+bNWXW/ACaVjxbZI5fFCSydLJ9ChDEF6edXqPSZqODvVZGABplsmi3z3\nSv4hneJsoyeF6YU1fEsWIrhrQlCl9VomNzLPuQCnd3tPbxpaF0MoKmyKaqK6\ny1BgSH9Z6ODVcLGIcZ832dMhhAp6B6E/2eIX30YTs7TFs9xBhJeUVCehHzON\nk8hXm+7F6nchcyXnXSnSlS/IUO1BZVTJFgrwgJGYzVhScXstehPiNmzfhdGd\nHXTIezKVYK8zqEpnw8iPQ7wM1NfOlYLq54qjpN2EmFZEcUyzOXSEfQIjH+u6\n9/E9jAl20nhxXGrRxfg46+aOEAn9YfunipCMdDK5IuU9eeVGtoBdkVqTplVi\nVUrfwo7vj1uF3NCSzeXMftYY0896oPfNZtZufsiiyMVdAtM8kWJM3qNYPYNk\n5YmYa6335e3MmZDaZJqhReBxSiUYYoMvoE/CheI9sY6ZoD2MJkPG5yOu483e\nXSXCrcsbBAnAQjL76R8NUrIsNmOlTreWAQifjjdgdfHlNEMYkasVf6wThAMJ\nQibg\r\n=cJ00\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCJDjQ2Pv4NaaUsenJaoL+5wPnVfnQoX9Wc9oGpdnZrVwIhANOICkWP1YsNcUHfASOjAxhIjdf/uhcNg4IxlZ8ROKQs"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.18_1574126434018_0.6912546681161749"},"_hasShrinkwrap":false},"0.11.19-alpha.0":{"name":"@react-ssr/express","version":"0.11.19-alpha.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.19-alpha.0+14f188c"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"14f188c58ca3a8efa0b4e187535e2dc1bd0e9bb1","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.19-alpha.0","_nodeVersion":"13.1.0","_npmVersion":"lerna/3.18.4/node@v13.1.0+x64 (darwin)","dist":{"integrity":"sha512-nUEJ9falOE7yigFhGz+54pgkKbmVeYjO0ZbDt9OjGR6QEbANjUpQ3cgeT+TA7SN0Z3sxriFPvpVk3guQf29ixw==","shasum":"59ce0760f1895366593bc3dd627c7bbfb9a8410a","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.19-alpha.0.tgz","fileCount":8,"unpackedSize":12772,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd01LGCRA9TVsSAnZWagAA7rcP/A4xO2myLucQ1v/lu9fn\nvIEB/mYSaYxJss+pQYEZ+Sj4dqn9LoXcQe7v3MhCNJ0M5FH86Rau56FGQGAZ\nQPZOAfEToOOodBYMZEkeY58PX8RHUfNNc2RncyHuxKo8LI8W84PAM+kM0LTM\nQM8tK1uJdpTD2wH3vRKBBfg2mLPYY9sWBYsMkP37mkfv9dTt9b76x3Ucb0l6\nAG5npxsotG/uiHUeDf/gchdfBbxbAJX4jFLS8mRpnvre/VffrPFCB2v9oLP2\n8GwHrw3ygTWigeZ3wWAtN+XxScFj9woOQS/DZzQJsIGdq19fz5QTwJ10aCgu\nBhZgn4y8JjqiSefJpKNcAoWt0mIbkYCToap7zejIrbafvwYRncn07bagRfIZ\nnxE2sxLqws1ZgTl200s15AT7pnb74t46XqG5kz7Q4dTQFjY2ZONeFaN8tHIq\n2pFSlLoSf9aWgCvZefIS0UQG0NHBux5Xlyr/psODRpot20roTuYYSumf9cQD\nR4c1QH/8e7oHWYqr6JJPdKglEXc6oFYonwJ7SZf6PTdX5yG9Netzl83ktBrC\n2pYGnEY0Ui3hH1SfPn4Ou00rNfXFTwWanSW4iKmw+hpCpIJB//0MkZSAHdgp\nr3bNnSrzDqSxkH1s1LQKuFnmvJTHR74I/pGtoSWt2VqyZdgoUnR658kCoIBX\nlOWa\r\n=ok9+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC/U5TgrOUrJK3x7Kib7CrGSyw5OMogVn2iVw5KCbsMLwIgHO/3ksGBadxETNrqTESNr2LpQFnB8Cn4N+eeec7g7mI="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.19-alpha.0_1574130373992_0.14247461191003952"},"_hasShrinkwrap":false},"0.11.19-alpha.1":{"name":"@react-ssr/express","version":"0.11.19-alpha.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.19-alpha.1+cbc6007"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"cbc60077921b98c574d6dbdc9f5ffaf6711587e9","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.19-alpha.1","_nodeVersion":"13.1.0","_npmVersion":"lerna/3.18.4/node@v13.1.0+x64 (darwin)","dist":{"integrity":"sha512-i/1LFieykzLG2Dr8I0bZnhYIwK/1icNehgcbtY1lXJ/zdcFg+r9Q4snUYCY7vwCGTcLG3Lc2mP33N2oFzAwtrw==","shasum":"5890ebd290db54cca582e65cbaddde3f5c8120c9","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.19-alpha.1.tgz","fileCount":8,"unpackedSize":12772,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd01M7CRA9TVsSAnZWagAA8UYP/RA8qDrML3oe3hcEA87R\nfNuPwH9FOe0z7MrwuevlbsOEhQKnzJHgYc3fixCbbTi7xbf6pVpggqKC3oyo\n0PeXAPzwV9DPZNhSRpgNcCYQLo3zI24DMBEvb9dkVdfme+9asWGF2G9J+dhb\nP7iZI9auSFNmcvbZ5J4pC5QVnRvHxiJiiH/LHVfdneIhN5NFUZhUyPeg/ehS\nAN19XUbhiQznTRWaRo+bFRH8jGw9eSafYV9RCBm5TMAxC/skuKG7rlnCh4vN\nPOQvNAST5VEPHq3y7K1XiepVjTH1a9b4XALELSMkTW1E7d7eWDmvH+tivHqQ\n6+hmZ28fOI6vqUgfjhhorTubpmudNXo97I424jLAlf2Zk7cq0xfdqcO47B1K\nayHTCR08RhE7HxpLM1wbKg1nVuxR/RWL/LwjHuKCTKgFwjMUALvgo1WDxw7Z\nTMjv+R2uGK+7uTl548p2BgpvyrmWcchjN0WpmtdU8z/Zx/SF+vOiUsK2OYob\neGcF4IeEgaej0qPZOdL1vLzpeo/pzgd/ia/TQrm0cjShnTH5HhrRGtyYlRHp\nBURGpeKcL+BxyMbvj31uxVTkpDvIqRYZhPNOVZnb4L12XfHGNxobKZHysQht\nW6MWKfIDJWM4Jz4P/Huq9AJV4di7Ch3kCvsWUJ3UQWdkU3pp9+Cf7ov1vRWb\nV1kh\r\n=ttPx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDhOHKU88X0TRuKWt8Lj26MOiMLZXFBH33a6JAckZZSPwIhAMFGi2Fz8+P/Ysj2mpNhAXqNszkhCcNbfVMOReyzKz6z"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.19-alpha.1_1574130491348_0.775563401929102"},"_hasShrinkwrap":false},"0.11.19-alpha.2":{"name":"@react-ssr/express","version":"0.11.19-alpha.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.19-alpha.2+520960d"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"520960d4566129f950dccaef75d70e00039cd38f","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.19-alpha.2","_nodeVersion":"13.1.0","_npmVersion":"lerna/3.18.4/node@v13.1.0+x64 (darwin)","dist":{"integrity":"sha512-KeGB3daBt1QQQVwnoDEB1o07xQeKz/RXkGv5ImzKcv/QX0gGUis3wMlk59eOyVO+MpSIouOrFPe4yBb3ocqBSg==","shasum":"4ba3957b78ca8683a32efa70f34be28abdb1ff14","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.19-alpha.2.tgz","fileCount":8,"unpackedSize":12772,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd01PaCRA9TVsSAnZWagAAysIQAKLTApfsCGtaMv040ml2\nAoMcMbqC267wIsnrdStFwowxzcZIS9U1ltIk4sB2UYsvOsOvVko6XJyJAm9+\nmD0k81dC91oWCNN59T3FowTVUIqgmVcKL3VHWMf85ngqUmYHE2FKteV/T4ZH\nMDq8+RHbM6QupHHnyZuoZV4Apzn3agrbjjNQ6ExD6UQdEcG2BKcQZbpLczCj\nt1y4IuYhHYUOBDUiB5D6uHUNUOspw7mqFohQ8lDggGtw/VAfv1pfC/Czed8v\ndYaMxt52GBOvxR+u41eHQzvjdBHxPYrJ59nST65oGElrkcs/ur+mCFkikSdp\nIddlLJS8/t30fRgv8yGNQPHGOy1oq8mINDt688BpNynxTOSNGHuZ7mG6DlSr\noxKMyi31/NNXEpdN9pQnSYhrMaOliebSnuY2TdOKe8S6tzarMzE+MSuDNTyN\ngaekELLRreh6cresV14QfIHiV9Tj6uFJThDBwHqAYKDsisd5RLP6TC1MDzfG\n6Z4TRArz6P5wd/myGGmDn6Y9W1jx2JpwyBmNfDsFh3ijmPPVV0lNi5DZc/V+\nh0IZk8ZSmkbAZAYNCVHr9fuuk9ia/tcXg2Y0wHpJYiwcFrN87wUJ4OcE9GRh\nyhbUdQd+Ng8elb0iB6L5FxbudId2tsaUonjcNsbd2a2U4yd6HanldccQ8ST3\nP6qX\r\n=bdbm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDMzc8cbA4Hd5JtZL0ZqCHuEzDr9/eV1I+DYMrzo1RyTQIhAIdI0BcTRLTK1Wju4VkuMtx1I3H67mai4fRr9T1tkKMS"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.19-alpha.2_1574130650287_0.3511319853739425"},"_hasShrinkwrap":false},"0.11.19-alpha.3":{"name":"@react-ssr/express","version":"0.11.19-alpha.3","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.19-alpha.3+7611de5"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"7611de5d1b6c326c2e066b391b41dc295d9e9e28","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.19-alpha.3","_nodeVersion":"13.1.0","_npmVersion":"lerna/3.18.4/node@v13.1.0+x64 (darwin)","dist":{"integrity":"sha512-q+bXyiyNVq+GmzSFhBg0GwtwnFasB3ysIf8fLjas1H/HiNzLDg/d6ZgnFqvd7LGf97RpL0lLTGpWns3Bxj+rsw==","shasum":"49b9f63516b60a9286d024cc820424b515358825","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.19-alpha.3.tgz","fileCount":8,"unpackedSize":12772,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd01RMCRA9TVsSAnZWagAA0mcQAIDGhLOow+jyV6xuczYX\ngW6fLyZ5h6allgvhRXgdBE6fRPdnCdSBPmuNAzlcwlq9f+UNkTCcPGCYNBG+\n2rM7L8ogKHLBEYY7Bko/bySxcnu+aA+1DSdrJuhOZgekL46sIMkBjdtMH6gG\nYKv5O/k1jQcRX+gGeLauuhPEczpmF4xwcUCoZ7Uy2HjVTPjTwSHr4vdH1ZiK\nfqnL0ZdwOdjgh7M5VEHT3RhMyfvEFDmWqnjVcDYrDZ8l/itaXmXjSyWZ6Uze\nqO07JLEXw9Wxt0rs6WgFzvNZoTbIjY2QNpEqfN8UE9F6A0uXzY6qBYLSjMRV\nu56BYmuiVGQJTO3B1IZ5kWFk3g7VvEjgAddv/YqrHx4GsoSTj/2RPTT4p29x\nSFLbA8yixZJbEnprhBskP9sR7lmAq+K0oGhKrvi+O1NXsLoxuNavuzTBcs95\nWBu7HlEwD8VW87qFxl5B85CMTLYPAb0k+QLf6glz4YfO9VmWOqM55K4q2uur\naQFPOHcPaP8bfm+hyngTl66w/eDgnwG/fsZpUPX6Js90/KpPDz+aYN2jf2L9\n3/73X69nf4DWxhcbQbkHMJIcfLcK04kCGJ6JyHcupM/DogGi1NVkPmIG0PBH\nciNq6+WW1mi3S3kN35/NNB5oy09tVqnY9cRAXayAydtN8WjgR1sYn0hbcZ1H\ntuR0\r\n=Xqq+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDB+BMlhOlYnkavXOlo6XKQdb6AAU4ZGfVh5j9kSPhXAQIgbLH65UZTD6ZBtElZtSLjxAvkX7QlHh3DzFHKsJ7wF7s="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.19-alpha.3_1574130763706_0.8420982115862781"},"_hasShrinkwrap":false},"0.11.19-alpha.4":{"name":"@react-ssr/express","version":"0.11.19-alpha.4","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.19-alpha.4+2cca9dc"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"2cca9dc1bd1658036527b85db7900ab153635a85","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.19-alpha.4","_nodeVersion":"13.1.0","_npmVersion":"lerna/3.18.4/node@v13.1.0+x64 (darwin)","dist":{"integrity":"sha512-dozBnt77PQPOAliGw89XFmkKkdlDqyE2c9xWFfMglZWZfz+kKomNSQxs6avXM2k3nxAMxtjBkTOVqWxJa+WLgA==","shasum":"453be203a2d07b3e409c7681c61d16c3da4530da","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.19-alpha.4.tgz","fileCount":8,"unpackedSize":12772,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd01S6CRA9TVsSAnZWagAAAMAP/2yaC0pIqa+Se8pbuNsy\nFL1n5dsUAkBPxpv4lyb/ciDK9tOLjbTqsN0mgM4lnfwxx7DaOcfXXVVRc3gD\n30Rac4MTuL4WzoyT0yPPHYwOiU7KcBGapoOmgQlGEQh11v3993PG7s3FWcAG\nxEUrPApGhsjXKWc3ur72MdRFufKsfaWGC6LppoRRS/QVtKKrZpleDeH567LS\nRlCNBikCUciT26Kn1xN7icVpkRbg9Yf5SPRb1L9gPyuMRNOedhd/HvDminkg\nt6w8ctl7FmVAilxy73WODfNuHX33Ss5mzMYhGVNWled3eIDe3K8wUodPsoVl\nsnnDntEWEP568+mE0tWn22gDL3fzbET6uzGAOmpCaTlJZHqeoX3CpIpunNfw\n10UHGzh7yU6KgOKAvliDKyt8SiqGmHNS02xNSNxznTFuGg+4Qmied0QTTN3S\nmrziucA3M1Yaj6/Mj2mpYLkdV8COh1s5GOmZKmznX4q8MX8gsmlrvM402svr\npepe9ATXQHjsUrTLgmyRlOIs6FsVkQbHEs3sNyjEnyA6iR3ik9yCbRyEo+gJ\nmSeBMWXrPVbEt6Ox5ETYiCUind8kMOM/D3Wq+FV906psx0+aqqysz1OErjTn\nZq1s//svpINmrf1EnxAtccCZC6EUH4MCjtPfvFIlj9KJl7N85+AmU4zJctW6\nYV39\r\n=eocu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB6ytXedEd0YMatGIkMPXWil6QzSuA5FjoHxO5aTYr/5AiEA+SFHupptDVEop6bxroCE2aw115KvGI0pqlWTBjb0GkU="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.19-alpha.4_1574130874160_0.39128862572050305"},"_hasShrinkwrap":false},"0.11.19-alpha.5":{"name":"@react-ssr/express","version":"0.11.19-alpha.5","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.19-alpha.5+163a311"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"163a3118d3d5883ba997c0ef4cddc0e65e3c292e","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.19-alpha.5","_nodeVersion":"13.1.0","_npmVersion":"lerna/3.18.4/node@v13.1.0+x64 (darwin)","dist":{"integrity":"sha512-F0ePZ4UKy3Y6s0giXG1iMwe5RYNYdDUITtXmyeVX4SiaojuZZTCGs0PulYJzKzrbcrhaMGlmrH2aLHeDmoTDSQ==","shasum":"a90980006dc4020d3252d63cecfc5759be77fc83","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.19-alpha.5.tgz","fileCount":8,"unpackedSize":12772,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd01V5CRA9TVsSAnZWagAA0bgP/0MCTcJa9jOG6hL3FkBA\nT6wM7Fgh+igeA0hHRtmpY5imwz/paxoy5oRi69gu8qjE3kW6WmDVxnDhzwQG\ngjdNEuysDlxX0jWnaHVxsWIbjJaSebFOfvaKI3cftKALUCGmRfs9ssGSioaU\nGghZxUgb8ZI4550Dq3SfZRyBqMGjsdTmFbxDpKpnzvC17wUA8IeabdoZrqfo\nuIGkh8N0zhjbgMvp1YjLYzf+BLVsZZ2S8UKYKlDFDDdFlpBcrgzp4QJxjRFd\nyv8v/xVhm9V6zMgSJvsj3YiBNccnJG8CSAGtmVXSM8hd6N9aRCWfRcQkJT1r\nxAQcofTWPGRqyaXBB4Yrkgyl5xjDlDd67nzHHRLMCvxavXQP1jC6knjIDkNc\niRkX+Qu6g6tlJ+cdQipFEvXoZD00MPDmMYDLwOuDczpFAdsbfCLO0IzPx9mx\nR7cBefS0y8mNOCWgro+Ceb6TKgpz2wYANTGMOU02/M+b9m0YCG/SzmeTaYHi\nrSNbeviCF4O4QhGAkfwXIjTJcktJ6XxXLFJc7pmNp7VGhs9o2QXPNMRduBO5\nUnGjY+aOBBS16HgsOXNIuD6nucSGjBAaLLhyeRaeR3jZeV6+drNiEcsg8WLP\nmgj5IAuhZ5krdqy2x/r6WgIlknoaIBSMy18zFnYcuXelOaAyUMthDCpEuEQa\nnTNQ\r\n=mlay\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEyJR3lSgFpGsmQFDIxnCh1TtqazXxHHWE+FkL8Fq6vrAiEAq4xL3pz4VRkUy9vSnbpG6MaceJeE3FWBZok7hb07t6A="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.19-alpha.5_1574131065168_0.03076037876034765"},"_hasShrinkwrap":false},"0.11.19-alpha.6":{"name":"@react-ssr/express","version":"0.11.19-alpha.6","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.19-alpha.6+ae6e992"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"ae6e99284419949cc405d7ff6b1bcd7a63f2d357","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.19-alpha.6","_nodeVersion":"13.1.0","_npmVersion":"lerna/3.18.4/node@v13.1.0+x64 (darwin)","dist":{"integrity":"sha512-l9YWpBJXsxKNyCrRHQ1hylM94ueq008rg4gnSehr6jDNiy969ane2eu+xtsfBzeXz/SSnyjYRUWYyLJ9OvLlcQ==","shasum":"2c27cc7d89966e508fa4cba13f45d211faa310ce","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.19-alpha.6.tgz","fileCount":8,"unpackedSize":12772,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd01YRCRA9TVsSAnZWagAAWIkP/ilp2CGNYvrsn9SXoS7/\n83BdhxgyI3XFLGTGwdejl16xc21EyOFy3M12as1dEE6djOqWa93jPtB/xm3x\ngwyKOF2sJ01yFGpywP0cZqBNAyMOkyFVPDYHg22aKmCQPTF8dn0BIeg0gjKz\niRcoM5ON3oXHHyD9LcB/WAD6ReSzXhaFXXgSCMnrDbvYI0MH2M+3lssE1Uh9\nV1P809qligz6iEELxNuJGh3o/+2t19THVggg3coeGC39wsg46+uIbjVv134V\nlTCjB9ZEW2JnodBWM5Wsa8h/h4+eXZtUrjXiuVGxpNLMCd2evU7B542DfQVu\nKOL3dBFE4FWQTqFpAYdEu3z216GJX4695MeGwBO4NKa5sneiXedGT/rrAJy2\nxFbUJW+mAGDJ403z/aQJUknrjhWv8q0eq0M7sY5Wr0yhdaaf4InY4b1SdGXH\nb5vR7d7y2Y2UA2MGpKxKJ1M95O8WWcdWE+ZzVcR2HX/TUdPdLdq1pCo8etoW\nlE5dBWWdsnZVNZRjG3l6OmPNHnXrdn7j2JGbd6ImcX9j68TvNMbTL1Z1hNQ/\nn7R5mZpJrtt92vHT1PXJ2Up5XN3neqlT5994PgqUUlTbY4JKQOnWpf/x0rEn\nfbgbRZ01PpFUD1sflRnZDloaQEvKt7xU9WdcNH+LtxN4TUKkekPhgXGoqzfC\n5EiC\r\n=UmNa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDgq+TUDTURJ9l+mjYzFA8Gmo2OuPr345gzdJSNxjpy0QIgcOEpcfHpmy8aMN8S1TwlXXE3C6n+iFfMtSOJEsqqBv8="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.19-alpha.6_1574131216931_0.8270630332664493"},"_hasShrinkwrap":false},"0.11.19-alpha.7":{"name":"@react-ssr/express","version":"0.11.19-alpha.7","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.19-alpha.7+b692114"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"b6921142015c6a9cc1d86a11c8dc95ff880eebd0","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.19-alpha.7","_nodeVersion":"13.1.0","_npmVersion":"lerna/3.18.4/node@v13.1.0+x64 (darwin)","dist":{"integrity":"sha512-DPgbsfJp2oWliUhnLazTjCtFK3CX6CwbT0IbHbpbW8U7oNzhs1T58oH0zJlU0cyt3GCaHLFpMDWjaT0Ni31dsw==","shasum":"65cf100cff7aeb1ec4477de916f36a334f103b9d","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.19-alpha.7.tgz","fileCount":8,"unpackedSize":12772,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd01bzCRA9TVsSAnZWagAAWLUQAJ9Nxd0vHtaRRAg9uvZB\nFFED/50IlBAymwjK2C0mtP05kDPctPylr8ZltO+Oxyo5PXDJw98o3fnR25Vf\nRHhSzamP5tab1cOFbXQgxMuA5k3mdynE8gFW/4A+p09AArShRpRo3DAr02Ok\nJdIg8lwnHdRjBjS7VKGET6euTH1X5LLv/H73xS+XpD1Exb4Q8jYelDWb/jtB\nMRzoqObqux+xrvsH/UWCs3sgip06LpdKbujYxtywDob/888R3SXh/SaIasFQ\n1BIHNFWGCOfmQyd2qKzu0XfUG/933gEri3T5NwQPlsFA/IavPnhTwtB3O6YE\nmGMi3rSLpXSE24oEyPlw6msVdCwEgcp9mD58l56X4LPv0CGOzk0lcuWYzdKs\n/53VQbZVECFZ6LtaUHY1rqUXpbleJ2DHrFsegn3zfuyjoCnxONUHpIseMVPv\nNxYGI9HdGx7ZOWy4nqx1R989dTOYm6tW3DeaeuCHydZLYAKExdLh99grl5DO\n3gPGa3JzsefqfqAcR6xC6niegNxWr7UMyXnxP8cnI93K4eXyjYV4LI881TZz\nGQf7TN2CiWl7DSJPv5NqZ6+RuaUGSLwo9J6N7zWOG5DoT0fDiemaxkkKOL49\n+Yq5Z9uhXVF0EXbGM/xIB7/008hZ7mwAXXP00nRuQ1Haiv3setnh7W/n2WwM\nGuIY\r\n=8SiC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICbbE539UVAKec+6WZHpooa24xxWQw7iNDJM1wDORobzAiEA0wr3GER+m5KRvFY1ClE+y/PuJmWtQoU4zZujOj3AHdQ="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.19-alpha.7_1574131442698_0.3965650453777583"},"_hasShrinkwrap":false},"0.11.19-alpha.8":{"name":"@react-ssr/express","version":"0.11.19-alpha.8","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.19-alpha.8+aca07ff"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"aca07ff76c6840aeffc7c4dbabcbe822270b0525","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.19-alpha.8","_nodeVersion":"13.1.0","_npmVersion":"lerna/3.18.4/node@v13.1.0+x64 (darwin)","dist":{"integrity":"sha512-yd8xQfrXLlLgjobqk3dQODwcdjxpQ5PzawDltrUGUi9x4N/Rk6kTPddx6nzgaL8gP/7HdcMpuUnsrYoQGkFddw==","shasum":"de64183120626911cfba8c6e34ae42b39ad5f249","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.19-alpha.8.tgz","fileCount":8,"unpackedSize":12772,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd01dNCRA9TVsSAnZWagAAC3gQAJgEbprCRNRLeOp1mI4h\nkC255Prt4JGP9Nsm5UOD6CpiTpkoOt2IR9/qwz8kSXHsuaVdLwend2iN7Pfr\nNCLsb0vdO78MGTDu8OjbhSZD82ukOIX77Wm2loe0XvSNbQlRr/VbXF7ZhUMe\nfYKy4CGDTLh64NZu0+/m7Wq4tcsvzcO5fI77VYeBNTZXBJ/AQ9+ckyXMUXs2\nni5Sp0KawOxIjME/vAKi8v80P/n8Zn3kFRfkFb1X0MLvGGxm4YEII2f+t9m7\nAjDimI8d/UowZPSaYTvHseBfkYfpMdSziS39RWuUffHFGPqpuOh21xeIiM2+\ni0DdDmCXk2Iajj1sgWBICHd4MUdCpuIHyaTS5VtKeZe8QpFVuG3fHjjMRaod\n9EvluGymy5lZ1LvzZAmaSWuDieF3MlXYUoEcplNERixS2t5c366wVgO7V2cQ\n5hZbyipNdy615fruL0RDW7RmhaqdVc2lH4ff+ANnr3SReeTo6j2x1GZDiGwS\nfQTHE5Z+oZvAT847eTiW27hszX8QkyN5Up2xriE5MUScvFcCVKVmFaTYwxb0\niBC/IoWGnh1YjGhvMU0z+uD6CTi1wtEaOl6nOqbJLofcBqAtcs0ADyFA5YNi\ntVC9YkpC6/Z0XDkhzPWbtEAPBcxuPDDaJMPZVH8pOPDJdyWp20yqR3KjzrC4\n2wCf\r\n=bBQp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCDehR6PbRGDONGGxFTjBRTxd9IwLSW5wR6PLyaMG9TGgIhAIhzwT39iXnJdRfYhitU0gBFYr7+VXlZ2qMcpNUn5kKD"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.19-alpha.8_1574131533341_0.6751786755653617"},"_hasShrinkwrap":false},"0.11.19-alpha.9":{"name":"@react-ssr/express","version":"0.11.19-alpha.9","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.19-alpha.9+f608f1e"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"f608f1e61d4cba46b5e7550084979fcf6670d10c","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.19-alpha.9","_nodeVersion":"13.1.0","_npmVersion":"lerna/3.18.4/node@v13.1.0+x64 (darwin)","dist":{"integrity":"sha512-IjdrJntL8GhvkMaRh2iyfso6XRQxDAzL8iyeRnrWYMMX/80VhHABz2i5qHEBVKELjdqpt4iWGx1PDvlgwkWcBA==","shasum":"98e17796c950bcc50e7bfee9a371e76f27c5555e","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.19-alpha.9.tgz","fileCount":8,"unpackedSize":12772,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd01fFCRA9TVsSAnZWagAAjngP/AukZ5Ez/7gNwFL9Uc54\nQ8UUeESsro78d/f/AvcsXZWQkJnNgjl8PF9CPpXaYx1SmdMsuS1tc1h4A9Ub\nkO+VhoPt85yyXX6MyiVewyyRwIkeBfGToGX1RiMffoSfUakSZs/Qpxn4LHAx\nCuYNwUV0SjQHE0vA6OR2ZzqQ26mNqO3ZbT/8KjnsGyPHY8Ec7sslvcRsa8Om\nytgsDzy6fG8YcfViDiz3lJTrVTGO2JGAz6wNQtaBzTghG2bIY+hRuqJjjuSV\nSPOEOuQst12HyHRldpixL9Qs0BOBuMJ7uDahczLTgoeaPMUP8R3X/p+ff0s+\nV9Mqy/9rxjbvWZC/JjHO4PQbzqNlICktkecKqwJquEXalREnlZekTuX1WLBs\nN5oiIk7XypxLMguCW3mZLQ8w25my+4PVBzo3oET44B1PTcWnTdir3opGBH0B\n7mASYsroh1FLMVBEs57fLsHtd/9fDQ/OeHbpyEW/d5Ma9rVYCXpf6yE9RZlV\njQjvKt7doezTHFIdGqvhI1VNE+tgHdRawE415lmJYxjEmeMy+W28usnO2xKh\nOww64QHxLl/FxYOyeA+6XBZAhlZmnfbibHlp8q0Lp0OIixrFFAkU7UkwaXQi\nsTd/tLCwSbzQDQQpl3tiArSgMeVrl9c4vk0LmIZDmjJzoJ6eAQvS1nx/MbbT\nGZYZ\r\n=HTH7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDrvDbPiMuyzMv37oZ63Hk6owBkaUwMoWjID37VoX+RQQIhAPHJNqWHce94NPCCI/5kpJwIlXrm1C2Hd6l3KiOpiviG"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.19-alpha.9_1574131652988_0.12438408654877264"},"_hasShrinkwrap":false},"0.11.19-alpha.10":{"name":"@react-ssr/express","version":"0.11.19-alpha.10","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.19-alpha.10+8680958"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"8680958215d44337f31ad2c8041394c35f4b5559","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.19-alpha.10","_nodeVersion":"13.1.0","_npmVersion":"lerna/3.18.4/node@v13.1.0+x64 (darwin)","dist":{"integrity":"sha512-uH8dKrIdj/p4HNcDXcfhPciERyOMDHNRAZ9dvPEIbsDhL8Ut/vnVDt/G+ch2JoNVYajovFhyUEj6HkW1UZrf+A==","shasum":"d180a203515883c4c5506f0e29888fd97958c3c4","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.19-alpha.10.tgz","fileCount":8,"unpackedSize":12774,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd01g1CRA9TVsSAnZWagAAbjEP/17gL/IVQMBCQV0WXlD9\nO39fzHIQBjqe2CUeGO8JguPiDokiHZRIFPB1F6iSj2sF40PHZdrwhEdgWs8i\n8YN6IWhMtShl3WwHImhneWBC4nRyVz7f4SYDwe80TdCZX1r2392eXqGjzwkt\nU4QkmNX84V1heCS18nmMPr4maM5HaBN3/lOGue4w7DkDdRXbLKbQ2HegPrtU\ng7hBYTqleBIaIOJN0wB4YHi4BtdEysODrPzGgmxM2FVyIfW/j6UJZ8LGEpw0\n0qq3s4DnCXW+bU/DxnkA4q0NGHHcMfZvwmexbVeATSMMETA+o9OnN7026cSO\ncIP0JZYj3p40wqGrEteJ+Vbj0GbneVDU9ZhcM290ExbIyNujvUccuHXXxk0i\n02p+pgAKSH5sTJJB8Gn3FqoLikdUwwNkOdmU0P+d6DSxAFPYRrE9k67PsjKz\nndjLYzi+tqf3vxe6dQ/EONXT3TPyObjlG2MRAfbKa4eM7rLahiYbC3EbnAgM\nEaLOukBT7a2P8sk1CyGesEoYhFKtAxTdYjwb77Q3ncXAJw2ncGruAJwETm5N\nDpfpVsgbbdc6HyHdaOPPtce6BXbZQSxQS2ijikSFIclZeriYidLq6rxQUegv\n918Ps0rvr9d6sErr1dy/7XjFu46Bf9zr0NLhwdXEsx8sX8mciURtytUJUH/S\nyJQX\r\n=2hr1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCXpgr/TnhsD3VQ+QTffKlGMIISXvLcNggyrZkhh+hk6wIgCXmwoewUOMFq/FwSfwwAwvtxdvGKJubFxgbAVfsAlZM="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.19-alpha.10_1574131764454_0.37700168086081476"},"_hasShrinkwrap":false},"0.11.19-alpha.11":{"name":"@react-ssr/express","version":"0.11.19-alpha.11","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.19-alpha.11+20bc0b4"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"20bc0b48b97e8357ed5dae4dadee2c5c70910084","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.19-alpha.11","_nodeVersion":"13.1.0","_npmVersion":"lerna/3.18.4/node@v13.1.0+x64 (darwin)","dist":{"integrity":"sha512-BJOTfRrXOGF/tyvUBKPSN0BPS0+CieHxYlXdf5p8PqJKWu1mCgz+rpqlLKjdK3NbOMV3OCH2C/3GsMyMMaQ/1Q==","shasum":"5c87e91d4444c8127cc842fbb7c4297fdfb14ec8","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.19-alpha.11.tgz","fileCount":8,"unpackedSize":12774,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd01koCRA9TVsSAnZWagAAQc4P/1JpU4czlP7T7A5RbBUr\nhsRmPiPvEtRvHbBo+KjHA1D7AXhzCXBCkR7ScCTEEUqMiRceiS0KWl7/h3En\nEFVrVKBwUPaF/2GI/TwfgjhjMazhLbRqpNJ+MwDtUVvtoFy8rHJkY++3oQqr\niqI/VALUOo4haZG4oxt2RjrBhjNHtwb5mTtbLEn4/MnLe8i8mATM8+7uL24/\nIs/CH0pw2slIZmUfNReMOhDgB81IbUG4fDpeEvE02k7KFGbzcdS87s6iHgyd\nppPfozsF1tK4jXGQoJBNQW/TsPsJ29BwUGnOu12YSJwBOPuvWOVt5ryUS2bT\nr41WKW6Gz2NCDMtdgqa5qx1rEZRw+bpk5oQor7LQp6Q/SUBSK5D1m4OooFpO\n1hWQmRx3EEEaMNtoBOTsDEMiwB7G+kEgyY5N9C70rTLetps3wMppoCzOp7Kl\nksuzJuRNU+falQT4QWG/iASuRunk5pm8Yowqe3V0KoEzj/QXJeTjAw+t4dtj\nE4tk4WUOZ0PMD5xOt4kJrhsINbFkTQt978PSOZZx9b6P2EMQQlFDDDRocB+d\n7JzUruq4Sb2WjmrywS1ixzB8nG0HZ/70K5jOFgKZZBXIHvUnFWPWgPlUkm61\nJE5Y+4Uq7GNtqRqPeuqdIoSh/zYFb4xn+RmW6XUb/1Iv6GzqYzXCGVtM4T38\nmhba\r\n=SiII\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDT0CXe9qEPsMJHNEMMbTwxHEbCruEz82WYmbowLQOvQAIgAxHbp5yV68++4quUx6aNSmKQKtEfc8RSCbWYqAr5GBg="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.19-alpha.11_1574132007737_0.985691738319886"},"_hasShrinkwrap":false},"0.11.19-alpha.12":{"name":"@react-ssr/express","version":"0.11.19-alpha.12","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.19-alpha.12+43f3ad4"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"43f3ad4afabef580b8cf20905b1881c4e9ce0dce","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.19-alpha.12","_nodeVersion":"13.1.0","_npmVersion":"lerna/3.18.4/node@v13.1.0+x64 (darwin)","dist":{"integrity":"sha512-m5o4XuUvfv6tLFBIszQo4MF0VhPJ6kRpkqz2G5gOUI1AK01tcunOFyECnKGZm3rUTuCagjQmiUyXw936KcLjIw==","shasum":"7c9d3bec3e0efeb4853c7d65858b43c2dc4a649e","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.19-alpha.12.tgz","fileCount":8,"unpackedSize":12774,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd01nnCRA9TVsSAnZWagAAP1kP/0ZJcHB1LLLaXC4LqM15\nMITnk75D5utT+iAZBAwn282vPHEF2BKwJkgQYjw8Pkn/+GMXfQzZhKV2f8Jh\nkiI73C3crYlUq507ogenG1kijBkST1QbQ7hXav/DggDNByQvm85GIEOWAgAV\n4b/7FOAtoN38cTajW2QxwPGRfKrb6+CXA89ri9zUxEuf5t3yVUAOPDNue3fl\n9Fs3TDSh6v3nrewFciy4NZ2bwBulgqlzdaN7re2O3Gcb8NMblYlyrEPWstvu\nLfmg2x/iIwyu5BUjfRelHHQdRqrcP/sKmDZyb0xnjX/DUTJOlYEe0/bJL+Dv\nvQ2AMuBAOs0K40v3jn33yWkPnFZXGrOCD09R8GKYT/btlXKFR0loMCSyEblg\n6XAWs9QQGB8/1Cr9HR+87iChBeMHOeUas7/Kay7xrWhSkdqINTYkAQODKOA2\n4fgp9JqmnYPUhsc3OHF7HW8w8PXNtbhRZQIYo/3yXBJLkbZrNP2OUod1upoD\nFP3FdvmYCRKwXsaQbQ5Q+Pfi/Se6pdPh3YG++5gVIB1kjD/luIorGiV+dd0a\nq6gtxcvTAoKSCb6vz2lWoOlU/05kf3sXpY10UMkLe8x9y+XfIA28CTWDI4dZ\nbFSec4Phk9TMIdidMC+9Y+YY8yCuK+eKuwNJeiyDppVAA/3p1/t40Xokk+qq\nh0Iu\r\n=gvjM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDP517iJ+v/pFXXLDfnTuInbG35CJrI+bwKxFNrCYo6rAIgEyTklDyGaJ+L1if/vXILtuAGSmzBBsy9UmWMF5U2TM4="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.19-alpha.12_1574132199380_0.06941356400794585"},"_hasShrinkwrap":false},"0.11.19-alpha.13":{"name":"@react-ssr/express","version":"0.11.19-alpha.13","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.19-alpha.13+e115955"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"e115955f99561edfe1f52900381a2872ec80095a","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.19-alpha.13","_nodeVersion":"13.1.0","_npmVersion":"lerna/3.18.4/node@v13.1.0+x64 (darwin)","dist":{"integrity":"sha512-JcZD0np8eDVP1VrYNixknFQxGW5F6ieBP9Yj4glDyhTgChrsmv7EHVyGcHcvUXJW1swozyJgWNr2V4LBgSesMA==","shasum":"de3855645e26b7be7a1058cdf839ae9ed2a35fd2","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.19-alpha.13.tgz","fileCount":8,"unpackedSize":12774,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd01q2CRA9TVsSAnZWagAAJLcP/R3XKC4N7B/JOv+ONu/Y\nOY1nUZ6gsf6s9wW2K5u+UCnZ8rm2ejMXZvlAlMXURpRTP6PAMBDKeqDsiXsA\nOskQYefYJDtAGLxl5EMgWDkYQCCMrj+IT6gzhy4LtUycbLusaWYdPewuDEFe\n02LpGxo7+JWqvgNoQDir0h5sByA2QLMT0gRI1ZJmLrN/RgwqyJrx+WR7Q/y3\nXfkLzBCjOVw8+V6l9KUjHMgQaLFR4oezd7iTWxsqyVHcPbVypWlFSnIN0Vxp\ntmfR36MZku8n0aQVysfvf1E0Bj0b2Pb8dxTrzY/RxRyapWkVyU2gfAyHE0aH\n3Edv5kNdoPAPvwSYKM3L1j/Rhm8Q09OblBRKXN8acM866ZV84UGsWlmN5Zw1\n8uBidmCwU7zFveiRGu1NMCqblHIoRIPYEUTLySm1ABdyGNYXVv0u66LsaKu+\nY64KlRV8tUhXlNlE9U9MDQ5IpqfA49wAAwJz+sVOIyhWwXuaOQ84yR2UViF1\nAaU3+1YrjrH+JnRZIKkF0vZHN9+ByOkmX9XHUWTVQjFjJBmFdFHLRluZUT16\n543A/zsZOOYxxrywbvaMnfVEAXPikxfmZ3IGRmqSeeLQLG9gjLFHYLFIDkml\njOcXWcGCVEvJEU9AaXHAr2jZ7A337ZLlw9aKBbOhB8jFI82UyP//OgcvP080\n677s\r\n=X0Be\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGeJFmTrZayfkIQT5mWFb3Bq1KWeIrIT3y/LfLSJ2xx4AiAVlIlMiuO+u9je9VUVjo3pX6sUBEWUs2JATeea2U+SvA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.19-alpha.13_1574132405741_0.8133444062772501"},"_hasShrinkwrap":false},"0.11.19-alpha.14":{"name":"@react-ssr/express","version":"0.11.19-alpha.14","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.19-alpha.14+9038a07"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"9038a0754970bef62e7280d77bf8252c2bf1b19e","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.19-alpha.14","_nodeVersion":"13.1.0","_npmVersion":"lerna/3.18.4/node@v13.1.0+x64 (darwin)","dist":{"integrity":"sha512-7YXhfv0sxelHGCzxydfuglKa5svFW6FUQboJdbv2E1Fav38zfHKUpbC2FAD7PoHjMnEIGY9Ugb4iyKkz03RXhQ==","shasum":"f584ff4bef857dce1fadd550b5ed01aff7fc0da5","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.19-alpha.14.tgz","fileCount":8,"unpackedSize":12774,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd01srCRA9TVsSAnZWagAA8y8P/jwgnsWicmOqH13dO1ng\nGcIPQylffT4BcECgJvc75GZi9ZiXX2SWegMQq55p+8CedL05cMhKJepCksa1\nlGOQwPd24vrFJ0US+h8p6ldC0o4gZ+V5EqACI2NK/wYkVbMARrT2sHRjStxa\nIXBD6kO4A6TVM4+OJPMzZAIUSOLmsFUTmj/mmp2MdkltiV4IPDJovXzL7IrS\nZlV/rsu/LZtNpYDG5ZbGkGxa5VcroKPHZkKDRIklwQmfWWWAScRoL74sYRW2\nIMs7bbnmE/UxF/yqUP7FidSTsXX8tZxvxuIR8P25mt/0ae1Q4mc5QHalfwxz\nUImWfn2f8crRs51eMMDgGauENW2IV4klkBFRcGtnV7IbaUshH+cJtLJut3tG\nC/hQjuMqU9RlWFewP9DOJOb5QpwcmRolNTJHJ9LJMg4P22j/NrqbPoRJrU10\n2Q9s4NECwBtlb2/C/rtvNbdQCW1bDHcf4RKvtm618vdOfPxSPEOuoXIGEVZr\nVLnTk/1lzULP8MCrghukkKxjjQD52xf1ha6j/H8iXtDttJFzmkhXQtN4A1lk\nmaFhDGTx2CNRFHJvdqCDn8Qey91x13u1U6DZN0IRUlUl/69+hllWinT1H1m/\nnfLdJ1Ihlqb/y4w4tZsLNDOjUsxx5+cRayn9hp7XHgIDdFPuwQirq1KK23JY\n2P4R\r\n=71za\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDDHlU/uK2it51TOV0QwK+WFkpnwsSJ54ff9hEgvsO69wIhAPI0pb/2Eh3vk8YX1JtaJV6FRPZlu1V0Kgz5B+cuVXOn"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.19-alpha.14_1574132523071_0.8851171892138097"},"_hasShrinkwrap":false},"0.11.19":{"name":"@react-ssr/express","version":"0.11.19","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.19"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"24f56aa3fea5a9ad02a1f7c2a09c221809bac1d2","_id":"@react-ssr/express@0.11.19","_nodeVersion":"13.1.0","_npmVersion":"lerna/3.19.0/node@v13.1.0+x64 (darwin)","dist":{"integrity":"sha512-fBKT0l/EFTbCN2A2Fv9pamNdUabcNghHpSv7/y1oAkrvg6huj22AsfPqruVX4JuCvaLVbm9nznvelUDQ2kfPrA==","shasum":"7cfaff5bae7b418dd516a6afb8989c95aa85d6f0","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.19.tgz","fileCount":8,"unpackedSize":13925,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1zd8CRA9TVsSAnZWagAACXgQAJKU9B3LYK6iYsx4ckm7\nkoX4iw1B44VHNeJHM7kqDWPa7Srd/TCQmaHUAj6F1R4m3OmSeYdVCAreY2pD\nbm+Wgp8wBlE+XjCins8DnyLKYmkQMkz+TYd/WAXNXCDAPDYc3C94IHs8qzBN\n5o3sL/07QhaCl7SWFBoS4z+TfYtZXgm/Lxfxp6rRi9Ulr2r2HafL2czfUrsN\nwJxDaZ2d5d60+nb9AvVmULkZnV7em2nNtyXTyL5P2spHHSsREqLmyuepiNYe\npu90eyfAcctSlSGB7HBL5zLZrJldX3B9Pfhk//lV5eUmqo4LEj3IIku3YxAz\nrSRxEhoKJW8PmYeOwPW+q6mj8PXcZpKqKizm/krRgmEM24yq/jx5FGV8ycqa\nYy3DrETf/zO06eT1zQSW1c0Lu0PkfvRbNNHe79snvZXWbI9Tvi+tB7td8QsC\nkC8YnLgKGoT26DQEE9qktpvNMyxUyx4nYdHWcp8Z3stHzsXyBRxkB4w8l21E\nwqWZ/sa60q2jLd0T8DQkipZnOJqHTMxZhDlE7DhiAde+wpsZcBG/et+FBw8Y\nvc3ocCOtR5NFhxrk3OBWR+EulhOEGwPXLnmZZFBFzcTd34wsT23SRBE1v4lk\nnRagrzmXtj+4RTpxgIlFBFN+fps3t+Rzwc4jiCCEIWsXxNKGauI42XYhDkyc\njnXt\r\n=W147\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB7IP5jIBEqVhIgSJa/kHC1laNLPPJBrvMCSW74dnDxwAiEAknzRKXpyG00kt3/A/4QbP22cesPyyXLd71c+kM6Qnqc="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.19_1574385531914_0.5720216536155251"},"_hasShrinkwrap":false},"0.11.20-alpha.2":{"name":"@react-ssr/express","version":"0.11.20-alpha.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.11.20-alpha.2+ce99302"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"ce9930210ac88543b4a147ce01858b89d942cf81","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n  <img src=\"https://img.shields.io/npm/l/@react-ssr/express.svg\" alt=\"Package License (MIT)\">\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  viewsDir: 'views',\n  distDir: '.ssr',\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` outputs production results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.11.20-alpha.2","_nodeVersion":"13.1.0","_npmVersion":"lerna/3.19.0/node@v13.1.0+x64 (darwin)","dist":{"integrity":"sha512-kJWerU/6BJ2H6IrmG/W5jWjOu+QNzMJc/Hb5R+n/c5KW6OuA9U84t/4CnVOvYxP964U81cntQg2F0ynboC1JeQ==","shasum":"8150af3f9e31a7692548998f5ffb4d235912271e","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.11.20-alpha.2.tgz","fileCount":8,"unpackedSize":13957,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd13HOCRA9TVsSAnZWagAAcfUP/2kL7k8ImqjhcSCAlXNH\nywpFMivMniEEjEXOwKkSJL8qfoDd4pxZjFSIIfuD7ainL4D/hibcue7c0zIn\n+/jWYdOkrxFsZSNiUu7D4TwY9M6+lZyxkFCcAU65ACzHpIT1LLUBrtxbxS/d\nXc6iJ/OH4WYaEU2PCmDPAe5y8m722RsY33aOHnUJ62DFxlPhLPTfd1zwGyc1\n/MVLU3A7Q79IfuMxNOg0uoPIdaI1ew4TIk382+l9WCQ18uzKuTmdNsq2hXZl\nKFpLUN8XMil9jQHB7kMWz7ntzYxVquZEsl4i34jK77ZyEd8HEcPJZ0ikwgEE\nw7w0L2Ka7Vv50RfGzUf4OfL5wNDT1Q8f69tsa2ofB0V7lMrABgywgrrITXPH\nJjRxiwIUxZ0n7S2Pg6vGkYn5MfkTLhqG9pYIGmVHCFWuba0IaiTktIkjYEn2\nFxeW7W0WoAK1prcvro7k7ArbP2ZZXy+u3Yf8xpR8Kh9uUMOtTTI8fUdYWwCe\nrnsT+MbFG6YO5NO5xuu+GaknnkuDQTGEYewEN/qNEZh2tKzO3H/1kQZsFJrN\nX1XDrQlWAN0WFzTCSfj442Lghj0DLQFnQHjyIeB6Ek1dp+XiCdw3SdabkzEl\n3+L7VM220ZaaFKqoA/T92mRf2UlVREtXB0wkIjMM9+9VrKr4Qkrg615/JoYe\n6L4Y\r\n=D26E\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC2QaxIHSKdYJzpS5fB2f6JmpbUF4+LIu4zHnWbQmhwewIhAOGYkg76F5QVRsk7zpLg2EU9ZCl1QLuEK9Ns984l4BOD"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.11.20-alpha.2_1574400462455_0.203593028412566"},"_hasShrinkwrap":false},"0.12.0":{"name":"@react-ssr/express","version":"0.12.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.12.0"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"17d2cb9cf7c496900252700c08b9843b5e728d3d","_id":"@react-ssr/express@0.12.0","_nodeVersion":"13.1.0","_npmVersion":"lerna/3.19.0/node@v13.1.0+x64 (darwin)","dist":{"integrity":"sha512-gb84zE0BrND6MSh1RCR+jI7VR7F8u3/p+iyzSDYZAr0PmKV4L9FRwTXO+Bb5yPzdo+yAR/OSMCPCACRXyWIdPw==","shasum":"a92dc5acd67f35a7955010b1f7c6f1f8266b1149","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.12.0.tgz","fileCount":8,"unpackedSize":14385,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd13hZCRA9TVsSAnZWagAAvLMP/jXMvJAz6F35YC5am6nV\nlRzjInGIMnekTkG2FLe1r76A8djYDlqBjLmFd6IHGPm4Ucb1MaFF90fACGpV\n4Gq4TI69+OSqK8MNZoBy6Qwh+kbfTmOKOSQC3icZVY6g9tOWOu9RVJfdnn53\nERxihLcHTEgH3MjUjhmU2FfYMl6Tzk0+r6rhuWMq0z9fmfmdltnD6EoCEzXj\nxsgFRD4BWMY/p7/tIHNgcJ+A+CGFg80k9xHWQeG88sor9GQtpWz5x8OO0Voy\nWsuJlDNRO0r8HJE6Gd19mJ91R9WWxC2lJ1XT3iQw0l3QlCFZl0qleh9J7ym/\nzs8Z4Jh2mYUyi4eYl1PK+7D4G/vGnnQXirKqNiWz5iKy0ZGyqjL7uxppZW/n\nqgsRZm/Yl1g6h4GwcjDdQiZ9KFI8JdK232sSd8H+fD8oXZyqcprWER6/qFVi\nEPlZhfCuu8JYfLLY83mjguZxu64q+hvGmUld2p3teSvBSiUzEFz5+mqbgYZJ\nL5lut1EDjxM226GKAT5sSUXaF0ZV3cjkkEEb5kO5JfYMNxXWoHcaN2ghJiE6\nuLTdpGJ34G0zwPBo0hYAm0m3t6B4KRVoetBI74iVWQNglmVeUhOu9AhhwNdE\n6fR+mkkoF1fMOaDz5IzMyV7Gnm1pnAmNbafvRdlhjZY82LGx/RWSrx69rLuX\nGO87\r\n=UN/q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCMKbPu/Z812Z4aAKSY/cgeA3YTYmfoCO6N8fbVkezO1AIhAJQyLQjCgUzzmxwRDiz43ejHevyK8NOR+2hiKkoyOMOd"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.12.0_1574402136800_0.48076681329334536"},"_hasShrinkwrap":false},"0.12.1":{"name":"@react-ssr/express","version":"0.12.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.12.1"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"8553f17c2aa5f2a451cd804c247dc41d6143fc0e","_id":"@react-ssr/express@0.12.1","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-wA1vQd6cAbydjr2cqAGzs0fltGm/tczGn+9j4gR6lRp0kZRzHTHwYf5tJOtUZF4EZEUIgD1s4VxN40hSnIjnIQ==","shasum":"45bead2406f51f6b63be10013e9b08de20c50e28","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.12.1.tgz","fileCount":8,"unpackedSize":14291,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd2u9PCRA9TVsSAnZWagAAn4sQAIFSaoTLBgi69TeTtZOm\nTAh3jLqgKHauDd3lofcZV9gwJYi4+RIbiUebIK2BfGSRsFhMwWYZdU/t19tV\n1GcBRFlhpvBpv4l2y5j9Ju5You3wWtlfe65lxxlKfGw8cTCUO1FW16byzXyM\nAmDXQ/MuqWQZwCODLBEWC9LBGzzUzjGZh9J3WqIjSl51VQ5ZukujerQ1kjd6\nxdAzCUczS+ewc60LLtAGZJHAZKvlqIBH8tK+vUw/t7P0GXJ8h8c3j7PNgO1J\n0LnI9eKzSQJyhk6xEscuyXbYSOR4m0pMK9np8pXQdOCpF3bySLUpTgEa+jrp\n0LKsvnDdTB1CIZMMA0+rU3pPL+i76rQpUGma+nN156HunG4jPNy66f5u4zt0\n/KqDBfo8tJrUOWEgqS+Lwf8OYy4fNpyMyJhUYbMZ/xOTxSX1+s/B82JgR44B\njqA6p7YADFrh63Qcd4rm/gxKGS223OmwEDmXbO3T4/tfPsPfH80a8AdwnQmj\n38SCnVl5zAutSMvPSXZYYDZwoveGSE6SsknPBduJr1nGeQvbDq8DXXJKcqq5\nRRxdM+n9BEHctqwxe8HWicA99ZjL6wjJ94ekrgAFHIqyY24g4uNhTM1BUhZ0\naTlN3Il4DgxVIWsbm1A9FtrUhaLAxdgWiePws7RrMtaoIEoElLiJ20dPB7B5\nvf6R\r\n=W1sr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDwWySCbSyP2EIQDeXbDR6urGBR7yxCm90REIZnwLHetAIgRYUKC9y33y8B/pjT34qJUrqQpT6c63kJQqR53uaa9jI="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.12.1_1574629198566_0.7718894152344586"},"_hasShrinkwrap":false},"0.12.2":{"name":"@react-ssr/express","version":"0.12.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.12.2"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"708a19f7c3f578b58ebcde4491be179c6641050e","_id":"@react-ssr/express@0.12.2","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-uYuls56jTmDkcY9/9HUsVCkPh+SaiOFiifzblaRV2mUPyXyyCuhupcway3BDatQlGjYo6HySRxbvTYkbIhgLlw==","shasum":"5115cbef7adee72627b5f009f50c85325f70df87","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.12.2.tgz","fileCount":8,"unpackedSize":14291,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd25hxCRA9TVsSAnZWagAAZ6IP/jynipv+wu/Bt7cRQ2xJ\nwMNgR8poWJ+XkZqgjFHRaU6VmYKa2T/I37+Wgp+rK3zu9UZO5/qNaXMcuFBL\nxbUSD3pNlOXu7wsQP91/yoqFN++RuoXlGHhF7vDXiU4kwtEOmP7SEB5Y6MGZ\ni+8ZYsE5Nk6LkTVHKmb70rjEjhy3pAWNS7j9J1czVHr8dJ5qz7e1Az4SEhMh\nBFAw2rAkAZkp31sdLj6UByfwaWzDMCUc5D8lZ57ID9Kgdpi0QkcCxtHWIv5f\n4Siu092mxr/CcZIU+nuRnnvGhguBkP2UlCh4aPOiXjoHWY0i8XQ6f53NVNEK\nzO65dsH6y7kIEYfQiPaNi0yhSDNazVp0r7AHVIV0UUdp3v/7u5NqOYpJ9pWB\nnZgdFTUpR6BngkPAqt1nG0pvmIhfkiSIvYotrtj7lbNZYRomtMM7jAl/Y4+s\n2AZ1PKnGIODHeB208YCrhUlxXuZXNEP0gtes/MUn2wbyVutMBgNiI4Gq7PL8\na5en2f2lsv3RJJ/vdR2VtZWx7buCdvF+rpRK7jgvwnR7QlStSs6bMNoaw2b1\nf0ABOcl4E6+aWgXduucouTJRnlJ89wIHlbdk6yFlvwxz/5t1L/xzvMKd2cF8\nl1roDsX1/T45O4DN+TV5YJld36ihijfrgK6wMPoBrscwRRgPjDVsjrVsiPwv\npwYt\r\n=rkXO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFZOPP7llRkzcrNmPPb8w+3P7VcwbeWUgWtOfd3eDaFgAiEA6pje/pvbK3yOlLjCAUKuZV3hhj4ew1YcNTag9I5BwPk="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.12.2_1574672497356_0.10846059209501413"},"_hasShrinkwrap":false},"0.12.3-alpha.0":{"name":"@react-ssr/express","version":"0.12.3-alpha.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.12.3-alpha.0+4fde23f"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"4fde23fb0bf5c12a847e43e9748f1c621af3cf3a","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  dynamicViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#dynamicViews`\n\nIf specified, `react-ssr` won't generate html cache when production.\n\nThis is suitable for search-engine-optimized dynamic routes like blogging:\n\n```js\nmodule.exports = {\n  dynamicViews: [\n    // this means `views/posts.jsx` is a dynamic view\n    'posts',\n  ],\n};\n```\n\nA working example is here: [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.12.3-alpha.0","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-JPhiciCjtCZ/iSxk49IgObaWsNN4h+CnF4L0euxtLSTNtyDdNJYED0FWEFpakYIzF7/zUscKj3GIUl0cln8ocg==","shasum":"1502e6720f1a1655b93b611177b6d54c1ee8e7a9","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.12.3-alpha.0.tgz","fileCount":8,"unpackedSize":14323,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd4LQKCRA9TVsSAnZWagAAOdAP/0h+X0bouwthyFXO1gzN\n2qL/PeFGx5bwnSjyzLHXdNlSdH0GWAfJ8Ri2Pp9f6fydn0Lgho0QZ2hx7AFJ\n66mKsIs478njZUxd4QKThPWznOqXePeeqSO/rz2k3DOGaSBZxTlyxdMyRnfT\n28WawYQxpISFeKbXLkslyav7dWPlbvpInkyV3L7hpjgfZr6QnY6iqa5psgE9\nz9UZi6xvvkVtURrhin00fxiZYwldk7rdAwNStN4kQ0vm8POtRuJV5wWOvogN\nrqvCc8Y2jH3rQW5v2IUqV5hvtk4+CTtHq/PMrejHsEWpwriZOnQuEceokBQD\nB22d7cTsq9bvvK+7CPbM0R35y3Wa+sPs6tpC0WNd3bJhQ0HtA8qj5i93K10C\nsdOPuXdJi4tiiWHaqyR9hGb5CzqLKoIoc8WbC2OU80/cMUFT5P17M5nPai4K\nvd9QtBQgr3l4rXjFv4qs7i+ZtDkP7xAHBAIT2fJs8SAjjcCwNlCtyI+nmhja\n1t6Up/y5LnJyE6sFVFqAc9VMIbSmuDacmSTpelTHExtlBpP7iJ+MXDesQS1+\njczz7J61CRXPHzMu7pbuPi/uv62+68CbHgH8GCQQ6qnhHMXrpdUT/EYozgyT\nmHZfoYda2GY4zRDR5OOkGCuCJInWAEy88q7MGS+xAlkTtMsP5gqanMwdsB8Y\ngaaM\r\n=iJPd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE8m963xcGu9jTHaG9B0ckzZWulKhIdmUQ8W4ppZJz6wAiA7Nu28nGetUYGeVG9GxCkc2zybx1WLjFltRIo6BTVmZg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.12.3-alpha.0_1575007242179_0.0007472279431621764"},"_hasShrinkwrap":false},"0.12.3-alpha.1":{"name":"@react-ssr/express","version":"0.12.3-alpha.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.12.3-alpha.1+33da008"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"33da0089dcb5e4c1eb3b8648f3ae5848bee03157","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  dynamicViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#dynamicViews`\n\nIf specified, `react-ssr` won't generate html cache when production.\n\nThis is suitable for search-engine-optimized dynamic routes like blogging:\n\n```js\nmodule.exports = {\n  dynamicViews: [\n    // this means `views/posts.jsx` is a dynamic view\n    'posts',\n  ],\n};\n```\n\nA working example is here: [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.12.3-alpha.1","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-jFjCCaUjaxh4WvJerXBwGzAGbUjURfnpX1cZF+PI8FhBQYjp7gNGzO4dIBaBSxw87e8pzTTQFluhIpA0rm7f0g==","shasum":"4e90539fe39b5ef211c1a99f07c45105fad55a9e","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.12.3-alpha.1.tgz","fileCount":8,"unpackedSize":14323,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd4LkjCRA9TVsSAnZWagAA0PAQAJhVJ8Y6Ob1kCLRVb846\n2b1K6eNIO6g+G4VLlpN07RbY41VJr6tRb36JWx3c/9fnGJbVglxBUdp3sRYs\nXq0ccTIQM1QBy46z6187gTerRhlAP02xz1GGX+Q1DCHNiSxRlJcgCPUhdOaf\n3jOF8lBzBKF0QgBi2U32nfqPAP1jgYbfmd/FvAz6wFruLmF0iJvwRkeNKHRB\nFphma/3iKEKfzm12gwt3+5AbIc+g58rrH84jpg6qXPUFzwz9RNcvWq5ELUhz\nmQe8mKI/kKGB+Q3mTB3vdDShFEGVJq1FSlIShR/hHVNXUChz93Cu9xTlFj6y\nd57ZGoOQ1WeWBcNylcbfteGupjXzCuU+7XjkQRh9cywNeFYRJLn7jThDQzJv\nlJCm2bMX6C2/4ce1x2IHGllllEPmvaQcwFSxRC7ktWrlSPb2p8phpTJwms+g\nFBoIbjc6BpPs1hGBdkhnDnc/tGgJZYKDwj8wmSvkafW7q4NBIE0pS7rdsI1J\npdj7jqqiUPNfI8fK76KmL9J9f6Trg7XxdfeBu8JAWCnB6QAnsr01Sz+QH3PR\nYcexynpnqmEzrEO1ZOFLEsmX+srMepYoMMlvrslYyp1OWyjSVFnPzUj5pN3w\naTxBqP4mnZs4PRRfp8siWhwrdyGSjxFVn0PcniF0R4CKecw3sCEwYvBBvaS/\nvwtW\r\n=3pkL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEnZSyi3BADJhoobXfK/JaGteKxMzGAUKO8HKBwyIi10AiAFmo9/fwrI7DnhI0t8asNeLnZoXBryVqMQo2Uf696Axg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.12.3-alpha.1_1575008547370_0.8995304158601287"},"_hasShrinkwrap":false},"0.12.3-alpha.3":{"name":"@react-ssr/express","version":"0.12.3-alpha.3","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.12.3-alpha.3+3876734"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"3876734dbeb8b7d481424f1e19eb1dfba2d9a762","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  dynamicViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#dynamicViews`\n\nIf specified, `react-ssr` won't generate html cache when production.\n\nThis is suitable for search-engine-optimized dynamic routes like blogging:\n\n```js\nmodule.exports = {\n  dynamicViews: [\n    // this means `views/posts.jsx` is a dynamic view\n    'posts',\n  ],\n};\n```\n\nA working example is here: [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.12.3-alpha.3","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-wZejpIgLWrdeefd8YLTA96722UFlhoN39J5gFzFlzM1++sOoBJ0750kqzDeUt9obgrzh9EWPZKqUcin06KeMyQ==","shasum":"5fee31ba0995ab3eec116dca8c6125cf53a4640b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.12.3-alpha.3.tgz","fileCount":8,"unpackedSize":14323,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd4Oe2CRA9TVsSAnZWagAA5EoP/0cJsbMY6SvPwLOSkV2W\njw/Wbik4dk/WlloHTuvby37dRw1MyGlCh0TFm5w2Q4Fu+ziWk92PP9w7GfK+\nlhzaofSgayIXBbYqUvph0c3XSX7PPjsgMs8raiFpVGwWuffdUdgwKeozonfF\nSsfhKsOOEOpy96bp6pfdwDxbwr2dZIjzGvX/r1gKsqVN32tf2JReD84w6M9k\nUPZkaixjm4+Ws/WlhatmU0MRgQMOn2zMGPchm6nIkUXFzWmvwLE14RMaVbs9\n4W5IOJq9Z+j5q9kQ0Ckh5HgBznep/0zMdxU+yNDWRBkvuFuMGy9S+xUwpXUu\nCa2Zki67T879ahC6qkew6ysq1M3A+3NpVTttYJ1QcNFnycdFlCLLtW6i5IN4\n52DTYjMT1yU4EODiRE8/13GgQA8mLvntShlxvsY56HGYppwKlb2GxILJYtJv\nSHU3lMT5j3+fnSn1P3W3FJ/OSVhUFcWIm/Jm9lQs9WDSqOmAx5aF+obOse59\nAzhl4LI3NluTJOxQZsPgzhR+y2kBqo9+/nOiNzW/3+5mGQWIL0k9Z0dhs7iO\nn0MmBUxyR5dx7MWbPVst76o3+VLWVG33V653zjQefKWZsR6dKyMPxCaeN9kE\n+Jix+WdECbMOmav9ba0+7VM98S62fVW7XjnoGJ44jSkP5iO2Ymsbnbj6U4Ha\n0O9u\r\n=PkHJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDCscP/EJbui55ox9d2cP0PCzEzGOcRFGplZBx+eP49SAIgVSrdQnxJjPjL7WfrSmLSDISJAVo90lB7dWBD1ELK6I4="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.12.3-alpha.3_1575020469911_0.31182879640166883"},"_hasShrinkwrap":false},"0.12.3":{"name":"@react-ssr/express","version":"0.12.3","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.12.3"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"1edf4d37e54d13401e02c32507906d6edf9a12b3","_id":"@react-ssr/express@0.12.3","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-gpohFEfuV6f377nTC7Khn8eB2H53D8aF2p/Na9z2X1wngqwbmWD3dNMDNak32Oz+kRQmcUU64LW1qJp4yxYX+w==","shasum":"af30c4a56a2cf1ecd39de0ce52a94f2da6d08553","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.12.3.tgz","fileCount":8,"unpackedSize":14291,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd4OgkCRA9TVsSAnZWagAAN7oP/i+4Bs1BgI0Vul01BU9Y\n5ar6XOFMZIo0qPYGocya5uXExA2dkc6SFbVsGNfFW8G6E7bG01KtzGQ5T4Pq\ng70sXBnNpt50xjh49/rwNW+b1sGOZD5mCO+x88hsn+4nL3ZwBCa4prF04tvW\nVKb2yMeOm3Q093Tl3mFzmCFDOticnFef+j40SBmOXwiRLt4G/lRSG2hwwvbt\nlcu5XEzrNgpGOzsFFwKKt6DnhQs6T0TgBowazN+F71bGabPunoXU7ZADIl8J\nY7Wz17ofsfnAfrz21XerP/S7mDmqZZSYz5J54A1bVwTOQWdnmD9KN+0uQP2W\nm4O0kcg8z43/GiFnSYnPZ44gBD/6c5wrZ+iZQ3i5GfjtQKomJBHsq32H2+mn\nZBNnweVga8ejYoU/cGP849+tKLPNoh71v9GerwcpKWDCzGq6A6TO4kiZoK2i\n1Qbu9ldjZBFL4B5MA7/kc0a22JIwqHYwYTFF1WwLbM3rDa1ioEeBCUH8QshT\nLFgyrDQpSwwAN+Ux89lFsX1CXxkY9rlwN1r4cMGS3R9Y3Jzd686jyDXsNmF+\n1b+iSEx0vwlZsHX4OnK6w/xq/WqcbUcK7EcibVkgfXmowxJcqd1UVwWnMcxX\nbGihDn6t9QG3bCwAagd5fxHo7ZdFbhxwfwPvCSa4dimjLx5HgpU8J8KeNg3V\ntEC5\r\n=WpKV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHieQ/znOdyPaUkfYaZSqa3DB7so3zlXdqnvRBr5EmdMAiEAko/Q98vGL0yVL957+pD3DdWHIVPudCzyG6pqj/0PhFI="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.12.3_1575020580002_0.36876590905622453"},"_hasShrinkwrap":false},"0.12.4-alpha.1":{"name":"@react-ssr/express","version":"0.12.4-alpha.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.12.4-alpha.1+7f03377"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"7f03377b5eaa904e00854e83905f5e458c5c33eb","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  dynamicViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#dynamicViews`\n\nIf specified, `react-ssr` won't generate html cache when production.\n\nThis is suitable for search-engine-optimized dynamic routes like blogging:\n\n```js\nmodule.exports = {\n  dynamicViews: [\n    // this means `views/posts.jsx` is a dynamic view\n    'posts',\n  ],\n};\n```\n\nA working example is here: [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.12.4-alpha.1","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-J0EaEx2OAuGU+Rcfk+xI28+V1o3uh5RpcK1V6gfTT0Lmmy7mw3ygaYVn98EMDvThFa7c8bGFbTrp/Lx4GuRCYw==","shasum":"5de542b0d6682b631759ba538e39f41cb5489183","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.12.4-alpha.1.tgz","fileCount":8,"unpackedSize":14323,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd4OogCRA9TVsSAnZWagAAlvwP/2ggMgiKnHCv8Jr3Kupu\nc3IY+gvmIp4UC8Kv8x3bXvrxZaNZdqI/XIWe9Saoj/my7BsNIEi/oKEvAycm\nFp0wkmCmurGVVwApmHPA/hBug2LLvJ65qiA+kso7YFBVUmUJJ/4Vx2BURGCY\nEw16OG/jdQAUmut6L3Cnuufono4WmCVGwQYL+dVfaAmaJH7EiHfwRUp6uqip\ndaq3OZ4ujV80yeW0sdD6A5iPklT9OgXEJlEs9uVKPc3nck3Rb8v3SZvKWr4y\nCupH3StoevnrgrlfkjrdKueujoxIE296P+x++dJ4vJDZIdFvbWfInMCB9i/h\nWYCRdRgGH4lXeTajbwnM6yUJfzzFo7J3Nv1jJRIxYujnppeDJ2fxsAzMGVVz\nSHj2aKsiuLxu9QkRrzXW3HlMv0OGp4NTBkitbbEWmrxBtaD9bky7B5cl3h/R\nQmtO5RsRn7HTn75NK8jo8J5vYMDLWwtiz+GobEuEwdfaWLmiXJWX8zkBVyOC\nkFFe4sUFwImqog9sR3zAMdbBoGOXfSPIkk/G96KemJOH8/pLEYLd4fQNR//+\n0+m5PD72lrTXfPgI8e6g5luSQQo9oKw/5H/HTQyZH0Vg0hrTfVrY1g1TJ5Zt\nBOacbrc9ZYjt3uENrDkXmkpNcWYB6uYQPv4/pN9CBFFnsMKAqTYxSNwyMM1W\n9EDW\r\n=DIhx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCpMYmU30PS33z9Z3jY/XLUd5a14lLXVog3ywJ0tZ9CdQIgZJ9zOnEWa18DiD8k5oZW0ge17E4OJhGKgVv1B8AWDaQ="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.12.4-alpha.1_1575021088311_0.7346589097392815"},"_hasShrinkwrap":false},"0.12.4":{"name":"@react-ssr/express","version":"0.12.4","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.12.4"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"2f15ad8760b94b7eeb7d34db14837ad027b006a4","_id":"@react-ssr/express@0.12.4","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-nfCQtTKF2wfzBn/lJnfcxwVE+42cZzx4T2W5fPG24a1ehN9DFaL7Shfgmb+7L5hW3QgP6dtuUZU0tpVu3B5kcg==","shasum":"8df608de673724f30b8989696c0ee26402f6ae16","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.12.4.tgz","fileCount":8,"unpackedSize":14291,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd4Ox5CRA9TVsSAnZWagAA+ucP/0lXl8k1hMATrZLq3qKY\npGy9kt8WeD5G+rCHahajh/EuLOJO40+VUOoqxfS/MYajZqkz1YXrmHmTdQgd\nAVN266DW6ODDAOYpugMAir4BIfwilLIAM8F2k0gu46jgWfr+Pb/jLB6alCaO\ncKcHm6XUlpXOZtPBitCq/S36/t74hTlBbIo+1g4Vwohbe8yXzTENesQbzSsa\nopVkEBAKbGaI0gRYDrtyTBNh8IyYn5YJn5cwnarxAg6aWELNiB+2IQCuGAri\nFFYIp0KzlDDOVprTgvYmZOgz5N8y/8YEzUMvhFpLncn0rjsqOWKxi6zVTTD7\nPXC5cOPlFJh1z/+mnovm4vgZqeNiqi8ptVgCPSdQkazWrLtO/UwiQrV04+81\nYY4sdrI6rAKXcDkRtpWldznBZ6HekKDbxQv8nXf+Jal2+0CNeHKGlfvumxYj\nP2MH6aqPOlpl1ld3VbKTn+mXvINYulOnWpsGk5WueIJTf2YwRK8b0Ji7xz3q\nndNcy9n601j28B6Qa22FbKtdqhmKGG3PqK6UevFift5IEW/2g+xqqdVDDNed\nG6ZmLzWgD3IlM/wlgezSJ3GK0rzXkLOEoxxC4v81MhsZOh1KMHHNERoKZrw0\n4ADoXLkrpxHDOrbt6fprkFCcWkZ10XWU0Q9vw13AAxnzcoimlnbat6/4no8E\n+KQB\r\n=kBHX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDCUblZBZIn/vAErgv6UBZPu9RKoh25ri/usG0P8VeP+QIhALe1k73/TKZafkKeO+KRlvBz1tI11XZbmBu+4zPf2bs6"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.12.4_1575021689333_0.14419424760157407"},"_hasShrinkwrap":false},"0.12.5-alpha.1":{"name":"@react-ssr/express","version":"0.12.5-alpha.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.12.5-alpha.1+d01afa1"},"devDependencies":{"express":"^4.17.1","react":"^16.11.0","react-dom":"^16.11.0"},"peerDependencies":{"express":"^4"},"gitHead":"d01afa16c27fa75f0e52a707d37059963008663d","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  dynamicViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#dynamicViews`\n\nIf specified, `react-ssr` won't generate html cache when production.\n\nThis is suitable for search-engine-optimized dynamic routes like blogging:\n\n```js\nmodule.exports = {\n  dynamicViews: [\n    // this means `views/posts.jsx` is a dynamic view\n    'posts',\n  ],\n};\n```\n\nA working example is here: [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.12.5-alpha.1","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-lghWMRYBNBWk29kaH3xNcFLkY3BOaVQpQqqvoCkCB/VlYSPD5oFgmu/QAh4rTpk709qkykvRGGyGOerOrrppyg==","shasum":"e47071cad408085aad4ccde98003a09454e719fb","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.12.5-alpha.1.tgz","fileCount":8,"unpackedSize":14323,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6HrvCRA9TVsSAnZWagAAgi4P/3QmKPl5bTQbs+4yLZJr\n8/eEXl1nicE0Y41sduYAa9MmSIATj0mtoXyxJPjRy41Y92S8ascUSo16tKzq\nb0cZxk5sFPPI7Ph6LsVwmqIvE4k3Go1LPHKu3r36UQXq8PEDiZWWzSuQbDRc\nE5EfRxDPnAEJcwrwaLUaRIaL0CoSe8NMCrJiOOpaXSYxII6DfbMcXPoSAhdb\ngqiI+Gdjh9b6ywYUOxduIFbSatW7Fzhno2rzsLYYOYxIRtLb7L1hMCyWDJ+X\nLv05htxY1xeQwcSXk+NmhJIsmLxt/AtiucAGCEOYdhWT9W1b1P47LLAmTThz\n845g4s17L2bYszFnCsx1SyLthU+tt5JBobO1hgvdHq7EGn3+puEKJo8D1COE\n0xFIZ+bSgLejHIGTzFkVTUzaNf3gWJNkqaVe+QiJXpLmMATZRvRM0GWIJODu\n8YswJb6VGBwWu5PSOU9F7rEfVjbmkYi1U7ClwyA5lyyW9Z7SodR70aQkrEN6\ndsQGtEPKxnMUmuEwKP0A++9p2OdXbRyKbRCeP+a/P/aLuWTZGV+BnZ4q1F6+\nsNyLqnTRP5sy61u2xGdKpjGWouO9oJHEDsJdYDjQrFRyK8X6Bh91db59G28j\nbwT/WLde2HLAArKO6I2sGJtqIcrkRZOgYkrUBZds0Hlk2btjgGNMlWMX55Fc\nm4L6\r\n=dMPf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBSU5fH2ftiJksJHTLuY5if8dU58ZWgyduyxU5UxnaJDAiEAmtncG0bx4sNbKIs8iFdUFll4yOUKGh7ot57NnqIUHmk="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.12.5-alpha.1_1575516910551_0.22986873134168984"},"_hasShrinkwrap":false},"0.13.0":{"name":"@react-ssr/express","version":"0.13.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.13.0"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"e3688489314c9ab9659876cc1ba552736e7ec0d1","_id":"@react-ssr/express@0.13.0","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-zFFlwBmd4PbfQHDyU5FWQeN615Csya0xKWpsyPLHLBJiVvdlYwuG30vYjIoYUsknWqf2jw9GHiT86pm+dbm2OA==","shasum":"4590eb0ceeb47d3f870d305b1c641369b67a913f","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.13.0.tgz","fileCount":8,"unpackedSize":14291,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6HzGCRA9TVsSAnZWagAASGsP/ApWw39VDHU7qC2pEccS\nA5uwNFs13Uk/iJZKOwRxA5oIrPy74bMKGa/zmPevRiwkDZrreCb7NKoajwVP\nCipWM/qcbzoR9CCUXywEo+4xcaoQhGPgP70UR4mjtjhJSdUogTp6SUZ9i9EJ\nnFfyQsVioJNVt7WrsY6Jwgldb5Tx6cKIuXwLX6LFBttUKFJj3zI9sl/Erv0j\nfJboGimK4YRl/SODfXNxHNyQzY9FiDWztVPxWs7K1myeeftQvhtvVe9BpeVP\nlPXe+nYvN3o9d5sziaz/kdrmxdHrl1OnDZmh2xnD5OJt1mBbppqY3fuZrVik\n0dkgd+IxdefEOMaDrp+QLq6LvsGUzXYjmlkMSDOzE4m6BYEawbyiUonLogza\nvAqYtWfHTzEneF3KktbZ0fktjN2qXwKtLrQy2/7oQf8NjIlK1kdgR8qw/dMM\nKBzi2QRCxumfP09q+9hC2d5/ItI+BAttKG8TDFW9HGhi6aoQH3HCnlH8hQbc\nJcaE0cPgEMFrjiIHUuPawPmme3a8JLsOgk8eFCCq57zi5oedb2fk8g2r0J2t\nCEFliK0qc7AqK7YycxqsKp+boJrsGpBXWjOL34lt9VFWRVH9ST0sCY6zh9iV\nqAD32liQZ2/7BTRM8K3nnbd/veAPSoNhRuoKWVpL/OOYiWLNpFVoshM/brxZ\naAGA\r\n=yDK2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD/r62I4uuSUOR4an0bQJOsoqA7IIjWgj6WcepnTDghpAIgZ32vhcs9mc5ZFgJKmZqAuEIMCVJxVbWVZGztRqQneE8="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.13.0_1575517382313_0.6599084287393906"},"_hasShrinkwrap":false},"0.13.1-alpha.1":{"name":"@react-ssr/express","version":"0.13.1-alpha.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.13.1-alpha.1+46233ac"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"46233ac5f50f6c0470ee8a93e3dd9e576b43514f","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  dynamicViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#dynamicViews`\n\nIf specified, `react-ssr` won't generate html cache when production.\n\nThis is suitable for search-engine-optimized dynamic routes like blogging:\n\n```js\nmodule.exports = {\n  dynamicViews: [\n    // this means `views/posts.jsx` is a dynamic view\n    'posts',\n  ],\n};\n```\n\nA working example is here: [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.13.1-alpha.1","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-uQ0I0yeiaVIw6E9Ygzdg2+SQevb8HxIDsaJmwOZL8RY420xa0ITNGzeO2dq+0S+Bg8ezaxP5XggZFive0o9Zog==","shasum":"51563c1ce3b0e13f190067880a78fdd6162901cd","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.13.1-alpha.1.tgz","fileCount":8,"unpackedSize":14323,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6stuCRA9TVsSAnZWagAA/dwP/2z1narHanbsTlHbwAEC\nooj7taXeUqG5mDeWy41w13fNccipnCHk4XPm1fk8hDDWodN6DhF7w9X8mvHe\nZPBvH9Ov+aJW81t8+HgTz5FZdcHiMqMAlFi+a/RwPlqOSIW2U0/LpH48mEFw\nvSttp6Fqf9ESYA7KuQvH1rbZW60k9VJ78QLpO2aJqZ2DlVeC4jFkhqGVKyjg\ngMJCpatxaFzO5KjG99yzIJOKOPxzADg8aOzHNlpkF3qTVPeAFM9W50PMDLio\nuZQlRCSd4PwcefrYe13Km7ktrZkz6Rylq3Y9Fa85C+YvX+3yI8tJbQTu9K7w\nDL24Pqs4VpfhMTPXzYKvSZyLmPjTX2cqUVhSxzhjIrDqx0RxoHOtxFuVoI2h\n/NTtdh6NCD8JG4HKTfD8cHhzFhcacW6ymVo4ahJmXdF/dLbvC5MF2szMT26i\nq8YhCR8yfQnovv71B/PCy8KcgXfVi8PNiYBOXB1EAfDjzhKjDPFP60w3b2fD\nLWCJT7ySV/ixlFlB9Ro0SzvaCU1OLo9XO2YhH0lWIPhFa85bIUVBCMok21nQ\niEA90bRqilMbTTykrO/fnpnXAyBEQNnF1HBA9ireJjZ+VV44QVvNzKAVFHqn\nzUAza0ho3bcBI118wnuCISZ8XLlW5s51IgC1RxjcJnNlUQODSyfcTrZ/G0LH\noHuF\r\n=fVrG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCgvGFFwohsl5CktZABQJrppdySkL0Z50XkOAdaZmuDjgIhAJI3yCKcePmR+M0K/ViKVG+3PlbFWSYY+V3BlkUVR+C6"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.13.1-alpha.1_1575668590441_0.5881619902070081"},"_hasShrinkwrap":false},"0.13.1-alpha.2":{"name":"@react-ssr/express","version":"0.13.1-alpha.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.13.1-alpha.2+e987c2f"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"e987c2f1a8599ffe1004f1931581f55e4b395002","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  dynamicViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#dynamicViews`\n\nIf specified, `react-ssr` won't generate html cache when production.\n\nThis is suitable for search-engine-optimized dynamic routes like blogging:\n\n```js\nmodule.exports = {\n  dynamicViews: [\n    // this means `views/posts.jsx` is a dynamic view\n    'posts',\n  ],\n};\n```\n\nA working example is here: [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.13.1-alpha.2","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-FnEmeXxw3CwW3XXqENfxBOH/yCDPmg+dDwT8pC+LL2QdJ8guLYHNFP8oubq9yaai0MSvXTLKtwrzE5BuWTIaNw==","shasum":"8cda8b017087a26dc4b8684a27b29f2b1f5128e6","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.13.1-alpha.2.tgz","fileCount":8,"unpackedSize":14323,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6swoCRA9TVsSAnZWagAA2UIP/1hGEFvA7MSTCc70cz7K\nOZVeOBkClstZtP5YW8Gdk2VLmb7njHddSY9RjuyBtLTTdFsUFrgZF4ZZLaxk\n+9Vc+7fbEZDjDl158tIdZSVFDoGVgG+rgQqh+oaBSlHTzJlhs/7KhhijarE4\njcV3Op0lox8XKNLyU7Z+KYPc78ck/97H4mNk5+JSlg4jqoS1kpOQ95LcJcdE\n3TH+qxN0bvVFvChgUGYJgQYbSOIFAv2oJItpzjhSAgyxR+kBGMirbdJgED1Z\nb1byYlkXdBCO6e4k8ZjSicI7nAss2CAdaRj5MceT7EFi4Ln10EelGrs6oz1+\nEHGUtncjZ/AR+o3s0WORnBTOeP3mTeSb1q8Nfeqy4TPsRpI96FooCTo1lUii\nLDLfZWFlRNEQjHTvOCBAiD8Yd6SZMYMbOtUdvQUiU/2ZSiJ0mXZSpReHIuiZ\nEhyJMSjwT5lwh6y5t38NEPPuJNJnEbCGSa+BeQ2ttPo4btQJIsCs7eNsxWeB\ni6UEVWtGmEHKpT5VP4ODNthw4TITW/lyzezf0R97hpmYX6Bt+jMHzzzSWD/y\nNFP0+IQbaRTwBfnLX1gwYa/pN4C67jW4LgFmEvbnpYr0xAfwItMEKANx1gup\n7sdTMfusUJgCMeqr17XgjwOvq/ekK8Qy2EvWQw+8AK0GAow+b+U3KRlk0no9\n/LH6\r\n=SqMW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD5wqw3m0xfZG6vOYOpIorMEBhPXYMmDedqcb8IliGUuQIgSOaGauU+42yKuQ22Tn9gCLReVorXqtAjTf5wcHtr7DQ="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.13.1-alpha.2_1575668775822_0.07405938963912906"},"_hasShrinkwrap":false},"0.13.1-alpha.3":{"name":"@react-ssr/express","version":"0.13.1-alpha.3","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.13.1-alpha.3+ab9b189"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"ab9b189da5897b6f8c7f5b01c8abe2425b8ee3fb","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  dynamicViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#dynamicViews`\n\nIf specified, `react-ssr` won't generate html cache when production.\n\nThis is suitable for search-engine-optimized dynamic routes like blogging:\n\n```js\nmodule.exports = {\n  dynamicViews: [\n    // this means `views/posts.jsx` is a dynamic view\n    'posts',\n  ],\n};\n```\n\nA working example is here: [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.13.1-alpha.3","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-UYudk9WwyDOiYpBPd7O4esSdOAigIOwSrifP3ezp80Jlr74Dua+8xDDbP9AwBE0cJuyijWYhuS/TODocEO6YoA==","shasum":"4d84f004516e9a34d5566af43ed214a18d66d5eb","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.13.1-alpha.3.tgz","fileCount":8,"unpackedSize":14323,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6s4dCRA9TVsSAnZWagAAZ4IP/R+Qr8wOY4KsWannn8cr\n4VOjn4JX5LbBvVbWF4yIU8/JiCxTUQpGToSo/Uyfy6Vlyvx/OcgjHLhWbM+d\nwwXAw6mbMMH8Q9bHvbtqiZm8CiyKR+I5wHWhgs/hHGUlKuvDiYN4wkXmi3XT\nAdEeih3uOmcppBzTiTXt+mcY9F3M8Igr49NqqrOWQFanWvLs70rOMRTS6AoD\nPHmE6tfKfcZQZSPviJCce2dcyKnfLO2XXHdKIVsUE3iuVt0gHZHu21WACbjY\nOrWTOkjX97FedDmXsKiF7D3vcN9yJ1LMEsJLSevLp5k6Ktok/Ru4C0XuNjIf\nFFag6fvx6bwHyzyPoU+oNfLErCuuDAVFXp9ZP9RgE+EcZFOO0wRS/0nDs7jG\nreGIGymZWNMi6SJyDsp78OlMsDu0rOU4RQNbn9AqdOtWkXcWV2ptuuAN2tTK\nTG1VcPL1PgmMvomGLJWlH03XYSO3YrDiMyeV9LlYno9jSe6v1nO2+NrVKUT/\nYClax6Q/MZ7JrOxEUnUV1hp6zl+w+PtiHFf6e8ttbtvoJIU8MJAGn5qG792F\nwpkr8UfebbwU5i7cAtjWq685rWJMp0iEzFmqPuiZ3kwACJScvj1hELXSzZjp\nr4kDXDAWmb1wETPyKhicaw1qD7vvJniyF7HdXSRsmjvqicmm7BK/qz9DvkoH\nfCve\r\n=hqtc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF12vaPrXDqrZKSCyRnqapK5XHniZQ62TppHxU0SjkDVAiAXHHg38NZkFls3/5GCM6MlbeIvjXZ3rd2ZXrjEMtLhiQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.13.1-alpha.3_1575669276867_0.849183852318333"},"_hasShrinkwrap":false},"0.13.1-alpha.4":{"name":"@react-ssr/express","version":"0.13.1-alpha.4","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.13.1-alpha.4+02cc684"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"02cc68490b83f4adf0bb2af4a7b067cabf763427","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  dynamicViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#dynamicViews`\n\nIf specified, `react-ssr` won't generate html cache when production.\n\nThis is suitable for search-engine-optimized dynamic routes like blogging:\n\n```js\nmodule.exports = {\n  dynamicViews: [\n    // this means `views/posts.jsx` is a dynamic view\n    'posts',\n  ],\n};\n```\n\nA working example is here: [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.13.1-alpha.4","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-ARJacqbYeKbTjui8tku5uq63BqlzfJ5XAIr/1VO/d1gvXXANh3N2QJob1AKWRDhOd1yUjfd5DSf2F6lNMWoG4Q==","shasum":"9f96f9ecd31fae6a74c35326cd5cce6c0b0eb2b0","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.13.1-alpha.4.tgz","fileCount":8,"unpackedSize":14323,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6s7TCRA9TVsSAnZWagAAs5UQAJ+bSnWxe78hSZJeJg7I\nWCbODo9vh+0f0mZEPsFDG7v4YdZ5hCxo8z8/7PHSppM/2wtpGLsYxBCTYOat\nnqMjhZ7U2IM2YtjdTiETmmC87n2yyAvGZeO6Rb40/mswuwOfkRAFd4fS/e6l\n6IzePhNGgeTUUxfc9c8nbBJLhzJ+fdN5XSzBvJL7dxg90ROoPb5XrIMzMrYZ\ndCzmTjDAPg+PXMomdpBgfxBXVfp48xjWB4U9/hS/JH7FOasW4jZIH/PhCfpq\n5CM4ZbvGQjexG4drD5LOjJpD1G32/jTbseOD/atl+9uVnjgvMevQfjHGw44X\nlGZoxdIvRrlx3OsDx0226Q7IrGI/0VIjK331VhEgzL796tYVQwjdd0LDWui/\nOZLbKNKNbzm1jCvwnxSnEp29eQCYQGCmpWdNKbxfU9wJx1wPE7yN8SMa9gdz\nZfQsM7tHrj60jMfGVPXEvOxxNW8M+GbAR46pIuJbLLxUGyi5i6xXGpentfOh\nWI6CuCdY/88GvBXBBLi6b/r8Da06ofNDIrlA/jl04LshR72N7PYkiRol+emW\nU+UxMnkAn0qGAXXfQYshY3dAGbuIvPpKBArPq3OuMVS80kS3DgD4e4H44Pbr\nG9psNtWTbKnNhyK/p0D6iq3HOLKwc+76hje3hLlJjaD/9nFpb74EzQMgD4Rh\nPCah\r\n=TKX8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCFmukmpQyScq3omXs5fxrlJK214KNp8bCTCTQnIgWQngIgNjpKflKJ9kIlvdz7oe8fZzh8sJkVDGJppftwqmnsEII="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.13.1-alpha.4_1575669459500_0.3923294800244992"},"_hasShrinkwrap":false},"0.13.1-alpha.5":{"name":"@react-ssr/express","version":"0.13.1-alpha.5","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.13.1-alpha.5+bba17f0"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"bba17f02d08c9686be113355a9349be00a4789e2","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  dynamicViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#dynamicViews`\n\nIf specified, `react-ssr` won't generate html cache when production.\n\nThis is suitable for search-engine-optimized dynamic routes like blogging:\n\n```js\nmodule.exports = {\n  dynamicViews: [\n    // this means `views/posts.jsx` is a dynamic view\n    'posts',\n  ],\n};\n```\n\nA working example is here: [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.13.1-alpha.5","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-Bf6tiwygoavR41/ZQ1dVsddJJpZ5aUEPF0z0trZWe6p58vbk0XuKdorKYaOX0dzGyF8beQcor73/yR5/kAtKAA==","shasum":"f13002e8289e48a59ef8a68df825d66c7d28719b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.13.1-alpha.5.tgz","fileCount":8,"unpackedSize":14323,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6s9ECRA9TVsSAnZWagAA/FwQAI22QXsu9+No9OxPQKnw\nPtbe7K7DelZ+FIc8QlIAHQ00lQ6l8brlodc88pzb5ldAAbFG96lz1A/6lBtp\nVaBKsmt6AJmJOnDKrwauLhdrhPhNs2nob5AkAlbeFkkqSWvUcyLdnwVBNMjf\nZGJkaRNZQIOht8PcK9ZCsZSyiEBlHrJWNdo9jVK8ti8XCiMBqsyTH1Intvul\nRqJeoSj3Iw0bTnutU25LLrD4WjHV416WwLXHQznKLoWlyBSMbFbw9TQNJHv2\nGMwkVNOACvOoCJo6hzIlZfh1jFeXJWWFt3KnPtBrhX75H2+IyDL5s1hz3u0a\nuAiqi2kF5lD4M4248u4F1BP+ogd06YskP+KJXhcg9ag4Dg5PPtW9xSS1LzMr\ntSqE0+x8KDDpsb9Uvi+IaYtfMhELqZQrV9DC1DIgrQytKY2DA+Af8MlDy2yx\nHcdKNU76SyPU+Eyr+Oin+V4wLzlAxmQ8/jb2Awo+lluzZBccKc/RAga642bd\nTqXSHMvdV0OGssvlJy55OLIX9OgdtJDRf0kHdTszWWytkuEYnhrVtLgyKQOd\nRdPCXR66ccqmQTjflBmxewavJnxtyuHpNSf14Cpw1Oh8T0alL9uc2kGaGS96\nJZW4YXZ4lzmOWGX2rwDA/s7v4fLXFCXRYSBQAoQ0+qLiD8XNTOwbcxSeBQDU\nKSDV\r\n=ORj7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDKxilJelQv4lvAIZ1ePj/zHe61swUgt668qbmm5kcdnwIgB2qv0ubWQaQYXD7Q/BJbaMPp1EBZUAvV1rsaYwqCxNA="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.13.1-alpha.5_1575669572262_0.5736111734696654"},"_hasShrinkwrap":false},"0.13.1-alpha.6":{"name":"@react-ssr/express","version":"0.13.1-alpha.6","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.13.1-alpha.6+729cf7b"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"729cf7ba9985c9c47c9c8dc3c7613880ad0c4517","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  dynamicViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#dynamicViews`\n\nIf specified, `react-ssr` won't generate html cache when production.\n\nThis is suitable for search-engine-optimized dynamic routes like blogging:\n\n```js\nmodule.exports = {\n  dynamicViews: [\n    // this means `views/posts.jsx` is a dynamic view\n    'posts',\n  ],\n};\n```\n\nA working example is here: [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.13.1-alpha.6","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-w+icYsxt0CSyNX0RVa8KXHFcw3W3SpgFUNqyb9t7T3/KfFLcnMa3n2n91l9/VZECqiOdJUyISY8ttWy/Kr++sw==","shasum":"76c9b53973119ac5498eb5c8580cc59140aa8858","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.13.1-alpha.6.tgz","fileCount":8,"unpackedSize":14323,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6s++CRA9TVsSAnZWagAAtDsP/1+2ubFAId/Cl6Y+3tfZ\nL1N8pq5CE9ZUcEPqVnwo9ZP+QVh2tn4DLhjxGnvwRFsOImh9SCG7UeCHjGwW\nheDADe7iVXYc1AveCRI0gYZa0w7HdGBgelwtv0WlI3U/M89c4tzJKy+bKse3\nnrA0zPNJBsnesiUnG0LbqxtfWq9tUjqkCDuOQdBdJ0pIw+J3NyS5/ISaAcl7\nnE/l0ktCqSF4x5j3kqaZCOHpqsZZEgyjYzNRLKq3EJNv1REPnPdzAXsQDmWx\nqoK1CZ7z2vxh9bL+msa0RWblm1GYEdBTKjrnQ6w527sK4PNCWYmq2aiqSLlW\nGIB8KMdK5UK4Dz87vD2jfaOn5L17DXnMtz5bvZSLWo4aI/IlhVYdPrnAuQgl\nut/cJs7d73RV7h6MvI23Hcye4JkXWhiSXpw4MobLBfHmehpnYjn+1WnyFw+g\nVKNCXLhTPDSdbOtc3o4kXCKhvuiZOPQ77TVzDjfBC366dTE87azUwy889EKW\nm8RTsdB/y7gLicAr3H2M2ww3DbTho01CTG715pUzVCD5xkd6bRlGkSLzQB7S\nSWxU5nbSD7bIUs6pBBSKFOLiktWXaNOB+rjKu8oB9NFqSCSYl95Vg2h2MLTl\nqsXETL+DNWehgkmzLBQmTzeNLFg2XmiRyo3jgSgcBPYjL2NoLvv0MeA92P9h\nYd/I\r\n=sfwW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCCR5c0GUuN7+k1We0TAZbyTEh2a+gTVQGV5svikCIgTwIgN1QGCi61nF8xsQRJdW81wanS0/m/+NcXREVZAnsnP8I="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.13.1-alpha.6_1575669693633_0.8069504944702759"},"_hasShrinkwrap":false},"0.13.1-alpha.7":{"name":"@react-ssr/express","version":"0.13.1-alpha.7","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.13.1-alpha.7+3b6724a"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"3b6724a3535ab0de044c3bfe023a4bd2d82a126c","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  dynamicViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#dynamicViews`\n\nIf specified, `react-ssr` won't generate html cache when production.\n\nThis is suitable for search-engine-optimized dynamic routes like blogging:\n\n```js\nmodule.exports = {\n  dynamicViews: [\n    // this means `views/posts.jsx` is a dynamic view\n    'posts',\n  ],\n};\n```\n\nA working example is here: [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.13.1-alpha.7","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-nSzbJ9RZVDAMK1kAejAI80e9kW5O2WHr4kWu5e8TG6vnLn7lNqcXMtKNNU34cSsFkOA8xT1D0VhvGecXl0GfMg==","shasum":"35661bd90d1c3f3495ba22cc9a2eb997a2bc329c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.13.1-alpha.7.tgz","fileCount":8,"unpackedSize":14323,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6tBRCRA9TVsSAnZWagAAcQkP/jfH4uL8Ya9MYL7kOSKS\n3zRCGCLDTxKqa/BeHZnEJTSB/NcDUZ36g3NmRRggAghPqHaZMmyrVu7jVLUk\nCl2Gq6HhtvcvQdwUxPWUeZzoXlvBM88yfu9z5ciVu8wAkKDRlgVhB4a0Lht9\nf+2GQibK42wcYc22MagQq1qz/hXkKMw6tUM3pGm7cdjfwHKFO3hxL9Fzh2fx\nlewLp0KZSKs5D8FoErWobebU8c13b/k0o4u13OgqefNVnH0e41h66+mwkDm9\nHIf8qaQiVK08mkO2TjiptgFrSe+lw87joRN6OSCkHhzvgj+nUbh0R3ffRWts\n/HItlZ7T0AOkK9T5d2vqQuBQ0SdZCBiRdH6Sm0lvP9i5WpeB/xtPAqy0fULX\nGNqrJO083zGd1dJm91LfQEJ7xQGm6i1UEhKUOyQ2JSar6Qj3O7FaDyTK2DGx\nk02R+bOBl8VMAqLQ1gNjkM8r07r+NPOHdCCMEHYfLMIGlFabnQT+KpV5vpLW\nppWl3V2mvSzgH3jx9ZjE4M3mmsJsWosYo1rrkv52eA15XurM3cra3hFewmby\n3pGgzi2jbFYoHMDHrLz213KF5Su8r36WFCOMd9K+tcI4KlaOfvVhaTrFqBFx\nb6qk9rXN7P2Z6qLHQ1HrIzhC4FJ1Q4wqGleAeFypQjC/u319+wlrfgAqvwvp\nh7Te\r\n=uYZs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDraNZ/2P//M8ophbsIRajwukNGGlYAqSAMgMehA4VDQAIhAII8u193UqJov8BOG23LbFOeNz4XOSgWAlO+NQDGQoQe"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.13.1-alpha.7_1575669840611_0.592919190934704"},"_hasShrinkwrap":false},"0.13.1-alpha.8":{"name":"@react-ssr/express","version":"0.13.1-alpha.8","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.13.1-alpha.8+78d3567"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"78d35671067c07d44e231a13e5263a423c685519","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  dynamicViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#dynamicViews`\n\nIf specified, `react-ssr` won't generate html cache when production.\n\nThis is suitable for search-engine-optimized dynamic routes like blogging:\n\n```js\nmodule.exports = {\n  dynamicViews: [\n    // this means `views/posts.jsx` is a dynamic view\n    'posts',\n  ],\n};\n```\n\nA working example is here: [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.13.1-alpha.8","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-nsp8u+fyIrWUzW/HNNGwCnFsI7E0PcvR5DR2xAcgxOv2hc9tcA1LWp6JYgcxPebA7KEZFgigwsxbY914DqJNOw==","shasum":"c6fb6d4c2a2369769d046ca265ab3912275650a4","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.13.1-alpha.8.tgz","fileCount":8,"unpackedSize":14323,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6toECRA9TVsSAnZWagAAbTEQAJR0Q3naGLuUQ9bwGt/r\n2Isboc7XrYl/3wnZcok6hK3RLw2X2SMFvJ6fNG2cfuf5o+ZPBtRzlKfNxPTs\n++kzv8JVOj5d0nbUYsIeH1vY3pwqBIW1P/SRsCQ0JUH8p4j982gl1DcUskot\nj4YIesiYFyp39d6y/k5hygvuG1kbhJwQqaOnZxPSyrvXQm6kxLE/EKLlDVLV\n9y+f0QsanK1PsdYuBDvOc1FdaoAiot4ct7x/xCf/GCpu0qviZN7FwKz5cbpX\ndqmHPSRvNha7qrujOC5Bp7kMfQ9IgWqOOjHhjX6QsFiKyF1fUuhbVcZYiF4V\nCdLYBkofE4l/k0O/2vqZXh4n5ro82J8fPV6dn8wjJeknM55fHXyQ07ekfgdR\n25bmzCKckyhDh4QNN6NFwL0DniOwILcpiQ10FTvYAwOubwtLX8lWr2RU8MCy\nJuh67FAVayNUoIucpqQ5Mb5UvOxTSAA5vRF90ghjM83DxVYd/iDBpbnuc7PX\nWBsI9KMu1aUodCr97WdO9g5yJRKdZjzj9r3lu7bkcGv/f8nXAuRSfcPPDbuu\nrkyj/GYduNbIbo/LECyCopZnq/Y7aUqUTBjr5ydPzcyRVr26PAqoRASOn55w\nHJGncClc08Da9tvQ2jEMsh77fytxk2cvjcvmUFStrWK2tZvQQggwyvOlEGgk\n1HG5\r\n=DHAk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDUxpLKM9weOI/0HfFGDUJEL62d8zokSkyS6gjuFH8EKQIgUYnCHvbFR5QaeTWhNJb1UkxGAITf6OzIFSSns2/qDaU="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.13.1-alpha.8_1575672324403_0.5007302966585347"},"_hasShrinkwrap":false},"0.13.1-alpha.9":{"name":"@react-ssr/express","version":"0.13.1-alpha.9","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.13.1-alpha.9+860c5ec"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"860c5ec3b47bd4a3a276f0b752d6f1e6b01abfa9","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  dynamicViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#dynamicViews`\n\nIf specified, `react-ssr` won't generate html cache when production.\n\nThis is suitable for search-engine-optimized dynamic routes like blogging:\n\n```js\nmodule.exports = {\n  dynamicViews: [\n    // this means `views/posts.jsx` is a dynamic view\n    'posts',\n  ],\n};\n```\n\nA working example is here: [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.13.1-alpha.9","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-WOrDdgP+ldJ/DIsosxlbHANFupm7P4rT4eQcPUNkZ0z0n+W1TT/WQA0xut4XS3QtijgV2Bv2Sw/osdW+XG2pAQ==","shasum":"e6914aa8d62a1505636bec8a2208ca88c3e8520a","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.13.1-alpha.9.tgz","fileCount":8,"unpackedSize":14323,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6tsKCRA9TVsSAnZWagAA0h8P/0qONK4jBnOQ1qQABjPz\nGvAG6IjJyFjelPlRRjfM1uf8zi3nhhLQqx/TQzh+g7CPNJaH99SVkhMdReyi\n2iaU/n47jId3+V7HYM9LtFY74S0d/ebfW4FRSEBB5UuQbN4mNy1Odvo/8Tzt\nQ7K/KIEPEkmhucw+Fd7YDwVggKMPh8l8NJWYU2HGOAoEoavjihSXPen+N8q9\nDFm34ESQMftn9x4ECPcl1E8SMirTBMtnjo5wEZlbGP4r+c4w30CKg41yz7Yx\nuLv1/GJsoq65AL0ogKE1qlOmW8Lfd3UX+CFhT4XO1nSGJUx7ytbGlByxUkc/\njYbU3hIwuFjsnFCWWphRsEUyizAvOFMn0UlpCMCzm437xvpR+obXKyABKS4v\np68KshvmiVxQRvayFGjCshNsm+7XW4SKtVab7e7u9f0lCJxH1FzhXOtSEep4\nepUld37oBFAP0RiyEAh5Ns7Trt8DlGvxqsj0lYiCLkvOZoIHg6VX4NUyc9pp\nrTH933K19+4LMggmqYMFir9XfD+PyPg3u9IDrg1AGE0+T1xkmVcsJbn34Aoi\nz1KWe+qPUOjDF9GsOJZA20DURnDQ4iWOOHEvpMOV+agRG/K2RZySezXGGRLl\n+80ZQpfrzMc0toYA1FqTRn1VXb7igzmmMdBKcO9HdQYbxPWA7b+3HoInIyyy\nHcpV\r\n=cT9s\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDDn4IAfpZfHAEKppQXu5foqBNCyBNg03nhHsrlv4jm5AiB4IDSvJY1g1ISsjGyPq4zxoZqxOf8AoTpC/huzgczW4Q=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.13.1-alpha.9_1575672585798_0.24621128340454024"},"_hasShrinkwrap":false},"0.13.1-alpha.10":{"name":"@react-ssr/express","version":"0.13.1-alpha.10","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.13.1-alpha.10+3f85ff0"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"3f85ff0bd4cc7fce1e0b58fdc4f74a98088788a3","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  dynamicViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#dynamicViews`\n\nIf specified, `react-ssr` won't generate html cache when production.\n\nThis is suitable for search-engine-optimized dynamic routes like blogging:\n\n```js\nmodule.exports = {\n  dynamicViews: [\n    // this means `views/posts.jsx` is a dynamic view\n    'posts',\n  ],\n};\n```\n\nA working example is here: [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.13.1-alpha.10","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-5/mYBj8SjsAM9VHhdxisSyBig42u2mvt5kGlEKoBKf/6ToRB0GsjTxxZCu5YAS+lhCcO6J3z4lyZrrrbEqg8/Q==","shasum":"6e59b3ac778782286d081bdf512c04615be00e41","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.13.1-alpha.10.tgz","fileCount":8,"unpackedSize":14325,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6tyYCRA9TVsSAnZWagAAPXYP/0augfhzTkIu5WPhx1eV\nq9koq58eSQM2GoVnAmgnqjHBqCW776nwWq6SV2P2vS0ZlQqTVEOPk9Gs0uSi\nyLR8qwF/5hWIq+DS3N9235dUdr5nOLSzzeymlWiPQL603si3J8Y/aV/J2Id9\ngYKAXzz5RvLP7ZCNfxiWA9FbF6NWdG+yAo9oxKeJ8kshCU5kJUUJ78eHgoyG\nYzNzRNFQER5ywIq5UsYWZDwrB85SJw0j64VAQrGgoSn8aSJUpI80ndqMnvqn\nIydDCgvt/pzUcCUe2wDPW2o0E45v8srTHvU9nIghQTnel7ulSNrqOzvPAgsb\nwGCv6XA/Y4MGq4jsfhmzr/f9VCBka3Vbb3lvs31pzHjp1vsWaQ38ZYK60eCu\ncSTyFLsnonRMYDx7nbTK6Fko8cXTsL2GP9xiWBKT9RUY217Htup65YE9lFCT\nG1SkRDknTIAEeH4tAmZMAi/zWr/VYzwCZhqtNFtN2nk+SIAnEe/8g3O1cHwo\n++uhjx81fq+csHMtxe4mpHBF8w7QADV14tRGIUz+sM6n4Xar/Xl8nqFP2j4X\nxRqF7XX7Ane7wH92CBgmAQFj1dV31kzJkSdTIKQC8xJ+io0gc46UNRqzqbX7\nzs/kYUAL+DFTaXjcvkauOUKFyyVlRtvYi3MbUz7Iz0i6fq3HdgS1GfbMvd6J\neD/W\r\n=8oqX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCdvzwQyZBzEEg35qhi04WXlM7PQx4H4ve87vqsyTVuvgIhAMRtMhjmel3K9DWuq6ZDxrndeyo9NNgl5iY7yX1VZ9Sm"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.13.1-alpha.10_1575672984018_0.8937814066194283"},"_hasShrinkwrap":false},"0.13.1-alpha.11":{"name":"@react-ssr/express","version":"0.13.1-alpha.11","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.13.1-alpha.11+47a2c65"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"47a2c65a2dc0f5bacdee025101f0c11e4bd61a22","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  dynamicViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#dynamicViews`\n\nIf specified, `react-ssr` won't generate html cache when production.\n\nThis is suitable for search-engine-optimized dynamic routes like blogging:\n\n```js\nmodule.exports = {\n  dynamicViews: [\n    // this means `views/posts.jsx` is a dynamic view\n    'posts',\n  ],\n};\n```\n\nA working example is here: [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.13.1-alpha.11","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-QoIIZ7YhuDPA5h6D6pH+8JzvTDpbozCg0MW8TLNJGtYPaxwzUHyVYB+5MA+AoT9G5m+c6QcxFW6FYRuhA/63xg==","shasum":"1f7b970adad6da9891e2b2ca89d9a44bf86590fc","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.13.1-alpha.11.tgz","fileCount":8,"unpackedSize":14325,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6t1TCRA9TVsSAnZWagAAXR8P/2cG3ipHzQGAHWFdq/UP\n4oUCgYxFGXP3oirpks9K508tlI7CLBHd7vsn3+j1a5+807W+K2uXrsCUcXzN\nu0nHnI3hAU39JP5AhbypcB74jR+1sF2Bhoq/9URoSr6yd/oxA/zANBvkPRXe\nAQZQNZqEmuG/xEkGKN/BoXChhumD7jqfhc8W/1cPAUR40gSwiHQBKudeqppq\nhz2/KFNoC94EfZMA1xjSMCFk8DJtUYy8hpGIUDm+RoBEyuBXRBA1MQUCLfmY\nxagu+rGWW4EhcyD0TQkpq3hxnhV+DJ8VS/OjAY8uNpvJWxQaQDg4jdXeF/oV\nGoWnq5XMPQwcBWlIQVdz+EdZ/2qzB7IwIvpn5hNHHUwt2cHJ3Cc9r34Rb58y\nSlRVhAcQvJKiYjechnV44X6OGf41h9rmrvRpwN3q3XCpfrrA70/2KmX2nmzx\nkpX/GbikEDFnNl41X8MA2A2wVcof8HIA04nt2OeSM4OL48Ouqzgw/u8mV27H\nO8WOjNPMnwe+4AIyrhV5zhmgGvQwA+lLUkNe6YffcUatPrSFp9IzSBEn5lrJ\nwjmmC1O0q0n+qt/K/MrR0vqhzjjrLhZMGOQG42TKL2PyMmkMpGTO1EyU9JO4\npPF6/94yrgGgCQZ7KFpw6rUKin2eLjY9NB9f26iYfNBco9aA9ymKp8rICAcc\nRkw1\r\n=+kGe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHJdFiocOQYZR3rscCABPpzL2RdV63ke3a60T89AQ+AAAiEAz3bciE+RSLo/cbocEfpUbxuCfsXxw6YhGiTQ6+YTzgg="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.13.1-alpha.11_1575673171160_0.08979440646968895"},"_hasShrinkwrap":false},"0.13.1-alpha.12":{"name":"@react-ssr/express","version":"0.13.1-alpha.12","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.13.1-alpha.12+550e3fa"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"550e3fa0c177fb8dd60bf3aa2a179e406e2e7a6f","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  dynamicViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#dynamicViews`\n\nIf specified, `react-ssr` won't generate html cache when production.\n\nThis is suitable for search-engine-optimized dynamic routes like blogging:\n\n```js\nmodule.exports = {\n  dynamicViews: [\n    // this means `views/posts.jsx` is a dynamic view\n    'posts',\n  ],\n};\n```\n\nA working example is here: [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.13.1-alpha.12","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-5R6/8E2qF2CpZsBW4ofEt5pBZKrlqVS6iCRzMLqe8hWcDZkGW4IvSQs3ZSqaUmwAdzMs8oDOot/S6SC6EuxgPA==","shasum":"5f2bc11f9a77f947df436c42029bf3c3b64c0e44","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.13.1-alpha.12.tgz","fileCount":8,"unpackedSize":14325,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6t7SCRA9TVsSAnZWagAAcNYP/1ux52UXfS8fhQsXrJW3\ngdT6KiSsfaaNIyTVUW8b8Pu5k0YMu9SSKdcGNuQW2CGXFzwI4Ia6R0AGQwTv\nYjTIwAuGvLQw6ROyQe66ksj3flOsGIo3CfXzAesgTH+Hvg0GoMtax49kJ8bG\n0HocHp9aD1JcRO+J+ydb3S6YKIIeW4CoqUjSuxjKpzJa7XULDTsB5rEaVaGf\nVLIcebUTqBtkPCQ86Yxaw6aGDLVCC4+/F2EP8sqPBzfDdarlvA02Lh1oM2bT\nereJjd2PNknH8fxX9sU+KrWdmnn4l5jTGOTTjwQMXQ0cZOE1Ig2kg9BGX3kH\nW01fEUfz1fFmES0N1rVLKgxTAhli5r4vcqYb+4SiIM2oHRnsKT9zqMEG21Z5\nx0MskU5eGAqlyk2Pk/Jk9ZWjGl6xyH62eJjvO6NyhnQN66Ish591K3lWgT3Q\nvgQQOADL/JKD2u7Zhnq4N4wSPDO4+HKLdNX9rWaITcX1yO9MTjsTDNryTVXw\nXXfdxB827tc0XJ8n8OY5eTXVk8CBlZvU9NUUJC3PQfKSTNODtm2rrku1kLS/\nuXTv9BesKnoXNAxM3sPOvNLBUVWOZxPfXikX06pV36YqXO4c31PugAgRRZXf\nKAva9fekRBUTMGGmpPOnCq6Tw5gNXiZ6DZP4O9YsHXVvowODtdtgA3GpEjR3\n68MQ\r\n=clAK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAIjKSv1IF4hmJRpYaT79Fvy2lkNhFk5h7UOnTapxVgoAiBgKiuNMKrGwsX3oHcBXE1QdtPgFFGCBOgFICxGiAuiqQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.13.1-alpha.12_1575673554098_0.13342515544658262"},"_hasShrinkwrap":false},"0.13.1-alpha.13":{"name":"@react-ssr/express","version":"0.13.1-alpha.13","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.13.1-alpha.13+a633f10"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"a633f10258963f4d96a580bcc510efad607b9a30","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  dynamicViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#dynamicViews`\n\nIf specified, `react-ssr` won't generate html cache when production.\n\nThis is suitable for search-engine-optimized dynamic routes like blogging:\n\n```js\nmodule.exports = {\n  dynamicViews: [\n    // this means `views/posts.jsx` is a dynamic view\n    'posts',\n  ],\n};\n```\n\nA working example is here: [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.13.1-alpha.13","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-BpT/NWzG4BCJj7TGJr+aZdnroj+VaId7Tuh1ngL+DUFONdueBL5CBoStC3sr2bhIxWXwlJArnP+Oz4EUvKNU5w==","shasum":"1a63e2e2fb56c9bde12ea8b95477783930957f9f","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.13.1-alpha.13.tgz","fileCount":8,"unpackedSize":14325,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6t/nCRA9TVsSAnZWagAAVg0P/3JzqDq3dkHEPASpUzvb\nJyXnQiwIirc+jKomVdhGnYkNPhjSiNK0I7GCdUHyI+4Z4F/gXX++O1h+cLP6\na+DnoYVdEETAwP1nfbWYGKZJcDJSDNF5//C31CLCEF7ep+XN6A2o37OPzNCZ\nax/UBBsRQg7UPLx+FyfoR2Oxt6hg3+v2LsoNxpGLRqdFMDTMRN59MNV2j9k/\nxUi20m/aj59CBeX1dctinppJYUv7hzkHTyx9gFDNAywGTSj5J9IAwbnEQ46g\nV4x8fWXZfNyChc6WJpE5IcVYO3Gbu0lAgDwxHikaRx09+T7pFLeRNHeY+3dU\nR2x70/mWPelrm6/bLqRYQL93qPFnTPhKm/3nYvKt24k7H1OL2FpAfM5V20Qi\nZ0KvH/PnKyb94+5Wuga/NSKcSTej0rx2muxTR4BHZGdxRPODdLKT8b/yYaiy\n+LgEPdCMzOUmBc1v3qsLdFA86XAKLkwsQYCmdMdDhtaecRLxpA+1d+bICE+g\nHFawm/zsBgNj7cV9GqCwolrpHQWNBHYG20TSr9jQdmEsNVMuRzLXX5s6iox9\nYCR6PF97crkNRUtYvsjsebYnNcmuT9GlLLfyl9p9vkirRdnrXi4kmTGg/K23\nR/gBpE+Xx5WinXjAeHLPt2Is9ilHwbhq/RrUkH4OHbFTwoRRSIUM2FJWnjBL\ni9v3\r\n=OXdm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEt4fWDjkKDWWmQ0Lm1ab9Ppawk7lmd8GaSm1w4zl4DvAiEAocU9pze/l54qxbjZvfMBlkLaG92B0CvgObSd4JskGUE="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.13.1-alpha.13_1575673830731_0.7068192862290739"},"_hasShrinkwrap":false},"0.13.1-alpha.14":{"name":"@react-ssr/express","version":"0.13.1-alpha.14","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.13.1-alpha.14+c2dd033"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"c2dd033b04ba1417474c24a881f2e2213b67d64b","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  dynamicViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#dynamicViews`\n\nIf specified, `react-ssr` won't generate html cache when production.\n\nThis is suitable for search-engine-optimized dynamic routes like blogging:\n\n```js\nmodule.exports = {\n  dynamicViews: [\n    // this means `views/posts.jsx` is a dynamic view\n    'posts',\n  ],\n};\n```\n\nA working example is here: [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.13.1-alpha.14","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-o1GZb5zU4uXby0xLdy6B54teSQoVbzvvhh8ovhpPsQmpVosaaxhgn4bgPE2Qj7bJp9QDcrAx9MsR9nqZCswIRg==","shasum":"9e76895d8bb41d5abf6e2f96f772bf917bbcac22","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.13.1-alpha.14.tgz","fileCount":8,"unpackedSize":14325,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6uEICRA9TVsSAnZWagAAwE0P/RZ6dz7D26DNks9S3IUd\nwyb1FcTOsNC60n+BeZ90OTmjNyFcJcp+J9tUe86Aw59JyjIev2wWtRLNhRQJ\nC+DSGiY5Wp7/HvHqX/PMXV3g0Igf8lcqQnYERbTJILrPC4rwfuGB+CSZa/UK\nOFLrBOdH2U4a8hIcNr6vVE7gk+GkiaSi8sdgpah61uwzAWEwITQeke2jPNyn\n5qbMu8H2U/eFwqeEnkopVC1f5Fb0FpZBKptSBwyE1qHk25vTZRri/+5wtp2V\n+cTsmmMZE42aHNPd0dadIWWk+3LxAFZEqneDdnlKW1LE/sAUzmQC8IOHfnT4\njpnhQvT0BpRAyfY/Vlq9RCEiPq7ee2w9W+IF3zaRzgju5QKr7Mc1zMC7yIGp\nSR9/USt8TmhK0AYyIBKOfKYlXQreaWNTvur1/GrnjH/GfQSR7yncNiqiJFXy\nPLtxx73zvVR47z/C+NfHf9b+dL7NV8V7uF9gt7xxfSc8Ccmdj+a1U52eqELe\ng7Hhre+lsH9JbVg7if/u8h2zBnVvaV7tww8F2Zp3V7kawVpxKhQpVqFjIDHb\n0iLUJnpxoB/2NbYRGxTGdpdYHNnE6d79tudyKXTX8FEG1/+crUNtEHxvBONV\nTVcRn06IbOqqx4nQwTiZqi7gnD5StuSgI2vKvRi9HmUi72gsn0ncEwbDOmI5\nM1Rz\r\n=ah32\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCg2vBL2g9odaBQA/AdluimNvj5iLfMaariIpgL/VWo2wIgQN5OQ/KM0lCeZuC8v5ChOEhkKjrIJ5Ko5bqJFtLVniM="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.13.1-alpha.14_1575674119608_0.6790541184963108"},"_hasShrinkwrap":false},"0.13.1-alpha.15":{"name":"@react-ssr/express","version":"0.13.1-alpha.15","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.13.1-alpha.15+b9a0a65"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"b9a0a65894e47172b50ff476709ad068354e402d","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  dynamicViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#dynamicViews`\n\nIf specified, `react-ssr` won't generate html cache when production.\n\nThis is suitable for search-engine-optimized dynamic routes like blogging:\n\n```js\nmodule.exports = {\n  dynamicViews: [\n    // this means `views/posts.jsx` is a dynamic view\n    'posts',\n  ],\n};\n```\n\nA working example is here: [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.13.1-alpha.15","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-MW98tnV7qPzLGCdkWCZEEuTLjY8sotrCnJhTVE2jdnBX5cVSgpuYt6IZCYQaDvAmeJuwKu/qbCYRFobwCLe4Ww==","shasum":"34300a0ba1341af8e0aa17c8c8513ebac4ecf449","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.13.1-alpha.15.tgz","fileCount":8,"unpackedSize":14325,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6uILCRA9TVsSAnZWagAASLgQAJmt7NGBG9nch0ZrEdPU\npRWeP8cS907gkLlMRwtkKd8B7uyW57mE6k1QpOLjA+ANmjkHZbwThKvT3/2U\nKQCIlGnpjsm6Zk7ThI9pv2BCw2Q3BA9sRp7ALa6xVOvTpCs2Rzgw+mg1jSwT\nzfKMP5AyKaBG91i7x0cicuJS/kDO2x8MKH5DNGk5g5s5EZCG6k0QpnrkqTMs\nNjeUiq9eNdx60PpnRH4MzzZO1vnnwkLKi9RqAIp75WdHsmm3pG2v8sP5hfUa\nQTbXsH8S1CWwfvWgg0F6lZIe2JDb5LqXih7DNM2FuoEGcMXQIvb+ZZ6CjJOF\nAc89t4Bw5gpZkGqpWaq+nucc4f150rMlidUve2NZu4TSxreP/YeSArgArOdF\ngt4SrYQ3pOis+FoLPJeRGYu2eu3ROvGK+tmePHTzfPlg3NQq3yFbE6zYmv8X\ny43y7Ow2MSeuEXfGUtHm+SzEV4XFlOSfsBzwxdXKxANUWV2in1oszCvo4okw\nLeH67U4j4x05BZ9ruJgWqkk0iqqeGpoxxYebxuO7LI+tDkKTZxWcofYkF7zK\nRRSrLddlH/wjtTpXDkDeqDGTo/rycKq/bMW7k3n/r+vPfiixyjq4JeFvriXf\n5bf1FT3DRzAeCWc8YKfvOAvg1fx0jO5G+yfVYw4bn7F6wj6rib7+nGHJhYyy\nn2ES\r\n=cTxK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAEqF6RWQhC/Q5Vvu2UB3CREVXQzsWLAZapKVfRCp6qAAiEArgI6FBEjNneQR+xgDj/Uh/NwTO8+yOrN9XgblhLV6AQ="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.13.1-alpha.15_1575674378874_0.08403356207221968"},"_hasShrinkwrap":false},"0.13.1-alpha.16":{"name":"@react-ssr/express","version":"0.13.1-alpha.16","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.13.1-alpha.16+f8f3dd8"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"f8f3dd815dd7edda44cfc9f639ca7bf948861551","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  dynamicViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#dynamicViews`\n\nIf specified, `react-ssr` won't generate html cache when production.\n\nThis is suitable for search-engine-optimized dynamic routes like blogging:\n\n```js\nmodule.exports = {\n  dynamicViews: [\n    // this means `views/posts.jsx` is a dynamic view\n    'posts',\n  ],\n};\n```\n\nA working example is here: [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.13.1-alpha.16","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-VO9SfLfTrDUIHEaQcIWZ1U2g4Gc467G0BSLmU3yTo1MdLk3O6shvzONqe9AwYn1LukcmPTJ/YCiSvgYT/uaOCQ==","shasum":"714205a55998fc76d6a8ee97618fe1c055b3f75d","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.13.1-alpha.16.tgz","fileCount":8,"unpackedSize":14325,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6uL2CRA9TVsSAnZWagAAIYwQAJBpZbvgpm3lwifcteB1\nB8DSsSQD12JlH27X6OHqwkCFwmiCfqJ595Uyf3cVB5w5vQMWZh6nbnrSCG8x\nkVgsXZvINgTsS0uRI1agi3jjF4bYqEH+4z2vE9/DtOOEOGiIri0B80lAPQHA\nTmvEKusdg4pO/tdb32EwBGE4dNT6rPA+68uSRbOFEtrT8CcV5xt2boXZ2UJO\nmDvEUVH65QdQGEJPI1rqb0W49krobm+mc1T3DezJR4kzJ4l4GTUIjhcgRbbm\nD+G1G4nN5oaxS7fUVetwDodqki0PO4+DPO2eYczCuzAT7ZGcdbbE159TkUWd\npyn8ktvZaD1guEOHORIlUOofimMnPekLR420t4DlejQh77152uyzKxPKCHkO\nvlP2MA/fogug9GxTyW9Q27TfH6DSSCiKOCKjH9AnnQm4Dyczl6TbXGWXYFgi\n/XUGss5jREwdakMQxDBbgAJgAkVpH4GnxKT0/Yor+I+ANhuO13LnEDUPJ56Z\nRGexOnvl9+zbImEkhmZg9DYbSjpPxKUaohaiqgSIlK5D1FfHzxz+fJxl4P0F\ncSmHTlCqlarCxTJuCHg9B6BZXitVKpQJ4Jt9inInFjrqPMc1Uyxu1ywI6Sk6\nErahERNHgL6qc73VGGraLCDqpZ0PlseeRWv6VIAQT7vhOMf57bIicvpWfkHB\nLn0/\r\n=ipvK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDKj96toF5/JRox9kXJA23+BJPjcs+RmTwJJhU0+x/XOAIhAN8/0ZqkfmjJ90JKjv1RDe2ym/tQLKMLINaga60UiJz4"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.13.1-alpha.16_1575674613808_0.36114336465221153"},"_hasShrinkwrap":false},"0.13.1-alpha.17":{"name":"@react-ssr/express","version":"0.13.1-alpha.17","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.13.1-alpha.17+0e01e00"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"0e01e0079774186c5c0691268fdc274019d710e0","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  dynamicViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#dynamicViews`\n\nIf specified, `react-ssr` won't generate html cache when production.\n\nThis is suitable for search-engine-optimized dynamic routes like blogging:\n\n```js\nmodule.exports = {\n  dynamicViews: [\n    // this means `views/posts.jsx` is a dynamic view\n    'posts',\n  ],\n};\n```\n\nA working example is here: [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.13.1-alpha.17","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-5FVei8Y1sN4a9uq2CTxgtpJGqS4nNcEq9VfvB3vkktpQYhKHpVMGKMNoNMVji0ktgiAj6AP/6WIBr9mTx6pe0Q==","shasum":"7ee7f09df0d62b6d2df49dc75b02cff80d168f1a","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.13.1-alpha.17.tgz","fileCount":8,"unpackedSize":14325,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6uOxCRA9TVsSAnZWagAAuj0P/3PagTdvv1Z6MmNpVVwi\nylBhq79HK9IFYvEgRupsqED1oSCMgDMKWmLPx6cO76BVicDtFqRX4/jFZqwR\nAAIfxkB8k3L+LgGnHt29cOxuODPOPFbcBbgSWzX2CuHG9FazmpKVmZBYIx8u\nac7xkGhPGt20ESl4YB69dRuEV8kvHDzJbGPN7tLih+ALDxcYUgPhY1Eu0/kz\nDYMWfLcosvOL+7q3+5sZkfH+5/itLIk8WUnSDcKHKIqaZTSQkDB0IFYq8JgS\nRMVBrnVgbGMuID39bGvHzxdhAlqYJPAHZQTel38BgTKFlB3VGGJutdTWHiov\nll+gy85At2tc+Lxp8eur8gL4Ih+C7RfF7yRwu2bcuvCpJFFyK2/Nuy/+1N6g\n0AS5P3pLR5uyB0Dy2C0AYDH2Ik7HZ+D0KL5Z37J5Owjpkmgf41cz4OLY82yJ\nIYgwu/HYC2mlEAoqgr9iMzRlh0j9wyAvZ+1E2+nzINgNz9Cj0LfrrjtRgvSY\nc8XsrHR4XkuKrFMcb9DtYg5LG7Ji+uS2I1byRyQNSOM3Z/R81QOdvpk9RSsy\n3tiEzN1Mb5OnuAHGzudqf38wnX478rnSQnzWmPneWXFk7B9Vp1VGGTKfkgF9\nQBh9rOQ6LRFcLcxxdFI+b5e4aESRCm06KRzCgvo/UrQYo8Di331i6iDkYKpO\nKYGg\r\n=JOLT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICwsq7BLvdRvJqjZ0y3KDGH3XXvvWJmX9W++bOBtSeSaAiEAhF7hYs4VpXGVap+7PhyWhQ9TS7/daJrtKJJiTmMx6jQ="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.13.1-alpha.17_1575674801526_0.5239368003323222"},"_hasShrinkwrap":false},"0.13.1-alpha.18":{"name":"@react-ssr/express","version":"0.13.1-alpha.18","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.13.1-alpha.18+3f0aac0"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"3f0aac097443a86cf1ebf6b3663d6202a658e291","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  dynamicViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#dynamicViews`\n\nIf specified, `react-ssr` won't generate html cache when production.\n\nThis is suitable for search-engine-optimized dynamic routes like blogging:\n\n```js\nmodule.exports = {\n  dynamicViews: [\n    // this means `views/posts.jsx` is a dynamic view\n    'posts',\n  ],\n};\n```\n\nA working example is here: [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.13.1-alpha.18","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-ms7QH/rMa7gKtmggdHTPomMi/bM+/ePONjIYTiBeWzFi2vjYbEaZUQktT+X0A0evQSiA6+fll6I9vCpTFuY63g==","shasum":"4f0dad88f7aecde6b67df570acf987d1d84ea1c5","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.13.1-alpha.18.tgz","fileCount":8,"unpackedSize":14325,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6uURCRA9TVsSAnZWagAAueYP/0ROrDr5hx/IXhO1/dRN\nYixjOL6m4riLiwCEQOgoUJ2/G6vJxi8oEOszoQWwkBCUsWxe9g6MkR0qL8ga\nbGwOi0u3VhsRCLGIJXmJQL4GZeoNCW+04LAGlHYPgbP94kfO2nGeehMGPs53\nY5xHIqF+7+zOBM+ueNBc6TkwUvySjjo3snOuB+zoxFFWo7x7NcFXiAFcHxAn\nPSWU4kRVeL08MJ4KZQrRtN4DfbrNg41y4YUsIVmziWtSBzUEI1o1ELAY9vJD\nw7A9hFu3+lsvM8OdiQTRSMFWvrgBiik6qfDIzaG3sbU7XEyFCDw82btcVF8e\nSM8ifiJjg4XtKrLEJiPMH4lryTCM5b8eWlqp0W3M5CLRzbCFiJSqpC6/93Or\nuyyvTBwqZPot4SSScssiTp+inxgK2+87tdAzBw6P5vToyB17QDIZFHkgdJ2s\nsQBL0PV4OTKO9eC5Qbx0dqYZ37kT/MmDg/Cn0aF7VTLTl47ef+8BuMOE8mM2\nHufVhtba+VLAPkUvsFrr4gGoehHQkInZk1BRzDMnDobDv4LVKL/LvVbiyaBW\nuyLz1wi2ctiLGAOpnOAc5VWrnNPmG6w04XF8z1zXyzCSMmsAxMIztjlG03Xn\n4IxvKx/hDmey/F5lMGpZAekHIls5dXbsEFoEyX+XBVyMaeHYD70hCREQiSFF\nfF7K\r\n=tqOE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDAFkuNSDYH8thkGjsbmSab9D98luGYpNlpc6x2iwVVJwIhAJLCbolRmPcNsegqwMRXePlI2X60OIDAvb9R6cqTpvPm"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.13.1-alpha.18_1575675153297_0.8113371832566736"},"_hasShrinkwrap":false},"0.13.1-alpha.19":{"name":"@react-ssr/express","version":"0.13.1-alpha.19","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.13.1-alpha.19+7afb33e"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"7afb33ea27a46d78786e894ecea0820668e039cb","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  dynamicViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#dynamicViews`\n\nIf specified, `react-ssr` won't generate html cache when production.\n\nThis is suitable for search-engine-optimized dynamic routes like blogging:\n\n```js\nmodule.exports = {\n  dynamicViews: [\n    // this means `views/posts.jsx` is a dynamic view\n    'posts',\n  ],\n};\n```\n\nA working example is here: [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.13.1-alpha.19","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-KciYnHstDNO96sp1nIoNa5B96ezTYnoYMVixgbu8y2tZKFVag4AZzSL9VLuI52Ww2NlNo3iRvF+uyEfb+v3y7Q==","shasum":"7dd5a7336ee889ee6cd58da8ee29359d1eb9c5d9","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.13.1-alpha.19.tgz","fileCount":8,"unpackedSize":14325,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6uXvCRA9TVsSAnZWagAAOIoQAICDyPbxo/U29NNHBc3r\niQNgO5gyr42a+J0dCw3CLdDcp+UcJo20YA55vtMTdg1lqc6DKLl+v4Got1jh\nSqRIjLg+VF9hduMnZBEsaahCi1hlz/hyvWhETJwjEGRth8nbkRssH+7D//L6\nhMIm8VU85Co9O5lh69RKTNdLiCoQ3LJ4ougJYkSnRPrHvvH6Pjaag2zVcA1x\n+wVJnO7XcuYoUnj1KX8OIwkG0aXZ4+gu1dZpa97zp9mwlDnjG7cDXEEk8U4l\nbOwTUN8cPy7tXU1yTskLdiqK0wqq1V4C3b9KKd7MQFRQ4d57FjHo8ag+ZntN\nX3PdznxvRoDCHMOsjIpMIkxUxYucINPgpuwIxopoh7j5l0hA6EcgbpEcc+5d\nKe4Zg0uxxZ6pTvTJmi3UUacmHErblr/t3eqyRU5NkDLoJ5LD39rhlm7NymE4\nXcn05OEtJH6AEoxKP7OtcUBE+1rJzRbAzOYzwcEICH4ifY6clxYjs/xv2TTj\nFk30VlwHtQKhcTUDRDQ7DHPXl7AkWL2bHPSgnJxQJBzp2IfJqB9w3ZBXhQoh\nwwHUsexJ0y+P59H+qH1MUGCw5p3CyrxXjIwbaUDDCiMfR31lszDcOdA3gJTD\n9r55uiEQzWq8LVt1IlC/OXka8yUfZjzAzqQmNwBTbUvNOaNuuW5s5olsGg+B\n3ApJ\r\n=rhH5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDiHT7+mefusShHuSfDZ4aK3wAnoSc4wG0eISvcTRHy2AIhAIJQnAdAGCs3fNzMSPbdq+UsePH6M9w78oMorGsFrTQ0"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.13.1-alpha.19_1575675374931_0.19794248110814405"},"_hasShrinkwrap":false},"0.13.1-alpha.20":{"name":"@react-ssr/express","version":"0.13.1-alpha.20","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.13.1-alpha.20+1cbd325"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"1cbd325b9ff7c185453188d65be57cc0620c12e5","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  dynamicViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#dynamicViews`\n\nIf specified, `react-ssr` won't generate html cache when production.\n\nThis is suitable for search-engine-optimized dynamic routes like blogging:\n\n```js\nmodule.exports = {\n  dynamicViews: [\n    // this means `views/posts.jsx` is a dynamic view\n    'posts',\n  ],\n};\n```\n\nA working example is here: [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.13.1-alpha.20","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-SetOUPyTLt5VZNmHHLSJI9rkWex0ncU4v4f6o1M6IHkMBcMs10vMyuacW2tKdCiuvcgl8ODL+5yeLVbpWWYq9g==","shasum":"e531bf868bae6a7d17e22d92127f5e940ec891c2","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.13.1-alpha.20.tgz","fileCount":8,"unpackedSize":14325,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6uY4CRA9TVsSAnZWagAA4VAP/1p3PGp3K6MQT5YV74EK\nC/QgOGOs1npMO1zXCgYt3LmcOPFbLTgG9HL/gUQWqsWS4eS90TlLqju0BMo7\nz95xBcXsfdzlx00Uqs3KNBH3AC4/hnk+nrrlHDhC6odd//duqj+bAIxZsKJS\n7W40RkXMjuW6EbMfwZhLiQyY+1u0m59MAvOx8R/OC9FqgSDhpqNgME2Kk4H7\nm4mABvVPCE3rBWbmDUrfvZjnVmmA9TtRwlugeR63U+zbptyz6SizljO7IPoR\ny7k3kVNIJn1Qi6wg5HVaI58X8VDgrUBDWJ9NoM6/CID+rP5phDdkslCa09et\n7oCIm2dcfoZRDvd/ej3RUo6XSmhruebavijYymBkFErbUNcAnbTuitXc4zLz\nm4e/MT/oFmv2+xWdM0uh1k5iV/iFTBeaJbVSvYeKtkjD0HdXv/1nA2AxhRCK\niiaCre0vHPIB4EeKf4oFz+Iz1bzmZWGSj6DbbgNMjh9QAP/8DEsln+vzcZFK\naiJb6p4GSOWQTQIh6ncetLVTwmwCw77tACFNIij1944i/G/K7XUonoSMbc11\nvpQcjqTePrnyqdm30RkdATi66XDaoECtGuFOm+IHxaQ2sXlcuWQu4ALXTNgE\nAxwfqLyVkppPGeCLeSMs51Xhy6clSICT7LAzTxlS1SnZUcbHWHz9oh3lyQSh\nsvsC\r\n=hKin\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG1sKj2ojKj9fPX5gjOniCaNxFat43gfqlXR9Xm7IQMqAiEAqNQYDhkR1M/xBvPrANrHbTq9oYooDrn/exUexiFt0Ns="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.13.1-alpha.20_1575675448425_0.04519582276776957"},"_hasShrinkwrap":false},"0.13.1-alpha.21":{"name":"@react-ssr/express","version":"0.13.1-alpha.21","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.13.1-alpha.21+e7b73cc"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"e7b73ccf8a5570bc14f6931b33bf0154a0b5fec2","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  dynamicViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#dynamicViews`\n\nIf specified, `react-ssr` won't generate html cache when production.\n\nThis is suitable for search-engine-optimized dynamic routes like blogging:\n\n```js\nmodule.exports = {\n  dynamicViews: [\n    // this means `views/posts.jsx` is a dynamic view\n    'posts',\n  ],\n};\n```\n\nA working example is here: [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.13.1-alpha.21","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-YtLsnh+uSE3RaDSsgHIl9VJP26PkD6aGey1nOWVrJ2wVqQnZ+LKP/O03v4W1x4wmm3C/gX+VrOLW5FziOvpPDw==","shasum":"c6036fde14c875157211d13f7f38dae3db26193c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.13.1-alpha.21.tgz","fileCount":8,"unpackedSize":14325,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6ubwCRA9TVsSAnZWagAA13kP/juFyxBfOeYhSg8hTA2C\nr/nLGyFPmjqDMK6rXpIfCVgt/IUhmgmAGXdJwTaf8m23A2Yc979yywGL2KO/\ndt9W8EoL96NtfMm9b849s6BPgc0JESAQjimvw+XlZFQ9u1db2M2T/fBvpYoJ\nKP3Ul1ai1/lB+QQZ+K4xobkGr/f1iz2ehnUTtxkR/EaUr7iG1KMaN0lmb6oO\nBeo13cTWw/UqXR3sXGx1DxHkRB7QyHocdchyCE5n/46YNENRjYXdVmCd/C92\nJ4JxgTZ48kY4IIKqMifA7l/NJYSIMQY7LuTBF626Pkoc2slUda+R9zvKc80B\nlROx0j5jp27YqFvzlupdJWHffK3HCEIWZhc1BCTbk3eYDog0yLaVZPvKIA3H\n4s4wd6Hj0wxvI2pDH4y3yltbAg9VoiVX+ydOXv6K/3gApcFrw3iuVzc9SLbS\nPyjTi/aj7J4Ds6QeX7fIMVN/rOO9cuWINH2CeH69FIA9h5+akCbGYg1J9Vl9\nb4tFOSgVDn5sYCHSuRjVB8XZ5Nr2xHmzeQJpo8mZzCSoUDh/fgCl3Z+fKMV+\naq1b7EVND68uCIPn3xGMUwEmSRa7oYpRE3j9nGFMul8fzrBst33I/UopzxgD\nVX2/izyvc2UU/jI39dc728t8nfNcqa/thzoJIir2GhEKhZDx5CvEONRDOG3U\nhTUx\r\n=XqDC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFhvpFu0pxThmXvexjslRaMy92JldehxbQodRAumb098AiEAy3u4VHt2ZGs0Vxe42db/5uf1ABx1cWDMiP9C42T/I7E="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.13.1-alpha.21_1575675631703_0.4507542558627742"},"_hasShrinkwrap":false},"0.13.1-alpha.22":{"name":"@react-ssr/express","version":"0.13.1-alpha.22","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.13.1-alpha.22+c8a4524"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"c8a4524865a0f21c3eb027c1ab9807d8655111cd","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  dynamicViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#dynamicViews`\n\nIf specified, `react-ssr` won't generate html cache when production.\n\nThis is suitable for search-engine-optimized dynamic routes like blogging:\n\n```js\nmodule.exports = {\n  dynamicViews: [\n    // this means `views/posts.jsx` is a dynamic view\n    'posts',\n  ],\n};\n```\n\nA working example is here: [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.13.1-alpha.22","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-tcj2q/ujTLZOhHSnB72+Erzy486eocProd4pYJRSZPm2CKngTFcc1e/sT645fYtlPGqoMKthTf/q3yc//fcbuw==","shasum":"bb0cfcfd56c05b57a87c8964491b141e46986e76","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.13.1-alpha.22.tgz","fileCount":8,"unpackedSize":14325,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6upvCRA9TVsSAnZWagAAYKoQAIDaEObeIZwYFtJvBq5r\n13Qct50e5Y2sO1dDsIWAEVSnIj7SMczfcDJyu+osovsFqLpLuOaN4yEtd40L\ngjj3qoSCB8FuI43itIXvLmpe32MWo/uUmFsbFarAnkJsNBbJieJsOntLFzfB\nxovS+wSY4TC4Jh8X5NdEpbYLBNV9UX/yjbWJ3UrjtvXQxBUTNk2r5xfN9F80\n9igdoZl188G5yeAa+QgEmzGCuda+JAfu3k1uJlRdHWS9xOtlhZfB9TphzkDo\nS0NN9yjJlIwevZ48nY/BurvBkVuPJNEel5jWjqKmSvphJCM/uTZqKAiTNGqg\ncsuFWPVCdN9nj/PdY7lza65hUhOm2V05jN7GRXy9aH0zDCVB458Ya/iXRQpN\nKms9ciXUqUQbnOunMhKs0opHUoNXjQ81lAXDj2cunFMxE+GvYNKelmCyKa6j\nLdOfjdcHvx50YEDmxjWR5xKolyaK4XOxcIDH1aTyfFpA7u3I42ASmYLTTTRs\nb7+fiOLvi8ymLgFVpqSV+w5E1AE69BdwH3MyxCl+emrIllanDzalzwaSVaVh\n4YLG6PswzDtj3E+1+23iFS4XLvxSiqR3OBu6moDJRi25x242jg+aOkfp7JnC\nBg+7plgJSR6sY7PDtARJ22u9RyJwsxTZYIXRaIuC1hLuVTV3bJP+f+EBNOLM\nDCju\r\n=wqw7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBljv1PxH77xWKdkufhUX4w4zWJYkXvTa+aVAyxyH3FaAiAswOglp6+AJaHDvDDSgY7mRinbj2j+wSr+iZbMLcy+4Q=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.13.1-alpha.22_1575676526114_0.6105791786618779"},"_hasShrinkwrap":false},"0.13.1-alpha.23":{"name":"@react-ssr/express","version":"0.13.1-alpha.23","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.13.1-alpha.23+1dedffa"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"1dedffa5b5c72ea7a39490a698d9eb05ebc1702f","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  dynamicViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#dynamicViews`\n\nIf specified, `react-ssr` won't generate html cache when production.\n\nThis is suitable for search-engine-optimized dynamic routes like blogging:\n\n```js\nmodule.exports = {\n  dynamicViews: [\n    // this means `views/posts.jsx` is a dynamic view\n    'posts',\n  ],\n};\n```\n\nA working example is here: [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.13.1-alpha.23","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-JtknO5KfsMUwWW5fvGSrqAilpM3j6dRWZWoYcv4XVT4AEV4mwY6w5n0bG7qeG3r70sKdMSf4sr8Pt+ESVPpNsg==","shasum":"22386d241ca1a685de75683b4ab086bd2303e696","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.13.1-alpha.23.tgz","fileCount":8,"unpackedSize":14325,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6uuzCRA9TVsSAnZWagAAPWQP/0blLJUlD5fA19fKbncx\nUSyrPulU5nev19pYGBKm60+3fQsH/l5HMT1g2eJojDXqF5+Dkc6mhze6WO2n\nfQgtKsmo0p7xjN43VfsAH1UCtVg4VCkfZwTh9NUFcMBFuZqDnowPqBsiEiQk\nEme/MP7fFI1BQyND9D3nWlmTGSalBNxFsNumxW2tZueL1F8yzgannSVjrIJd\nX4meS2tVbjA6XWK690SXA/zhOAR8t9+llRFcnx/9ovaNBJi3rsSCkPsCR50P\nnZIAa+Yi7BKRFa1ZXzm0vaO61+fxidmyd8QFSaEaeYOpK4vvWGR4sV4aGw+6\ntqUhcKq+6mZNS7RcNNhkbl56itPON/hOQTwi9OgLaKnVTztauGnP3FM5krQ1\nFD0qdcgzQVU69RqGeFXZQm1TV/ROpexW7eiYyX3Mo4GL2N7SAUXNHeDBae7w\nsUqvxoWB3ij0CZNh1P5grEci+mOWzwp4cJeFM8WfcAf9PIPubMn31jLy6PxD\nRE/B1ElJ6Ab94WMK94u31Iiq+6BfyjaD/OgWDAPokzQazEV0dk1M6p5hbC6r\nG3wPyZ//eu2Zf/IUOpkiUgWXygMdv0R5D1ZXjCSiLITdTHkNexryjj5vblb+\nKm4t2XM8yck3SxBbRcJCv3DpPxFw1wYn82USx1WihwfCUpdwa49U1S7D3Va6\nvg9J\r\n=UnKr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDCAt6YlwoPb0JRJ7butbDym1Uv1MByE5+df8fRXbKYxwIgGCpDG+s46pfu3O2bnwtGbTbd8cIZkSTxdcudnXkwVSU="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.13.1-alpha.23_1575676849419_0.3153520216631469"},"_hasShrinkwrap":false},"0.13.1-alpha.24":{"name":"@react-ssr/express","version":"0.13.1-alpha.24","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.13.1-alpha.24+ea6ed39"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"ea6ed39cc27d6b43c533c1665cb107603be70828","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  dynamicViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#dynamicViews`\n\nIf specified, `react-ssr` won't generate html cache when production.\n\nThis is suitable for search-engine-optimized dynamic routes like blogging:\n\n```js\nmodule.exports = {\n  dynamicViews: [\n    // this means `views/posts.jsx` is a dynamic view\n    'posts',\n  ],\n};\n```\n\nA working example is here: [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.13.1-alpha.24","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-mj3j3bA26uKcJlo/3PSecHNS5gt+A3uAMuR1I0vqMrXhjvFmirMPUUnHz/s+nzWTkdYZZLgtMnnpTgotLVOoNw==","shasum":"09d484eeed5a9536a49495966ba3f62ae9807bc3","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.13.1-alpha.24.tgz","fileCount":8,"unpackedSize":14325,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6uzDCRA9TVsSAnZWagAAqgcP+wSsOOSdC4mYrNCvvB7T\nfeSwjvqiLBH57QMpUGGN42uMe8YKEs4QCFJug9kPzMgMnDACGaGPr40G3ihu\nahUuLvqp8IckVUNmr9BNGLbDHiMTA1PwlA5R1XAIr3BMLg7b8IdkWWhfrdad\nDr1mbTLA4SYgcQletxgmmYDpS5JBg0o8wT3/fgqg9MSq//1WWKZulu4GHqEC\n0+2ZMtThgcVcuZJsaRlkPBZ4dHCZBB8GdnotmwB/Bvdg/upaaP4AXZiEzMGm\nhHqseNYLcpya6rR2bV1VcaKqtwIVcEcVLleX4MkNhezmCpVDFIFsylXjGDgk\nffwJJ8RKTG/9hEMz56YB8OqtcIoGnJ4pH73Vld+fQiA2UcQhaWyNhzAuCF4N\nKF9xCSm+u0kuitYXm3qaWxN+Q7wTqZb+HSRYuhDDbyOMb3SAi86825BNREpS\nlT/XuhSQpAQBA6r2ZkYBa48AW7aVYVfEQ5gZoWObrnha3jIGENKgHQqBmQkf\ns04E2sAA0K/44eCz7numYD+XIDxOJZ2Z7vgsV4HIFsBKToSG7p/dFVQtWkr3\ngqvaWG/4Ke8iE3tjev4tbberJE1h/Syt7jEooIinKEQbx7TegHo9Y+rCHDLz\ny7Fnmeu81w1gtoviMeb8EWM50eRRIpOjlPb4GJcoiz7dD33twYtkdsGLCHHf\n/K2z\r\n=IZtp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC0+2NDUqTzh5oNeu+tx5YxKJT55UhIFaKADSksnP4FsAIgfe37dHaVYpUF63eanZFJs6zcFlqBZxGnWqwK5DgWVG4="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.13.1-alpha.24_1575677123557_0.3509997307040964"},"_hasShrinkwrap":false},"0.13.1-alpha.25":{"name":"@react-ssr/express","version":"0.13.1-alpha.25","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.13.1-alpha.25+71b4166"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"71b4166c1ea9ad5132212b54576e2ae8abf9d63a","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  dynamicViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#dynamicViews`\n\nIf specified, `react-ssr` won't generate html cache when production.\n\nThis is suitable for search-engine-optimized dynamic routes like blogging:\n\n```js\nmodule.exports = {\n  dynamicViews: [\n    // this means `views/posts.jsx` is a dynamic view\n    'posts',\n  ],\n};\n```\n\nA working example is here: [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.13.1-alpha.25","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-uAb6arYVX3FJC/+xzcRCA/kjcvtp0Jnmkwc7Klo0+BsO/YHUhBg+cI+OedlQci9ZbnE2094YY275QUWGtA2I+A==","shasum":"677bd367f7b478495831e25c2699045605930170","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.13.1-alpha.25.tgz","fileCount":8,"unpackedSize":14325,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6u3kCRA9TVsSAnZWagAAP24P/24JKATx/6VQiUVjiPGE\nnAj/ua9Es5q4temAsuBFoBw85fCKLPC5acYk9qPSX3eyijNR+MGfPEx/j5xy\nSLCnnzjguS9Fp6yHEO5EnSf4fAasjkwmRVJTtTxpFspioYHKGSRE+EUs2nvN\nnvorkstEZYIMiU4fLX5MFWIMe6DAP9efAocuo2y2aEOpLvPVpNLozALDf8fj\n+sfbTs/vP8mYfP2A6d0HvY/LnxXgsAL1zeeIsPHu502h0gFpDx4flWXPUp29\nElXtAA/KBmHKIHWbBVFUd7DA1jzZbctyoG0kqJjdB5AL6IKD0tltqb8PTneJ\nLnfnwpDyJfoDSwdDXQQaFFSp58cI9woFgS7sFfezAQvmH/WvZ8IICyG3dGmP\nNzumS5rdnkbNWYzsXIR+YimVGCfmQqPzOeeUAKYON1d9808H07O0fhoyFWns\naCMpsWXAcC6AZp3mHUz2qYE1cLKDyFyqrCBIMCkz5AmFEd+vCD4krqWnmSs7\nlWjZ8ZOuUTZfSCkrPU9qsB0b242CxkSvP/S497XGyG2B1Y36WVK9yjIepWeB\n1COeZ12/m+o0a0P+kGKCgCF7flDwqoxsS/m5boThD9C6oENwUyINZbylx++O\nSW7w5FXhLZqynf9dtlmLGrnqN1hF12uKkI9nm0l/qLpoCWLSqTCCUKL8AFpl\nkejc\r\n=eVqN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB/perN14B/1pBmuFOdAja8GT7PEAyadnAUTWNNuju22AiEAuQoSLQL+4i5XNhAJKbsxSVduxTxAthaLabxayYbtSds="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.13.1-alpha.25_1575677411890_0.4485637097972899"},"_hasShrinkwrap":false},"0.13.1-alpha.27":{"name":"@react-ssr/express","version":"0.13.1-alpha.27","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.13.1-alpha.27+f5a1ba0"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"f5a1ba0d9d1b16f41983e289b2c0b9797a75e7cd","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  dynamicViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#dynamicViews`\n\nIf specified, `react-ssr` won't generate html cache when production.\n\nThis is suitable for search-engine-optimized dynamic routes like blogging:\n\n```js\nmodule.exports = {\n  dynamicViews: [\n    // this means `views/posts.jsx` is a dynamic view\n    'posts',\n  ],\n};\n```\n\nA working example is here: [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.13.1-alpha.27","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-3ukvXFK8WcbpcI1h2XXOaWk9QYtuGrDUHOE2MQKV3RjHPxxFINJlDxisAQvFg1nZq9tV8c/5DLM7o2yWlgLvuQ==","shasum":"c4b21f88e65388acd75aa1f3943fe77a0e7d6885","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.13.1-alpha.27.tgz","fileCount":8,"unpackedSize":14325,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6vAoCRA9TVsSAnZWagAA1UkP/jnbEYcQNsmgS4Xn7/N3\n/vFt5w9HmOz3SYS9Af7OB+Nswy2voZhwc3atDnbubj3C1fJRd0G8G1GbNCPY\n2LGCCrrmskrMrsFfRJGkJabstkpu9dDjgjzQd2oobhqbeydi4JFUDazkqlgi\nb1kYSbXOXLDeE+CZvJSllvXjJ2x9/BAXKwy2LgKqZHyt38htcfdEhxxpw1pQ\nlkiOiNK5lXhX1lJZooIK82483unITxuVlf0EHOzXZfyLjDy+fn9n+AEOtBTZ\nDXeMjnWpWCek+qQIoVO/6I+OdZ6BbTwjMBNcJqbOrOx6Ivk7oQhamgT370oD\ng5Qx8LJGNGC9jwWTx2myWrGrRFtVbkpsqwkpiLYCAgkhVL34FU6jPq/BQ309\n958sZyLL8i/WwU5qomOShwUXTY+4nDocs0ltXtYQ78z9Q4RsIQpN4AVQ7wLI\nLq6Ov64BQ0ByfbQXrr8WB0B2JTqDM96RQbNRhFTap3olDIH4d3yzRTNy8roG\nacYNXmTczqsGyELQO5BYxyhAezJUx4nJrAWdl0CWoGYc1jFuZZsolBQB8Jrr\nBED6Ayha8W1Er/uEsIrGOZAi/adm921TYwK81GOeGQ3Fd4ZJ2Onz8Pp0qtyn\nPLNFh0QmiGtLEa0NRHG9NbSjOSJbnQyMcXQzdl2VK5CK4b70h1PqNNSfsqYj\nS510\r\n=GH6s\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE/ndKYXvscuCB40AMRb5utSnn9fGFmWh4lgWYzXy4DtAiEA3AGrzRDUtg7Z0Wo8XvhYs2kjCnTE0P4FnXbNixrwz5M="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.13.1-alpha.27_1575677992126_0.3523004644887917"},"_hasShrinkwrap":false},"0.13.1-alpha.28":{"name":"@react-ssr/express","version":"0.13.1-alpha.28","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.13.1-alpha.28+6a284a5"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"6a284a51927406fd99d77a2058dcf5654d015316","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  dynamicViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#dynamicViews`\n\nIf specified, `react-ssr` won't generate html cache when production.\n\nThis is suitable for search-engine-optimized dynamic routes like blogging:\n\n```js\nmodule.exports = {\n  dynamicViews: [\n    // this means `views/posts.jsx` is a dynamic view\n    'posts',\n  ],\n};\n```\n\nA working example is here: [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.13.1-alpha.28","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-GtWMQ5RvpQnHKjzgiodsned7qk1gd1+SVdxzXVi57M+gm6rBOWjf/IxTkTorBVWjDxurNN7sK89RrdWHGRc+9g==","shasum":"d846f243b2d8275df24e8bec2c3dec69d069cb46","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.13.1-alpha.28.tgz","fileCount":8,"unpackedSize":14325,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6vGGCRA9TVsSAnZWagAA3eQP/ROdcn7MVDtiPiSFpiID\n2h0LHC+7S/w7Kj272rDCFrwKYzS6sQbLo9J0SUaGCqWL8JRv5iT+/nMuG514\na+kin8R8GVlW5OqL+lGwg+KXwoYPq7vxhhoBBijRL+J3zUWWi2R9ey4QVCTq\n7xY3UiHxcMk1NYR7/lqPkyERLdItvVZlpCwwtl/Uo/5nc//kEWwd0IhqC9/f\nvLi2iMKKcEcEu6yqWgmtdnjr+w2jTy8WY17RpyQ4v/8s+2wT9wsWsPWK5GCM\nQHGDVzXY9BgTpZr2H2afqsg8z6s4C3O38Ns1qtiQ72pdifpXPBKhF9nhl03A\n1IQmUodfiPivKSYqDOpuwcemk7fcAnMAFKmE+yL6cbkEKv91ue1/9SBkHf90\nGnfNwY2m4MA7P0BRdQd+yGJXcE9uA0by/mLDBrKenhbcbatEBbkdu+xL+3ly\noOdfyfHICFIIKcAcEqicu+s4SQzGhxtwZZIWLUp7mOEhqZ1ZJ54be1wge9Ea\nMfJCK6i4pavzYdmI0HGCRDUXBjS/euw84GKMm0YP1YkbRC1Da7I4vzm2cwok\n1hvekOx6lRIm+KcTXX7Aag8RCkwlKRS598HCXG0r0FiGuwInhMaV7qXgXRyF\nELSyZK6TOvpKqHICPYG4jFjg9+7ezUAd/h1ieQuiAFy0tv0+CDnsn57GGzCh\nSqiN\r\n=ISq6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIETPkP69aXeSlX7U/Lkb9/pq7q+I83pjEMwxkYt2qGdGAiB45zR5fnXqAK4d7JrKj/8RQmYi3Nr08/Fypp9R6ZoGqw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.13.1-alpha.28_1575678341742_0.9779714702569637"},"_hasShrinkwrap":false},"0.13.1-alpha.29":{"name":"@react-ssr/express","version":"0.13.1-alpha.29","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.13.1-alpha.29+ab44a6c"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"ab44a6cdbc6991ec58b008a66705a7ed9e3a93cc","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  dynamicViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#dynamicViews`\n\nIf specified, `react-ssr` won't generate html cache when production.\n\nThis is suitable for search-engine-optimized dynamic routes like blogging:\n\n```js\nmodule.exports = {\n  dynamicViews: [\n    // this means `views/posts.jsx` is a dynamic view\n    'posts',\n  ],\n};\n```\n\nA working example is here: [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.13.1-alpha.29","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-JJtZVgOjWiQbMudveOYnM2j6V40AnwfiAPq65VkLCDaNi8Yt+nmf5dkIEJ52F4TKxFF3azNnYp56XtmLmlj/0A==","shasum":"64edbd0220738c31a96177d89b7ebcf79591bcd5","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.13.1-alpha.29.tgz","fileCount":8,"unpackedSize":14325,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6vJbCRA9TVsSAnZWagAAdicQAJEDj/RWtuvpF9fHo2qZ\nuX+cxLlk2bhkaXHI7LBhVF4W694UU9UC4Z3PrTduPx6tmR8OJT+NQO0sASfk\neoWVbf96lKEsp6ALd3/AUna52U5xTqgqXcWPVAu/ttEQAixOd5dWe5tIVfNy\nWHNgyFuHSlA+QRXohKrKT6cYyCpjWuwaScKKZg2FZEy6qUsg6gtBFNtvd7wY\n7v5NGliYX1wSOaf2m8+L5zhU5rOE0i4GxkGkA9PNz9qKpYBRhEKvekv6UcWh\nEj2wG225L72fYM3q5I/ismgVjRMI4zJEy5NyxetKQP8F63mdTrF4agvGRr6p\nbXmYEcCMVbD5jD0TelS+L4sxVFYCrtMLE4ul3Cz9TmFJxBl0gNv+FY04yi6I\n1F1GCBjlinel71KxkR9ObDIvgYULZaEgruD7NciPHkz62Y+vr7USWhtbgjxp\nyKy7QOutNpOecwWLp5nh/qRgy6Q28U+a4FlGkUqBuBzjkv6O7VU9KSf9i99j\n+SyI/UzfMVI+Sh4cMe5QPw7JW93hY8eWMbMzK4SehmvlSjqbvU8lKiTMCZGm\nzfltWb6jU+q6PA64vCcJCh1rkwOj5+5t7S6H18zrfOr+l/Nw9k6ZHi1y6SUy\noa8vePRSIK1g0eaUvz7g3ivzAZ8tNqJVVWFw5NE3WYJQP9z7v0NhaBlcyDHX\nTInv\r\n=rtva\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA+VO9rK2kHCK6MPljfIkQ5hpSVhofkC33k4mwGtdSgiAiEAsu2Y24nPzSdPKNe7N4gBW+63k1hwaqy3LyyS7Ys0pwk="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.13.1-alpha.29_1575678554869_0.4808010321472309"},"_hasShrinkwrap":false},"0.13.1-alpha.30":{"name":"@react-ssr/express","version":"0.13.1-alpha.30","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.13.1-alpha.30+ccb988e"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"ccb988e5478062e4cf830655fa39b7eaaaa93553","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  dynamicViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#dynamicViews`\n\nIf specified, `react-ssr` won't generate html cache when production.\n\nThis is suitable for search-engine-optimized dynamic routes like blogging:\n\n```js\nmodule.exports = {\n  dynamicViews: [\n    // this means `views/posts.jsx` is a dynamic view\n    'posts',\n  ],\n};\n```\n\nA working example is here: [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.13.1-alpha.30","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-jlvgqTrgmMAcItVY6FYVJqcrsQVjfjC4bOGCoyXXXOcKReauiUTC6g2bFxyZQQKcO2ZDGsz4WkjDMWvJho3cOQ==","shasum":"c18cb0edb1422447427f091cf46a9626a85b660b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.13.1-alpha.30.tgz","fileCount":8,"unpackedSize":14325,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6vNnCRA9TVsSAnZWagAAd3YQAISXOEJTSciZQgzfLbD5\nevDLjVyRMqr3341fBLOHeSC+VP7/C2b3TNFbyMS6TYAs4MmhOVBPA7TNZPGM\nJQ5ow5Lz1pf1mjAlD2XLBDQCQMFkftsUmi5lkXuQ5WC9X1HQf91uvw3cB9qn\nj7rroiMvBg1sps0/UUt3+pN/awmJpvP/Oqc8bJs31iaRNeAGfDVlUYXifaTo\nrv31LZ+Ba64hH4oehOP4zenzvlSByhUtitfzym7uUFKjen9YSZICqOmO6oBr\nstDTCc5+WpousowsGnitBT2Psm/UYCnf9Na4EYRvJrs+NErsYjmYjO7YEo6K\n0AMmhSadFs1gH7GUFtzfxuu3+Yln3lGQJCnk2E72kVLew458EuJ7UAmpS2mH\ny5K9FB9RX4+NFFLz3BbKEaF/oPCCNbpoUHeI54qEwpQT4yzx8X3sEgjtnE3h\nXOvyjlesZQYRZehW0Uf1PzSiXN9aqlbd4+G1DvcfGbgL2up5VKxVFZ+VTsPE\nKULnycqIOE50LapX+kfP2yMTK5+QJjaFZdM7foeZmE5XYaGcuGO86921LvjO\nzaDcsVDCPrf1Jj+JMYlAsVWFZJbkwfZweEDGk4dQ83mhXJdbUUCDw0tRWgme\nUWGT9eYs2L7WMtkzztu44y4nuoxslQJUHRwEXquop/2deGrXN9QxTK12WMpp\n2HI4\r\n=xEfR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICLy2k3G8cSBkSgv0jlWJmTtCosqzEmu4rG79gJJ/tapAiEA8AvU1bEiiAb+NmiSXs0FcdxGm9gzPU1X3L1XJZDZ5SY="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.13.1-alpha.30_1575678823431_0.8918875406163345"},"_hasShrinkwrap":false},"0.13.1-alpha.31":{"name":"@react-ssr/express","version":"0.13.1-alpha.31","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.13.1-alpha.31+6f6197a"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"6f6197af8b68c0b0e8210866b3d76bd31724ea9e","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  dynamicViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#dynamicViews`\n\nIf specified, `react-ssr` won't generate html cache when production.\n\nThis is suitable for search-engine-optimized dynamic routes like blogging:\n\n```js\nmodule.exports = {\n  dynamicViews: [\n    // this means `views/posts.jsx` is a dynamic view\n    'posts',\n  ],\n};\n```\n\nA working example is here: [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.13.1-alpha.31","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-SKXEzeNx/GnmgbJgWAENovTTgMFC5d38efyfY8HWjxiUoQrt7AJyXCoUKuPyN4v71XtC+X3SrilkWWj8e+3m7Q==","shasum":"fb6276f72fe74290d018b3033019b0458d9055aa","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.13.1-alpha.31.tgz","fileCount":8,"unpackedSize":14325,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6vSiCRA9TVsSAnZWagAAxMcP/R8E13CGkE2HU8lfxwsx\nuJQkuyZwDtSIkmB9GVmX1t9jWgkMP0N6yjNBNBnNgBr0oufGQ61wdk8AOgye\n21/W6WvTWSYoHUGbvpvGcPJTajYCGWzEKNN1lY9pgafBZOehXBVNzd4sNjUK\nc+f3/PMAK4HjmWdzQZIZOLoLeHneZLiF7IFTQqw93yL6qTO+KRg5Q1nRNk+a\nl0yIzRs3chKcP8+dooBb1h0JmLaR/L61zHQW/+n140GvDFxijjwXQQeqyPao\n5FoQihYid0B5BKoZc1+cnJqNq82pGfjAWs+cVzP5L6eXYtDli9R1f/80GnXs\nnOtxCEw++hM7Fj8rhDS7G8rFNusjXzlkGB+6TxkulCSgEkCtZ3T4qoy8kBkr\nuabJL8wYr8FdBv0msNRakKQG865OGjTjb1En7XGZkrnILoBHEkxwl4Xoaxje\ngLe3LcTtN4KsprryiN+77PgWQZWz/LRpQ5+gWeZ1O6EVh1KMlQzvKbzI1nfl\nDOJhyi5YHUX1SbKZ69v2p8iOxjNsVbB3nDtrNMk2G1IBk7WTZTzXrOCdPlhR\nRLHXsqhx/woZNLQmuioB5KQLWzmzum0EHW6RblTLFEsUz+1OpEu89eHBUJNK\n3O0aV5qfzk3LIEkF6cMPWXMAvhunOSdqaSGH7DL+H906qpVOG90veCj6uGjA\n/lxQ\r\n=DTEo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICpjiK61Fa1TniCFPbKJnPJt/Aci++Tx3rhvLc73GSKoAiEAjVgJiCI+WH3X2nE9aMEh2R+E2NM0XCfQjdq86ipYQvE="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.13.1-alpha.31_1575679138402_0.7232196199883001"},"_hasShrinkwrap":false},"0.13.1-alpha.32":{"name":"@react-ssr/express","version":"0.13.1-alpha.32","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.13.1-alpha.32+add9d7a"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"add9d7af494a613135366f60ea3a733a859536bf","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  dynamicViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#dynamicViews`\n\nIf specified, `react-ssr` won't generate html cache when production.\n\nThis is suitable for search-engine-optimized dynamic routes like blogging:\n\n```js\nmodule.exports = {\n  dynamicViews: [\n    // this means `views/posts.jsx` is a dynamic view\n    'posts',\n  ],\n};\n```\n\nA working example is here: [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.13.1-alpha.32","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-ps/t1OAvyoVanugdPMXvtxfpmcc5278QCBWZM2/bVoLoMTRtzLDXo5D1eYtgQ75Nscnw0HUBSTZolnd4iEvqPg==","shasum":"413b2eadf882f48e95440c02b9e02df5ff45facf","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.13.1-alpha.32.tgz","fileCount":8,"unpackedSize":14325,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6vWqCRA9TVsSAnZWagAAiGcP/13S/Iv1wgYx5A94YMrA\nAnsec8JBT9DLmRgifeZg9Xo6K/y7SGHjNZwb9LL7ObdkKc3SoL/JOP6SJPIs\nfktd6qidS7NLpZ4vVhAhq9494JzdhAGI73T8HyhO+NvBLX1xQxdAuxOSOvln\nqBD4P883j/QY0PYDuYMbDcxK/LHoDSI7QJ2BeHDp9vwj3HGdbakxEyRbyal4\nIIgNHQBT5GPAQfZcuTdZqBS5UhuGtLgTcVVf8iqT2tsfOVda9hvWdOoEu+rQ\nNu9QNJ3mZkD1afncr2i4OFXV1GzY4uVm0ESRtycoujuzx8TggZ7fEcn50ujV\n3iJx4+2uDLGOA8T6e5Rhu5LrNaTEtCQ62W188XE4Efcvi1GPagcrXqSvw7Y1\nVwNkkzvI9diLdDWhERQKX+aTfjAEWmVOxbHqsbhe/DNZvM4kd41QtdXN0Wsi\nShAtPL1vZHub5uonFo2JOHR2iWZJGTQn6fLuTktx+g10t6a9F7c8FDk1juIc\n330nVbOZzJyqlnpgzV2K5suwk4cVym8xdjFNtvFWmEtcVD40u3Bsim2hQ4GE\nRarHYuu1jgV7+fM9ao29l2eU+OpADRUFT9F/3FT4sO/v2zilgAKBMtE7o2Bx\n0HG7s1L5ASmTDEg0MWzZuC6CeBA3xSu0JE4B1K9ZGyeDZAIWFN0dIuM9YWR+\n1hCZ\r\n=cJyw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD7LI9AOKtHcP2U8BDjBaljNb/pyJa39w55iPIBlxt65AIhAOtYA85WGiA+RVbi7NstSal3APetTXdLJuyw50WQrfMO"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.13.1-alpha.32_1575679402276_0.6601811445045342"},"_hasShrinkwrap":false},"0.13.1-alpha.33":{"name":"@react-ssr/express","version":"0.13.1-alpha.33","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.13.1-alpha.33+29ad812"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"29ad81282165594a0b072ba3024271ac3834afbf","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  dynamicViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#dynamicViews`\n\nIf specified, `react-ssr` won't generate html cache when production.\n\nThis is suitable for search-engine-optimized dynamic routes like blogging:\n\n```js\nmodule.exports = {\n  dynamicViews: [\n    // this means `views/posts.jsx` is a dynamic view\n    'posts',\n  ],\n};\n```\n\nA working example is here: [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.13.1-alpha.33","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-4meHZx/XxTtsD/C1BhfWht9qWpIyzQDcZRTdqOSk9MHsDepM0ZZjR0Y1jtRJswjZqAVtbjJKM6c+K/yMr+wymw==","shasum":"2e9e3a7fa7783be8531a8c2ad416dceae34e6da7","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.13.1-alpha.33.tgz","fileCount":8,"unpackedSize":14325,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6vZRCRA9TVsSAnZWagAAtq8QAJZ76flCGl4qGGH+Th7/\nTTyaI/HCkEZnkk0ObQg9q75nKc0YX9g6IFBTX2MOeAPagt+aLqjmyYhfE5MX\n3MJtvMLP9Mzs8DtAFoyH3AFGdLI2QWBqIAnlYbZhfjvI7w1hwV6lZnTZNHhw\n+XUhKKy+3+z9X8LMLmPb9lc9wBqs5qsuvJCRNhco7HBDNG/nz5QLe/3AB01q\nO3uo5h1GPKWEBtdZaSc8YCJEYDpxS7zU1hnkyPrwG17z6moALeGNJub/EKas\nL8otJx63V2Q2aH9E9+bQoSACGX9eiYEuf0/VlspdsULHkqxBIl7gRkdUCXM+\nSG80J04Vi3s+hkkmRLMMczlbhgQN/qAKeZjqlWSNCTKPqvLwh52G0ex6gah/\nzWXtgP7RsoMoMrc84eOo7JmsBhSecO8NCFuzHlqXGPttV1ybf/tFg6P6zvyf\nSodKlhVDh2SmwYWZgAAYckhGgf0IrTvj6dFG3Anx7s+cvJGApQeQt5ic47dy\ngbd6jZsJFjzUwnIKuihIxof4n3xirZ7TRcX3ieQhTuzpI0nnRsrcRR+54o3V\nXp0M+EPZOYKIx5ysfExBLug04ONmGF7PCuCjtlL86+h3SRwFQ27Il6tV/YCx\n/9BYWFaEsb/dowuROYy8YXAcM7VLLDn7sDYNeDbYylXqk76RKCLBvpjh7WYt\n0mJ3\r\n=PLMB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIExH/PqmlzHAobjXWYcAv5z+fvXIJpYDII4xsDLd/oL6AiEAlfaFkorE5cd9YPgmCsvfBJsBrXlgdNfoWrMQjSFq6bA="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.13.1-alpha.33_1575679568923_0.6843849388141796"},"_hasShrinkwrap":false},"0.13.1-alpha.34":{"name":"@react-ssr/express","version":"0.13.1-alpha.34","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.13.1-alpha.34+0736bff"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"0736bff1f444ec16a81f96a6b70c00bcebe25db2","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  dynamicViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#dynamicViews`\n\nIf specified, `react-ssr` won't generate html cache when production.\n\nThis is suitable for search-engine-optimized dynamic routes like blogging:\n\n```js\nmodule.exports = {\n  dynamicViews: [\n    // this means `views/posts.jsx` is a dynamic view\n    'posts',\n  ],\n};\n```\n\nA working example is here: [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.13.1-alpha.34","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-EK6rkC3cjTrTTbr+RLXcOVrN/bwSsHlcjbYG9+GxPWyHfnhoz8itGCu8eZ6ACirZfs6/2bE/3ghOtYJc0h+KZQ==","shasum":"38d2f557b928fe9f6b989626b8bda1f9f28e6bfc","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.13.1-alpha.34.tgz","fileCount":8,"unpackedSize":14325,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6vdlCRA9TVsSAnZWagAAze8P/j2E5XbMa4Pf1BBU8W5/\nRQMPYbSOEWLQaPCDNdAQcNafcWXoibE/JSAXq0/hiuIzj17niunT2jLGNYMn\nmxTaVxsI2xFcYC+osGpqQdSuZG6NdrCfDMER7t/sIEaSofwy5y+AD9EInus1\n2IPIwSxH/SOpyujC6O+nl93AlMDVRQY7R2WU57iC9z9joyHx1a24hEPTG3rt\nOXdi9zZvF6BRqPKmHWdfib7Vr/QW45js/jEmlcmxCkT7z8M0Yh6wNkCmZKTC\nL5PML4bhApfMEsBW8YsKPeZ7VnVIhRzT2taIg2x+7TVfKVpymwiuWQO+WuVQ\noz9KIdbLZJ69zkLJ0pbVjrAeEzK7LdHP20CcQ06qQVWPWvIm5U4BcmUEz+0Z\nZMyb/q/TxXuW1TnRR8md6qt7lOkEKN8wbfe1epfCamq/G8PXUAfy8bG88VCi\nqhH/sSNfqRri6VL1XF1pI93Ire70jgXkk5EX8bCnnmqP7PF6SgYUl5k8GAik\nJJIAHnfYJlB+EdTS+t8S1sSgiAp6zwIAYDCat2Ac2oRMrwycwEpXRlXSZaDs\np9BrN1ihuPnTHqdkv9b3JX4ABlJWHVYz9xYYRDa43I9MhfW/GIULYvRZSXH9\nDFP8sxyuP4LPKCx10ukPCHfPDDSb72I1aPUW/BcMIVx2IsGeJsZ13dgwh/TX\n1ouP\r\n=RvKB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDvMQiHY0LSr8rkafwB+cv57QTKeX7JjHuJYU9ah5EL6AiEA2YR8pFd5Tdr5bnFmyP2ZwmHnP1zjzzkSITK1xr2Dzko="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.13.1-alpha.34_1575679845488_0.07806980952404685"},"_hasShrinkwrap":false},"0.13.1-alpha.35":{"name":"@react-ssr/express","version":"0.13.1-alpha.35","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.13.1-alpha.35+3f5ac8b"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"3f5ac8b52ca625948e9a6317c5e1beec007d7c68","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  dynamicViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#dynamicViews`\n\nIf specified, `react-ssr` won't generate html cache when production.\n\nThis is suitable for search-engine-optimized dynamic routes like blogging:\n\n```js\nmodule.exports = {\n  dynamicViews: [\n    // this means `views/posts.jsx` is a dynamic view\n    'posts',\n  ],\n};\n```\n\nA working example is here: [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.13.1-alpha.35","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-mqhHahne7W3SJzhyzRQeQXVE4UQmwneUHY4LtQxliuFVwExwWR8JtvVKYEaZjtqUf38wIVIVQjP7rz6AXQHGXg==","shasum":"544196f19b158d5b73707350bdf2926914587312","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.13.1-alpha.35.tgz","fileCount":8,"unpackedSize":14325,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6vepCRA9TVsSAnZWagAAiA8P/A5Ctb+FPBr8lXI3pZ+g\nN9OpWmGrqAsiUal7xwbihsaOxlfAs0tzR3xTqkPzCB6dJfYanFJTe9NZULQI\nW0Llay9oAfsknvSu4Hg2baP+1Dkc0XvJguip5WJVPUVpBNIk2gSND+L2e37S\n+z0tIH1CPMO0EQrosnuDw/xxD713QM/jRImDAzWCAEcxTDmS/zfb3zHgViNu\ngTLNwbgtnpz67sG0jryAUuzNbZJepD1uA4/4tWDhVyweHdM+Dn15x3zTpdkN\nQTaKV94EtD7mW6tzIw5woaiKqdFpQr93s2mnXI4WzZsHmqfWQ3zVRjLBIGmp\n71zRIcJkKbiGRqdy8l/DCbqWPuauUwXo+itncURflHq30u9r/mUirenON9ol\noJp4Hv11glNRznDHwBudJeUAnSQutRBBG03ppmwWXlHiNZqARiYfuzTRpm1w\nZMSw1aLIZstAL7lB0mlKwV2MA8BXl5+JsRnlGb3f6MrzDduWtFDDAAROyYNN\ngUqeBRQ+zQc7dE16vBDB3uOBB2Sm/b8NxJLID1KsTbYFw42FSkX8no895TG1\nkyH7Ba2T/RBXGXvU0VPexO/pLJ7CyhYUheeADtqQf2k67pLGfrbbD/qja0kt\ndqWkkpyaYYdHYzCTeeZJkABF9Wma70hfqd5zX/zHROBaLuNZT05QMrg2CSch\n5Jl/\r\n=fBFw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDT8YVxAnJ01XRNnSXrV216MAiI23cpSi8jr60J8W52ZAiEA5B5JF5w/pss5sJMxhPRP3zmE68ih5XdvAjNVfVhceQQ="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.13.1-alpha.35_1575679913039_0.7788523875103162"},"_hasShrinkwrap":false},"0.13.1-alpha.36":{"name":"@react-ssr/express","version":"0.13.1-alpha.36","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.13.1-alpha.36+f97a5ba"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"f97a5ba982324d6732409d4868e559e70ad88753","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  dynamicViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#dynamicViews`\n\nIf specified, `react-ssr` won't generate html cache when production.\n\nThis is suitable for search-engine-optimized dynamic routes like blogging:\n\n```js\nmodule.exports = {\n  dynamicViews: [\n    // this means `views/posts.jsx` is a dynamic view\n    'posts',\n  ],\n};\n```\n\nA working example is here: [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.13.1-alpha.36","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-qjwGgLu1yaJe06Ccka4Fxo+8JBTfIPNCXPR0Ho3j1HIEX9r66VMTOmfhY74kF0BDP6boCl4dDMe/kK68/yWgHg==","shasum":"b243aa123f5a41bc65fc5633b9b5d1a904f02892","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.13.1-alpha.36.tgz","fileCount":8,"unpackedSize":14325,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6vilCRA9TVsSAnZWagAALd8P/jddEvcqyGyYtOLgmJdk\nJO+h79StcHkISohn9G2SEj0k2qrt2Z+9UeQYMFka/1vfzsyvlZ2vEhopXHkI\nSjsfKyOkmsb+VOLOHhMBI5g3byF/zrHrm7pqlHFpaRuPXBofuc04ClAYJwwO\n66syy0sisMqJ0G3m3fybb513wqM3HBnEfXCcX7uxANBwdkziO/iPwZJ2JfOQ\nJsA6lHPTnX8DXQeV01sSFcx1GJTT1MK/HZPedQ7l4SfUFgLkAN7Jte4riFqp\nDsjTr0q4t92DfmWQK1gyLRcuUK8bw7LaGANabY5csGfhb1LCZ4YsogLHILUy\nr8iAQd84G02c8ECi0Ir7Jj/0BCXwZROXL1QqlXlsGzISEdCRfGQaUyrOhMPM\nZqBTOefQqV3LPcsnvYgPA07lHvdwpPxE6rOKyoW3cRhMLTODGNBMA1gwLVCi\nO0A4wL40AkWRnhtyAljDg1fJIsdCJkUgX9g4zUZDCefXqsij6aNO2eiD37+b\nd5etO53oCdQyzVEBdNmap2lvdPfCSak4lY1M9xlTNzvIUietb67fP+i9tCz8\ngO0/bDO8/YDIDwDdaPV5jHBCfYnzy53j7qjb3ECPeN1o8RM3NMede/ghUQGh\nx/dbVFEYQ2/euYYVUo4Hw+JypxUcNDHpYzga3fbPUK10bipEWfRb1tQQprOe\nRuSU\r\n=YWnh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDXPwruhlWLZC2M0NmKwCtUFR0nhNjDna2rhfl5RxwekAIgdVFRAvZ9k8CvFJSN/iOITlXUD13NLBmL+SIcoI3+H4w="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.13.1-alpha.36_1575680165434_0.40697590500757674"},"_hasShrinkwrap":false},"0.13.1-alpha.37":{"name":"@react-ssr/express","version":"0.13.1-alpha.37","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.13.1-alpha.37+735a458"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"735a45853b93ebcacb5c813ef7f47e7a1de0379d","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  dynamicViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#dynamicViews`\n\nIf specified, `react-ssr` won't generate html cache when production.\n\nThis is suitable for search-engine-optimized dynamic routes like blogging:\n\n```js\nmodule.exports = {\n  dynamicViews: [\n    // this means `views/posts.jsx` is a dynamic view\n    'posts',\n  ],\n};\n```\n\nA working example is here: [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.13.1-alpha.37","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-uWB/Y+9c/pCdhZ1bOiwG6IltTQlga7TMD1NyYI97qb+rqjpJxkfQME6CqdzJHZo/g7O+O+gfZYhQL7Zw7IW2pQ==","shasum":"11dfbe5a065e45378b513e65f2f334e53da42a15","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.13.1-alpha.37.tgz","fileCount":8,"unpackedSize":14325,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6vpMCRA9TVsSAnZWagAASqEP+wTyWARyTY3TNEYvFJ2/\n+iaGOpNAvf06FOoqxH/ibo8Gs09NclKwJiYQmdvXzsIfNxCasb9X0vnpUQxa\nLXR3QKTj5hF4tLBcZaCNHSKM3XsnuxafAYJWCdER4pdYuB9Y1MzmA4UowInC\nepkQm/cBJiBDeupQJvvQFwlPETxAQxsgPUdBShWo6GmENp5fHGHnTzQ/PmEz\nlwq+qfI4TDEbfWumNry9IrdLlsu0TdoOEWiA4IwhYH10H/AudjVLvENUJPh7\nJoud8xMBNq70SpEMuuRW+wUfTeQd6Mves/NjZ+D81A9t4gUQY7loGXFytrUd\nFk4lOiEZ3IgCNeLeC5tcwLl4l75EM+PULctKPf+x4blFQQzr3wo9t8JQUoE6\nhqPDgUHZVEG4XNkMQsWIhOLChjmSUiXbOfsLRkMG6T3hZfUUIzm13KUsCN6j\niHAmdLcctaBC/ZTgUtjUElHEAZXAhDe9mdVax6YCsHgbI/8MrU+LGLFYKzXA\nIlttWFMvunNwt83a8MSJWUSFzmIsM9S6YWdBkvMfPB9WB8aVcVQL/FJK+o4X\nhHUePeuNokhsSnikr1XlpgBTy8dOgz37DGKxnqyLQvuzae+zBk9caXOydrqZ\nICa7r9Fu+Ca/Rb7DKde6FBdbsHxnldiz983VFQ2b2yTTAH7G4zG5E8jZOKqu\ncjRc\r\n=UxSn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBMA8qGGTsVqyl5N3x+sL7WjYAYsI9i5B3c8WwPc3kyuAiAQ6bwgSE+xfpvNHxcD3Y0ot+Igrkj2Crr1iD6eyxyM5w=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.13.1-alpha.37_1575680588205_0.4243798515868442"},"_hasShrinkwrap":false},"0.13.1-alpha.38":{"name":"@react-ssr/express","version":"0.13.1-alpha.38","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.13.1-alpha.38+9a94fb6"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"9a94fb606d445f432944c76ab05a2f46f0fe79ca","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  dynamicViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#dynamicViews`\n\nIf specified, `react-ssr` won't generate html cache when production.\n\nThis is suitable for search-engine-optimized dynamic routes like blogging:\n\n```js\nmodule.exports = {\n  dynamicViews: [\n    // this means `views/posts.jsx` is a dynamic view\n    'posts',\n  ],\n};\n```\n\nA working example is here: [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.13.1-alpha.38","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-EunWA5ZKhQ3P+6uxy1ET5v6gnbp100xzjPyd2HGCDMyQGYQoIbGwWY8cIq1BuoYfW7nuNB4TQkFnYYXBkgSqZA==","shasum":"e4daed0199f8ebb67fd89da2e9080ad6ad5b916b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.13.1-alpha.38.tgz","fileCount":8,"unpackedSize":14325,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6vqbCRA9TVsSAnZWagAAvZsP/2WmtrikMITHIoFoQdT9\nDrqBwSHWEJ5Mkx6C4YDxKS3SVFnGPap63WoR89JqS+Otyz3asdETdZbPjh5l\npG2y6WNh0PoPWHsx1Z/h3yyPS2z3ZAouEJeoEYMx5OK/Gw2iBMvo6ZG8TyM2\nrAWLjzPDLXXPZGIUkT1iRlb9nW04mZTJDf1YKASSoZY4wgN2Gtwk1ax1btan\nDu+KEUt0+jobvLmDTpRqPNF7Uq0TAWTDJa4NSIVIzJnUrxCwbJuwZCF8W6zt\nwXvoYQWRYJZL8fRpmISweTey19koxEs90Z5VT2HN/4p4nQU+luidZKcF25M9\nH78YQ5gYwMhu2nH67NJRMvf4+X7QtnYZ2VQd4l4XQtEZcHE9EgfmW/PsInFw\nvYrmfkOIKX5qFcsFr+2DBzlRGAXNXwXTZeAOBULNYs9rWxyi8o/WEnlSg/X3\n7wRzMXl2ZDw5Q2DZ2ceRFBX+NDdIc0zRd7/By5PTcLFnI1g3JYcRc2uFMJ+u\nN8XXAU8Oj3tSWkn7jLu2fzX2HlGG7j3rZYA3gGPyloH+K7/1o+DeDJLkh7wc\ntdPMIUphRkgw9XBLF8mBE+b4stlSSE3mO1jbGoSiNuHH1BES68r0yUPFgQpR\n4jt/6PDI+M3DnUQCWT8fEWROZX4dBG4n1y1gxnx0CxjexmmlWSF2Z5Dfun8k\nwrep\r\n=C1Si\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDZVMCI7awKn3HnltWTP21SZhn6jNi2PLJElkDD6q9oDAIgQ3dF8GI/l1TbHYBI1Gp/t6mP81YSD6c1tZ+5e/Iy9vo="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.13.1-alpha.38_1575680667056_0.1959235658100622"},"_hasShrinkwrap":false},"0.13.1-alpha.39":{"name":"@react-ssr/express","version":"0.13.1-alpha.39","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.13.1-alpha.39+82babee"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"82babee842a002dc597efde14c5ac7a3da7c3f13","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  dynamicViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#dynamicViews`\n\nIf specified, `react-ssr` won't generate html cache when production.\n\nThis is suitable for search-engine-optimized dynamic routes like blogging:\n\n```js\nmodule.exports = {\n  dynamicViews: [\n    // this means `views/posts.jsx` is a dynamic view\n    'posts',\n  ],\n};\n```\n\nA working example is here: [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.13.1-alpha.39","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-FIRYr+NuWf7xtdkPt3R+EBWtQbwWI/iARoRNlrrOxLl8qFbCgZ2s7kEyN5ztK04QRd1ilNSeOfi0ndmiZbSBvA==","shasum":"7a8fd5e7d29dcf6a0ff906b37710dd9d0fb3a3b5","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.13.1-alpha.39.tgz","fileCount":8,"unpackedSize":14325,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6vvECRA9TVsSAnZWagAAQQoP/3FyZaapszhZXbi+ObDS\n+tPtY5wNGyCz/RiM6i7AHCJtjq6Cqfj8sJcuoMSZz76FsggCkCKl8QcNCQjh\n07h1I1nofVmArthppivYFk8dO9LNWrSS8XekyVtMMunUncdnf9x/MFnGNozL\nniN/SvnZ/VUWuV45NeG2ZETRN1xFDhW+S/2R2vj5pf39mEvyActOcO2LZtkv\nZenM6Nuzji+0EWt4OgRY13hIrJ4kPMXFCgVgF68BgLU0NbjY8PCrLvcfFn+H\n92lEHRsiaVk1x5fbTaG56mEMlqwMWcH9/k9Zwu8iGKgxmsq13gAKtCwFzqvC\n7xcMvA9wAvEqBm/5sqXCUWYPN6HFAqdJlKyMSiaR+IPRMXKIqYvKqtn0/13C\n93hY7gJZEGkrmes1BC5sBhxHLlcs6X+5PxTe6pO2lXu+jlaWRBf6L614QjOD\n3CYDRgTEAWVJPlI/GOopoi1KeLrQsc9dpWG0D8l39APokV0TyDENZo0g8QDW\nLXXj3l+RvE58BuZgEBTgbA7aDJJjRynPmFmo6j6yciaoai5OkhQ1Zt6ona9P\nazBNNAgXcArCOsKhtIXGr7rc/+DWZCn+jekFBMVZWLgmi2an3Gb/Tx2UNMuJ\ndlb0uP+ooMXFbpi3W4yMnf+wUpuOlwjMQqRIpTvUB0cLNsSVDj+5amFJl3aj\nDrFY\r\n=0X9p\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC9AI8/ts5ai9GQ9znTjse1fFk0t5Q7y9hP+nRW7rE9vQIgOGrsK7eJq1Kdpcz0DYmFl67MUcT/sE7HpO0XSxkoJvs="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.13.1-alpha.39_1575680963602_0.647640123755076"},"_hasShrinkwrap":false},"0.14.0":{"name":"@react-ssr/express","version":"0.14.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.14.0"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"6db9e90b6aa984fda996bfed54fd5432a60f7b80","_id":"@react-ssr/express@0.14.0","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-snF/1EDDW4lvxxp6LiTONA2RCUKYmYYuYoxGigR70mUrHRrz4Prx7eJ8tnZKr5HaX6os9jT2h6NdOReRpdmbYA==","shasum":"6ddf9a8fe508f7dc452d3f764fab297061affe7f","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.14.0.tgz","fileCount":8,"unpackedSize":15252,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6wF4CRA9TVsSAnZWagAAO0EP/R0yc1WBe5Ch23lTn8eR\nId2DLy4KFHeU8NGsfD2P3pq9dvSUyjQkfblyCP6XcBkkB0P/UnY2sMxNKnm6\nTTFQjD3qHh140ag0QvZq+QVFvA2idz3Jl22tjVAX02YYcP2RlxsVf0jgTvL3\nI4k4Pwjr2X9TypH7rvF/2Y9BvknMX+Fc7JBxkPnqVmMBx9PVgYo+83LxSJ4V\n1hRBGGtQqXDZodfci/IKPlz3Z1RGM6UEDW7YMe023XcpQ4iBM47srfAoOwuW\n38yFnZrPDCLA+FSyngLtgE4JMNfW4+aS8Zvk8UqCGSE567lIGrd61l4NjHlL\naVkbEzwfTKnVn2BfzFiFMzo4owhiom+1Qa1k1boz3P2WEzuyaM1TthqhnEDH\nXZ08xmTCFBTp7NUKu1qnqvE3qGP5WPdYlyBRJHjvOwZAT2YJFWVDa15G/jAI\nISGXvXPmyPbDOwNbLPiZ//asK2spXZ6/m8mahiL9fSIs8onPv4Rf6ai7ZiAb\nXucz6s8X8t7kHAwodJEGFXk22qxKEb+oL7JsIZYBzr031JT/0GTuJM59ipbx\nYOaGbs5syOgU28gsthA5yAfFqES++6sxnm78bdDnJAsPuXBw+3VhX335AafM\nmiiKw15mwelb4qEEQQVeQ9pL8lHyrcmZSJrMCSa+9FZIAkMv8e0MggFzeWgl\n7/mz\r\n=jYtg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDYjqVLG/zwhbxTCbNIPYY4Pki17vv7LcsE5Iwrg5t2BAiEA1jWnJqMj4XOqCtBGOSGHl+hbvPHVUtKO0HwHFRNVZw8="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.14.0_1575682423440_0.9664377928158394"},"_hasShrinkwrap":false},"0.14.1-alpha.4":{"name":"@react-ssr/express","version":"0.14.1-alpha.4","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.14.1-alpha.4+8bb1f054"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"8bb1f05452413a7034c2485b34a484d143ec7cce","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  dynamicViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#dynamicViews`\n\nIf specified, `react-ssr` won't generate html cache when production.\n\nThis is suitable for search-engine-optimized dynamic routes like blogging:\n\n```js\nmodule.exports = {\n  dynamicViews: [\n    // this means `views/posts.jsx` is a dynamic view\n    'posts',\n  ],\n};\n```\n\nA working example is here: [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Handle Large Data\n\nWe may come across the error [\"431 Request Header Fields Too Large\"](https://developer.mozilla.org/ja/docs/Web/HTTP/Status/431) because Node.js has a threshold of http request header size. (The default value is 8kB.)\n\nTo overcome this, we must specify `--max-http-header-size` option to Node.js:\n\n### Basic on Development\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node --max-http-header-size 512000 server.js\"\n  }\n}\n```\n\n### Basic on Production\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"cross-env NODE_ENV=production node --max-http-header-size 512000 server.js\"\n  }\n}\n```\n\n### On Development with Nodemon in TypeScript\n\n**nodemon.json**\n\n```json\n{\n  \"watch\": [\n    \"server\"\n  ],\n  \"execMap\": {\n    \"ts\": \"cross-env TS_NODE_PROJECT=tsconfig.server.json node --max-http-header-size 512000 -r ts-node/register\"\n  }\n}\n```\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"nodemon server.ts\"\n  }\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.14.1-alpha.4","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-d8C58Yr2tOSSj8KCiGNW6/ndxwSzIzVHHRqxNMonX5zU9cDIzBaiiF2C+sQOOm9snYSxbczmnFhucUO50OGDnA==","shasum":"647d05edb12c404b8de5539d5a4e0cf43a784158","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.14.1-alpha.4.tgz","fileCount":8,"unpackedSize":15286,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd7cA5CRA9TVsSAnZWagAAU1YQAJQndtoXXfoT+DH8Hjqy\nJR4HqgQCLHT2ayZD0dwXnjTYqava9OF6kVlWODYO++MDil+yxWk79/a/fFtf\nK0mQ+EcSIhG5jalW0kvEEugE96gm4vwjJ79Kb7wvn8b1/p8sFVJOvVnzZNWc\nCGfyszgiJkdSfZssDs/JoFHDVD2ETMYX9dgcSY1x7MNuWbgMvxQxPDeZ9cUx\n7+IcYgjcEnQwAo9m7cUMEMYm3A1WdWPDppVQ2yG98vX/aDscIQYBZWRyU9Uq\nXgvvIB+4gCmIxPYEHuvd1G5b3hbRfW4Ypib8MZSvzvEGVc4APHbm1nvE+wEy\n+shrZak+vkuiLcmod6X047Lro5Po/u5Z/KXlhxZOTuMWLPdmiBGiHYoni+Ss\nncZVlgCV3cVcf/+zR+rJWPezXNwInxM37uE7SRHFUJbJmOu6gLCWyrh+rQOd\nzWMn0zB7mmoYF3ZatlbKICiHCMxNW56BTftntK3HjBlsW/FGbnnCyJKHwgm1\niPapdWQi8E78i727HwGAG6GcY+/dUVCLZvoXNcZ8UTW8AbKMqt2PhRHUqelU\nl65mnozU3ZpsvSjT90sbor0WB57OmDDHqh/5ScFSyOiF9xESKxQCAYLlOssf\nLwG+enSVdmJCP9KU/Iwzp/fn0owXOneghUAFy3GXyqpr31i2a6LYkusM7t9x\nRtzm\r\n=1vvj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCb6XB0be5fckqpSmbAbgil1L6S3qADpTNmlsTIOeUaLwIhAMH1Eb3dB39+0jAnaWUZ8vUUvHwi3qw9eKQw4xDpLKVW"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.14.1-alpha.4_1575862329256_0.5085767216548098"},"_hasShrinkwrap":false},"0.14.1-alpha.5":{"name":"@react-ssr/express","version":"0.14.1-alpha.5","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.14.1-alpha.5+27688dca"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"27688dcac3077bca3f77e5683a90feaf7bda3463","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  dynamicViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#dynamicViews`\n\nIf specified, `react-ssr` won't generate html cache when production.\n\nThis is suitable for search-engine-optimized dynamic routes like blogging:\n\n```js\nmodule.exports = {\n  dynamicViews: [\n    // this means `views/posts.jsx` is a dynamic view\n    'posts',\n  ],\n};\n```\n\nA working example is here: [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Handle Large Data\n\nWe may come across the error [\"431 Request Header Fields Too Large\"](https://developer.mozilla.org/ja/docs/Web/HTTP/Status/431) because Node.js has a threshold of http request header size. (The default value is 8kB.)\n\nTo overcome this, we must specify `--max-http-header-size` option to Node.js:\n\n### Basic on Development\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node --max-http-header-size 512000 server.js\"\n  }\n}\n```\n\n### Basic on Production\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"cross-env NODE_ENV=production node --max-http-header-size 512000 server.js\"\n  }\n}\n```\n\n### On Development with Nodemon in TypeScript\n\n**nodemon.json**\n\n```json\n{\n  \"watch\": [\n    \"server\"\n  ],\n  \"execMap\": {\n    \"ts\": \"cross-env TS_NODE_PROJECT=tsconfig.server.json node --max-http-header-size 512000 -r ts-node/register\"\n  }\n}\n```\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"nodemon server.ts\"\n  }\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.14.1-alpha.5","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-9sqC0/mgo2dadD8++FBe66OOqbo86sns6FofMKb+nj6pX4H9UY5GC5J28h6/Pn9tnokWJA94JUNGDZXWbe3o1g==","shasum":"733387f23fb374e633977479b5202a02d225d3a7","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.14.1-alpha.5.tgz","fileCount":8,"unpackedSize":15286,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd7cH2CRA9TVsSAnZWagAAwaEP/3mI5dMUSuNToc03Us1/\nE54D46XfsaZcdULG6grrDiOLsJyzkEGaxq1HNbjdrsolsOHGEudXpa/A4Vok\nyFxyYwQRtoaZeD+nkEJY/6vTz5l/sQLL6dgSAsoqwisLIY6RD0Ec5eqzP5L+\nOqON5e75Z45Zc5MmwCYwHgeFistjqL2eWm+gR0D2wlcdSyOL51SU9YM/hxFu\nH0kTp2XfGuqD83QkYCmJh/kwG3TTu9n63YGUFlWaIIFNr6jVT2xGL/ApXPYV\nDqKsHgfLBaTHi0Qt1sDqNN1IwWn9O/AgbNFNFgfx2hDkVVmn9QEKb+qZ9zQr\nZCBjsDS+6olk5EktswaBPJjLkx+MpsjxHJagkv5mvIEZeGlRJ3dV6/tLkRDL\nTf+pr+aMSmdQkq+PRi8mxgq8f196BS/RULe0dfcicrZRceIssOFo0sSeUmOk\nZhru/NzMXpEmRtOPYb4pJQoNT2BRfYHTpSpz6yZfcs4k2f+ihpi5myhebnFq\nCQtInYszQhFDeTfJ1GHsCrE5WYu44XDossTK7xTSm+PuTdgYIysYMKhKWv2H\n34B5QT4QSPqzGdoQ7QEkU8TZt+KieeuSNvsrJgMt3vH0QzUJIalFf7xw4KYH\nPS3oeArF6AlC/2+Vj8n2lAphS7quBj88miuiX0xjbEZxSwMk9aVhLzS7Ozfm\nLQoM\r\n=VLN8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCuNMhP4Jzn4MchvcXwWtWnDh4Ou2aBnd3I+DU2NBRlOAIhAKsqKEm/wwwFgra8Y3/cxvKF9ceXVzs9kZzVJphmKhmz"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.14.1-alpha.5_1575862773860_0.9802642660766725"},"_hasShrinkwrap":false},"0.14.1-alpha.6":{"name":"@react-ssr/express","version":"0.14.1-alpha.6","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.14.1-alpha.6+a5640dbe"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"a5640dbe95a694186fb8a71ea752dd30bf28e976","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  dynamicViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#dynamicViews`\n\nIf specified, `react-ssr` won't generate html cache when production.\n\nThis is suitable for search-engine-optimized dynamic routes like blogging:\n\n```js\nmodule.exports = {\n  dynamicViews: [\n    // this means `views/posts.jsx` is a dynamic view\n    'posts',\n  ],\n};\n```\n\nA working example is here: [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Handle Large Data\n\nWe may come across the error [\"431 Request Header Fields Too Large\"](https://developer.mozilla.org/ja/docs/Web/HTTP/Status/431) because Node.js has a threshold of http request header size. (The default value is 8kB.)\n\nTo overcome this, we must specify `--max-http-header-size` option to Node.js:\n\n### Basic on Development\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node --max-http-header-size 512000 server.js\"\n  }\n}\n```\n\n### Basic on Production\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"cross-env NODE_ENV=production node --max-http-header-size 512000 server.js\"\n  }\n}\n```\n\n### On Development with Nodemon in TypeScript\n\n**nodemon.json**\n\n```json\n{\n  \"watch\": [\n    \"server\"\n  ],\n  \"execMap\": {\n    \"ts\": \"cross-env TS_NODE_PROJECT=tsconfig.server.json node --max-http-header-size 512000 -r ts-node/register\"\n  }\n}\n```\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"nodemon server.ts\"\n  }\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.14.1-alpha.6","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-zDYN9+r2Gz6K9OH1VcYplkachnvfoVmsxL+GvCVQdw+Q4l3CmlZn+pa9hWGKEI5WEy0+ZPDi9mZw6NqWwfcnAQ==","shasum":"f5accaa7f5a846c6cf3ef6cc5d20cb57111ab6ce","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.14.1-alpha.6.tgz","fileCount":8,"unpackedSize":15286,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd7cLoCRA9TVsSAnZWagAAPhwP/RX3FTKGjDiMDPCYQ/Wb\nr5KrYHzYX/2oQVc+hXdf3Xqtny77KR+zllody9dyWiSt8J301cX3rfoHAPvT\nmrvDY5IAwpfnwL4mUC9eBbYs2csC61OtMKoBpa8vvabcwqsQP9RCmsdasI0x\ny0ahvAK5BDkWlrgSC0WHuI5DBai0cCWmdiDVaeTehAWMwon59Q+lSDWbGVZ+\nuD0NGSFb7WGhZg0p741z/Rtbz7HSwo0ZND2LX5gZuCLGBAKRdTtXzdRxuGjF\nz6Eosw6sHrNXESOSepNyqcj//kvPMSDRuPXuv+GtB73AGy0Uv4fXJzLjWh+F\nikxWQcynxBujeHeyxqQotwczUEZUZ9LI2wuBKv4e2IyNa7G9/0VMb6Uck4Zm\nF1EepwvCvpIvF9ziBxL2fP+3V32pz7d+wTMUmUQCNFiFsod51wscBSIrCtCU\nxT7PVZFhGIFKeH9Z2yJZvfd1iA2vAMnI8lfiQ/5XzJSuXS68zx70LZxAHcas\ncgIkMw96sbDiWz6zzgAul2S8AAFgAf8r/9nbayV0iU5DmZJ24d9mSpgWtOzY\nPVFE0oTCLsKkZzNUy4O6P6bCTcwSt02SlbtHlzSEjTByrIkfgbYauo8f8r6Z\n+z6NVd0smRRFRCmPjFrYPWPpBbt0g1xb+Fvrz2pXMiRTOdI14J/nRbDY8tFH\nBjMR\r\n=KZcR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDuJtSh7oJZljdw6yGThqMSUtaziHZeCBSHS//IWwxEBAiAfDc6qrWQOziaFVylNiqlsueFyLo+FbEQk3HXHsXYY5g=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.14.1-alpha.6_1575863015616_0.5805325754232555"},"_hasShrinkwrap":false},"0.14.1-alpha.7":{"name":"@react-ssr/express","version":"0.14.1-alpha.7","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.14.1-alpha.7+75267e24"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"75267e24453b29f574bedb66705c00a160046ef1","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  dynamicViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#dynamicViews`\n\nIf specified, `react-ssr` won't generate html cache when production.\n\nThis is suitable for search-engine-optimized dynamic routes like blogging:\n\n```js\nmodule.exports = {\n  dynamicViews: [\n    // this means `views/posts.jsx` is a dynamic view\n    'posts',\n  ],\n};\n```\n\nA working example is here: [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Handle Large Data\n\nWe may come across the error [\"431 Request Header Fields Too Large\"](https://developer.mozilla.org/ja/docs/Web/HTTP/Status/431) because Node.js has a threshold of http request header size. (The default value is 8kB.)\n\nTo overcome this, we must specify `--max-http-header-size` option to Node.js:\n\n### Basic on Development\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node --max-http-header-size 512000 server.js\"\n  }\n}\n```\n\n### Basic on Production\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"cross-env NODE_ENV=production node --max-http-header-size 512000 server.js\"\n  }\n}\n```\n\n### On Development with Nodemon in TypeScript\n\n**nodemon.json**\n\n```json\n{\n  \"watch\": [\n    \"server\"\n  ],\n  \"execMap\": {\n    \"ts\": \"cross-env TS_NODE_PROJECT=tsconfig.server.json node --max-http-header-size 512000 -r ts-node/register\"\n  }\n}\n```\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"nodemon server.ts\"\n  }\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.14.1-alpha.7","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-GclM5LkIW3jcjlEqlQfIV+SZERgKEcu0FmHKKM/tBusD1Yjl0cCE+Jmr78L1I3KM5idgZ+9nd2dLBiYF3+6/Aw==","shasum":"459167c0c733c36f7ea14185e7721d8cec66924f","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.14.1-alpha.7.tgz","fileCount":8,"unpackedSize":15286,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd7cQ8CRA9TVsSAnZWagAA6AQQAJ3y71RVSkwnjjy4rQzt\nN+2OBoYy2+QUjOuByf2g+yHU1kiHjbBgkbGQIkr/tSTcBmh2pfjQ5BPhUKoo\nUPsbfeihdPpk2MKSA84zUU6PYZOlXxmEe2tCzYpvr6wE7TUEa9MRnm/Jww8l\nS3LVyuR38SK0a0m9Ee9ougJb36mA6cud3j4lXC7se4VLrmJ9h7/bh6o81yi/\nF4id7g09Wjo02m4N1Sz5QE6LQ4ha/HM4zszyyYFafDwU6ADl13VAy8K8UVM5\nJFqYy3sPsuy8mRwjX/39ofOeBzf1GV3Pat/Hdc9tqrIrjSLTl8vsHMYUQmMf\n43aJtFAEoTD/CV/raKstlwDLp3NYfahJ5sk1xfTgszQfsrMHYZdGvDhAijlY\nL1CMeqCKqIaoZBt5ykGBpdHaDbTLLl48SIarI4avJyEgAqBNw8LS3APeD0hl\nAEInGyqBp5lf+63hbsyLhBQQ3LkeKfZ2u9l8zl0xWht9dKv+i/7BjFgHie8N\nbj/FNVleN0n2l5ikT4d0e1bBTZhKl+R5VIdYRcr7IoTDwRF5pGhf2l+FuE7v\nvUcszqnsYRsdfEjWMWiX/1eqT0zHLX6DRzWLuyoid6sJdlsDanAGNm9Dj3qu\nLEf/oTwAQ0I9Xp6XyLy2dfldWluxs3n4fiMHH4PWpk/IAhR4DSrMXcD9g4a0\nYnnb\r\n=B6wg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAvOb82Aa+Yn3463OFcupkhlJUn8xGdD30Dar2C4meiQAiA+GKhp5ZWnh/ogzU206vOx0bgbyfUAzykYC1G3fFZt+g=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.14.1-alpha.7_1575863355775_0.40681654434400416"},"_hasShrinkwrap":false},"0.14.1-alpha.8":{"name":"@react-ssr/express","version":"0.14.1-alpha.8","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.14.1-alpha.8+a8eebb44"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"a8eebb44286de5450f639b4aedcdc38441192680","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  dynamicViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#dynamicViews`\n\nIf specified, `react-ssr` won't generate html cache when production.\n\nThis is suitable for search-engine-optimized dynamic routes like blogging:\n\n```js\nmodule.exports = {\n  dynamicViews: [\n    // this means `views/posts.jsx` is a dynamic view\n    'posts',\n  ],\n};\n```\n\nA working example is here: [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Handle Large Data\n\nWe may come across the error [\"431 Request Header Fields Too Large\"](https://developer.mozilla.org/ja/docs/Web/HTTP/Status/431) because Node.js has a threshold of http request header size. (The default value is 8kB.)\n\nTo overcome this, we must specify `--max-http-header-size` option to Node.js:\n\n### Basic on Development\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node --max-http-header-size 512000 server.js\"\n  }\n}\n```\n\n### Basic on Production\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"cross-env NODE_ENV=production node --max-http-header-size 512000 server.js\"\n  }\n}\n```\n\n### On Development with Nodemon in TypeScript\n\n**nodemon.json**\n\n```json\n{\n  \"watch\": [\n    \"server\"\n  ],\n  \"execMap\": {\n    \"ts\": \"cross-env TS_NODE_PROJECT=tsconfig.server.json node --max-http-header-size 512000 -r ts-node/register\"\n  }\n}\n```\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"nodemon server.ts\"\n  }\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.14.1-alpha.8","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-oOVgGSqti8hhq4+rga8DWx3hAM4ePNIeiVJuir4drKFF/YRCi8/Lf3JSmiLOsp5xUD+gcnkOOHCyDOaMf+a1dg==","shasum":"69319180c61302be83b2608518d3a6b65db43c37","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.14.1-alpha.8.tgz","fileCount":8,"unpackedSize":15286,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd7cXBCRA9TVsSAnZWagAAXxsP/1IG9mW6VtBSBm/NNnc3\n33lhVezJTn7jwz9An/Emuc2BwcrrS5jHvnm4BWbSJRUAO6ZH3ubYf/FHT7tQ\n37Jw9alkI8jLBtZKVjy7jFHE+VYTnN1ePaKTrtkz9bA3sK0nyj6Qym0gjd3G\nPZCTn5IsRapglTfZAOBXn7pv9+ohxI1BWkVYsYnP9NKy4Iu6LOjTUA0lGH7H\nRJwXwfS2xgaSRPKIuOLfOIQlrmcO/s4CiPwDolP75DrPRodd04CyaMQnb+ze\nrxt/tlMu7lC0O4MT3Mmr5jQV5dWxB2QqKgBQncCygEM7czs37hAheCEgZNjx\nSbitVjC0pP414qeLp1OQKt95e1vocpy3cQBB9MOsa5ZPlGLpE393XFCzExxM\nDDv/RgDDfTW8OatnImZdA0yQQ4noiqbnXxPNvXs5rBOq3horN5gROcqd3XHQ\nHQhwtSHUX+p7GdunjOE9Q21o/qebKd17Px3wwZ6CCFHKdiLsweStruhF1Svv\nQatTS7oYj8iCCWKHSQd78BP3f5kBRbvuOPVJapzZGDbcXBBRf69FcsY2naqB\nwjz2J4kTan1CXGgpw9IKjc3Ez/XUDDiES5zZAv40Vbt1ZtCVCSHWK5ScuV85\nDJPh1mHWT7Fbym9x7wigYhUycwuMTns6upoNc4dudgyEr2MUMeNEqztKecn7\n+Xt/\r\n=k3mA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBNSGfseyCLATvLTR10X0vkbO7XUTEIC0RilPkphr7fMAiAZmsfFS13UjJukgkabPjI6AgNjSIzSVPe13qm/Ja7Osw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.14.1-alpha.8_1575863744715_0.19614458282727787"},"_hasShrinkwrap":false},"0.15.0":{"name":"@react-ssr/express","version":"0.15.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.15.0"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"4a7c33e60247c55915f2b90b2b2e777309e58c44","_id":"@react-ssr/express@0.15.0","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-0SwtVGUs/8Ow3V0Wr1bltGRhEqfxiV3dqFLr8HvzrAVvGPUmd1kEpYoS022VIfuJsrcEdpMLaM1yEuKhre7G4g==","shasum":"5f1de5507e53274b91954c15364e89f5aac7849d","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.15.0.tgz","fileCount":8,"unpackedSize":15020,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd7ciGCRA9TVsSAnZWagAAiN4P/1yLjyJEWCcWzU4FC97A\nxhAkZhZxP+LGHHxKGZ/Kkq9+Sm+EYN/fjsmenopgQaomGEjxTaqMNB5l6FsV\nnkr8wcpMg6+g0cebhozO2v8DxxFCeHkdJrf/TliMrJlm6iOoKs2U1B+v14k9\n6YOFcp7wfJuDUmNS/w9uSojl7mBTy8z9OZMJEFYcnZbgU3ju+UdTffIBJwDa\nWIDDO0kmGzazks0xqk3k2EApwYEnSRfKZX1Nhju3LAV9IMsz+tUIBueIvqB1\n1ggR8Hm3hd6p457tZqWNTGrFVw81rS9pdiphqlWyAwmJRoGM+cAN2kbFJ45l\nG6glSp4CoUjvcfFKuqEc82nBB3eyHxHBgwwKWihK+NfDLPL2eM5d7DxxgH0I\n3txu3s6buJ5CF+iJ5cLz2hGOCTkB3UgvM5aiWXU8dmGSv+jEBwe+s6a9OPg8\nN+JJyVZEJPIOAcq9juRLauLdQmGV1yImisGqgBZ0aHhzdZ6kIfueli/HvWZs\nOgvi2+5yt56LhtXCKTMGgFvtVFZ97QKno3ctdmj4kA5vohavWVFh/ex2jbZm\nbsRNn3gvNbtLwl0SnMIFiU1tmCW1NE4OhBx7FULR/OM70Y3for63QB6wEG6s\nmOLHy78jRB5cEBfLnO3vyuIqXaa+5MdAyJ2OStypnWzn7lo6uwC0Na+nWnma\nurIW\r\n=lvEQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC9fhkkF25kcGdBjWldzSEwCeruBw9X5MG+DROVVs/QBAIgc2Ngrff/wj3HbGBcTbOYHwjOMGqgpOJGwm3S0Z8gCzU="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.15.0_1575864453570_0.5095812821831553"},"_hasShrinkwrap":false},"0.15.1-alpha.2":{"name":"@react-ssr/express","version":"0.15.1-alpha.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.15.1-alpha.2+a2a3aa18"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"a2a3aa1844332dd9ea170fc5b30e1dad8178a788","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Handle Large Data\n\nWe may come across the error [\"431 Request Header Fields Too Large\"](https://developer.mozilla.org/ja/docs/Web/HTTP/Status/431) because Node.js has a threshold of http request header size. (The default value is 8kB.)\n\nTo overcome this, we must specify `--max-http-header-size` option to Node.js:\n\n### Basic on Development\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node --max-http-header-size 512000 server.js\"\n  }\n}\n```\n\n### Basic on Production\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"cross-env NODE_ENV=production node --max-http-header-size 512000 server.js\"\n  }\n}\n```\n\n### On Development with Nodemon in TypeScript\n\n**nodemon.json**\n\n```json\n{\n  \"watch\": [\n    \"server\"\n  ],\n  \"execMap\": {\n    \"ts\": \"cross-env TS_NODE_PROJECT=tsconfig.server.json node --max-http-header-size 512000 -r ts-node/register\"\n  }\n}\n```\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"nodemon server.ts\"\n  }\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.15.1-alpha.2","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-RVRCnUHyY+b13zR7eZ6YXLRYoKX+niQSENPa9It4m+sQh4chiyyHnr3v3ZAuofxX1m9rMkGh7uV5ePnZ7BCiRQ==","shasum":"77a46f36548902e3296636c063540146a9f81d8c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.15.1-alpha.2.tgz","fileCount":8,"unpackedSize":15054,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd7tNkCRA9TVsSAnZWagAAV+kP/22BscLPTB219ndqFu0H\n9fU6MgNMHbVneStYclUa5QDNGK3EgdvJLPfEC8+wryU4AEmCilzafWvErEwm\nN39Cd3aus0/4TgZCT9/NQE1VM/tFMANiVsLzJtzl3zgbgSz1HivvgG1+GdDW\ng2J1YfsxrqODZzXhWgD8xrDF5mh5k+9XiiPIlw13tB3JvZqC5pKuwZak5DiO\nWG+a0I/9SWSONAFCEip/xE+T4jLetHl9PFcX4/9Z6VWFPOI1gD+b9T9StcND\nceJ9tOIa4WsmMWMozl+esffK9EJ5qq3snaHCnDeQxPSf2apzreoRknDtbmt2\n2E2m+V5JmUOsYQq02ZYu+raixSeSbLoI3nvp11sx/ok4jZiezKkc5VRA4SwR\nVUQ2fc066jbddjbjG1JDI/WCYRrZMJOn+zBaSAow8nm4DB8DXXKmv0SNYZfh\nia9vuFw19HyN9BZXgoRatHF9IlyhZB4pMcHSoRnlFHbe10oOIRJNtId7zGvF\nzQnUBZYyZ6eP5rnDyB6Yfre5wfML/I60dX+r//6vWZZV+L5CtHVZjgqzTqB8\nY/de+OKVA4sGM2F0iRL4Tl6cj8WYSOwp4D+lo+mtL7YdwVjZgXDJArE0BBvi\njNMHyRmzOjt2wzgAl9K+vRXOF5O4VXghoYypK0WySNKRlcNrpi5UFaKEad3U\ntkqz\r\n=HE1X\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCiVJ7hG2da46rK/HPp+b48HhIS16XBfxVqLO5onvNVIQIhAKMVs+6GcFCKrfRWvl/vn4TT/JnKPIMEJPMo5eh27FvJ"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.15.1-alpha.2_1575932771477_0.06948555411082169"},"_hasShrinkwrap":false},"0.15.1-alpha.3":{"name":"@react-ssr/express","version":"0.15.1-alpha.3","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.15.1-alpha.3+1d20361e"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"1d20361e8e0b15b2b5628f7b64ff92e91c6cf4e7","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Handle Large Data\n\nWe may come across the error [\"431 Request Header Fields Too Large\"](https://developer.mozilla.org/ja/docs/Web/HTTP/Status/431) because Node.js has a threshold of http request header size. (The default value is 8kB.)\n\nTo overcome this, we must specify `--max-http-header-size` option to Node.js:\n\n### Basic on Development\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node --max-http-header-size 512000 server.js\"\n  }\n}\n```\n\n### Basic on Production\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"cross-env NODE_ENV=production node --max-http-header-size 512000 server.js\"\n  }\n}\n```\n\n### On Development with Nodemon in TypeScript\n\n**nodemon.json**\n\n```json\n{\n  \"watch\": [\n    \"server\"\n  ],\n  \"execMap\": {\n    \"ts\": \"cross-env TS_NODE_PROJECT=tsconfig.server.json node --max-http-header-size 512000 -r ts-node/register\"\n  }\n}\n```\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"nodemon server.ts\"\n  }\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.15.1-alpha.3","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-47CBrtn/p78CO7Q1qUM3sCQ/iAaO3mLs2321sDN+RhXYyT7+CoIFDB5ZLZkq+8aWyWX8H5rMf9SlfU78wVzWHQ==","shasum":"8cff3ffc442b1682ea147bc6cacaa41b11c65ae5","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.15.1-alpha.3.tgz","fileCount":8,"unpackedSize":15054,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd7tYICRA9TVsSAnZWagAA+okP+QGK/T2xqJDuZIHbEpkz\ndXaPwMSYeIoO1Ty8Gs/MZh3Ha/iEowlepNFBzjwUHH35qQclNl6smwsfuemE\nubx0pN6798jMK1jxBlu4JETJJwU1avQjIMkzE7jVGwtOGiK+Lo+rv6Y7LUKj\n5r/pzv1FUDM9fnAGmThO59c7tkZ09bEmmpbyzIv0gv0SAnFSbeFuRcT5hzJn\nABqrALD6muZhZc694G4EONbIiOdvB1HvOZ6VXZWE10lCkqJUTPgNCqCg279a\n3E8p8gxFt0K1C4cpkWkDGqPEw8YX7A0Fmn3MDeEKyigivgFrmhXl1Z1SaD3W\n5lGlUjVxANEzjxVHA14iNGpS3x9J6/5/6Hr35o3lRvVnF4cHSrWm5Pi2tiMo\ndIzXxwFD4uTLxkKVTT9XOzCNu8iaLFnlFBPyTJvFZB9A2Wy2AuYbwahQeYas\nt89or/p9g81MoLYzJmXIc9aCdFFvUWJm5Qv1fe8PRhbls4enErIMjfA0vx47\nrHPq3An6PGFKKLViO/4exgMV3c1y94CRtMLgw72poMWZvzxVFxH2MyTiE+QT\n1QmrBZvXISSLSw2II+Vrh26i73hmxbV8mFW0U5TepQdhWmFCwNdYovnhAv9M\nKjx+zDin5+b2jzXB1zBwA4P9lyh9M6Z1Rc0colrqtnLbXzQ/cJWyj3fg515n\nMYzm\r\n=fUhZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDnjwEdP4ibQ9KWyOPzTbJd5q1kvJQ0oRVzK2oGfFirNQIhAKJu8TQCr+4liFXpmR23H2xq8lS64vXvhJdmRxQ0nmZj"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.15.1-alpha.3_1575933448431_0.8861786820308792"},"_hasShrinkwrap":false},"0.15.1-alpha.4":{"name":"@react-ssr/express","version":"0.15.1-alpha.4","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.15.1-alpha.4+f053782a"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"f053782a9c42470060d74eb4bc092b168ef75eef","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Handle Large Data\n\nWe may come across the error [\"431 Request Header Fields Too Large\"](https://developer.mozilla.org/ja/docs/Web/HTTP/Status/431) because Node.js has a threshold of http request header size. (The default value is 8kB.)\n\nTo overcome this, we must specify `--max-http-header-size` option to Node.js:\n\n### Basic on Development\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node --max-http-header-size 512000 server.js\"\n  }\n}\n```\n\n### Basic on Production\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"cross-env NODE_ENV=production node --max-http-header-size 512000 server.js\"\n  }\n}\n```\n\n### On Development with Nodemon in TypeScript\n\n**nodemon.json**\n\n```json\n{\n  \"watch\": [\n    \"server\"\n  ],\n  \"execMap\": {\n    \"ts\": \"cross-env TS_NODE_PROJECT=tsconfig.server.json node --max-http-header-size 512000 -r ts-node/register\"\n  }\n}\n```\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"nodemon server.ts\"\n  }\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.15.1-alpha.4","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-y5rl6CNGRJEUYkifcUhnf8xYq9SQZadZHlL0xQQ4m5TtpQJDxtEW2V35vvaHkjhwU1zNHfoSq09hIuFAoR/u2g==","shasum":"740a5d0a3af50acd315bdbbe20c005cde5f19449","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.15.1-alpha.4.tgz","fileCount":8,"unpackedSize":15054,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd7tb/CRA9TVsSAnZWagAAvq0P/isy8G0ShLfboKnRmHsl\nm0e/NlvEMXJ2VDs4DeJZft7xPK5XiMDvkI/I2S1vyc5T+pfVkT3lmwAreKyN\nFIunkregO8/0zhaN4zmyMJoRvgIDjz0YTCfLOBAccT8Wb7U99Zkty+R0BNTZ\nOAnyCyMw0wk22X851jqT9qmMiTJQeo3APKQzUppwC4K/BSGpC7Q+Idb/TeTS\nGfDrSQ4gqSjSgn/3zNM3XbXmyI7A5dHLg762I7FQcQZjL0yz5905AnVGZF2y\nKv23UQKOQ4c3oo/DmO7o4gaGWLVQ0ZMxKwKvNrNF7sJACUdw5+kM1mCQDXWL\nEOqLhE0DypRfskWGMKTWkDjG84i2w2csBBWxhMtGRlWFds1oYKx6AKcI+Dal\nXLlWU89AX60CqXd/Ru/cH8fvuP0mLs9M0N9oufXSjk+zz/JEoEr/VpHiXxoy\nRx8aVAGuA5l9Dv+x8d0j5ZdhWP/v5EihKkAXaqn90aSsYiiMl0GLsKUeFpir\nuZZ1sPv8SCrxlJ4J570yasiMAdFt7sxmtAAXlY/qfcDbCjwVERje5XfFzUWW\nnLHXsG31yg1RG7QBtcyGRVDfZz4aSb5RAc7DKCD9jOYLqqa3IhLAPfE2dSKb\nsk2GR9M2rHGx0duh+opc+h3cwSGd0ocsVD2gzfTGa7wlXno+7JL5+Yg1RjqX\niCrP\r\n=45ZZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIARoJ90W86eHkZFLU07VrAOFdzx2PgZaWbSvcEckdg+2AiBi8m7XIfXA+BwQKjq191fKumiij7t4yYrr2Id12DHyXA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.15.1-alpha.4_1575933694742_0.1141626522867012"},"_hasShrinkwrap":false},"0.15.1-alpha.5":{"name":"@react-ssr/express","version":"0.15.1-alpha.5","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.15.1-alpha.5+4a6d3e2e"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"4a6d3e2e14cdb7145c8cc76c206db0872450e2d4","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Handle Large Data\n\nWe may come across the error [\"431 Request Header Fields Too Large\"](https://developer.mozilla.org/ja/docs/Web/HTTP/Status/431) because Node.js has a threshold of http request header size. (The default value is 8kB.)\n\nTo overcome this, we must specify `--max-http-header-size` option to Node.js:\n\n### Basic on Development\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node --max-http-header-size 512000 server.js\"\n  }\n}\n```\n\n### Basic on Production\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"cross-env NODE_ENV=production node --max-http-header-size 512000 server.js\"\n  }\n}\n```\n\n### On Development with Nodemon in TypeScript\n\n**nodemon.json**\n\n```json\n{\n  \"watch\": [\n    \"server\"\n  ],\n  \"execMap\": {\n    \"ts\": \"cross-env TS_NODE_PROJECT=tsconfig.server.json node --max-http-header-size 512000 -r ts-node/register\"\n  }\n}\n```\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"nodemon server.ts\"\n  }\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.15.1-alpha.5","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-p3nERllSFP15i5X2A+4JtmPc0bR8JNu5DN0Ja0xJkKv4skKYujUblcFuKkDdotSPa2obBQMKvCKNYtPdaEgEPg==","shasum":"c9e9409f1c421da0026700e8536aa8d8e51725a5","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.15.1-alpha.5.tgz","fileCount":8,"unpackedSize":15054,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd7teqCRA9TVsSAnZWagAAH9kP/120S7CeoRp57LXGm6Gk\nvs/KBsvBDZ5d+h0zIvlfrH3tBMLFVvSd15v/vOmOlSXvFHtPhb7TS3G786lA\nzoUAEz3kRGjhUml0ceLnz+nsqrMqm83Qrc0hWW2uMStod4XpYFcujxzvgIJ1\n0EBLot4X6AflC+/JyEHKPNByuEGWOIVimZYjNEgBLmCAaxzPbhT1E0W7vLrJ\nMAFttfXw4WPnZcCxuaWR33ouIiWNKv9IFdRjo4uogYUEnF1CTDOuZY27xvg0\nNA2z2doh1AHHrCaki6xzR591/REmARu4673PxQITLqQq7vXn90BsioZzjRBl\nIDOecMjqv42DBf1CFRQiebxg/7uSNZyPg43q9sTY7YFd1nNqVfv4EOgY+8K8\nrFX8OF1PmjDNkbkXcd/r5efP1kP7slgxgbyCdouTKLfCMouoJgMJfe1KDFoW\nOjF515wmepRMw+IUJaSLUzvwdYZLrjUNwhyK/VLfSc3641FmNCn+2cB4kRa8\ns2sM0mrG7jyGTgpQeqdID6zuNKxXD6h6WmPyXcApwV0UCl3j5br2zJVIUKPE\nxfh9+BZC7EE3bEbtta49CqduH8HHP+fHsRmhHAZvzgmhIidB3BTn8yqXthgP\nKoMWnOwgm+DspCIwD5ynK+aFxHvSddG58RiDbJiFJp7CylGb7sHpJc+V+ntW\nk2Ai\r\n=H+tI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICagZyXyV7akCba5qcFrirDgd7kzr7G9UtaPztLTo7mXAiEAw2Fb/6sek4us0V7i4N+aJMfEOG1xbFSzIP9Fjhqbt6g="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.15.1-alpha.5_1575933866420_0.3613672613215644"},"_hasShrinkwrap":false},"0.15.1-alpha.6":{"name":"@react-ssr/express","version":"0.15.1-alpha.6","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.15.1-alpha.6+33fd0f8d"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"33fd0f8d1f04a7c61c05680455191021da3fc88b","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Handle Large Data\n\nWe may come across the error [\"431 Request Header Fields Too Large\"](https://developer.mozilla.org/ja/docs/Web/HTTP/Status/431) because Node.js has a threshold of http request header size. (The default value is 8kB.)\n\nTo overcome this, we must specify `--max-http-header-size` option to Node.js:\n\n### Basic on Development\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node --max-http-header-size 512000 server.js\"\n  }\n}\n```\n\n### Basic on Production\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"cross-env NODE_ENV=production node --max-http-header-size 512000 server.js\"\n  }\n}\n```\n\n### On Development with Nodemon in TypeScript\n\n**nodemon.json**\n\n```json\n{\n  \"watch\": [\n    \"server\"\n  ],\n  \"execMap\": {\n    \"ts\": \"cross-env TS_NODE_PROJECT=tsconfig.server.json node --max-http-header-size 512000 -r ts-node/register\"\n  }\n}\n```\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"nodemon server.ts\"\n  }\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.15.1-alpha.6","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-6gpxFqwqL1oba5DtanhR6U5u+KxZDvzjVmJqrcVFQ5aNvfumwatj5zSDj+gRSzdfMvqvYq6DQrChlXUSAS1V5Q==","shasum":"ff8fbd8824b03b3058558881778e2b04da61be72","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.15.1-alpha.6.tgz","fileCount":8,"unpackedSize":15054,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd7th1CRA9TVsSAnZWagAAeHkP/RP4kXbOg0gCaJwtYyIg\nrbWFfNVOY1BhZRctu3VXFGbzfd+z8L5nfmehROnaekGfkjDCEgGxqP3hiTlc\nOByIjAYvE2QUgaNjEe+nWTueGHmatVC/Eqs3mdZw6iuQyBjrXq7/vX8UTbHm\nidc8MfUp72tDNwVsfw9Y0Eh/f+F22mYGj6fx0n6jj01GaXKHD3cK+LAl7V+I\nwzMxYiomU3G2JCf9M9uYQV1m/TbDDnhbUSbnsN+2GGQKVu5ZadyVLkouhsVm\nL+aCexy49M22ankvpxgB1GTmowf8qoGYzuLEGp5MGZ9/P3PDNdtIDGxoMp8D\nT+flgq1Jo0R4OPLoTlDWyqZ7WhsT+ORd328b40om6XDeXWpN4bEa+mNL9KYR\nepvw0fMZPBqJEhluOfoSb7yMwRc7eEA3Qv7CwaiiKbJtG+/TnqHaagiw91hW\nqNrgXSAsWYHO/zxGbzPQzds1gDEpehPxMF93oFztF3WJpg21qyTEaRChTJpj\nSqYtygi7qiawa6Q+qj+sGHEj/s2SUQWDvZwcolR+BNuDF9fw18nDzmMuZ00/\ndvOJUqdHOLrb/NmzH2y3iqobSH95/WP3Cz2vxhoou4vgczIYw5wbdqKal4zc\nHgsJdh6gZff9N1zX+xRofyWCXIiAMh1PmkXj+sJ0Qmwb+y7Oig+w2RRE/mr7\n8PGr\r\n=Q/Re\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEWmUIi+cKuVQc/rN7t/ZxxIoa2vFiqahk2H8hMeImZZAiEAoEGMiUQwOs2+Ka9CcPAFPlGE4a9IWkkN/q+blc4Nxso="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.15.1-alpha.6_1575934068771_0.532421125636849"},"_hasShrinkwrap":false},"0.15.1-alpha.7":{"name":"@react-ssr/express","version":"0.15.1-alpha.7","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.15.1-alpha.7+8906641a"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"8906641aeb26194c321bde7daccd7136fd8d74cc","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Handle Large Data\n\nWe may come across the error [\"431 Request Header Fields Too Large\"](https://developer.mozilla.org/ja/docs/Web/HTTP/Status/431) because Node.js has a threshold of http request header size. (The default value is 8kB.)\n\nTo overcome this, we must specify `--max-http-header-size` option to Node.js:\n\n### Basic on Development\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node --max-http-header-size 512000 server.js\"\n  }\n}\n```\n\n### Basic on Production\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"cross-env NODE_ENV=production node --max-http-header-size 512000 server.js\"\n  }\n}\n```\n\n### On Development with Nodemon in TypeScript\n\n**nodemon.json**\n\n```json\n{\n  \"watch\": [\n    \"server\"\n  ],\n  \"execMap\": {\n    \"ts\": \"cross-env TS_NODE_PROJECT=tsconfig.server.json node --max-http-header-size 512000 -r ts-node/register\"\n  }\n}\n```\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"nodemon server.ts\"\n  }\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.15.1-alpha.7","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-hgokYy9v8xijOHr4XYUzHKAcjIx7Ome5YkSY363pHBQUCEty+PCMJcMLAIG/QsnoSOKiWllDQet9UmyYK82VsQ==","shasum":"f9fb9f3ee47c4485befb0ebfc5c7f97d23b0315e","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.15.1-alpha.7.tgz","fileCount":8,"unpackedSize":15054,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd7tnnCRA9TVsSAnZWagAAw0sP/3eSf5ufYYBkPCHq0sml\n/7lqNwdP/0ToN2U4+hlhzpvuPfCClCpHq6RGOPM3h846cgu5P42pcD7Yngdf\n1rpd0LXvAaK5leI7xTOCqM/H9y3zTsVCChnpNyQWb2gOSPSihveQ5H4F1r7J\ngmDsvlNkjf7mi5YmYJ8H4GjRqi4YzhfFkYaTi7zIfSmYVQMZCs6fImycExPB\nBlabOlv00IN86J16FC7tyqrDRHF2s5+tnQ2MefRAUrRKJFJ34WXxaXkl+0Ed\nix44I2CDiq6WFMUnUA8exCb27qTHba85Hv3YUhRCwvbWhwnrOQAucSxqBiP/\nhuw4W3Bch7l+/0I7ja63ftgw8Jwa6lQ67TVZsdUc+II+lEgRQrh1Qm6PQHTC\nB1BAwCc05RR6S5dMiLikpJJ/NKia4GkdoQmn52dCRM5FUG0PVeA4JVE/zfD3\n4D35nR6w45zRLPH9G9/I/MBG7p45KWAK+Hj5G2MfvShd7aq5+pIFDcjPABsp\nuDalShDmUvfOeIgGdjPA+JGe/MC4e3S4N1cEKe52rMWemyRJTcgREgzf4LmW\nejA/G02YdI6hmPF16GQq0tQtJcolKB3ThfjF1jsXfo9IHztfiqOJXxzmTw5D\nuHJLaSTdxTBAx0Td8vnDZT7tAfClTYCWQ3X31ySZHeeuAqCpz0/NbqubDKMy\ntNQ3\r\n=5rvx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCW6/92nkwhEUqP7MyPEJ4XHuEy253A1CI7MQ8GIocM2AIhAPPiz/AKYKuWFVe9lfZ9ueFyFBS8gsTpM97xp9GlcJNL"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.15.1-alpha.7_1575934439085_0.5144834277329644"},"_hasShrinkwrap":false},"0.15.1-alpha.8":{"name":"@react-ssr/express","version":"0.15.1-alpha.8","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.15.1-alpha.8+a14596a6"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"a14596a6dbbd595c5a22a88bd2486461da25001b","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Handle Large Data\n\nWe may come across the error [\"431 Request Header Fields Too Large\"](https://developer.mozilla.org/ja/docs/Web/HTTP/Status/431) because Node.js has a threshold of http request header size. (The default value is 8kB.)\n\nTo overcome this, we must specify `--max-http-header-size` option to Node.js:\n\n### Basic on Development\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node --max-http-header-size 512000 server.js\"\n  }\n}\n```\n\n### Basic on Production\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"cross-env NODE_ENV=production node --max-http-header-size 512000 server.js\"\n  }\n}\n```\n\n### On Development with Nodemon in TypeScript\n\n**nodemon.json**\n\n```json\n{\n  \"watch\": [\n    \"server\"\n  ],\n  \"execMap\": {\n    \"ts\": \"cross-env TS_NODE_PROJECT=tsconfig.server.json node --max-http-header-size 512000 -r ts-node/register\"\n  }\n}\n```\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"nodemon server.ts\"\n  }\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.15.1-alpha.8","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-w2IYd4Hj04rdrwWHasO7AYklOY4JSboa7ihIMHtly6KU9ayGndnrLn6qGV+LeJMjGSzeSxNdsZ/GXCrvfktQlg==","shasum":"90cc357013d78c3912710b95c2be6c6594b9568e","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.15.1-alpha.8.tgz","fileCount":8,"unpackedSize":15054,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd7tqcCRA9TVsSAnZWagAAUE0QAJlZV3269hKD1YGFmchI\nJRLM7TyJgHIVFese4AGBV4Eunkicap+hGdBZ3X92gcpsK9NSOeW0Gt77ScOP\npIoM3dsHQMrBDR+nW/6pq7qHLUCdOU0SV3yVlbQZuniomTC36VM+KYuD9IW8\nrZJfvUvsWCXgxOII73KdBvMKOmeMjTe1SmWfY/rCInyM09V47Z5jMUIxWErq\nSbbmITlVK8lhURCeIbjd2vAGRVGVrfOtGzqDXAX7Tr2FizjWxbBmYGFxfQ62\n5KYMXKBlKziojTYb42XmmX3EWA43teL+G/UV2CFF+C0BTB80naOBp44FKaFW\nTaNECqM9p8B1LnzBiPYrP1+W+nyeabXy2kbLlciDnMv9fNPV0eee6BLx6mOx\nntfaerWpor9JPbv+XtcWe6RLmrn+p42Z5MkN/xiXdsEp6OuVbt1nPwOmVqpM\nvIN6tb5scoAde+mCoeUlZc5RS3mSrrCyt/n84egXs7fptOKp8jj3gDhFZkaT\nU0/JlNYzWE4TD7IU//XSlSwahnbKRWZUQjHqtEGpuA8SHzBqOkBY7ude0+Qn\nl1LL8FBSRpUFHjZHzSjsH2pDG2+N1DRt6h8vxyZuNytuKG9vGIJ5+61wSIKz\nXV48P4ELgheG90Q9IX/KfLsYGzI21s8+O3DwuelPTNAgQ7IjIR9BGZf9rwWe\nAqd/\r\n=kNlm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICUX7gEbI7BDXOpeeYKApF9HmdKjBvlNiy2AaMh8fBmgAiBh6snVq2RhQlZjbDeYwTD9z84aXZXsZCPp0qHZpKVFhg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.15.1-alpha.8_1575934620365_0.8093214353323863"},"_hasShrinkwrap":false},"0.15.1-alpha.9":{"name":"@react-ssr/express","version":"0.15.1-alpha.9","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.15.1-alpha.9+16b1cf76"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"16b1cf76a2c6ddda55360d43f0c9ef1fbdaa8d36","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Handle Large Data\n\nWe may come across the error [\"431 Request Header Fields Too Large\"](https://developer.mozilla.org/ja/docs/Web/HTTP/Status/431) because Node.js has a threshold of http request header size. (The default value is 8kB.)\n\nTo overcome this, we must specify `--max-http-header-size` option to Node.js:\n\n### Basic on Development\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node --max-http-header-size 512000 server.js\"\n  }\n}\n```\n\n### Basic on Production\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"cross-env NODE_ENV=production node --max-http-header-size 512000 server.js\"\n  }\n}\n```\n\n### On Development with Nodemon in TypeScript\n\n**nodemon.json**\n\n```json\n{\n  \"watch\": [\n    \"server\"\n  ],\n  \"execMap\": {\n    \"ts\": \"cross-env TS_NODE_PROJECT=tsconfig.server.json node --max-http-header-size 512000 -r ts-node/register\"\n  }\n}\n```\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"nodemon server.ts\"\n  }\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.15.1-alpha.9","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-H/u8YjfmcgGzFCA/DYfQuThhLpLHM0ToJRbKPlisnWNMOMoy5gLJf+anl+huEtdoJcT+/FQnuX1ePyG+vlC/DQ==","shasum":"3064c2f9dd4af1c60c72b6fc23b82d26e3043a55","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.15.1-alpha.9.tgz","fileCount":8,"unpackedSize":15054,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd7tt7CRA9TVsSAnZWagAAE6kP/0jr27ZKd1FDq06J21aU\nJvm9joEa2jOTKh1hoXZ6Pa+DZlgWJaxZuY+YHMkW0dR9Nlim+p50nDI+K6BL\n4+WttviHT+Sd5yLYVN36W9YF1m/R5isfUCMaYv8btx8EHvXv+3DTBqf3rw7A\np2A3s4ISBkduemoI4DXVnqiJZSfD+k4EdRHVI0L3x5bsXV/LGBJXJxQghIQo\nCYQCtz5oEOkS7111oYl/SZYzUa6Mg6myF2jbqg8mB9I7DmwcyW2VhgX2PSs+\n2aS6v0P8ogYdJStUbJ4DQjizqZMyjC+Y34vBRFpU2bUCZk5vD8150nA+dIxR\n4TJ6fO9Q4/UsWgMYpeZ0S0KUHdL+3AzGb5TefdYd6k46KiN1dO2IMCIqJcfg\n7qDILk9AoHI7TaT7fgDz4ZnO9DpYS1Jt9ZN7mFHy2nKmWgpoSvgAFH6oAbKD\nno0KL3jA/zzpltfmBJy/ZkIOmWZIRJpUrj+STXsFkPHxvWIjSHOeIZUu6SBX\nDCeJjP5JT6E1FEMHIIKdJaqUXdOG5xRmzPRNHjikiOUJvadAnkTLbZbhwbeZ\nJTgU92DnPXwj3TPzk+XDyZrqT2tiJ+y3nwN44eRnbvHgFhSo/BvcQTF7q+ov\nWlino0e+JF5ATTGi1rgN4zdULnaP0OKQdIxqsn27VFrsGo6w7pF63owxJ1/N\nF4xj\r\n=ygQM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDR7XBcIZeHuff8gVmH8anWGzq8fFjgvujbpu8dQ81KlAIhAJlscd8o62qqLN5ZpXjHXiJtiX00zP0BBu30ybNxfl6Y"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.15.1-alpha.9_1575934842571_0.9065248062482565"},"_hasShrinkwrap":false},"0.15.1":{"name":"@react-ssr/express","version":"0.15.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.15.1"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"81736018e73a33586b2d17d779de097d0e887ae9","_id":"@react-ssr/express@0.15.1","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-ykSTrsgxalDPUhv1PSC03cCcQM9n6yFDnxqU05hHYxn4Yr0N6+w8SyThcsHkpKedEHG/W5biKoNpBGjsfseDEw==","shasum":"c6190b644ae52fcde0f607437d9ede644730c597","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.15.1.tgz","fileCount":8,"unpackedSize":15020,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd7t1HCRA9TVsSAnZWagAAWC8P/A0SWQdwN/qc54vyL078\nI1CnGUTxGgIB3918UO+PnfeAFPliH83FlovhJOf7z9JhUAX1W+bnVGNDw2R7\nlA4LMWyTnk7aIthvac2CUqh/TTY33TJKUFbVPSNcGYFPH/w5HbAyFVmnf3d7\n/5WdYMc5TIq3s3MK0YQ7ZxXy/h1LvmLRKO2/XHlXkn+RaVBZ7qK5jjfGEEzF\ngdBKuwDWARXwkNaqSl7pfKg7/3VculE2zJhG4GZB7C89GMhqcfSaTn4r4RP4\nV1eWWZjEEMf/sxN37pZ8zCW6gr1r8Fp9T4EFg/dMOzuutv/zL3DSPaTpwEAb\nXqgXl3YuoNsch7An8og7DGDv3aim9yf8haWeS5/y1DPnut7sAecm/btE3pg7\ndwB4oEpRQYnJID3ZmVG8Srjm6cron+PDO9IpWKoeMcO2ORtbhr1Xlo7jkSx7\n5BZGQ3rnnbtuu+nnXQrxAw6ic5EMWtK+l9XKxUPJnK89uQskNEucNBsbmxCN\n8WywKb028wKKw71twy5aiR9379ande1w+/YosLR4Ebpo+gX+fWojQJFGaGIG\n8QR8XiUWUZzvtF0t6HfLvTwhr84330OSq52Fd+U5oaH6HhuI2rDFG9xCXDTK\nv07LK11AldfKaVheJPLNn2S1dU0/zMP0QlxL+Jn/+RLfi3o4vAKNHQ2Yrz/X\nt+0Q\r\n=Pzl8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBWR2eF6LleFqqxluyZZ4wA1IN+xFtzhU3G9UzwCM6piAiBdcf5S2ER3fARAapb7+/BOSpK9wI5p9hwioJ6bFJZqSg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.15.1_1575935303387_0.3529929920222741"},"_hasShrinkwrap":false},"0.15.2-alpha.4":{"name":"@react-ssr/express","version":"0.15.2-alpha.4","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.15.2-alpha.4+c6413951"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"c64139515598dec22d2b5e6eadad3488ce7e9479","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Handle Large Data\n\nWe may come across the error [\"431 Request Header Fields Too Large\"](https://developer.mozilla.org/ja/docs/Web/HTTP/Status/431) because Node.js has a threshold of http request header size. (The default value is 8kB.)\n\nTo overcome this, we must specify `--max-http-header-size` option to Node.js:\n\n### Basic on Development\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node --max-http-header-size 512000 server.js\"\n  }\n}\n```\n\n### Basic on Production\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"cross-env NODE_ENV=production node --max-http-header-size 512000 server.js\"\n  }\n}\n```\n\n### On Development with Nodemon in TypeScript\n\n**nodemon.json**\n\n```json\n{\n  \"watch\": [\n    \"server\"\n  ],\n  \"execMap\": {\n    \"ts\": \"cross-env TS_NODE_PROJECT=tsconfig.server.json node --max-http-header-size 512000 -r ts-node/register\"\n  }\n}\n```\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"nodemon server.ts\"\n  }\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.15.2-alpha.4","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-qtjKCyHQikyMuRLCk7Y+/TDYiJ3j/ICP4O9suJgHRwWycVXDaYAEbNoXrwrlCkapYiQRKehp5sjUN9Z2R6CW+g==","shasum":"f5f791ffb37de49ac2a00d39080902d1fcab6bb9","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.15.2-alpha.4.tgz","fileCount":8,"unpackedSize":15054,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd90iyCRA9TVsSAnZWagAA7yEP/2/ZTLESfP/FjjTFvRXG\ndUOOCg2bCNP7CJXXh1lFl38uLlog2x2Q2gUsNXGFfkRb7Ef9aT/aPLwILD4Y\noarQpLcSRyFtNKpZU2e3mgxwNbscp8dzCOle5rrvB67NY6ZpcpYL63ok8vkg\nVtGWys2zDX3zcPo+/Jhcz1pPLhhnsDRYt2tHqPtJ0iO3PpZjsXDzUGbAIFIl\ncTClQKrsCIaFzVwjaTy254FTApyZi5C47sis4EQxTD0Kwbz/56C8+Cv8L2WZ\nCt4JR3XIpcX0gtL0dTjeUAd+xmCsb/IHJTlmdggqrTLSPk17CeRj3dMJ3+NX\n0VS6L+FKP1/RHGWMOtXvL+3iWydNEAVB823mSkNss4N4QWKf4Pj3GkmFh/Ge\nUIL+xYhfVrDJ2bPorYSQa1Pz6XeehmdB2A0XSzb2SP3Ns3NJD1wYHjIkWT3J\nOYn7iHuQq7BZpgNOpPfuVcSpuKf3MD9sFQFOXaHpJRKYUo/2md1fLqjKTXd0\nZc/uOfXHJqy2Wr3YCE4elhGBol857N2plFfE0PUYgyg6w5bJR55cTLdOLwjY\nnr7SXtnfZ4tuKTpHd7Wd7OhP+1MnU4slplKDJ0SW3sXs+l7EjeU4/2DJPzl3\nSG59G3eXLZZuYF21Rjd6UScibQHbuZeV9/1NJ1IyADGL4nI0/LupLjWzp79o\nGJE/\r\n=A0Dc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD27r4fnLiTFi46qIuqH/NyaI/gsh3Myw2kyQ0kRmLrMwIgO4AXmMEpKjBFVTa8aZ0qW7Y8F7lkft+VCmVOHUoMwOQ="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.15.2-alpha.4_1576487089719_0.9000046236019725"},"_hasShrinkwrap":false},"0.15.2-alpha.5":{"name":"@react-ssr/express","version":"0.15.2-alpha.5","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.15.2-alpha.5+9efc86b7"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"9efc86b7e0337cfa1bcba0ee47560c366822f42d","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Passing the server data to the client `props`\n- Dynamic `props` without caring about SSR\n  - Suitable for dynamic routes like blogging\n- Dynamic `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Handle Large Data\n\nWe may come across the error [\"431 Request Header Fields Too Large\"](https://developer.mozilla.org/ja/docs/Web/HTTP/Status/431) because Node.js has a threshold of http request header size. (The default value is 8kB.)\n\nTo overcome this, we must specify `--max-http-header-size` option to Node.js:\n\n### Basic on Development\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node --max-http-header-size 512000 server.js\"\n  }\n}\n```\n\n### Basic on Production\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"cross-env NODE_ENV=production node --max-http-header-size 512000 server.js\"\n  }\n}\n```\n\n### On Development with Nodemon in TypeScript\n\n**nodemon.json**\n\n```json\n{\n  \"watch\": [\n    \"server\"\n  ],\n  \"execMap\": {\n    \"ts\": \"cross-env TS_NODE_PROJECT=tsconfig.server.json node --max-http-header-size 512000 -r ts-node/register\"\n  }\n}\n```\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"nodemon server.ts\"\n  }\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.15.2-alpha.5","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-CMRxEXtXqvcjQEcIOCYHPv2HvOa/651qJaTmNarwzQRw0GGROIHjmyvwodOfbgXvh4wfaPPu4ZA7VCdHgM7Reg==","shasum":"b8afd68b83d337fa0e203e675cfdfac024c11ab3","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.15.2-alpha.5.tgz","fileCount":8,"unpackedSize":15054,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd91BQCRA9TVsSAnZWagAAfPMQAJ1jP7PysP2Imb5YSkMx\nIyj+rXJSB7tfpE/Dq3YKNKKonyF3jLC8Rl3uzwIazTw781bQObd93FQSLs7k\nsuzNv9dLXF0YfWSPGrM49FRhY73Pl4ttKm9CaiFcSw2rZ4TPqFSFa2WSmlgV\n8Dhf2bKCj7IM3LXgSecQz2LGgVbqFWUxiCQyoyLPJzoJ3oFv961cKSPEydst\nox1nKflQUfwtmjn56beKhL3N/DBuImGfg811aZpX/ifaMWws3txWf2fnwTz3\nY+O3Yjiogy3auZ028UcafcnaeHs4hHYMi0sDXWH/Z473uxOC7YfADX7WVts5\nGjqITfMiERNBZFXCPHns/qWNxZTg+pMDG00BzF3KfhbRBWk5JgOdG1nm099h\nI86/yE2t3O/+ozCedqchXfa6R2DlGToobl4jeR3UIz9aWuXs5R6p2hnvGImq\ncRt1aYEATGr1YyDH6Zpfmn/XjmjVCjy2Rpplz+M3MXlAdVE4uWgMA5PoEVg0\njgZnBhey1aw60nv80RxTxDwLvOZbIb0Nf6ljal8oIQcbXdiee50GhTKI2Vx2\nw7P451bVwSzbKwu/x5VSO9Q9d5aT8baMafOQ0yyL1IM8rgiDKl0iWfSYnW1a\nMe+uRYrSaz8zfsfww5lFlsGkc+ABiJIuNgNnVfxMRbFSTq4wssbudQITpepQ\nK0ni\r\n=c8dQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEWQS1b1zLmqdoUwdxHWAHkx8wMrqnyMC6Mns8gObxmZAiEAprf3ABLsifdP9rj5VKGR1I9nF2Xg1IJgHDgeh+aNxIs="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.15.2-alpha.5_1576489039860_0.5778319910347345"},"_hasShrinkwrap":false},"0.15.2":{"name":"@react-ssr/express","version":"0.15.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.15.2"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"12b5ec953c340d4556a1f24bcab6c237a9ad493b","_id":"@react-ssr/express@0.15.2","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-wI0We5JfsM9tTl2efpWzvkCePXE7/pHjWlA3deyF2tQd3lGNhRTCAZ/OQPXCZ98U2o97OCrT61cCJR8DbFwHgA==","shasum":"cde3e91480ced7054ca2cf1e1745c5d169c29857","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.15.2.tgz","fileCount":8,"unpackedSize":15020,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd91HECRA9TVsSAnZWagAAKHQP/REJQl6c/A0u1fCW0HCw\nPbQfN9PPVpCRnpn6te0muB6BrJzlmSMW7kR7wdDczE+CdZ1w/bIahAFHNX7h\nVJWr/hw78orO8AWfojA/AadS4aqtThcpb5LWF/BNDBX2v+A54vaW+wj8R6/f\ntH8ZQ6XAQK+6OUSmPJJecUfRIIljtapTKDgMq6LB8Idj9khx7vAIBtSiqJlN\nVvM3AvwWK5BdHck/UZZdFNuwJTrhsAfgxEKZHYYpjYuzJy3jb9mXPB/lzLTn\nNi763S3LjM6MA7w9xixFdAAVtpHoVU06QlCiJjOaWcFqqqoYtZygbeRP+Pn4\nKJNagcOxr28gKxqryXrchobVm/51UHpLqghETxbMuoecJhRqxhjFqf10mtiC\nxINAFkQE880gD+P7Zl12U1ST1/pkXyYKo/i0J94xdm9DYt6UZ5p2lp2G6J14\nhssLc6437oUwTJ1jlpfB7iO8+bkBhztbR0CLyVpNkopBELlzwaeOhWWPniw2\no9zue5hF+06shMJkiih/YPPVx8BBDmyOE5wGTwY2RS/GJ7wopTbAF0jLycps\ng9Va5OKs7Aw+B8z2PIYmvqI2OOx2X6dVbFU78WJKfRRHOiCZ28DPMjYwXYz2\nhgt5O21HUVA2DxnYI2AMS9PPeyZZbl6pymxE1jiBRvE9kE1yi8h7SF7lizf1\nX0yA\r\n=EkHa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDI7Z066fKRhcWs3gCmSjAslFNfhXhjGZPjESG27OAzRAIgGUmh4u6slhyfKJyx5rZNytF+22nXzXQyRzpIr50r8lM="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.15.2_1576489411615_0.8988934075432242"},"_hasShrinkwrap":false},"0.15.3-alpha.0":{"name":"@react-ssr/express","version":"0.15.3-alpha.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.15.3-alpha.0+53d6fc10"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"53d6fc10d6c1f1f76f0696bd990f7e1a8048a03a","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Handle Large Data\n\nWe may come across the error [\"431 Request Header Fields Too Large\"](https://developer.mozilla.org/ja/docs/Web/HTTP/Status/431) because Node.js has a threshold of http request header size. (The default value is 8kB.)\n\nTo overcome this, we must specify `--max-http-header-size` option to Node.js:\n\n### Basic on Development\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node --max-http-header-size 512000 server.js\"\n  }\n}\n```\n\n### Basic on Production\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"cross-env NODE_ENV=production node --max-http-header-size 512000 server.js\"\n  }\n}\n```\n\n### On Development with Nodemon in TypeScript\n\n**nodemon.json**\n\n```json\n{\n  \"watch\": [\n    \"server\"\n  ],\n  \"execMap\": {\n    \"ts\": \"cross-env TS_NODE_PROJECT=tsconfig.server.json node --max-http-header-size 512000 -r ts-node/register\"\n  }\n}\n```\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"nodemon server.ts\"\n  }\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.15.3-alpha.0","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-GecbP0yeYiZ9XymrXGPYECYDgz70ucLa/PFnOkiFGw+T0A2KHuF0iMObR0+lnmV5QqalYAhQl1bBv5ZJP9ys9w==","shasum":"c8f12370362dcadf429d55c5c0b3e267baafabdc","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.15.3-alpha.0.tgz","fileCount":8,"unpackedSize":15033,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd91NHCRA9TVsSAnZWagAAdVAP/ioSP8/9GUHaEudV2SQM\nV1SilYZdMEphIDKT2aMshDqtKuRilDybsYG0q4RdNBEVkDBVdm8hPDkX6SIp\nxsLH2AdiR2sA9SalGve7fgMQNe7azSaenpN3P8P4/IT1LuySymGuM6SsXkOc\n43QUiYWsY86QF4aAHKE3p5bdNnVkzjQgDYuSOSTtMmdk6dbVyk0l0Y/EYnQH\nsFJgGzx3Hd4J5iOE2ANB94idBNCCXrTCDgmuRC6CbLxtXJoBJElUKRhu0jE6\noswkeKup0xuWzshz6kSONFSYcUUwx+ds/o2D1sUTEsyWpVrAA9Hlq4KIJbkB\nieStHLilBkv3qlgUJiFs+aLGFkWz/vx4P//tvF2n/Jx7ebu7JEocfbfZBTvr\nBQEfSi80ZVDtDbhh9JMzcWPw/u6CfzU8A0z7oFg5hjLQjUlwnHYJnTS22AnU\nH3XQsq5SDvLxbKI10LaiyPpDi7bF9T9P0pcz+8s4Dn+tIf4W/xMoFRLa7S3R\nM7IsBb+kEp/hERseDB2tzjX2cmm3GP1uG0GngIQfuse6I3ZGzZK4hhmp7kOY\nJAh3DSrt3szRQ4AcNK4NQv9IToeGkNI0wl11zpHmucOMbj10o1/tzZLcNCYq\nnJwxWiEvq28Yv7CwQ7dwJzWeDB3q8RtMi+IE78dy5np9cSNFXiNdiaKuMnm8\n7KNu\r\n=jixG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBzMnk2OnvjqmnUrLGZJXeb8DUdetdXzxIgzWoZb5m3WAiEA9k2YfTRzllMHxsSt6ruqnwpOiQ75/vpDzID4le1dkQo="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.15.3-alpha.0_1576489798738_0.36684345371782556"},"_hasShrinkwrap":false},"0.15.3-alpha.1":{"name":"@react-ssr/express","version":"0.15.3-alpha.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.15.3-alpha.1+e9aba71e"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"e9aba71e31ff56b6af91d1bf635c6c58878a6915","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Handle Large Data\n\nWe may come across the error [\"431 Request Header Fields Too Large\"](https://developer.mozilla.org/ja/docs/Web/HTTP/Status/431) because Node.js has a threshold of http request header size. (The default value is 8kB.)\n\nTo overcome this, we must specify `--max-http-header-size` option to Node.js:\n\n### Basic on Development\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node --max-http-header-size 512000 server.js\"\n  }\n}\n```\n\n### Basic on Production\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"cross-env NODE_ENV=production node --max-http-header-size 512000 server.js\"\n  }\n}\n```\n\n### On Development with Nodemon in TypeScript\n\n**nodemon.json**\n\n```json\n{\n  \"watch\": [\n    \"server\"\n  ],\n  \"execMap\": {\n    \"ts\": \"cross-env TS_NODE_PROJECT=tsconfig.server.json node --max-http-header-size 512000 -r ts-node/register\"\n  }\n}\n```\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"nodemon server.ts\"\n  }\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.15.3-alpha.1","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-ZXb/Ap7n/PXFfM7M6v84nzujtTGZYeHC1P9IMz14pcbl0AKqMTR/8oaRZWPcp4bCUrMuj7usqAhDR0gUxxvr/A==","shasum":"7fd8845045d5ec582ab6acc9719b5529b1d097c4","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.15.3-alpha.1.tgz","fileCount":8,"unpackedSize":15033,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd91RtCRA9TVsSAnZWagAAwyUP/R8kaN8UzaYljRx0UtHr\npdQFd6WmnTFjT32qZjNSa3y7AHc40XJLdJq31arSa4b1i+8eBJiiasBy3gHV\nPEwMy7tt/GsGhK8ApLGbU+czE+eK+7WcKIA8BqjJgaUd94g+kBLHyQu+zR2X\nn6I+Lf5E1065D7e6XVoP5qU1eAd8Rm6elKgEkLOUEJ4ktPuOuTq8OLmjeDhJ\nwBAxXqfTzc77oUZmRr9CwHO1U9Szd/799S05Iw8OhWgPdb9J6aS7BC2H8QfV\n7Cxyzvc1Nm4bSUlIeVOo/8FfzqiZoOaVb2AIAKrcY+15RAKKXJKg3kFFt4wF\nbdQw2E5/48vgz2CYvfd48y7Xs75L0JC4S8+sa/5bUm0EHXuKvF0zM4qro05N\n/BlEFm454ThMOgIhNW0+zsAjtxRRM9sGXBwDuRK+hJU3fXafxVMEFJ16Z2nM\nqMWzsfu3KNVIaGKwo7xU5SZe295yJQV8odxbv25+wfy+WeVYe2I36nXARm9W\ntlaspcIw1Z3MAwRWwSxVHR13K83NsqX9AyQopU0M28f2tefykZsqeUa7OMA4\nTVi5fW1jTPwnpiWLkxkP/QegP3wt9JEg8Yo6c9vveVSoE29rrCGK9eTucwrF\n0O9C0el0FFVl7iR/M2DtjXCJuK0fAqATBojjT3nW3m1w4H/AodXQwQYQrF9f\nW2X4\r\n=xsWX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDHw/18m5bsspeZXXWt5apygcglyvj49IkCb6PN9nMyygIhALuFvVPj6ZxchwGF11Mkxbv6039zwsyB3/nC9agLZdhu"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.15.3-alpha.1_1576490093243_0.6253954459739204"},"_hasShrinkwrap":false},"0.15.3-alpha.2":{"name":"@react-ssr/express","version":"0.15.3-alpha.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.15.3-alpha.2+62a3b91b"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"62a3b91b1dd506e8f56990ce9b5e0cc552e64590","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Handle Large Data\n\nWe may come across the error [\"431 Request Header Fields Too Large\"](https://developer.mozilla.org/ja/docs/Web/HTTP/Status/431) because Node.js has a threshold of http request header size. (The default value is 8kB.)\n\nTo overcome this, we must specify `--max-http-header-size` option to Node.js:\n\n### Basic on Development\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node --max-http-header-size 512000 server.js\"\n  }\n}\n```\n\n### Basic on Production\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"cross-env NODE_ENV=production node --max-http-header-size 512000 server.js\"\n  }\n}\n```\n\n### On Development with Nodemon in TypeScript\n\n**nodemon.json**\n\n```json\n{\n  \"watch\": [\n    \"server\"\n  ],\n  \"execMap\": {\n    \"ts\": \"cross-env TS_NODE_PROJECT=tsconfig.server.json node --max-http-header-size 512000 -r ts-node/register\"\n  }\n}\n```\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"nodemon server.ts\"\n  }\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.15.3-alpha.2","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-djoBCiYDH4vzncg/Jpx8vox4shN7VfqID6HBAc4m2ersDC0esjyaKA+hgK8I3Wc9Cn9wixytA/C+P6a5mLSYQQ==","shasum":"8b7d163a41c17c4cbaa5f3175d4b4f5108ec16a0","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.15.3-alpha.2.tgz","fileCount":8,"unpackedSize":15033,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd91UaCRA9TVsSAnZWagAA4uwQAIuR0B0wcAxm+qmYD5EB\nfto5n8YdHcYguzKlDX2A1GDzwSz8S8vDfw4DnxIp2s9ve+2iARVPfQkPF9sT\nVv+9/bWsqy5EZJ5m99Kst3/xs6MmlOkaJGdLpvGjB0LVsE+4XkGloqyU34AY\nrNTbQnnPRYH+LDRXTVEF+F0vnyI8vsHKVHV2KSdOjk7nfGwZB0dr+jI9WMle\nBy2lx3plyUDb8LpjBRDOVG/S5lGxFu+H3sYfAPEOqsNJnFg3zMdxcZtmctLF\nzTOxA4Z9H+NJoU4PyU5Whg2cr/u8fi1rQXSR+pqAAusY8JXb5upsCdLU0hsG\nbxjeUVYVrPLyCJHz+w/cvNvD/vHPEgjVgPS4BRk7xLJOF59LNjD9RU6YSZRu\nISyl1OodQB5Be1OQj1G6sG5sO0pGNeiINU3fYnkJfw/ka8h11kH6TxTDAjGP\nx/+SJfXP4c7+o5JtkM02skggcY6ywnXi6T3gvEvMNPgMuMJWC+dxuW6BA/Wo\nJsulpQaOUGB2Wt06VrwQwhu34uaCYrb59qqi4eglKkY7VXivNNeOTVeX93xE\nccuClkf+JvcrwYLbFTjn/SMjWBofTRVuQ2e4SP6bgR5IunhmRNx/7LE1tIX+\nVgc3YHanimZkofW/2xm1PFHodW/PqdOaykeI3SvHsK1LjOlksVmr8Ywg7p9F\nBVeL\r\n=fHxZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAnNSYfCbeq9dq26Q2FSt7lt627H5IrscxhSqsZ+xTfAAiAQbazYqn2XRis2xcSSdhfGGK5MSyuYfqoxK+nVBbvRSw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.15.3-alpha.2_1576490266100_0.38305971765631686"},"_hasShrinkwrap":false},"0.15.3":{"name":"@react-ssr/express","version":"0.15.3","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.15.3"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"4e9dd8356d1c34b5949e5e9633603371c2e0a1b5","_id":"@react-ssr/express@0.15.3","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-mvu1iPMI7e0mnzwcTjOPlTWL2p9BgdAHREGLSEs+t6TDe8RzImDDS2WOuacSIl/B26/a5GfVYVBYxP+s2vhjWA==","shasum":"5d4378580d69fd88b20124d4aca79b8529e05caf","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.15.3.tgz","fileCount":8,"unpackedSize":14999,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd91X+CRA9TVsSAnZWagAAyKQP/1E2Q1eaCLzMsyFVF+PZ\nsevSs0gAZ8z7ZUQOSFSZp2w73s2MrML/HyRAoKxVu2wrN69ulktW6w6LIzwf\n+Txm3YSULhq9US0HU86s8HJZ/T0ENTaLqFHFCRG4kC12xZvq8s6fsbUQK/bj\nLCtbgC/tojrlbjsKoTtMCy9DwInsSbS5IerblTCS0eqgGR6vxhyi1brcwze4\nKf5sMzuk8Q//K8LN/G0I0qT8jL+NyccWgH2LS+w9M/TSaA+UFZ3NMsJmudzZ\n/2ky5riAdpDuh1Z9Qtpn8Ezrv7SmypwI8m+ldMog2mXlI6oJD/kEamGGbUhk\nx5mBJu6DAorzlPSZ2TUfDp60RhoPmESX9MyO5sVuFT/MjFmqMj4qYkSbQ8YV\ns/Ce38YrnVpt3NTA3/Gc17r9+wYqHrIIQUyzNzrnedk7k7DKKi2KdVeISCnL\ntDScP3cmKwuFESxr76t0D+hAR2XPdgBwt+UZ3NRayZuEUTpB4deNtcM1vwJA\nu3xdh+nS97uHfpBpAOjBtmYUx+f3HPPyJK3qwS44FOdk84BCvwctxxVq9UDn\nvdFojfCBy+WAfZ3GqWNBc3PWMAxKFVsE9APzt/FLwvp/tfVEDJdLY0UmWiuo\n05+pA5yEihSv6uyBh6QhyD7XkVnOL2pCHbAJ5NWK+QXRKUidU35YobF0u0n9\n9k5S\r\n=hTOC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC+kNmOnjOtdr5Cg6Qj/XRS0H95v/u0fXq9lhyHebFPkAIhAKVOb1W6vWbwgOTRONJrK61yIB9iZCavsF+CDaZcC08E"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.15.3_1576490493256_0.5759208494246024"},"_hasShrinkwrap":false},"0.15.4-alpha.0":{"name":"@react-ssr/express","version":"0.15.4-alpha.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.15.4-alpha.0+36cf103a"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"36cf103a94bfbda43b6bba50b5bdf84b85770c03","readme":"<p align=\"center\">😎 @react-ssr/express 😎</p>\n<p align=\"center\">\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"A version of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/v/@react-ssr/express.svg\">\n  </a>\n  <a href=\"https://npm.im/@react-ssr/express\" alt=\"Downloads of @react-ssr/express\">\n    <img src=\"https://img.shields.io/npm/dt/@react-ssr/express.svg\">\n  </a>\n</p>\n\n## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nPopulate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nThen just run `npm start` and go to `http://localhost:3000`.\n\nYou'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other non CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Emotion\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With styled-components\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n### With Material UI\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With Ant Design\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Handle Large Data\n\nWe may come across the error [\"431 Request Header Fields Too Large\"](https://developer.mozilla.org/ja/docs/Web/HTTP/Status/431) because Node.js has a threshold of http request header size. (The default value is 8kB.)\n\nTo overcome this, we must specify `--max-http-header-size` option to Node.js:\n\n### Basic on Development\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node --max-http-header-size 512000 server.js\"\n  }\n}\n```\n\n### Basic on Production\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"cross-env NODE_ENV=production node --max-http-header-size 512000 server.js\"\n  }\n}\n```\n\n### On Development with Nodemon in TypeScript\n\n**nodemon.json**\n\n```json\n{\n  \"watch\": [\n    \"server\"\n  ],\n  \"execMap\": {\n    \"ts\": \"cross-env TS_NODE_PROJECT=tsconfig.server.json node --max-http-header-size 512000 -r ts-node/register\"\n  }\n}\n```\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"nodemon server.ts\"\n  }\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[The React View Template Engine for Express](https://dev.to/saltyshiomix/the-react-view-template-engine-for-express-42f0)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.15.4-alpha.0","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-7WalZuJRA4qyxUgEJkEvebuyjHvgazUy/BNj55fo/Pv7FYHva5E+wv0lUhN2SCVzzVtW138l39jszbSzOM7BTw==","shasum":"6bb857e4ee5388534ad3c8c1e43e9072761cb4b5","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.15.4-alpha.0.tgz","fileCount":8,"unpackedSize":15033,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd91dSCRA9TVsSAnZWagAAR9IP/2w6//EjVEKa/HrtNfrf\nxkhpW7nTNPlcUciATNBYyrxFUfwQOUzYEDcjXqpifXE5AxccYvqkB0LC0ZKd\nIncE2SUSRapC4GNuMYkxbkV8dUe88HbuPo3gvk7oJnRA7GRLdLhA2HJ4XBBR\nNhxohPYYian/LvOni6FxwqxDY1Bayjkz/0PGaxR/j/bknBY9Mv1MKAE1Bf4B\nMMQWWo/mZiYfAs1jg2FAMYsWWto26PwB5s3mu45MBCMnte/Tl9oK5oyaMO8Q\n9YMsL2/stOn/rNvQCNjxCMfR4gT4ErtFTLpD8xwpCfATqtBNnd8D6zEs0U6n\nHK7EdrIY/8EQ5K5HfVi4Oqe4xPJo+3zJ4lE91xRwqcmF5pHdCyjaZQvj3wrg\nHyKpW6FVxHamJXH5OwvzArn8rdteS2ZWc01mBbB9BKZ2Yjavf+3umbY6Aj8S\nwIZp1fYM8aUzDGSwmnQdP85V7KI0fF6nbFUjVMIQMBlbpUOYQjEE99ZpFeGg\npKc92xFha9nKf7v8pSHRhKQIeuLtDkax2rITfUTjcYFksxidjXDCJMfzsQ/W\nFlbmZwXbRt/wrCOqCq8NzVJzqAR29CKg+kfmOJq05hsFhf1t2Hea32oES/12\nQRkFsJlJmB49haNLFPytBkHu38ZqZn7iz4RAc1Zyv4BYsGz4S75OY0iQ6yKq\nMEqD\r\n=2HWW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDX2TsUlJGw2ytL8CmMxFTd/HRyL5KedwVruzll1JycUAIhAP0d0L/jA6iRVl4b7AVyMbjSR8cqnk+SgIUcsWlNPmFe"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.15.4-alpha.0_1576490834283_0.4984023479738664"},"_hasShrinkwrap":false},"0.16.0":{"name":"@react-ssr/express","version":"0.16.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.16.0"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"4bd1022433d2868d3b98fbb1c2206fcc5eaf8c25","_id":"@react-ssr/express@0.16.0","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-LQS3fV5tDKUJtQpnZF+Sa0DCzAebSB5VqfTpjOT+p54CvChK8sBJl96l3ilE1oGkdg6eNptt0QQItTOng1nctA==","shasum":"54a458cab3de6545a01b4ed4ec50d93a732fbe92","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.16.0.tgz","fileCount":8,"unpackedSize":14999,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd91ftCRA9TVsSAnZWagAAheUP/28hRFm8HpvbAefxzueb\n+uGKW9w+iyP+bLijOjQ7TK69cnqWJwJY0n6Z9T8y+tQxKqcCmqz+AtFXpOOw\nN+SCZCAV+pcIbGt+rcj/fLCIicyR5jcsa3DUvn1bXY8i80rsu8/xD12acTIa\nv/YtqJqYzFdYgVD9sSP6Ob2rieHiYV3+2zTzpxEsWduavSNqhmOIby+RGAxO\nG08d9YFrdjY1Ons/9nMbdcxbfwIL20tsBxcbt6r30ID18DwuV33eNekDq4iw\nUaWbvSbm7Thr921NmM/B1jOnbfSTCmTSLtAYPs8kAFM1RO7oWvgubGDgnKnF\nSzUnPaRbnfWdkmlp02RHSvSKHu+reiWGnoYPMBpcbKVh2LJjAceRBDjDzwiQ\n/HO6213udiQxgQxICxqe6ZpMbQlNxdtj05q4hY8W5rpcuCqAYLTaL496IAxn\nd0+SIklMQgezuFLjMDjM1AKf475pWHVl3MTg6zMw8mRCZiZv3783nxiZFHhO\nWoSaU4LQsuk1/bsu7E7VompF/EEu9keghV5U+R1OJuykNMMmPW3Sw/nDmCp+\nsQkTB+3kHgks17gXgN3WSgoVTsWDfJwAoSVmQ7PMHtMNyBfL4TXJxEpKWddu\nB1Esq+5oq85P9o8Gcn2otHQtStBtl3++7gQ715Q4tBArvy8lZXK14iGVVoit\nog/q\r\n=4wrZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCyn8LGP62AmUJtUNFioDQSg+SF3SRdb0jHjdWPCtLIzQIhAJFUpa28oi/fCYKlrCMaUW0YVJHsoxrT/26VEIUR/pem"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.16.0_1576490989400_0.5784540707241383"},"_hasShrinkwrap":false},"0.17.0":{"name":"@react-ssr/express","version":"0.17.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.17.0"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"2a322e5c475b945bfeca1374a5c0e66a2400ad12","_id":"@react-ssr/express@0.17.0","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-sMo0Ouoq5RWCfifU26xxMy0tBDU7KmrQKA31+u9xvxx0wyrMWWwHG6J0LZ1Cs5Hk8Hy3SWlKIvuf/TrSOqAcGA==","shasum":"6bd4bf9e53c9e4582f745bfbce288aba3ad524a7","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.17.0.tgz","fileCount":8,"unpackedSize":14038,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd91l8CRA9TVsSAnZWagAA5FoP/RN4nrZ7SukpRSAAlRxf\nczzYViAiyfEdWLM9oovReGjzGQ2EqXpDny/c044wXc8H7hUdTxhhk5wJokXN\niWkAu9pUeeAIljl/0P+D8SSGZJT7Nj1W4gjksUCYURIOhOTnUHrctmgEcHYN\nNlG82ptawhJ+/+OztH4jr+16F/ZcmyK6dCjn/kcBAlFxVd3/9HHQsn8I9aYF\nEVrPvz1lBwtmMzpwMyHWippYPANDcqmEHohMdOfGkzPWm+CHSczeLFBaUTu5\nZiEWAi41e62jVCcijhgMrwCF6Qdiw8D64vxpMmADQBNbk3/PY7xBXjBrHr2p\nE6ipOj1xAnKYVenW2uaOjTiapvgqfalO13fw/PZ9HtETf9TMbZe03hDiMtJ5\nmWn9hObkfqKs/RdkjETzaOSzPgG0M7SsoxHueqoiUmTOUmUKN802D3s3RFum\n5IdT+WYSVWOxazX/n0J1NC1+XGtHuPcBxnC1U+xgrRtEY3WHJpx1dULfVbNH\nDcsaIYtHk6NX4MUeWYXBZt6Z5QNk/AOnBbhuXH36wVF68jHoYywenTLbc61p\n6zNxTq+qdMgECskIZ1poLaDPwA54KxrmzksQhJlkNXMnpe3dkuVhXB4ZSCEo\nEYkmZTDlTHWuBvaWnHohph8BK8g8gb0FpadyXaq+luNHFcR4ObqIc6hgBvrn\n7g9l\r\n=6jhn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCbB+FX1Arj9A+MBZnyTP7tI3z9GQBsopkyAMMAFXfP7gIhAPeSjFXAoj3+WEhhmgeEnAvQ6nGJZzyx1dnPl2zkt066"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.17.0_1576491387557_0.8643445745533895"},"_hasShrinkwrap":false},"0.17.1":{"name":"@react-ssr/express","version":"0.17.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","reactjs","react.js","express","expressjs","view","template","engine","view-template-engine","ssr","server-side-rendering"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.17.1"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"2456d330f648f3ca92a48445df1302d4c4ae74bd","_id":"@react-ssr/express@0.17.1","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-oqaxZRhLxs06RXcjMHl8TS3ZbN0am5Yq6sZrLvIYNcH/kJVrM5GmyF5Wps6lPSyJl4aUZvpQ4PjTRM+vUWSiHQ==","shasum":"790812c31c8d90319a7a1faf68489c21132764d7","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.17.1.tgz","fileCount":8,"unpackedSize":13915,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd91tsCRA9TVsSAnZWagAAgkQP/1tYVm/M44BRss9h8MfA\npMOqWhFz8eW7tqCrkeYg7D8vA6hveSQ/L9566um3iC8dhaH5iDuNe84q9kKS\nnvN5MYEe6k9SUZNrQHccVtX5CbwhUEv6ouIOxgfKabC6h+kLtuyGNj1C7kQf\nwprlK2IKRU4dbmgCflZCLmO6VHsyoPM9fOAS90+OnWhJFJFC9Loxz9bxwlSp\nPRK2vgziBNKmsapTw2+d+Gg1cvYZ35JhL6Qn4H73RTKM06WfG+YgDYdZChfS\nzDA8hF1gUecQIKyL2CY1TtmWqKXS4QLwKiwEUvf+FZgykIwFJg+MU5OhLoK4\nQMiJOe7ty/5PXj4YZ3rc7v+Rys9TOSOKcXfZvnL7R5gdyPnXPr87xKzp70sX\nMEMBm9aOV+WjNCHXKkNgSjni3AgHNae9Iw2TY/WlWnoDNkM+R56GGAgEqK2/\nzgJaE2w//8AgTHyU9qcVBD8hEnOMHr7eD6CNn1oII+DAvIXSM+DJ/T6kxSR+\nV9yZOpS6KFtNQCDth1YGNA+s2/nKaYQhouipGHxEhRXYResclbwkpLIE+VSW\nXRscfXqYQBAcjSfWWMyytZ+DKICWS0yQ3TBycz26zz7OlvlLlo3mlgVUcfNu\nPyXuI603oclEQcWIywhmFPgIAdBk4muoVzRDC2m5uyRsJMFpoTJXgsZA1BwQ\n433a\r\n=p93i\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHLIcgrwpwEo0tn7nNuHLfNZfbvDU73gcLY0z59oP/o1AiEAl9epdc3xMklcvTORqXWxsAghtu/J7ugc34EUkDEtCN0="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.17.1_1576491883410_0.36773168115157384"},"_hasShrinkwrap":false},"0.17.2":{"name":"@react-ssr/express","version":"0.17.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.17.2"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"8d91b57b3eb3216927c6995714b09688f701b77e","_id":"@react-ssr/express@0.17.2","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-VWtH8SPEZVebERhGr6M3/eoZ2dLdstZixzy/KAMF4Tohth1dvG5cxo/YMxjWDCtYYDdCiDodfFihoJat1yuDMg==","shasum":"4e79fa3d0e396387f71f2ab86b2d6b9d95055c31","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.17.2.tgz","fileCount":8,"unpackedSize":13844,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd94N7CRA9TVsSAnZWagAA8skP/1OX7TC0iyEbettfc5/8\ne6CHw2SUBp+nubvL2YURoKcs3VYkYUzawwuQ0Iz6Il7UaE10gaPrgDBDGqiX\n9snIwNgAH5U1lKlRfsAaJ8dCxuHek8CMSj6d8B01WgnUU551IvRkgwqSVUpz\n2By/uxmSXQ97docgFVT1T+nxsXicvcdyItAh5jsobU/BEF1TMUyKrdnwxdNo\nC6tinsH+GnZw1I3mf/0cNnr/NtgxJGSVTSghIGbQ3qIGtUS9eHxDGqJ0iAgv\nOGoRMk1isCJnXdppZhL9duUaMk6LMiMpqbi3OjsXsnqHl0SXsQc15ckZIvKa\n20een1ZKtBs5pQ7NxpKPAKxI3ACAF4QEaJE6FP5YApXG2J/+DU6xn9rShneQ\nkrR7uETwH2Nas2J3JdajM5EVu0NzraEf1wmMo3hUYc41ZNNiNIkgkfIj9PAf\nNM0NGaVcP64/tIIx9cniW5QUAiej5V6rGdbsu6mBbcHwvNpwW6MDRCmvJ/Jw\n8bxBgM6d1dsP6fQbSeHmDsjB3MLOoo3O6Pp0c4vgvWKFnQub5C/N+s6lpQMu\nlxEMWHs9mEJm+0TDdr6lgEvIsNp+zPJQpzKzaFhzYnxJZpXBgU3tCr6rH0dM\nG41Pe4g+w3sC7DEMAuFQJXt0aq7+cCaisEgg2JbOtUVU/cVOwi1l4Zk0OyPk\n576Y\r\n=zrzB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQClw/qwK5FTbSYxGlQJ0wbzNcyEIQCSkkjalEsj6Vy/SQIhAPtn4EDE7wjuTT1F9ULa4C4HEgcYjG0lPMfb4DoZWOvx"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.17.2_1576502139014_0.1643613661585812"},"_hasShrinkwrap":false},"0.17.3":{"name":"@react-ssr/express","version":"0.17.3","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","dependencies":{"@react-ssr/core":"^0.17.3"},"devDependencies":{"express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"express":"^4"},"gitHead":"21a23b2b8594874132014865f62d400d9dcc7d38","_id":"@react-ssr/express@0.17.3","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-L/eNlqSPCs9GZn86o6Aq8wFpqbcr2uQG1RTITN8yNQl+9R9Fgq2M5GJ6iFKhq+0yFEI5bOLnkATvT3+R+/QWiw==","shasum":"4cc635d955e3fc5d2655708fed8c541f1730c69a","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.17.3.tgz","fileCount":8,"unpackedSize":13844,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd94VnCRA9TVsSAnZWagAAVZYP/RvPxAMip3FMyBx+L//N\ncpr8OQABVp+lLG2JrFwI+8e0GkLjpzy01xLc19qY1H8iKgdloXT2uebZ+AQK\nTIpNaBUjGDqREELE62t6tvOo/c8UM4pDPgAQuCMaVHoN8sI4f9eUmoqkLXwr\nli6i+e7xNChZGHvnPr6vSkiC5YwBG4P+dheU+O4fRzfqgApMEXYlvPdXF0ru\n86AMFK4hsbp5dUt3Fm0UEV4Vf3g5+LF/CD5Ne8JEenKK6DwwRScaQ+I2INI2\nPQAHX9LIMzeSFLle9EfIDG5Jh751wAI5nNWWu/CinWhNjPvKS2LSLdnhtrLi\nTyaP9tlFA+I4WAr7NaV0i6q/nwryUa7tzb0/647PB+e6jlhiclUtkfjGSb08\neOAqZUPTNs03av6ZJKJwHoZXH0dCCfzo/n6gYCppUS86XMgg1/F6zIsfEbGq\nOawg/Sx40AE5amc2+ISdM0lC3A2bOazzZsgl3c2xHSVHwpE9vxWcbTldoApE\njroX4/5YOvtLSFlbZQZhTxhP/E5acj86rmzV2cFJTPzW+YW2HFrsr1XGAUuM\n43FQhCW3o9hIO0i/b7KV8sNEzFBnyU22kp3Qv2uTipYKHmKTwjjbaB++DYVZ\ncclnKB7GWe9tdekklQ4wx39OfIOptpEy+6iV3QxqvsCYiBGUUO9n8WCVOgBG\ns3vP\r\n=wwqk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID/A1TMjjD6kW0n7ofTzZB4bMQzcy20NLzZrhjuPaR+lAiAhGSa63DhXdXdoo73CkwSeV8LloRdHihNg8NLZw8EgLg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.17.3_1576502630736_0.4414220735961245"},"_hasShrinkwrap":false},"0.18.0":{"name":"@react-ssr/express","version":"0.18.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.18.0","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"934f0caed6cf3fc0e8f9ed59465a141549339dad","_id":"@react-ssr/express@0.18.0","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-mdAxo+JWYpvEj/8NIt9pRFEGi2l8cpdT9oFm1Z+XiT9PPlBy1WYUMekbOBaOStyqI2DmpGMPBUYppxO+ESwdiQ==","shasum":"f408f46186493605374481378ec1fcdd3619ed04","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.18.0.tgz","fileCount":8,"unpackedSize":13875,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd94mBCRA9TVsSAnZWagAAQe8P/iBP6ZVT9ESwtS0il+EO\nZKMzU6tWh9f1LuC8au8YCtJ4FN8Yn5qGhMwptG31YocRWjuPY4y3qYWf+6Kf\nS0lSljAo8Na4ZfWziHBvMGV3nLEQ3szq3QRVmETlOpvVoO685Xwb7h0haQRX\nyTgO7naDux3TYmTFPfawjBQagjwc3KnGn/36FQTDhBUJAiQZug1y6Xi0Gcdh\n3u5Tny6xhACPOOQHScZd1TyugpXnpyccKbA4mlObykx9rFZRD/NmY+ePkgjP\nahSjYIqVloAbs5AJzvDW9eWmwr+ZV69hmdLx6c1dPMwHJQuL7UQYy7q8jISy\nzpvX1t9m1Ro4kpNJ1r6hifqOJC+ZFT0EY04eimXxgVDrvnf5Fz8P2YPOpG1l\ngVboLLti1qWCnHhjCGk7e4p7QelyI7T4DYe8cFlS3UAyixrxbil7BfzUD3zZ\nwqESwXkUHxpE0p2qqkNOVWx8HJaM0aS9INWh7dkamwd0vy4ttbyKohkwDYt8\nTfkGSyWqFhsLlSzxgSWNZEIFmeW1yW0Hhjpx8qlUYLfZAs/o9q2HO4EW4kYE\nJn8AEJu6ginz7iu+HNVafOCk6VOk3FllKoyMhIXoPDTeFwRJ+MSj/sbBHfmg\n4kShX+AVimSg14fPmlXHz3rlDcgXklg885v5umLGXtgRB9JMVZ76imQxvrOO\np1Is\r\n=o+/q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCBWAY/IAbvlo0e2jpQ8ryFH/Yh+pSOuPpt8ov0P48zJQIhANo1CfA+kNTxymWPBJPi/Vury9383xP0hytC1/D7Xbh7"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.18.0_1576503680562_0.39016256441871877"},"_hasShrinkwrap":false},"0.18.1":{"name":"@react-ssr/express","version":"0.18.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.18.1","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"b2e3321b4116f275a6b9828f38cf7a44ea9df360","_id":"@react-ssr/express@0.18.1","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-mRtQ4VjppIrPEC9v4IJzZB0ObYIGPw6qCCW3/81X/OpiUgYn7Alp7s4G5JhDGq/B0ie9OTxjmmHGfDRmDTyopQ==","shasum":"2eaade3ef9fd12826dae7bcba03532f921ccc21c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.18.1.tgz","fileCount":8,"unpackedSize":13478,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd94xKCRA9TVsSAnZWagAAz0QP/2tt4wdhhiwEKB49Lnse\n1f79C+2yGV4Jus/tFtB8efubb1kr6ieDrUGlSr29OBiqTvdri/tNJDSrv/I+\nsOENxKJeN8PFgv6Oj4tksayU+eCBfi1UWRwA0MB6jCDfpjYqLxvsxcR3lWP/\n1stStqOnq7Dbp6bjrtJpBlGXZI9ltIPjPwoRXU7puK2aF6uE28ujhEJdibYs\nnkxAm1oopcDb/hoxNyBQlSZ8OYfLrS53OrBlPoKb86FAPhd4wHmBSgyITaq5\n+b90OdYqNcFH/nuATa2eAaYESlQ7SRYHEPH+JAhYo74ou7EiFOWR2WSsnYOk\ni4Hn2L+2D198rTjc/J4QbcFqnmVQcG3hwUpK7Fev41iZLllX/5wTnuMKztL2\n4OcYRL4QoQf3U4fkEOjB3XdKhtaRXMPDgGzBBmjk84LteWfaWPmjo0zsQEjV\nZ7tbcik/wV5nVrZjLZyYJ8xMWEHb3GPXHYXp6LShdotNftrcb930MhKUJb1m\ny4eOKaOxn3goJFSgBt540hxDpo0RTL+Dmk173zWIfIphML7eugN9UmQrgAEh\nyL9c8hGlEo0YnyAhvLFgigi1jk75Ldf71qIcCCYNuWCMPRWxOEtQlqgeBO6+\nJrQ+QXw+Uo4YxNhmZUTsHgYW85M/agAUGxzDEaVkFkcqUtwsC+2Ebd6f3qnB\nxjVd\r\n=MaBL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCn38uaIKHeIjorGUrXO+uPQvVtyv2kCblB1gcyfKDufQIhAMWB+VFfOEfCBK8WxWIHVl1ThXj4DWmNpYXgTQ5AmOSn"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.18.1_1576504394268_0.5218915353357714"},"_hasShrinkwrap":false},"0.18.2":{"name":"@react-ssr/express","version":"0.18.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.18.2","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"4c7dc92cd705d27c3ddfca986154a1d2b64136db","_id":"@react-ssr/express@0.18.2","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-JVchCVbgJB+Euh/iyXob/Lla6dl618nTxjhEEY5krzGbfQ/1788wOvbgn2Kl/RnPsmCY+rHvOdD1HeBhyMcp9Q==","shasum":"ce213439e230f99e09d9f4f96b8c0b5135a957e5","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.18.2.tgz","fileCount":8,"unpackedSize":13939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd9/sJCRA9TVsSAnZWagAAWCgP/jtJlNQ9SRrz4g1PYw1I\npvp9Zk7dqcpooIEuvigjgEMDQebawLsfhivGCFgq+aIZC8S99v5XQLUoX4o5\n6orGcQF175VQStOB3hCEo6qzIHf5qflJvHmOr9FyCO2bjk7C2ENkNQQIt9Hd\npbbrUWPJXzalcrSNutBL7vMYpTJ7M6pgmjP1+avszwVp75Eo97HPFiiwCGjO\nV3PXH4itQiqdeAwa2OXXCyX97nzBmCcH6+qIxyhI6B7kpIzZLd3Hum+F/eIR\nguQpyVtdGBA++grKgjLvuvVrGFtptqwNC+Y8Y2V+VdYGAP6g3g55twG263/d\n6+jGlGDYZjLmVD4g2KbLcB1oFtfVe1wI0Nrxz+udROieaQKfs9RoQNwCRXjR\nJDOgTRDZsNZswFCzxzo53aJLtZBXV8NWLPkhZJFKgtJrWgIRUl5lDxrY0TTF\nALBM/K6Nuq+rfVdT+iUoZ8v/THEeY6YaBSyoG7VFJ4a4sGcRjiHqhKMxYKUh\nJQ5NTXG34pMwzUsin+w4KIW4wzBrPrvSB5x+qiuBUTbb11uixrs3XCdqmCbd\nOagxeLYsPrb9TZ/B1p6T2rckg7nCcKVbOJnN1kE7fog9ZeTL+vD6NcgCztYU\noE0LNhaVeTq8Rgv724RtgbSJqNCvJpM4xnJdXRJOhIk6jAWQemJMYG7EVRsR\nryPO\r\n=8GUR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDjgggLi0KMOlpEZmUCMmlgotdWG5PPV0nNAEnLGG+YbwIhANDT7thU2gKAr1qmnJHenTYuFN+As/m27b9n3Ymaey7Q"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.18.2_1576532745157_0.22820815377203663"},"_hasShrinkwrap":false},"0.18.3-alpha.2":{"name":"@react-ssr/express","version":"0.18.3-alpha.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.18.3-alpha.2+a8f14af","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"a8f14af095bf0ed1d458a6b404939a37702e9e4b","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.18.3-alpha.2","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-FxHaY+ezU5m77QtNQn5WC/uCflo/oJTccOweJy6nxkbEwEi97BR+3wVuPzKbW6W4QFDsCfGoPTY08+EcBG85oQ==","shasum":"4a12612d20de09c7910bc2d4b84832b56274a106","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.18.3-alpha.2.tgz","fileCount":8,"unpackedSize":13971,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+CJCCRA9TVsSAnZWagAABy0P/0p59IbH/Cxz1hnCXgQx\nSbk2uuxhKFxqdqi0wtXtmBmTjK7mDJGkk/AA1KqyjelxyEjR5jy6T6y+rsoE\nBarfK6g7bcT/H5TOrFGjO8puoNb+I6kWCltWYTzsAhZGZOwniMbeM2Brh7+3\nQuw0E1oEiiIKRn7yiacqepoymr/CugGTzKHiLmWAVnFyyxQ5SFtSsDup6QB4\n/V/bRdCTtWc1/V7j5VAbJlCavtMV035DXriKkyP4lXChf2vgGeEcRTP/qA1A\nz3V5zP9tqyMCiLVfLwOSQ0QFkcRIcfOzeL+/oNu9xmE4nHvh4wCKX5cGz6Hw\nBRIH1mOQQXI00pm8KGZnmCMGUJEVrLGAKC3yOXQ/aZm5AxWivq2T5GlVQ86B\nRkuMxEgOAv/ZiXJ9RD/G/F40RbM5e6vm8bUiMw8L5XYCwNy2rMt/c8Aiy7M/\nxoUCT59mDFKZZOiGesE+fAKH6i3EevWSppl08AQASiIRGdj1TCrVzSUAOIc9\nmoNF1k+sr+n17npyLr9LqgBtKwF04J04IAYEYywJuwV3XYQhwW56HR8/EXCZ\n42he7NtfzxVReJ/J2XK5gxPZDV9tnKISpa5xXt7SDiram2cJdYK+zGF2qvVN\nD3N570VwETl8Pvrh6LpJWRu/cEZ+rQJ+v/G66sFuIW+vLpiOXo/3rOTLjPMD\nnmp5\r\n=uoAt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFQfX/90DBXAwN41GiIvDI1lTGd6TDhc5xG3MWowdOXjAiBspuSbfKZLyncJovX/B91gZijVooe+9i2gRUIzDynjTg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.18.3-alpha.2_1576542786106_0.96199112541747"},"_hasShrinkwrap":false},"0.18.3-alpha.3":{"name":"@react-ssr/express","version":"0.18.3-alpha.3","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.18.3-alpha.3+2694789","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"26947898b2ddf42558801f041bc523147865814d","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.18.3-alpha.3","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-39Da69wBmFV91IwKkOWlDAkVoktIoI9yPwfTvq8NbfO2S2T5SDkLNATnQQZQzCT9Xv/cisEqE08yvWsC36GlXA==","shasum":"303642c6bcf564f77c0cd3a67e5fca8d79c4d825","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.18.3-alpha.3.tgz","fileCount":8,"unpackedSize":13971,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+CLgCRA9TVsSAnZWagAANnAP/0OS0dyaYrQHgs5RbOr8\n+AMLFTVmXDTXAfhgMEnsc1/Zw+WIVBdzLw9LAVc4v47M+L3C3Qf6JIq7y1HP\n6X1S8k8maWsUeyvuGC4f0sYOLF1pGsapHRL8XFKs4w2CDjWUtuz2iX2G9Hdh\nO0ZnTaWyKOeH0Wk7xdS1RDl1ehcJb+z4N3GXtLcLzAhi3/WQLnIswghMGSXw\n5TheDO3IshQKs2cpwmq7ImuxsrcO+rHZqYPcuEjmMEN1iNBz2N84ErfC5Ge5\nMLTF7p62g7z8zSPzLzWtV7A2oTumJWcH/vVmBqm5e7C6ytz9ytukAOWvp+sL\nrCHw2r86a3H9XPa33GFVraSYSDfA464V4KR0jtBHuSEDeGBadpkxd0O0+QMd\nejAsM2w1jrwZ9rNPA87DmSWM14RNJpxpN1V0vOgzvtYda7lar+1N+tDPOAnW\nj9osfuO1pN0yUgQB2iBO1VvrWvo0QEsnjbUMh1jO4Aj9v4ztDhb/A1akBRef\nq7zwetJAG9Ak6gMOnpsneDdpvdlhlN/6NL/60shRQ6qww1ax7oupI+aXl+nC\n+0CTYZbzqVXZGkWN02WSY7DIjgl+4gZOfDeqG5dh1uIyeLfLVJzNFSU5u5x7\nuz/n3+ZcKYPJNSKSjKWInV8byDK4QnB5Gep8HEH/K8NJbeebC7O70bXiNLlW\nvkYi\r\n=UdRe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCcY6fprxXbzV+16YYtPgZOm7GMtVfhlsNiMCCUtK+ooQIgDUS4+bUUdYzBOV1e28NCgmnHnOrhYAjxrVcZbu9ucpU="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.18.3-alpha.3_1576542943526_0.19927496409366996"},"_hasShrinkwrap":false},"0.18.3-alpha.4":{"name":"@react-ssr/express","version":"0.18.3-alpha.4","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.18.3-alpha.4+1271b66","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"1271b66ca6bc99bf9201b07ccd8740898684e077","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.18.3-alpha.4","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-yQj0zhL36ihx/qECera3MXaZgPWU2D5Zpn1g43trW5GY6DPA0SlMGWvBLaXj/JzQ87izdm+Ij+RF3lUsBSi4Pg==","shasum":"b448e67787ca06792e3f850560edf304a1505218","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.18.3-alpha.4.tgz","fileCount":8,"unpackedSize":13971,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+CPoCRA9TVsSAnZWagAA3d8P/1cGc3cz+zXSl/fRtqi1\nnpjbFiJl61FlqFEJnx9lzkVmnv2ycKJEyfa16nUTBVfky4MqRIJDGS/2bHie\ndGPQrspKR3oGfX3riIkw6Fl//W0xf4f234Db6iW4kJbufTHVPneqrdW+MB9W\nw4zHkH48R6VUkwC4TUk5ldqM7e25W+tGkRBzbLVNSF3SjR0McuNoN+MRdfJ6\nrUJVEIyyEtfOMli1kzPCpMbM/1mPcBaF1Tq7+h3RILWJ7VwLr/Tr65Pvx/ls\nmFDnKkFQzzguzn1ydQlOOyKA6zae51022b+9/7+0tVsct60hnl+iH57MXUyo\n4E/zXs+FB8lzofpD7DWcusmQ8yDQVG+SHtHRjfnIH6icyyByc9/BxuXHDCNM\nP+ubYwZd6hkNdFqLQpJu4tcVB8sdNhmdvt6MiSt53Ok4wJey0NKaM7ezwuX7\ncIMDZeHWWeR2scZs1r36Qt/h5/2r+XJGxZoGsMteMmPcXhctgS4c3kZ11ClY\nCW5X+3LQm+w5fuMQSi4HpxTdE38F25Udfy3u0+kWq0L1aCTAUhRdPpk7LK7x\nlNl5dGn/3WA+vbK5czuRuBq8dMTVNAHXs0u9IEc8P9mShWsWq5GJbhYtaYjt\nwjYl+Vm3p642/PCmAIX+J+3FJHRwdLZSs7kL36cgwWTQ9kC1238Ef+57avYo\nsh3N\r\n=6pAR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEu8br7BMJP4noBnc6VKjga2ojbGc9dJ6RMNEzWAaPk2AiBelvxU/p4Px7nXeCxuLzY49Lps6WVQDWuKUVqZR1LBgw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.18.3-alpha.4_1576543208177_0.9003156751410877"},"_hasShrinkwrap":false},"0.18.3-alpha.6":{"name":"@react-ssr/express","version":"0.18.3-alpha.6","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.18.3-alpha.6+70de518","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"70de51837a10cc34e9c923bc66a9834be1bd1483","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-css-import](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-css-import)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.18.3-alpha.6","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-8CoIas8UE1WyoH10/e64Y/nHev0afVXcrhfsd28JYKU08OS76NL7aGAx/svO9arUd+cv0KmPYju3cnUpsoCugg==","shasum":"2e25be0e738dfe5b2f64f523143fd3a2d93843b3","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.18.3-alpha.6.tgz","fileCount":8,"unpackedSize":13971,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+CZuCRA9TVsSAnZWagAAN3cP/1rVJK96n2Wroj+ttJVc\nNvqyiUKpl4hGg7xw8f1QD5MwW2UCndnANW7c5qae2dVV4EI0V7U6hAD/inJK\nenJCH+sC4Oj3WXq9tMGcL881aYbDDCT8xy9JnUtp7I/3K9qbwgjS2tA/9ilp\nNPS5eNRnlbGcF3qb2Qa1wGrO7Eo1hn6KNouUVEju9IJMOlv4BqXTuC1HbGYQ\nZPuyDD7rpCyQbyZnyC3QosJqTP9i4VAbCgYBZ0d2oOtVbS7+8iu4KnnYr8Ph\n7f8VxSpLcF4JWh3kRsp8cutuxhC8A0ZSQ2Xvv10HMI0P+CAiJ8YPuMNvMrVB\ni9jqQKyPad3yhi/xWXlNhVeikCLBiZBzjyX8Fj6mBgInV4YpaDqj+Jpm8FgP\ngw5zGJcioAZ8kl9qQ2crFl7yv1YN7x6UrC118l2s3MbUhe6x2A1wc3aAxOSH\nHc2ucYkp9HIlQbxtisWt05dwrGyYqvwxT8WV+dMlUBtNzkXoQoqzldGXlwgc\n8oFf9uKfNfExVYDEcz75Iq+ywipbaAizGnY0ZuQV598+zdFEsiGTkM6FLaeh\nVfo5ZWdhW5TMBglQyrLocgkrLK4+lytCwCbVrcGrHE1XDytGUa7JRm+j6aq9\nmL9oo+maUh0BfIUZXs2n4PsUFqrS09us7vsGFWvvfnXWuZuAld839aI/JZRD\nCXkV\r\n=zQ6v\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFMFX+bTpFW5M+22z0/UhDQJ1ShfroV0uQL7yMwxh4HkAiEAnk/1vbAp4jhTCbSZHyTUu0zjHYJVyreDgXQUx5U3d3E="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.18.3-alpha.6_1576543853993_0.48235421433645853"},"_hasShrinkwrap":false},"0.18.3":{"name":"@react-ssr/express","version":"0.18.3","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.18.3","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"93ef115986502169bc9ac91943d4ca35c3a0cab3","_id":"@react-ssr/express@0.18.3","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-7X1N6UvQZWi1KIF4ZjTZ96fRghoKrzD6hlhTua4PguNN8WpDbkJ5r1SVusmUMsbChN4NMfLbxCBrDj3iWCRtDA==","shasum":"6263e2f7105f039edd4a7c2700c795083a14acac","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.18.3.tgz","fileCount":8,"unpackedSize":14040,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+CnFCRA9TVsSAnZWagAAIi4P/A1/K7SX+AfNUL9t3kIc\nCwom3PjOHmmX4exBFQsVX/5pTvZZrjoGgnk56A5BZPg1aI1cG6sHHtPm3TnY\nZKSRwAiVO6580WFCqMZCOXC/9Ng4G5Md5vY7E14/82lg3g5HdODhiq+1b2hA\nweI4a4t+bB1iOPPi2I39nEmYFShKdISY0BG09jcyEcq3jdN9EHs2k4BSBeIQ\nR2SBQGOeHY2hWmpoclaLfFbHiiqK5wvzIYcjoCFDJk/w+JDtJmmqpRmrJzwD\nvkpqgfSgUWL52MIZsttFyazOscFx1yFFxxx+yGO1vG/YLnYG7GpWUL19R0TG\nA3ynpxYckfwO8aDVsIl53Icm4r1FwidjJl9QQvfGE9cEQZ3/2CGeCRAJJsl7\n8DX4T0UhPE+nTzXdD1wbaownV9kjGrABXrRbLA7pVNNP3pq2Yw12ixNG+3IS\nWF65SpFOXsbMGGGJ7yDfv5WmCKG1TxXZWj3BFmi1YQKdpW6E4p69zNqeA4gp\noGKigu/rNvW7FSy0rV7my6wQBEnLMg+OwFoy5ewW8EfmnRC1/72IDcjTZA54\nmL7ixEvqpU/oM5Hr7nW01fWjHXSGXRTet437lzF/ozHBvaUrfI1qHL26DV8l\n3Vy5avGWc0L9Rln7pEpksY5L30kO3IL0NHn6TjBWDJlTZig/QLxkr7s46nNE\nQSyd\r\n=TuLj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEyT5qCiQ9dpaKfZh7wdJNMNg3xy8UvvZRTKNkGwmSGYAiA0e/+kqY9ZteXNYB63qchg2I5oVccWrBqBMNU2mAY1Bg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.18.3_1576544709195_0.5254122109620176"},"_hasShrinkwrap":false},"0.19.0-alpha.5":{"name":"@react-ssr/express","version":"0.19.0-alpha.5","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.19.0-alpha.5+72b6b6c","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"72b6b6c604b49d039761ba88dca5fc3f47ed486f","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component\n- HMR when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`./.babelrc`**\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`./server.js`**\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`./views/index.jsx`**\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>Default Title</title>\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**: **Please put `<Main />` component directly under `<body>` tag AND don't wrap `<Main />` component with another components** because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**./views/index.jsx**\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello Layout!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component **anyware**:\n\n**./views/index.jsx**\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**./views/_document.jsx**\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html>\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`./package.json`**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`./server.ts`**\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`./views/index.tsx`**\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n- [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-document)\n- [examples/custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/custom-views)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.19.0-alpha.5","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-tsJQsMMAxsXR70/f6G6pNE6fbZHW1V22p8U8+kLtWebMSfR3NQyjWCZqZ2LZ9yAn/mL3MSMzU6EmEyylITpZQw==","shasum":"ba93376266474203b125ae3903f08958a7320f3a","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.19.0-alpha.5.tgz","fileCount":8,"unpackedSize":14247,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+GDGCRA9TVsSAnZWagAAgbYP/jacXB4lOlTe7KSGDgCF\nMTbzeS2SMxeVdVTExuMMvKJbuS2e7nkwp3cDQDU29VlmDDTcmkZp+D9A4Sqc\nslf6NW+H8gh2UNmvuHXqNMivuMdseOlUvLwm5qU0sRVLCNIEX4Cg6M8WqpqR\ns5guAf5p/UUcsy032rkz8t2FV4eCx/Y0CMx0mpoK06sr1ARXS/FHl8Eiv4WA\nwRQL2sl7T5cP6ylE81UR9P609JY3YcEdP4a1lDanKxaWCyGJeky3sndH4Acx\nmvk95SPvgo39O7AOwAWLryxQm9Uum/7NiSsZ0F/E8/9Sj07SrD20utaFuzak\nxq8UAdeFN9T2HF3Z0tjRj9/sgOMKzEM1BSOqITxDfIKNMICY2DFbkr6cVCNK\nmpU6SIq/zEQfpxfBnHH5VObCTXyLJ4T47npZDf9qPuhZBDAgxMZvnUUsATgC\n+xrH+7cNBiQnoCig0qj66SV+ue83DGU/l0StFle3D+a6JCxA7I4d99JEXKUP\n2PKzT6Hj/LWRXq963/DMn8HgaKa6TOjPKfIPHVVUxjlXKSbFJekenODv9S4A\nHfRBNSLbkkQSsR9WoeL+RVkZVOyPSeWOzaCl4VI41Ggmo2m6mSe1KIzP+o2l\n/kEG+t23jE99+LxH6OqPQlT7638RUTsAYv+xf9XqxYRwMN/MofNlW5/GGdc+\noxy7\r\n=p9fp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCg+vGWTs7F4ZltK6uZiZsvks+ghDtiG1ClkYvhe8liBwIhALTK5prEyxvhmakv8Jgu43g4dSyqMTWaReIt93oQUSJk"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.19.0-alpha.5_1576558790264_0.3062456738474424"},"_hasShrinkwrap":false},"0.19.0":{"name":"@react-ssr/express","version":"0.19.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.19.0","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"41fdc1f6aa9964a82b228f83d11e8a50f50774a6","_id":"@react-ssr/express@0.19.0","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-gvhzgmM2vdeYJ/E0xlN2vUjuDoAb20uVT18E0K45gMAEcnZ1uk3PbrlofMSogK6Hv/EZkI8xLSOgJdqApypiSg==","shasum":"c708d3c7465f2c0b333cf6dc9718306f5792fec8","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.19.0.tgz","fileCount":8,"unpackedSize":14434,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+Mm7CRA9TVsSAnZWagAAVnEQAIrwGJFI1irFZQtFQcOP\nNJ6bzwi4fkIAeaw8JpJizsht7PCfELFeWHWlZoSfZ04uRXA7dz5kNaf+jfWu\n39ZWeX+hA66KrSktoCKDdkPa/MzFntQTT98O6eSn0dzGVkSI/Y6rJLhLls3V\nsM/POzBMTti/8l3VECU33XCc6yV0DGbcBvDBwsSMbhcWUnH5fX6ES8EVJJ9Q\nYlKQ25s6gHqFIQ75E8WyW27u0zYqrkb57KUcld0EBZwBWb46VHEtwRA0Cija\nrelFMGuudmTuNGpuDhqDHrzvI3Bsxx3Q+lgStTIDQNSpUtriEbfDVMopR9CV\njqjl5+7hk4IlYn4GD4cc48mAVoX3l4dKzy3XGjPz8+enhEydNDZsvIk1NmxA\nFww5HU9Lolrfi2LaVIN+WybLytxF0Km8HA5ci0oYfbf8ts9GfSAqhZHKZ/RU\niKUwHbOFUSS+zcrrBmwgGfhJcaC0G+vqY9x4vtWzVxBLIFOxY1yYICg8hWEP\n1Mws8WWVCRqx0Jv2AI4+pAFIaNeTNb3J0VBm+LaZDdEM2yaG6YDFmx5OHopX\nBcdEjOLd2VZP1mdecs5vPeppgO8ndZ9k8FmlwJ9GbT1wjGbgCQ8izyLGvr6p\nOyEc2yNHRrpQ1ZpTMtbwUbSL03r1IXS/VDGCLxitGfDRND+d/u7KJgFCuktr\nZrRK\r\n=+Elw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICLljCHjvPuQU2B5ZS4QxbD5NwrwAWtDKlpwkXFSVK+7AiAHuUVm7IZR4p0DQUwjMc0sSVsafH1zDjR+lyXmi5xqfQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.19.0_1576585659091_0.8818367236529474"},"_hasShrinkwrap":false},"0.19.1":{"name":"@react-ssr/express","version":"0.19.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.19.1","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"0adc0bde4d9131dbc4cf8f10986cec43afcbab62","_id":"@react-ssr/express@0.19.1","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-mK90CdDMO4aGF2GeCAGaPTttpL8S8IdiburMoUAntrRkLl9GBsisMCTZj8mtHyJ12sCWe1GVrN5bcGd/IJ7zfw==","shasum":"fb27cd1fccf14a7e4a35c2ca0aa120d6e6a3d356","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.19.1.tgz","fileCount":8,"unpackedSize":14815,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+WrvCRA9TVsSAnZWagAARjEQAIuBe06nO3HyTqV15jeX\nw6HR3kQWtYP5R4gIDI0km3+icnVG3LEPIqJK1/to5IqpUL/FqCW4/0FvhmJA\n1/Oh7nZ0PXT0enTfc9Oyh/Ow9O4lIhhirvgZClNikFKbHpL52Wzl2Ptvw6qy\nFu5Ie1Xducwfm45N8VnGn9h6ont8scic2OW5eFV5e45LyKpFHEdmudQyxUJ6\nG6K8hXZAcTT4idHy8qqpkxbCZmSfLtrhapjWSuiHIqG8QRbXWemYb5LpocGx\nkrKnJa7MGqR8I3fKGU8X8BwIDE02utc8bEcLhfOlq2NJICQfiFBFnpUjYtob\n9b8mFwOlqwCR10Dtwud4veK3vl67vaLLcZIMugumx3e7a8bqaDca6Dt4Ezmb\nX/e5XY/UFBaN9wvfqJoFTZv15ZXGiFozqE+x3nKhAKhZX/lFTczM92xZaFmn\nWPGxbYnAgMeSHmeyX2BxN5rXGOwmUggbLySy8dJ3v3LJFHy4SJQ8hu9zpBbN\nfC0+S5h7ovOaGVJc5dxoWY0k9rIcJ2ucmewm6IX3KlVwX6fnAmhyx56dvzPO\nu5kONww9uStsWzz1vtjpDKeUo2v4qGIw90YVK4aCtAN4koaH4Crn/cEqw5j7\n7Y8oGcTPNRBQzeyYcSW3UCOaiNY+ulgbMUoCFd0QQtt/wb+LoaXNf5JwYeEk\n51GS\r\n=TjoU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC+XRCP10feKUwX2WA1HBE9vZABb64udJvadt7p31shFgIgGh2hU10u+XSFGaUioAWEPj+doD1EaMpXJlX7UgFH/XY="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.19.1_1576626927127_0.4957177101676462"},"_hasShrinkwrap":false},"0.19.2":{"name":"@react-ssr/express","version":"0.19.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.19.2","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"d413aa845be5778e5be729ca8e95ca1c85a0eae5","_id":"@react-ssr/express@0.19.2","_nodeVersion":"12.13.1","_npmVersion":"lerna/3.19.0/node@v12.13.1+x64 (darwin)","dist":{"integrity":"sha512-aZKNg2xkyKyjZjLGJ+hHHCg4ojaC4yJ3Vdc3CDNb6xV1bqcEfEMiwMXNAqGruAHLOgildjb+t/frZTxdfKivrQ==","shasum":"caef03ebed57b558aa2cafe12e9fa9a78e9a8526","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.19.2.tgz","fileCount":8,"unpackedSize":15180,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+Zu9CRA9TVsSAnZWagAAk2AQAKNvz0ND6k5DroefkxjQ\nMYeVPR7br94WYCOZIEdb3gwGSG09y2itwFZujXjqVtrRvHW0PJWMUZOwbSri\n+uSMaWeU1Af1hcCwt3cRZ7jy9TOwy9Wke6sXH9Pk9OX1qZZBxegROIRF3RQf\nlgvr+1d+Ftq3Cir3vq6dmplshp6jaBxTm3Yllo5daY7Ygy1eWCvwz1N5Mk1s\nLqbkcIhhgv8dlGwuvDLmrrU9VM6CE5au4/9lDA/1MMM3HCjzmdsmdICb1WNx\n8oMb+Yprnp6ZPjcquzJ6dC3hfEE3yOxgKI1ItHsKU/DlVMoCZn4f70U3uFOT\nxVG3ciAqV8bl27aFtP+Sba30at61MfYBf4hedpwjirKkvCdrA8zrAT8YXlhz\npPufiSaBBGwAV7ckhurZZ2Mz7U3zNR2juVgpsJL42B/TIqluJiwJ8iVEhL54\neTNwa+TYFdFnYV8D8MWFoCIGzy6E3OodgrNlvlg3twp9hu4zv3kAp4x72t8T\nL6j6uZKyL3YUm6QbOCemOnIltR1Z17ey6VR+0TaAePJbRLUTlBVc9FkDfLuA\nLitbEkJdPCbWUTsKK0cJNL45XwQjwoM2pEIRd/tDBAB7k5VTFjOL/2HTxPxX\nwpaFlpKOJIh5g9m1Ud3BY5NJKYLG7hiJj5ztLWGBXpXu2KgenDSCuBWpNOPa\nWJXD\r\n=skVj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAO0ZWtTfJU5ocr66PgVgWVAOFxsuQCvbUWCWi14zOAJAiEA/jKpfulY6wGHZApGrmfVEGcwRu+PJ2llua4kMNaVxVc="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.19.2_1576639420745_0.9952826746896091"},"_hasShrinkwrap":false},"0.19.4-alpha.7":{"name":"@react-ssr/express","version":"0.19.4-alpha.7","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.19.4-alpha.7+ec4d6d8","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"ec4d6d825b0763d5ba42dc383644eccbddb971f7","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - HMR (Hot Module Replacement) when `process.env.NODE_ENV !== 'production'`\n  - Automatically reflect to the browser as soon as you save the scripts and even if styles\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.19.4-alpha.7","_nodeVersion":"12.14.0","_npmVersion":"lerna/3.19.0/node@v12.14.0+x64 (darwin)","dist":{"integrity":"sha512-xzOBN7B8lmUx+whktV9M7gnual6aOdRTBsEEwzWkleCqsXUYsyV6Tz/EbbBmEYpxSJ0yCsmnHABPNXFzomU30Q==","shasum":"65b6aedaf9251d3c2ac69cd114babcbeb699c812","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.19.4-alpha.7.tgz","fileCount":8,"unpackedSize":15212,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+osoCRA9TVsSAnZWagAASgUP/0czhnJ0VevuMemaGzUY\nyUHPaj+ZgMETpuIw9ldJKNyVclEPvLzpsrIsK9zOe5j1z45Qp4dVEJgVbrPL\nCQdsh0oHuUX6JSo3Jen1L3XLc0CuuxzlWU6ZZbHziAK2NovqiaF7sGqiDFZ0\nvjHvktVVD9wGA5xMJmsPpwf9VrL7mT3W10DfPGw9IwyLecqDF3QzhaVxR8ty\njAPPfAzzwUkERIBMdtZlddmwI2ouOkQ1lHewK5Y10t8d0xBAj4TMQ9q7mD3B\naFII+ifhDHYZ886xqo7jtuvHOtirnTiwXZ53yxnUHOzjmsl/jI372rtWDQIq\nFuHaP9/6ups5krfTT5X6+aotCIuB891C6AImflIvVZS7adZ9v8UYJLAfuKyq\nn+nt5Z4oUA6jSF0aB3ErzYe50sN3LXEKr3oGLanb9M7You1vfYwzLk9haVXB\nwcw2UOPu+49pdZrIYvpYrpmdWu9Uz02gtvtqZM6SFSnzoDjpeTeOKTbdm0fg\nRUcZLU9ldOK4rnszYllpVTfkzthfK/IqlkaQa0fw9CHxebquJbIX7H2fEBQq\nlllvb1gSZIb9Lob/vz49ZyZujHq95dU/ULVo4qROmgc92fXnb1Td14LsITjf\nzgWSZVa8jbLNDWBHILCbrVnVTJl4f/6F8aPkVq8ZIRkPwwylr9h3pjsihE+R\nGXyY\r\n=fBWd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCEAleDP3qFXr2+t4APzzVBu1KBmbL4elINl18LlsNZlwIgOB3XQw8qX+wJ/rzp/6wOyS+JVIRV4e7Z3CVAiSlr5GQ="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.19.4-alpha.7_1576700712244_0.38323941880684953"},"_hasShrinkwrap":false},"0.19.4":{"name":"@react-ssr/express","version":"0.19.4","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.19.4","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"c5e1f07dde017b362c04a8e199cf3bd53424334b","_id":"@react-ssr/express@0.19.4","_nodeVersion":"12.14.0","_npmVersion":"lerna/3.19.0/node@v12.14.0+x64 (darwin)","dist":{"integrity":"sha512-q51BRHBC6/Mpr84HOM39c3y/4HQlU8KZ7F+THdBz1jGMxtb00WjY2zlfDSbaJirUNfnZ1QWYVD5+8wiPBXA7pw==","shasum":"f2ac366690b74d8a02326c8201980dcced3572fc","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.19.4.tgz","fileCount":8,"unpackedSize":15180,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+o4UCRA9TVsSAnZWagAApYwP/iSbwLBqCT96vayyT1Xr\nKUeueu0sjjjAyBO035JqM5urMzTpHTMfRe6jiGVHEMpdvRjmWFqQsDvbrMi9\n2IyhySQwPdMyA9RTCnOTjguwg19wd5nRhPH3EBrEGdyO0OyJZD/Y1r35Jc+Q\n7LXaS+yx09nJPgYB2NJzz7zCV9y2rbHXmbfZpz06mV5P8FfaDpFmw40FmK5M\noYf9XUXmF+lAGg0ihSwRaJjhL7g8bIs53DoUWfo4lWxWofbod4l5KMtvrhnd\nFy07jpIaw02OBSZNNdtTFLz3c8udllxiULR3ekGzUtLb+xpC8pV2lk/Bu78p\nqGsSIy1O1peAD5FvCtwryeDnh6Nydvf6Tawplat+ZE7gZPNtW5YogrFeuShJ\nyM1RPIktGjg9zwQ5m7YuC4jQVz4y1JvUsn5Yi5AWG9vIcXG2Jjp76pemhrGX\niWaH7SHrMyJf7X/xZlyGbbs+llmML9w/0kSyCsgv450foHFWJk/ep7YdH73x\nlYbWZp1Pwousmkx9V41in+TsRFkwFkwMWiHXpW4cCy0gGPhtQngarONBgoAU\npn9U5vXk/eVVy4HZnhVzxbabwNJyan3lm7QlQBl1scMJ0cYvzN8lK0tgC155\nRyquNjbyY3hUjjIaUuh8bI9sj897iMV5HaAXbWAFoQnu2+Ulm0ltQLu6H2Vu\nf0qY\r\n=9yxx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC9lm1adypdybA19GsESkToBayPg38jZ8TQlTKvaJT6fQIgOzwXaTN1LPd31rshwaM7en2fehdWCVMIzYl8z2ZhhbA="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.19.4_1576701460314_0.41821595152434865"},"_hasShrinkwrap":false},"0.19.5":{"name":"@react-ssr/express","version":"0.19.5","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.19.5","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"e296d90aabc86531df8cba37a02de4ead71fb585","_id":"@react-ssr/express@0.19.5","_nodeVersion":"12.14.0","_npmVersion":"lerna/3.19.0/node@v12.14.0+x64 (darwin)","dist":{"integrity":"sha512-qlnkiYWks9uiV6OzRNlgBdU7q/KkSD9FaR3I/FF5Gva7ehdE5m1OZPQBC+bA3q1l92l1Aa8PYpSBZz66V+H+5Q==","shasum":"287f40285a2d972d2ac641d96457b22be94b708c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.19.5.tgz","fileCount":8,"unpackedSize":15180,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+o+9CRA9TVsSAnZWagAA5c8QAIVacOwY/VVzFymEPJXc\nRjTzAsIQYfi3v9hRNxoNQajTho3OdisL/a5GaXTCVoA2IgcVCv9hCWPDgUhs\nQPbxK9VUKk0Swe4TZCbsbc7eVsHe49YnVJwuiDPTBUZI+dWVKJl+qCiqcdJM\nfISWGLoV3/sD15De5cTEs37a5xBuluT50RLOy+fOjHOmzdpzHWb5MjEtQAaH\nLChWgi2ouIiq4NVQfZjomZ0JPzu+8wSFPuoKfkpyDtKdZig5lZr0YuFzu3pU\nAxD6clrDXnxpoxCWvvTe6Si+ZEHzjeb+avFRRnmq1l4KipZzx/DsWT+r8+Ew\n5Awp+tX3ZTYFRjdDJCNlYdr96F3fHirmWEjVt+StmvTTfQl335VSvlSG4KCT\ngQIw8FmZcrneaHvDLARUfRtyloSl/Ej4IUi5CrQqBRd0zUuKSPa8TFON9mSY\n1iKbNGJaq4odT2H7ihCBcPfGt7rWBpg9z1DYZrMU9ThMUCcTWIfVQKbmfcgf\nGqb4fbZk6etvGWubcJVIiEdBNJ+o2lDJnpCFYQDNQuhZ40K0ldyAPrtvW9cr\nTUpJyU2aiePRG+QtTqfyyM4/h5NLp0duuRXUs8Xl6b0tfe906jODNAlWmQNN\nB5rDlFOp+FvViOH2xs++lxFkRdaprQhQCRLI0yaVonCS8M57WiCFlGaqw+os\nlRWi\r\n=mLGd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBwkFgpXMD9cVH132U3Fni+Z5Qme+fVFXhvw6rPaAPAOAiBjC3S7RyJHAN6Kl82Dz6u/dyJmAO/ax9PQNAVGEtKYRg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.19.5_1576701884807_0.5298904440995942"},"_hasShrinkwrap":false},"0.19.6":{"name":"@react-ssr/express","version":"0.19.6","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.19.6","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"9c375b4e1c631620368426dce0a16e8626b3a272","_id":"@react-ssr/express@0.19.6","_nodeVersion":"12.14.0","_npmVersion":"lerna/3.19.0/node@v12.14.0+x64 (darwin)","dist":{"integrity":"sha512-w3kRoL9+7hyFf9f71vYeujTc0jGpWf4eUWO7nfOdZISVDphSstFWDGjyWWIzDT9Y5ihekmugD3UvY7qUkhPnJw==","shasum":"e26bc6045b4c220505b4d6665044d4d24c594535","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.19.6.tgz","fileCount":8,"unpackedSize":15180,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd/NIxCRA9TVsSAnZWagAAPz4P/iOiARJ9Kpx8UbRS4nkr\nIE7dEFlsgn2mq7JVuO0GXQUShqx9HcEPtGcH+s/fbAT1gySkukdCgZlaSWoK\nqb5w+b6MXe1m9QlZmN4VYbUeEExMAI8J64Q7zS6pI3+4JDXdOECjCxYPCyz3\nMTrsmTqyE46O61NaP7QvfZcTEf2EKztHCvMm2cuvw2OuJ/IuO8PvnfUfjsgy\nqbqdOfIHBotzDmQN6fXksctJf4lItAuJIOnvxJAIzn0w1SQICV5SIdQmLvAU\nrznb9PdCyG7Oz7Ij2VK273nUJd7PO3exq168bGVNJsL7/s7EuGx1/CWEg9xG\nqxp4TfRJQyiOYIlJr3P74hhdCsUXd2x2NmRCwZunpNIH1gLY+kSSI+ZEyCFD\nb02S0YYil2GNYraOSsvpA9fE6YC667aMgU37uBvH9niPbG4tNOKEUB136hKv\nAphkEMQMlDPdxMOs6pzSo7fO8ra0Y+n3L/eHIQBXA8ElF5tHQFRsy4jgLZFc\nb9UDHYXpvzx/BHiuKFWNNbcJCj7Shw49iDj//4Skq8x49UQ+gd17r6EzEFt5\n0vgwv9v+8pduRZ4Jqcz00JrQeRCprgAeN2adeO6EfVrZEtJrEg9BLn1pEpJ/\nslbLWaw1hi0IVrFaFXrf7fv52W51IRnxVs+eXUI8BlmbmpS/O0vSvoIKHGkM\nbyfn\r\n=UGxn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCDkF9ccKLQqR6kRp2Ulhho67c8nk/8t7Rr2qhqtR7HSgIhAMK7CiE1pf0mD+sRdo5LjTdhvD1mgtpF73rq/4ZfBNOs"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.19.6_1576849968435_0.7614316417818769"},"_hasShrinkwrap":false},"0.19.8-alpha.9":{"name":"@react-ssr/express","version":"0.19.8-alpha.9","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.19.8-alpha.9+5495f39","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"5495f391a8550361082a8dd97c43a488f587ca0c","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - HMR (Hot Module Replacement) when `process.env.NODE_ENV !== 'production'`\n  - Automatically reflect to the browser as soon as you save the scripts and even if styles\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.19.8-alpha.9","_nodeVersion":"12.14.1","_npmVersion":"lerna/3.19.0/node@v12.14.1+x64 (darwin)","dist":{"integrity":"sha512-5w4Hy5yXcFjos9G+6Aaqctboz8goz19QQDLBEc1036RXTLL/Y04C3aU+OUV7FfLyEiYO8gxUA9PGJieE2sSIoA==","shasum":"85074525fb679c6884e26eeaba0f4309393f3989","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.19.8-alpha.9.tgz","fileCount":8,"unpackedSize":15212,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeGIqkCRA9TVsSAnZWagAAxNsQAKGwXF9pGCh0E65W2fZM\nxZ2gnVI6H6F69XaTL3ozhc374U7W/+aSk2+4WpR2ijX/22oEXyRqihg1Zxd5\nLBrrrIYYWvrJ6zPWV+ezzzV/FkjLVPQAINIzVEhcLvLVDqi7g9j1pRFFvqbL\nHIlDTa+ybV2YsuiZlh7A/z6p+X4u/q0sgkRfOHgjse/rsKSrUSoJFRtls3nk\nQebQtM/BZ8RE0il9DMZXoceWZLZh2nnF3EN+eL12QtbWqWxgt/FVScBAJUVc\nzMnngnjaxC0zUSEWkuLS2sfSXEY7eEPcJAkk481xhvVTvswOB8TRhL7ZHJti\nWmGKInKlEUr/rDo2DNQyke2q8P6iNSRl2Vgs30OcdtO8H2yPhX9JVYFCpU54\nASql2+YPEpI8TCQ7oeNsWC0zHU5Ovn9NMfB0A7IVav/sswxv483bUwkfEQA5\nc2Qe9c9ndMOidhQgRICL9NspLCVMLTv0i76HSgFRZ5LN6RcX5eOpc4A0Juwk\nTn73p3llB/Dsy7PbmHaHcAh0FPqgTx9yWRQ419EpOQQGXQzxvoYFgeU5lc0k\nNPfOQMgETYPsYg/Rn/qWUXRGixEvDtJLhwutz4jjx1WMrm/PQ62JWuBB+Mpa\n73abMua0yROVnHUC9rZBKd5NS5+yyOIcZC806XpO5mNuPGNfR19m21dEmpsI\nFSKE\r\n=uXx8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAsYQnGOUs/HdFwtebMebDLpHqG7XP2W4+36RhVk7Aa+AiEAvvkj0HMrpsPGYN2fdFNalHMiEg2ZFxpFLaHqerGwh4o="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.19.8-alpha.9_1578666659863_0.3235821155072298"},"_hasShrinkwrap":false},"0.19.8":{"name":"@react-ssr/express","version":"0.19.8","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.19.8","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"7d4dee56b2662a8d2498acb533fa275da77e6a33","_id":"@react-ssr/express@0.19.8","_nodeVersion":"12.14.1","_npmVersion":"lerna/3.19.0/node@v12.14.1+x64 (darwin)","dist":{"integrity":"sha512-GJixN+X11Dzh4+zDc6c1eU6LpRV4sI4QUKcBapuay0A512nL9tdDAXhprvc1gyUA6ogohaunj+bRLUJBBrsFkA==","shasum":"c67de3e1fe5e334710a42043e7e0e1b919213e6f","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.19.8.tgz","fileCount":8,"unpackedSize":15180,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeGIsxCRA9TVsSAnZWagAAim8P/1ra7gMqXe6lT69Neweb\n04W6lcFRGW6ibTWgnSz0uj6CN4nagRiuG6G0W6J42b5vZt2H11LGkahoxKjc\nyzB8dPzHDvnL2TWKscIE1Z6uNeRAAfdJw2zxbkfQ919FLtCoshtfJ+0fpHca\nbSgZMQwvnjk5kcrZN83XSlUbR3Ao3rstk0IE34sB65PsRhkBZc8IFnICEBId\nx3BWDzOoeXCjFmmvaKpyPnxm44PJAg7R3RXYNMi0yWfmbalrG3UHHz9qLlNJ\nbhVn+agynyna/Uda+DieJxO5B5dbg6bN/W0Dp1gCnCERuu8cvy/oDk6Y8FyW\n1ltmZShrYf3NgYbX8+Pyw2QB1YsICDXzTIRvfQhGkN6jfmvt4RuY1APrxgPc\n1qTeMGOde5yxRUq9J+mssI9E8ypI9oOt7bGPcrqZBmzi5Vi5ifivpA8SMd07\nDaItjsZ0ubaF3o2XizzXbs2j3LiOvRenEuDqC7Zc/TG1qVU+MoqASmuFalAf\nmi1Tjg/zd94OqKGLSQkTdvG3+QTndUxC9K+itbl6ptcQYCCVRG1ZMCG+Xx2A\nVVU91kJoo5AcarGFlKThKayxgYh+WxO02nyty/CP6Vp/HwDb+82EH6rFecKM\nfa+tLEpGWPsSYtu2DfFuqJCGB02KWpTZq44QYLf/SWXjsoaVflLtjK7YALgk\nxwb7\r\n=6NZm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHNUtbzrIMT5MGMn5tYO3zTeF9lNJZkqIZVUlSuaZAUFAiBk7k798oiaUMS9bX2I+sYzrHPR3gkBT6IZrD0T9e7s3g=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.19.8_1578666800652_0.4784351075545781"},"_hasShrinkwrap":false},"0.19.9":{"name":"@react-ssr/express","version":"0.19.9","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.19.9","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"3b318a0dbec60d05139259761b95e4689fb39f74","_id":"@react-ssr/express@0.19.9","_nodeVersion":"12.14.1","_npmVersion":"lerna/3.19.0/node@v12.14.1+x64 (darwin)","dist":{"integrity":"sha512-kjUaJfuEbo4uxTyguEedLj33g3O93lUMAXz53bFa6em8It5/E3xwx12fRv7HlkAGo9/+ZYhTv7Q+nmF2X+RHjQ==","shasum":"861efc383208a6f1ff8afabf8bfa43e4853c65aa","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.19.9.tgz","fileCount":8,"unpackedSize":15180,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeHqPRCRA9TVsSAnZWagAAGjoP/1yZUxegouAjLwXUcqT9\ncJ1jFOL/YbkCe3YwbPSj3u8Do+It+HPGYinCv9zpT4AbKSDudn812swioiU4\n5C8yt7ReAJ7+ztQ3eKvLQqeFuANJ2tC+2wA8UjO1DLorchL2KVYkVJyhobgy\nLVwGfy5UiFGxcPPKlAzMm5F3o8y6tcZaaDOYIGZfXI4DrHLtf/ccNhPrZggO\nv0S0NjySvRDuZKvKLRh+al77xjjJaJlCTC1wzFv3Q1MCQ6LltPZTaWxhPu+6\n6L84l7nSo/OPVpzIfmcHVCyLNzxHOiNTNHvdrjdroP+xh2Vsd46vgFWASy1y\njwYBxnRDBLfi7rhbgsna7gw/sr/okVoe4pyoXq4qQv5fUDZ94MBI4jKxe9Pb\nywdWUeK7u5PhobIiht841bXXA9cY244zZgr+i16QAFOLyaB8zZyWXpDc9B5W\no6svJrgTPZpMPYNlPgL9Q7MayYrrjAjp97X+AMthpU5PfSWE16uqJoj4/rcR\nbLXf8x9Q2vg5/1QOL4Alv1ux/kI5T4ZctMXm3B5iu36qu8Ab/kpOc1xl4wgg\nIaMIbAcB68b9TUJIuGM2bze/5six4A8mUAsC/3Oou9n+PbUqA4ekOYhkA0su\n96Ivdrt0wPId+5c4zz5a4yAsW3L7V8+CgO4r3HSGtirwZPi2fueKeBTP1q5E\nrkl3\r\n=OhDJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEucStp8/OxxP1K5xdb6dW4jJsXEGq/xvpZtD/wCbjgdAiEAyEQY67me1/0rbBGu37PQp9kenHcEQmLwrx+NI4L64o8="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.19.9_1579066321383_0.2689435869108341"},"_hasShrinkwrap":false},"0.19.10-alpha.2":{"name":"@react-ssr/express","version":"0.19.10-alpha.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.19.10-alpha.2+a837709","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"a837709ae8e219fb8d7bc8d18e6ec540cff30ef7","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - HMR (Hot Module Replacement) when `process.env.NODE_ENV !== 'production'`\n  - Automatically reflect to the browser as soon as you save the scripts and even if styles\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.19.10-alpha.2","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-qMLupWxSNq44rytNcZIMFHhdcO5FjybS/OYRwXYwW8akupU0SspyLyh7JkUqZqiBiF6Mn/E4kshnaVNGf0Ng6A==","shasum":"9ec00e5827b8876d39cc7991aeede4fb9388db78","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.19.10-alpha.2.tgz","fileCount":8,"unpackedSize":15214,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeXQf4CRA9TVsSAnZWagAAW+wP/jNhVXTU2pjeO8+PIJ2m\nxn67B2+kEtRUcV4S5kiS1QyKRitDYcN/nRqT5vGZ6r4OnbAHZEhxYI9SYMjW\ntwG539W2228W6JABEw0mBWZR915K94KxiFlbom1gi5www8eTuqLQiQAMrQwU\nVOwJtX2vqb0qgSP9fA78vcwxQ/T7iSG838RBXLTPwXGVYcxDWCKQOvbsAa08\ngvpqEqz6/SAdK680td1r16GPW36TrRqzQONR6Gv69JD5aP1Z8hNwhXxwK80G\n+4MJzS6iCVUsVWxjwDvkM+u/cgyuGk0AvB9ldhfNea+BRqTU7XD5jWPLBxgj\n74TqqDe3NHY0hBDM5eaf1YcGY7oAMvwzMdb/qFMGzyrDUKJYdpWLEoY2UkZo\nEPRZlLHVf93rUoxNkmvkGl+RBaHYc+QAl5m3zE7QmQ60NxVMJO2wLJalWtBb\nBDq8kX8fJaL3MDgPninNZvKr9qNnpk88g3uUyFM8Ef1QErASLbdKai8jFXdQ\nLcXQGHxbPgSQ347/6flYtlv28sfLwxPqaNqSH+HN0VSqxrn5ndjwZCjCFgA1\ns79o7On+ioiIDUCbDkdAcINEhXOqk72mgmRgUUE0qmw8Wz4RnkPV6E5ubzh0\n/Ot56X4T2ET4V17X9g86oVfLfQjY4/0jryByvrMHYSmr5qN+6lz1sAH4UGzx\n/zjR\r\n=cOnf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC4TOMwP1Qh8yyubekQJjg2sLxiIYt2lxRyelrQJStF9AIhAOAoDyAACxb8iPU2nZ4gvo49qTLiV0zFcf5IAwv0WF2z"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.19.10-alpha.2_1583155191825_0.7557443529263956"},"_hasShrinkwrap":false},"0.19.10":{"name":"@react-ssr/express","version":"0.19.10","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.19.10","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"0f8a75eb8aca6b55752b657c96c4c7ea1d7cf838","_id":"@react-ssr/express@0.19.10","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-zvzcKkGjabmYbX/z0n+ZjDt+71PynbvXZJUm0pb/hFavnSb2yotj1KNpG4E5zYlUeYOAtS766pAb+5LEMEWRyg==","shasum":"7dadf9c0cac0851c5c1f65c068a6130907b1e5e1","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.19.10.tgz","fileCount":8,"unpackedSize":15182,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeXQjcCRA9TVsSAnZWagAAvn8P/2/kIjgwGpMjQl1+PCr7\nfq1hLQZJmvZrPT1eXJGFtlW6WBhWDVtp1M/pOTAoLA01aEzmeVSkbGqCTIsG\nxxjCfCIsFXfAzLLUpmybBOUaLDjyP10lr3hUP3bfroihfGhQuRrK1H3kWlNB\ny/M4DP6BHxTpkyjnMlEIEKl1KP6mNMB8Jwqh94EjW/CO0+jVWnBHvo5sgqhu\nlVSvdOG7iZwpEki2uGcylkCqdu82QwInTOzIUz9ULxbRk42QIevomo2RD+xt\nUND/HhXBIuM3jVQuSzFLiX5Kn6pDWMeZZEfCrsk9qUZHuljeTwnCASJZryYG\nEhj2NeICGXfhf0os/6/ELosGu2dmmIzI8azt82U4AP1tQz8Svlxbm9HSs13L\n+47DOZs5zwY9pG7ICZZOEKyppQ/fx9bIva+DVx9/EthaQFcoaKtkqlxRCNSR\naxvh3Ug0ELkzORMiWdr3WuUmH+QOS7KZ3VfOn3J8BGpUigg4B8RyHfStE6L9\n7eWWgCqzfahXwHjWSJNBkIBaOOoEaoeOJSibTxhSpB6c4UxlNIyfuTsPHhg7\nnciRoO8hkXvJPAraagLTzDiaaCnTCVukqPJ5to8dlzP+ZFjcakMBwSqefe5b\n7c3dc+Zf9ZO8PDLX2WclMWQqsOA3PREDYFveMhZYv5NsDC76BXd0trp18XEp\nHfk1\r\n=a/Xq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGR6kpVY3DMoJK5Sz2TifqQuQe1vUW30+xYoXCLXaE3MAiEA18Z4hFl6bW4oTrt1V9PgW53oyWzDgohh9rsYyEVXG7M="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.19.10_1583155420310_0.6481931857835945"},"_hasShrinkwrap":false},"0.19.11-alpha.13":{"name":"@react-ssr/express","version":"0.19.11-alpha.13","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.19.11-alpha.13+a5d7318","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"a5d731824faac353903769e55c04bdc44003cf7c","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - HMR (Hot Module Replacement) when `process.env.NODE_ENV !== 'production'`\n  - Automatically reflect to the browser as soon as you save the scripts and even if styles\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.19.11-alpha.13","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-A3zrK5xdlI3Ts0zWEtJakJXJtBivBqC+1v0AwDfH+qdkI/ywUkEMI5ndJSGBuRGNfERKCDOzjADrggEpnyugBw==","shasum":"e0e6594a27035ff84134aa78485bbb079df2f4e6","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.19.11-alpha.13.tgz","fileCount":8,"unpackedSize":15216,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeXRGwCRA9TVsSAnZWagAAHFoP/R5vrL23OGa6iDvv0hFD\nqOfXjlxOfsYt+hLtX1IruLLSE7Mwu+/giv8uqEa9oItUH/lR+mjCUEWREHKK\n3NsAY8icJiDEe4kwivum6C/f+xB5zgOsOxtNGCBPOj0StpYI2Lfy/r7j+sKB\npgOd32mUhSskCJEyG3aonCs313N8WiYxBZ3SxGoXva71hACcWW51sjyhgqIV\nwnROxnmsth80t5KFExPgs2Dcdwyu4Q9ZI1jT2Vv8p385Ns38Z3Fq0G2FFk7x\nORL+LEG1WdJOuAAC79AzEmn5+Ic4lbSeNWk5RN+P/CQD9YHT3C4OS+uwaoV+\nfkOE+pA5RuyOjmudFs5jfd0B+6ZiJkTo9xgklLz8moJO10d8fq94Xsn8HJ0E\n5gitAPjXVKLjKcPS0JN9QjvQ5UQnqbZ6zjk9GSm+K/UnNqR4Miox5C1AEjlK\n1Qb3YN547vumB7FM7dx+YIvnh4pTBj85tnfZjAHz9qg4APYuUKqaX7xNnYnR\nDPWE+58P7KAVtfSt909uBQ46PniHSeJMX00b0Nwntiu5yj+8gqf0a0O4Ph2O\nOrZkt3yRyYqjx67Bxvhc3lsNzI0vlyg5Ig5TQWbr2SLmvgZc5RvMzMPpDgr5\njv6hsHBdGuHhBK3hiFo+CYl4hucXYSrArQQic2N4J+p9qg6OYmgymMsOAK30\nseFs\r\n=M/RQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA+94Plzyu+sj5VMjrhDNthIZdYwo5ZeSPp0uGcHPTT8AiBZ0qYyulBsTjOKr+/4KntOpnuejmAvoFgaSRCNy9uLxw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.19.11-alpha.13_1583157679930_0.07648302665077367"},"_hasShrinkwrap":false},"0.19.11":{"name":"@react-ssr/express","version":"0.19.11","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.19.11","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"5db7a89f256a6af6ec5e1f46bf1badd2d7ca754c","_id":"@react-ssr/express@0.19.11","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-V5oqo0we3iTk39JB1cqTaHD/X+P6YsAfDt6XolbQEIbnueZc2303JY3RoQ+aZvfYsxYnE1i/R2H1gGRbpttPQw==","shasum":"4e2256bafc65c217334fad0d96f9b4cc2f6b5e2a","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.19.11.tgz","fileCount":8,"unpackedSize":15182,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeXRJHCRA9TVsSAnZWagAAZA4P/RkekXMSqwyVDhFefA26\nRNF1V71lJQFvX23KWRZu87vN43Um+/ssCJwkeudSVWjsDxoXOqi1dRSQzhaz\nbLQbtR9mao5bd2dAA/udYg+ATskA54oa6c6nmm3ggxpCt36YTInY4ZvGe91g\nn0YSTR2/xn0l6hJ3k2WOAYAAJ0zOGEGNxvjPXJuqtL/olS5JDRdPAc65m29x\nZ3F2x5wJSclUUAXjv5gdYc96rJfFK+325FrKQLQFapq5NaXCzl00wh+w3AsH\nCOVncVIUpZ1/VYxGPkNb0uc2NiZo7o7/jPSQX9y5XlOHb57EAJvk1u4iRLSJ\n+BXIustxKlvVq1jTQd1byB3TeIs6lFfqtUQv3VwiPC9SBixJEya6INShTPMF\ne3Q1PMU+cK1bolbjsLZ4xsXJiZDHDXgHsT6OSBtADFSSRZlDhhWXZsG8Hi/M\np1YOjq1PDRAhWwvpAsXGNzazwhDemeLOCx8XTyVIUF/GtT5qnmX5O5Adq57K\nX5dFmir0w1+C8O2yI/vKyvuuuWmWhK6Cedz5HUKYUmyKDQN23m7ncseEfNB9\n/PTjQFDirKwHYc4VJtVGcEFdSe/t/WJvNb1YIu6K/m+uCYOihUKw9qbx1n7W\nPNDp4iQj2XdpS6huOnRGvjgq843B0onREmzFemJQ3ugjh+dw4CC10O56BrS2\n/DNY\r\n=XKn3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE8qduQAUvHTfamGZlG1y7LOAAULVBPw9NDm4gF5IIEIAiAdpCoH6AmjWCUn/JtbIKmRTEGtjFcsFQOfww8etfgDsQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.19.11_1583157831299_0.7373414053560567"},"_hasShrinkwrap":false},"0.19.12-alpha.1":{"name":"@react-ssr/express","version":"0.19.12-alpha.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.19.12-alpha.1+0506dd7","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"0506dd74406e759cf332cdf21697e07beb1b3825","readme":"## Overview\r\n\r\n- SSR (Server Side Rendering) as a view template engine\r\n- Dynamic\r\n  - `props`\r\n    - Passing the server data to the React client `props`\r\n    - Suitable for dynamic routes like blogging\r\n  - `Head` component for better SEO\r\n- Developer Experience\r\n  - HMR (Hot Module Replacement) when `process.env.NODE_ENV !== 'production'`\r\n  - Automatically reflect to the browser as soon as you save the scripts and even if styles\r\n\r\n## Usage\r\n\r\nInstall it:\r\n\r\n```bash\r\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\r\n```\r\n\r\nAnd add a script to your package.json like this:\r\n\r\n```json\r\n{\r\n  \"scripts\": {\r\n    \"start\": \"node server.js\"\r\n  }\r\n}\r\n```\r\n\r\nThen, populate files below inside your project:\r\n\r\n**`.babelrc`**:\r\n\r\n```json\r\n{\r\n  \"presets\": [\r\n    \"@react-ssr/express/babel\"\r\n  ]\r\n}\r\n```\r\n\r\n**`server.js`**:\r\n\r\n```js\r\nconst express = require('express');\r\nconst register = require('@react-ssr/express/register');\r\n\r\nconst app = express();\r\n\r\n(async () => {\r\n  // register `.jsx` or `.tsx` as a view template engine\r\n  await register(app);\r\n\r\n  app.get('/', (req, res) => {\r\n    const message = 'Hello World!';\r\n    res.render('index', { message });\r\n  });\r\n\r\n  app.listen(3000, () => {\r\n    console.log('> Ready on http://localhost:3000');\r\n  });\r\n})();\r\n```\r\n\r\n**`views/index.jsx`**:\r\n\r\n```jsx\r\nexport default function Index({ message }) {\r\n  return <p>{message}</p>;\r\n}\r\n```\r\n\r\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\r\n\r\n## Configuration (`ssr.config.js`)\r\n\r\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\r\n\r\n```js\r\nmodule.exports = {\r\n  id: 'default',\r\n  distDir: '.ssr',\r\n  viewsDir: 'views',\r\n  staticViews: [],\r\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\r\n    return config;\r\n  },\r\n};\r\n```\r\n\r\n### `ssr.config.js#id`\r\n\r\nThe id of **UI framework**. (default: `default`)\r\n\r\nIt can be ignored only when the project does not use any UI frameworks.\r\n\r\nSupported UI frameworks are:\r\n\r\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\r\n  - [x] [bulma](https://bulma.io)\r\n  - [x] [semantic-ui](https://react.semantic-ui.com)\r\n  - [x] Or any other **non** CSS-in-JS UI frameworks\r\n- [x] [emotion](https://emotion.sh)\r\n- [x] [styled-components](https://www.styled-components.com)\r\n- [x] [material-ui](https://material-ui.com)\r\n- [x] [antd](https://ant.design)\r\n- [ ] and more...\r\n\r\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\r\n\r\n```js\r\nmodule.exports = {\r\n  id: 'emotion',\r\n};\r\n```\r\n\r\n### `ssr.config.js#distDir`\r\n\r\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\r\n\r\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\r\n\r\n```js\r\nmodule.exports = {\r\n  // dist folder should be ignored by `.gitignore`\r\n  distDir: 'dist/.ssr',\r\n};\r\n```\r\n\r\n### `ssr.config.js#viewsDir`\r\n\r\nThe place where we put views. (default: `views`)\r\n\r\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\r\n\r\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\r\n\r\n### `ssr.config.js#staticViews`\r\n\r\nIf specified, `react-ssr` generates html cache when production:\r\n\r\n```js\r\nmodule.exports = {\r\n  staticViews: [\r\n    'auth/login',\r\n    'auth/register',\r\n    'about',\r\n  ],\r\n};\r\n```\r\n\r\n### `ssr.config.js#webpack()`\r\n\r\n```js\r\nmodule.exports = {\r\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\r\n    // we can override default webpack config here\r\n    return config;\r\n  },\r\n};\r\n```\r\n\r\n## Custom Document\r\n\r\nJust put `_document.jsx` or `_document.tsx` into the views root:\r\n\r\n**`views/_document.jsx`**:\r\n\r\n```jsx\r\nimport React from 'react';\r\nimport {\r\n  Document,\r\n  Head,\r\n  Main,\r\n} from '@react-ssr/express';\r\n\r\nexport default class extends Document {\r\n  render() {\r\n    return (\r\n      <html lang=\"en\">\r\n        <Head>\r\n          <title>Default Title</title>\r\n          <meta charSet=\"utf-8\" />\r\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\r\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\r\n        </Head>\r\n        <body>\r\n          <Main />\r\n        </body>\r\n      </html>\r\n    );\r\n  }\r\n};\r\n```\r\n\r\n**Note**:\r\n\r\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\r\n\r\nAnd then, use it as always:\r\n\r\n**`views/index.jsx`**:\r\n\r\n```jsx\r\nconst Index = (props) => {\r\n  return <p>Hello World!</p>;\r\n};\r\n\r\nexport default Index;\r\n```\r\n\r\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\r\n\r\n## Dynamic `Head`\r\n\r\nWe can use the `Head` component in any pages:\r\n\r\n**`views/index.jsx`**:\r\n\r\n```jsx\r\nimport React from 'react';\r\nimport { Head } from '@react-ssr/express';\r\n\r\nconst Index = (props) => {\r\n  return (\r\n    <React.Fragment>\r\n      <Head>\r\n        <title>Dynamic Title</title>\r\n        <meta name=\"description\" content=\"Dynamic Description\" />\r\n      </Head>\r\n      <p>Of course, SSR Ready!</p>\r\n    </React.Fragment>\r\n  );\r\n};\r\n\r\nexport default Index;\r\n```\r\n\r\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\r\n\r\n## Supported UI Framework\r\n\r\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\r\n  - [x] [bulma](https://bulma.io)\r\n  - [x] [semantic-ui](https://react.semantic-ui.com)\r\n  - [x] Or any other **non** CSS-in-JS UI frameworks\r\n- [x] [emotion](https://emotion.sh)\r\n- [x] [styled-components](https://www.styled-components.com)\r\n- [x] [material-ui](https://material-ui.com)\r\n- [x] [antd](https://ant.design)\r\n- [ ] and more...\r\n\r\n### Non CSS-in-JS framework\r\n\r\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\r\n\r\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\r\n\r\nAll we have to do is to load global CSS in `_document` or each page:\r\n\r\n**`views/_document.jsx`**:\r\n\r\n```jsx\r\nimport React from 'react';\r\nimport {\r\n  Document,\r\n  Head,\r\n  Main,\r\n} from '@react-ssr/express';\r\n\r\nexport default class extends Document {\r\n  render() {\r\n    return (\r\n      <html lang=\"en\">\r\n        <Head>\r\n          <title>A Sample of Semantic UI React</title>\r\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\r\n        </Head>\r\n        <body>\r\n          <Main />\r\n        </body>\r\n      </html>\r\n    );\r\n  }\r\n}\r\n```\r\n\r\n### With Ant Design\r\n\r\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\r\n\r\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\r\n\r\nAnd then, populate `.babelrc` in your project root:\r\n\r\n```json\r\n{\r\n  \"presets\": [\r\n    \"@react-ssr/express/babel\"\r\n  ],\r\n  \"plugins\": [\r\n    [\r\n      \"import\",\r\n      {\r\n        \"libraryName\": \"antd\",\r\n        \"style\": \"css\"\r\n      }\r\n    ]\r\n  ]\r\n}\r\n```\r\n\r\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\r\n\r\n### With Emotion\r\n\r\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\r\n\r\nIn order to enable SSR, we must install these packages:\r\n\r\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\r\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\r\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\r\n\r\nAnd then, populate `.babelrc` in your project root:\r\n\r\n```json\r\n{\r\n  \"presets\": [\r\n    \"@react-ssr/express/babel\"\r\n  ],\r\n  \"plugins\": [\r\n    \"emotion\"\r\n  ]\r\n}\r\n```\r\n\r\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\r\n\r\n### With Material UI\r\n\r\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\r\n\r\nWe can use [material-ui](https://material-ui.com) without extra configuration.\r\n\r\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\r\n\r\n### With styled-components\r\n\r\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\r\n\r\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\r\n\r\nAnd then, populate `.babelrc` in your project root:\r\n\r\n```json\r\n{\r\n  \"presets\": [\r\n    \"@react-ssr/express/babel\"\r\n  ],\r\n  \"plugins\": [\r\n    \"styled-components\"\r\n  ]\r\n}\r\n```\r\n\r\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\r\n\r\n## TypeScript Support\r\n\r\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\r\n\r\nThe code of TypeScript will be like this:\r\n\r\n**`package.json`**:\r\n\r\n```json\r\n{\r\n  \"scripts\": {\r\n    \"start\": \"ts-node server.ts\"\r\n  }\r\n}\r\n```\r\n\r\n**`server.ts`**:\r\n\r\n```ts\r\nimport express, { Request, Response } from '@react-ssr/express';\r\n\r\nconst app = express();\r\n\r\napp.get('/', (req: Request, res: Response) => {\r\n  const message = 'Hello World!';\r\n  res.render('index', { message });\r\n});\r\n\r\napp.listen(3000, () => {\r\n  console.log('> Ready on http://localhost:3000');\r\n});\r\n```\r\n\r\n**`views/index.tsx`**:\r\n\r\n```tsx\r\ninterface IndexProps {\r\n  message: string;\r\n}\r\n\r\nexport default function Index({ message }: IndexProps) {\r\n  return <p>{message}</p>;\r\n}\r\n```\r\n\r\n## Examples\r\n\r\n- **@react-ssr/express**\r\n  - `.jsx`\r\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\r\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\r\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\r\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\r\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\r\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\r\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\r\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\r\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\r\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\r\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\r\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\r\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\r\n  - `.tsx`\r\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\r\n- **@react-ssr/nestjs-express**\r\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\r\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\r\n- **@react-ssr/static**\r\n  - `.jsx`\r\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\r\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\r\n  - `.tsx`\r\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\r\n\r\n## Starters\r\n\r\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\r\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\r\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\r\n\r\n## Articles\r\n\r\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\r\n\r\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\r\n\r\n## Related\r\n\r\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\r\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.19.12-alpha.1","_nodeVersion":"12.14.1","_npmVersion":"lerna/3.20.2/node@v12.14.1+x64 (win32)","dist":{"integrity":"sha512-hg7U/ah25iSiiyH1qDDW2UfBuDIbeDsJoU29rVHRhWY+5MeHw3i2+x29yiviwQk2tY+MJnQhrYHDA/ohTQGNkg==","shasum":"1647e8d483aad6869dfa182b4f4c16bcb023d33b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.19.12-alpha.1.tgz","fileCount":8,"unpackedSize":15723,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeXV9hCRA9TVsSAnZWagAA9A8P/1GEBtGVeUauxu3cWhpm\nFkF408PUt92qnP3m2ZQX/Im+sB1s24vadxP3aQMcJEnfbVG/qRz0YjARb3Gs\nnzAmnb027daBOcjPgSl3Q4FeTZe9XXNWBp0VTgdw8W2bS6FUdOV42/lGxPnF\nB1JryAJYIBuHXY5xWiGlbBP4EYK8CPb+EHpyrQWJxFR5E0kdr/EJd9PnBbht\nLwC6skXGKWWS+M+z1wtf66NkL7EkKdk+P1sKjI4VPwh5ZzOd/T/VdNA6N7Yw\nVrumjxRneYXwDkbJ5Zs2rFtzcYRPnvGcXUReBabOABT3gpYZEDQt3Sp1D/WO\nL4+l6jNvkIeJ9U0xLyXkjwD52zJMq/Yh5gUk5o3ioIVuwpy8ZJw5I/91yWO2\nOvLmrcXQlYXDu3PR1NT2scPgBLGj3xU9pXSMMQDjz48L0Of9WFBOqjDFSOhv\n5UUI2Ykyr5cpu75M4S/ZwtGA2QCHtUM3CCkZXZe8ybnRSQY9WAnmtPgk2i7A\nSDwMtjfHEemTX78VUGIA33/vGjWK6dP4+v6d/XZGYr2H0/LWkQVNQ8rWypnR\nZ0hcQxYXkIGTCnWy8fjH9mygDDvzhfYo/zPpjjahX3qIk41GjXG78j2NKhwX\ngLVRifec2oYA6MzGhIgRsmvg8vwsjX8b8jli0fh3AeoPdAyy0+jI9R7ugJQZ\n98Yy\r\n=Hi7p\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCW9buoQ6XFbnNDPm/q1y9zdswHcgKtRANGcKade73zCwIhAP5fTur33QSuHS3cZBDSHKo8zlcg9Qlhs8bEZv+eWraq"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.19.12-alpha.1_1583177569280_0.4902944826076183"},"_hasShrinkwrap":false},"0.19.12-alpha.2":{"name":"@react-ssr/express","version":"0.19.12-alpha.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.19.11","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"5ce0f762e1331d50a4a30aae894e9fce84a159fe","readme":"## Overview\r\n\r\n- SSR (Server Side Rendering) as a view template engine\r\n- Dynamic\r\n  - `props`\r\n    - Passing the server data to the React client `props`\r\n    - Suitable for dynamic routes like blogging\r\n  - `Head` component for better SEO\r\n- Developer Experience\r\n  - HMR (Hot Module Replacement) when `process.env.NODE_ENV !== 'production'`\r\n  - Automatically reflect to the browser as soon as you save the scripts and even if styles\r\n\r\n## Usage\r\n\r\nInstall it:\r\n\r\n```bash\r\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\r\n```\r\n\r\nAnd add a script to your package.json like this:\r\n\r\n```json\r\n{\r\n  \"scripts\": {\r\n    \"start\": \"node server.js\"\r\n  }\r\n}\r\n```\r\n\r\nThen, populate files below inside your project:\r\n\r\n**`.babelrc`**:\r\n\r\n```json\r\n{\r\n  \"presets\": [\r\n    \"@react-ssr/express/babel\"\r\n  ]\r\n}\r\n```\r\n\r\n**`server.js`**:\r\n\r\n```js\r\nconst express = require('express');\r\nconst register = require('@react-ssr/express/register');\r\n\r\nconst app = express();\r\n\r\n(async () => {\r\n  // register `.jsx` or `.tsx` as a view template engine\r\n  await register(app);\r\n\r\n  app.get('/', (req, res) => {\r\n    const message = 'Hello World!';\r\n    res.render('index', { message });\r\n  });\r\n\r\n  app.listen(3000, () => {\r\n    console.log('> Ready on http://localhost:3000');\r\n  });\r\n})();\r\n```\r\n\r\n**`views/index.jsx`**:\r\n\r\n```jsx\r\nexport default function Index({ message }) {\r\n  return <p>{message}</p>;\r\n}\r\n```\r\n\r\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\r\n\r\n## Configuration (`ssr.config.js`)\r\n\r\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\r\n\r\n```js\r\nmodule.exports = {\r\n  id: 'default',\r\n  distDir: '.ssr',\r\n  viewsDir: 'views',\r\n  staticViews: [],\r\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\r\n    return config;\r\n  },\r\n};\r\n```\r\n\r\n### `ssr.config.js#id`\r\n\r\nThe id of **UI framework**. (default: `default`)\r\n\r\nIt can be ignored only when the project does not use any UI frameworks.\r\n\r\nSupported UI frameworks are:\r\n\r\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\r\n  - [x] [bulma](https://bulma.io)\r\n  - [x] [semantic-ui](https://react.semantic-ui.com)\r\n  - [x] Or any other **non** CSS-in-JS UI frameworks\r\n- [x] [emotion](https://emotion.sh)\r\n- [x] [styled-components](https://www.styled-components.com)\r\n- [x] [material-ui](https://material-ui.com)\r\n- [x] [antd](https://ant.design)\r\n- [ ] and more...\r\n\r\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\r\n\r\n```js\r\nmodule.exports = {\r\n  id: 'emotion',\r\n};\r\n```\r\n\r\n### `ssr.config.js#distDir`\r\n\r\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\r\n\r\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\r\n\r\n```js\r\nmodule.exports = {\r\n  // dist folder should be ignored by `.gitignore`\r\n  distDir: 'dist/.ssr',\r\n};\r\n```\r\n\r\n### `ssr.config.js#viewsDir`\r\n\r\nThe place where we put views. (default: `views`)\r\n\r\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\r\n\r\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\r\n\r\n### `ssr.config.js#staticViews`\r\n\r\nIf specified, `react-ssr` generates html cache when production:\r\n\r\n```js\r\nmodule.exports = {\r\n  staticViews: [\r\n    'auth/login',\r\n    'auth/register',\r\n    'about',\r\n  ],\r\n};\r\n```\r\n\r\n### `ssr.config.js#webpack()`\r\n\r\n```js\r\nmodule.exports = {\r\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\r\n    // we can override default webpack config here\r\n    return config;\r\n  },\r\n};\r\n```\r\n\r\n## Custom Document\r\n\r\nJust put `_document.jsx` or `_document.tsx` into the views root:\r\n\r\n**`views/_document.jsx`**:\r\n\r\n```jsx\r\nimport React from 'react';\r\nimport {\r\n  Document,\r\n  Head,\r\n  Main,\r\n} from '@react-ssr/express';\r\n\r\nexport default class extends Document {\r\n  render() {\r\n    return (\r\n      <html lang=\"en\">\r\n        <Head>\r\n          <title>Default Title</title>\r\n          <meta charSet=\"utf-8\" />\r\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\r\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\r\n        </Head>\r\n        <body>\r\n          <Main />\r\n        </body>\r\n      </html>\r\n    );\r\n  }\r\n};\r\n```\r\n\r\n**Note**:\r\n\r\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\r\n\r\nAnd then, use it as always:\r\n\r\n**`views/index.jsx`**:\r\n\r\n```jsx\r\nconst Index = (props) => {\r\n  return <p>Hello World!</p>;\r\n};\r\n\r\nexport default Index;\r\n```\r\n\r\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\r\n\r\n## Dynamic `Head`\r\n\r\nWe can use the `Head` component in any pages:\r\n\r\n**`views/index.jsx`**:\r\n\r\n```jsx\r\nimport React from 'react';\r\nimport { Head } from '@react-ssr/express';\r\n\r\nconst Index = (props) => {\r\n  return (\r\n    <React.Fragment>\r\n      <Head>\r\n        <title>Dynamic Title</title>\r\n        <meta name=\"description\" content=\"Dynamic Description\" />\r\n      </Head>\r\n      <p>Of course, SSR Ready!</p>\r\n    </React.Fragment>\r\n  );\r\n};\r\n\r\nexport default Index;\r\n```\r\n\r\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\r\n\r\n## Supported UI Framework\r\n\r\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\r\n  - [x] [bulma](https://bulma.io)\r\n  - [x] [semantic-ui](https://react.semantic-ui.com)\r\n  - [x] Or any other **non** CSS-in-JS UI frameworks\r\n- [x] [emotion](https://emotion.sh)\r\n- [x] [styled-components](https://www.styled-components.com)\r\n- [x] [material-ui](https://material-ui.com)\r\n- [x] [antd](https://ant.design)\r\n- [ ] and more...\r\n\r\n### Non CSS-in-JS framework\r\n\r\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\r\n\r\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\r\n\r\nAll we have to do is to load global CSS in `_document` or each page:\r\n\r\n**`views/_document.jsx`**:\r\n\r\n```jsx\r\nimport React from 'react';\r\nimport {\r\n  Document,\r\n  Head,\r\n  Main,\r\n} from '@react-ssr/express';\r\n\r\nexport default class extends Document {\r\n  render() {\r\n    return (\r\n      <html lang=\"en\">\r\n        <Head>\r\n          <title>A Sample of Semantic UI React</title>\r\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\r\n        </Head>\r\n        <body>\r\n          <Main />\r\n        </body>\r\n      </html>\r\n    );\r\n  }\r\n}\r\n```\r\n\r\n### With Ant Design\r\n\r\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\r\n\r\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\r\n\r\nAnd then, populate `.babelrc` in your project root:\r\n\r\n```json\r\n{\r\n  \"presets\": [\r\n    \"@react-ssr/express/babel\"\r\n  ],\r\n  \"plugins\": [\r\n    [\r\n      \"import\",\r\n      {\r\n        \"libraryName\": \"antd\",\r\n        \"style\": \"css\"\r\n      }\r\n    ]\r\n  ]\r\n}\r\n```\r\n\r\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\r\n\r\n### With Emotion\r\n\r\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\r\n\r\nIn order to enable SSR, we must install these packages:\r\n\r\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\r\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\r\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\r\n\r\nAnd then, populate `.babelrc` in your project root:\r\n\r\n```json\r\n{\r\n  \"presets\": [\r\n    \"@react-ssr/express/babel\"\r\n  ],\r\n  \"plugins\": [\r\n    \"emotion\"\r\n  ]\r\n}\r\n```\r\n\r\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\r\n\r\n### With Material UI\r\n\r\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\r\n\r\nWe can use [material-ui](https://material-ui.com) without extra configuration.\r\n\r\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\r\n\r\n### With styled-components\r\n\r\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\r\n\r\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\r\n\r\nAnd then, populate `.babelrc` in your project root:\r\n\r\n```json\r\n{\r\n  \"presets\": [\r\n    \"@react-ssr/express/babel\"\r\n  ],\r\n  \"plugins\": [\r\n    \"styled-components\"\r\n  ]\r\n}\r\n```\r\n\r\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\r\n\r\n## TypeScript Support\r\n\r\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\r\n\r\nThe code of TypeScript will be like this:\r\n\r\n**`package.json`**:\r\n\r\n```json\r\n{\r\n  \"scripts\": {\r\n    \"start\": \"ts-node server.ts\"\r\n  }\r\n}\r\n```\r\n\r\n**`server.ts`**:\r\n\r\n```ts\r\nimport express, { Request, Response } from '@react-ssr/express';\r\n\r\nconst app = express();\r\n\r\napp.get('/', (req: Request, res: Response) => {\r\n  const message = 'Hello World!';\r\n  res.render('index', { message });\r\n});\r\n\r\napp.listen(3000, () => {\r\n  console.log('> Ready on http://localhost:3000');\r\n});\r\n```\r\n\r\n**`views/index.tsx`**:\r\n\r\n```tsx\r\ninterface IndexProps {\r\n  message: string;\r\n}\r\n\r\nexport default function Index({ message }: IndexProps) {\r\n  return <p>{message}</p>;\r\n}\r\n```\r\n\r\n## Examples\r\n\r\n- **@react-ssr/express**\r\n  - `.jsx`\r\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\r\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\r\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\r\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\r\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\r\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\r\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\r\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\r\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\r\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\r\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\r\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\r\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\r\n  - `.tsx`\r\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\r\n- **@react-ssr/nestjs-express**\r\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\r\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\r\n- **@react-ssr/static**\r\n  - `.jsx`\r\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\r\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\r\n  - `.tsx`\r\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\r\n\r\n## Starters\r\n\r\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\r\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\r\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\r\n\r\n## Articles\r\n\r\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\r\n\r\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\r\n\r\n## Related\r\n\r\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\r\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.19.12-alpha.2","_nodeVersion":"12.14.1","_npmVersion":"lerna/3.20.2/node@v12.14.1+x64 (win32)","dist":{"integrity":"sha512-uj8PtOMpr+3448e/YH2nt7Yy+41o31wMTwPN5SeLdHm/faJhmyX9qG484QgvLxdgiZ/oi0BwpGyxbJDS+dKw2A==","shasum":"c67baa43cdb99c260d51f5ef7ddbec908dfc2582","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.19.12-alpha.2.tgz","fileCount":8,"unpackedSize":15810,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeXWEXCRA9TVsSAnZWagAAd4YQAIxLkqrkUyo81aJWgGLa\nX9de5yGFZK/K7uftjmQb536twQVqC0Y8ejEgYHL9b914rXwq0BCOfrxzxHRV\nUXNWEbWSxjfhF00AJh1OLWXrTqEGUw2UZVDqFl2/EzqamS+9twlJW3LAZIKi\nJUEdvJkasgv67wEbJzCG4JeGQpqskEDRRQkpTqjA+dC4v/VdDXZUK4Q0hTH0\nQPJb5QFV95DBwEaF2sZd4GeE1cg4qvBUQRElsbNO2uVQ7hQvisFyLpJ3W+7L\nywFMRUJRAjgOH1RJZSyr3TGck5YGKbx+y1aK6QM8JXdFqZw/1+hggMoRgzz/\nnhGybK3aRqHeXIAmhdLP7MBjHfUwEmIWxh8HjU3AVj0G/als0eP0QBVqCrLw\n9o20l16m691Gvwb4WVKt41rM0k7PGC+Zh3C1TmIwqBUZRK6Nn977YGa+Diy2\n2uSH6CMny3g/5PVyx53A4TW/F1buBwviRsLFEgvAI/LTtFDVrf4VGWfZGdz6\nbrjcyBr8KrBXr+NLUzEQ2VCBgZ0eTGbuhauA65L1t3q9XU01D3iBaSvlftZ8\nqFxpkxXmL0xLqEBE3a6cZAsNj9IRpJUToUHc/GwMz9+/AIEsU1VCyFEuVpHy\nxtYl74Da2msrKUVvqGkuxOfd3Uu3Aqja19RBbo9mKNafN5vsr4iyHGhpCPgt\nL1HB\r\n=VZ80\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCcuWRN3CPHByuH+cJiECriV3G2GnY/jz2yzuP8UaQeJAIgQx/No3lVw7rOCHJZVhDKQMNQ3TIe67HmMA7A5FvWnW0="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.19.12-alpha.2_1583178006677_0.11163247215088679"},"_hasShrinkwrap":false},"0.19.12-alpha.3":{"name":"@react-ssr/express","version":"0.19.12-alpha.3","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.19.12-alpha.3+ea265b9","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"ea265b90697d35a2ae28cf67afd7cd542a132f92","readme":"## Overview\r\n\r\n- SSR (Server Side Rendering) as a view template engine\r\n- Dynamic\r\n  - `props`\r\n    - Passing the server data to the React client `props`\r\n    - Suitable for dynamic routes like blogging\r\n  - `Head` component for better SEO\r\n- Developer Experience\r\n  - HMR (Hot Module Replacement) when `process.env.NODE_ENV !== 'production'`\r\n  - Automatically reflect to the browser as soon as you save the scripts and even if styles\r\n\r\n## Usage\r\n\r\nInstall it:\r\n\r\n```bash\r\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\r\n```\r\n\r\nAnd add a script to your package.json like this:\r\n\r\n```json\r\n{\r\n  \"scripts\": {\r\n    \"start\": \"node server.js\"\r\n  }\r\n}\r\n```\r\n\r\nThen, populate files below inside your project:\r\n\r\n**`.babelrc`**:\r\n\r\n```json\r\n{\r\n  \"presets\": [\r\n    \"@react-ssr/express/babel\"\r\n  ]\r\n}\r\n```\r\n\r\n**`server.js`**:\r\n\r\n```js\r\nconst express = require('express');\r\nconst register = require('@react-ssr/express/register');\r\n\r\nconst app = express();\r\n\r\n(async () => {\r\n  // register `.jsx` or `.tsx` as a view template engine\r\n  await register(app);\r\n\r\n  app.get('/', (req, res) => {\r\n    const message = 'Hello World!';\r\n    res.render('index', { message });\r\n  });\r\n\r\n  app.listen(3000, () => {\r\n    console.log('> Ready on http://localhost:3000');\r\n  });\r\n})();\r\n```\r\n\r\n**`views/index.jsx`**:\r\n\r\n```jsx\r\nexport default function Index({ message }) {\r\n  return <p>{message}</p>;\r\n}\r\n```\r\n\r\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\r\n\r\n## Configuration (`ssr.config.js`)\r\n\r\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\r\n\r\n```js\r\nmodule.exports = {\r\n  id: 'default',\r\n  distDir: '.ssr',\r\n  viewsDir: 'views',\r\n  staticViews: [],\r\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\r\n    return config;\r\n  },\r\n};\r\n```\r\n\r\n### `ssr.config.js#id`\r\n\r\nThe id of **UI framework**. (default: `default`)\r\n\r\nIt can be ignored only when the project does not use any UI frameworks.\r\n\r\nSupported UI frameworks are:\r\n\r\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\r\n  - [x] [bulma](https://bulma.io)\r\n  - [x] [semantic-ui](https://react.semantic-ui.com)\r\n  - [x] Or any other **non** CSS-in-JS UI frameworks\r\n- [x] [emotion](https://emotion.sh)\r\n- [x] [styled-components](https://www.styled-components.com)\r\n- [x] [material-ui](https://material-ui.com)\r\n- [x] [antd](https://ant.design)\r\n- [ ] and more...\r\n\r\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\r\n\r\n```js\r\nmodule.exports = {\r\n  id: 'emotion',\r\n};\r\n```\r\n\r\n### `ssr.config.js#distDir`\r\n\r\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\r\n\r\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\r\n\r\n```js\r\nmodule.exports = {\r\n  // dist folder should be ignored by `.gitignore`\r\n  distDir: 'dist/.ssr',\r\n};\r\n```\r\n\r\n### `ssr.config.js#viewsDir`\r\n\r\nThe place where we put views. (default: `views`)\r\n\r\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\r\n\r\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\r\n\r\n### `ssr.config.js#staticViews`\r\n\r\nIf specified, `react-ssr` generates html cache when production:\r\n\r\n```js\r\nmodule.exports = {\r\n  staticViews: [\r\n    'auth/login',\r\n    'auth/register',\r\n    'about',\r\n  ],\r\n};\r\n```\r\n\r\n### `ssr.config.js#webpack()`\r\n\r\n```js\r\nmodule.exports = {\r\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\r\n    // we can override default webpack config here\r\n    return config;\r\n  },\r\n};\r\n```\r\n\r\n## Custom Document\r\n\r\nJust put `_document.jsx` or `_document.tsx` into the views root:\r\n\r\n**`views/_document.jsx`**:\r\n\r\n```jsx\r\nimport React from 'react';\r\nimport {\r\n  Document,\r\n  Head,\r\n  Main,\r\n} from '@react-ssr/express';\r\n\r\nexport default class extends Document {\r\n  render() {\r\n    return (\r\n      <html lang=\"en\">\r\n        <Head>\r\n          <title>Default Title</title>\r\n          <meta charSet=\"utf-8\" />\r\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\r\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\r\n        </Head>\r\n        <body>\r\n          <Main />\r\n        </body>\r\n      </html>\r\n    );\r\n  }\r\n};\r\n```\r\n\r\n**Note**:\r\n\r\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\r\n\r\nAnd then, use it as always:\r\n\r\n**`views/index.jsx`**:\r\n\r\n```jsx\r\nconst Index = (props) => {\r\n  return <p>Hello World!</p>;\r\n};\r\n\r\nexport default Index;\r\n```\r\n\r\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\r\n\r\n## Dynamic `Head`\r\n\r\nWe can use the `Head` component in any pages:\r\n\r\n**`views/index.jsx`**:\r\n\r\n```jsx\r\nimport React from 'react';\r\nimport { Head } from '@react-ssr/express';\r\n\r\nconst Index = (props) => {\r\n  return (\r\n    <React.Fragment>\r\n      <Head>\r\n        <title>Dynamic Title</title>\r\n        <meta name=\"description\" content=\"Dynamic Description\" />\r\n      </Head>\r\n      <p>Of course, SSR Ready!</p>\r\n    </React.Fragment>\r\n  );\r\n};\r\n\r\nexport default Index;\r\n```\r\n\r\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\r\n\r\n## Supported UI Framework\r\n\r\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\r\n  - [x] [bulma](https://bulma.io)\r\n  - [x] [semantic-ui](https://react.semantic-ui.com)\r\n  - [x] Or any other **non** CSS-in-JS UI frameworks\r\n- [x] [emotion](https://emotion.sh)\r\n- [x] [styled-components](https://www.styled-components.com)\r\n- [x] [material-ui](https://material-ui.com)\r\n- [x] [antd](https://ant.design)\r\n- [ ] and more...\r\n\r\n### Non CSS-in-JS framework\r\n\r\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\r\n\r\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\r\n\r\nAll we have to do is to load global CSS in `_document` or each page:\r\n\r\n**`views/_document.jsx`**:\r\n\r\n```jsx\r\nimport React from 'react';\r\nimport {\r\n  Document,\r\n  Head,\r\n  Main,\r\n} from '@react-ssr/express';\r\n\r\nexport default class extends Document {\r\n  render() {\r\n    return (\r\n      <html lang=\"en\">\r\n        <Head>\r\n          <title>A Sample of Semantic UI React</title>\r\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\r\n        </Head>\r\n        <body>\r\n          <Main />\r\n        </body>\r\n      </html>\r\n    );\r\n  }\r\n}\r\n```\r\n\r\n### With Ant Design\r\n\r\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\r\n\r\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\r\n\r\nAnd then, populate `.babelrc` in your project root:\r\n\r\n```json\r\n{\r\n  \"presets\": [\r\n    \"@react-ssr/express/babel\"\r\n  ],\r\n  \"plugins\": [\r\n    [\r\n      \"import\",\r\n      {\r\n        \"libraryName\": \"antd\",\r\n        \"style\": \"css\"\r\n      }\r\n    ]\r\n  ]\r\n}\r\n```\r\n\r\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\r\n\r\n### With Emotion\r\n\r\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\r\n\r\nIn order to enable SSR, we must install these packages:\r\n\r\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\r\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\r\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\r\n\r\nAnd then, populate `.babelrc` in your project root:\r\n\r\n```json\r\n{\r\n  \"presets\": [\r\n    \"@react-ssr/express/babel\"\r\n  ],\r\n  \"plugins\": [\r\n    \"emotion\"\r\n  ]\r\n}\r\n```\r\n\r\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\r\n\r\n### With Material UI\r\n\r\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\r\n\r\nWe can use [material-ui](https://material-ui.com) without extra configuration.\r\n\r\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\r\n\r\n### With styled-components\r\n\r\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\r\n\r\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\r\n\r\nAnd then, populate `.babelrc` in your project root:\r\n\r\n```json\r\n{\r\n  \"presets\": [\r\n    \"@react-ssr/express/babel\"\r\n  ],\r\n  \"plugins\": [\r\n    \"styled-components\"\r\n  ]\r\n}\r\n```\r\n\r\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\r\n\r\n## TypeScript Support\r\n\r\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\r\n\r\nThe code of TypeScript will be like this:\r\n\r\n**`package.json`**:\r\n\r\n```json\r\n{\r\n  \"scripts\": {\r\n    \"start\": \"ts-node server.ts\"\r\n  }\r\n}\r\n```\r\n\r\n**`server.ts`**:\r\n\r\n```ts\r\nimport express, { Request, Response } from '@react-ssr/express';\r\n\r\nconst app = express();\r\n\r\napp.get('/', (req: Request, res: Response) => {\r\n  const message = 'Hello World!';\r\n  res.render('index', { message });\r\n});\r\n\r\napp.listen(3000, () => {\r\n  console.log('> Ready on http://localhost:3000');\r\n});\r\n```\r\n\r\n**`views/index.tsx`**:\r\n\r\n```tsx\r\ninterface IndexProps {\r\n  message: string;\r\n}\r\n\r\nexport default function Index({ message }: IndexProps) {\r\n  return <p>{message}</p>;\r\n}\r\n```\r\n\r\n## Examples\r\n\r\n- **@react-ssr/express**\r\n  - `.jsx`\r\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\r\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\r\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\r\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\r\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\r\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\r\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\r\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\r\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\r\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\r\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\r\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\r\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\r\n  - `.tsx`\r\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\r\n- **@react-ssr/nestjs-express**\r\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\r\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\r\n- **@react-ssr/static**\r\n  - `.jsx`\r\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\r\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\r\n  - `.tsx`\r\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\r\n\r\n## Starters\r\n\r\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\r\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\r\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\r\n\r\n## Articles\r\n\r\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\r\n\r\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\r\n\r\n## Related\r\n\r\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\r\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.19.12-alpha.3","_nodeVersion":"12.14.1","_npmVersion":"lerna/3.20.2/node@v12.14.1+x64 (win32)","dist":{"integrity":"sha512-zXFRK/8pgu7qH6tiOst7hNznscDoGeosENfSeGPX3er8yfxaPx1ABxPo4eo/l0SlDUH8lFbziyRrJNRBy8vdDA==","shasum":"04aa8c9b24af7397e0d865ceda53ccafb9ea6a8b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.19.12-alpha.3.tgz","fileCount":8,"unpackedSize":15826,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeXWIRCRA9TVsSAnZWagAAymcP+gPyIp9vejcsuoTPXIz4\n/croSEzHMh+jj02c2jtCTafiUdoSCNaUwew1pZ6AYDPv38k8+D6HyNnJ+Mev\n25hgK2/0q1Fu7VzpB9amxWMz/8ZP3qrp/uIrviAQQR6fzRhdomI3Q6NG2CYf\nANHQID5Ck36ugDcrhPuxm0y/25nagBHkL8mstxNz9UyoFJHewpehVe8ddmz4\nOaAStO1HMxuWDRgaPsR71C3+sVkxAUB1f2BZ8H5EA2kC6dvNjz5Y6Pul1/Xo\nWTNcl76RRpuGqHpUgzdKBlOaXCVhyhCnH8tw04pv0DoqbhgOfZlcXRYhEINP\n9B7zM4ZvgeRFpcBF94vskM9hLOBC6T35i6HpJmkkP0uFvvf77sCJqbkQjrKW\nc/gosHKga0XY8ODkVZw9TDGcEhkOqooi8Nd+MyuSg1Lr/Bea4w/ecvVc/jjb\nIQ2/EWzjZvj7Q19NjGCQzmT1EOlg9UUmyREbkl3yrwPH7qn5kGjqoRAp+MqO\npodsgH7wsfyW6NnwVZuH/aglP5TlonSXjErQjE1TY7FYHujkpaMekzWQFdKX\np112xlpiQR0qt0bj7p+m52gtgkUwkFIP1BKdXcdtrGt8fchQsZoHA66Sr5ax\nCM+Aa6QLYTcMpT3p+XE/Vjj+AoT7+e8NB32lugoUTu7C1jIs01E1JM7zXD+A\nuA9T\r\n=zAWo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFP8ESpwdU1cCqIGyLOLEKodtyUnp04Vsn+yQ6nMZS9sAiEArAiACn2hN2hpFtwG33Gy2adM2hFd9/AR+Rpro+DImSU="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.19.12-alpha.3_1583178257053_0.300139283793857"},"_hasShrinkwrap":false},"0.19.12":{"name":"@react-ssr/express","version":"0.19.12","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.19.12","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"268f1e8b1e3ab9b089058b926900fc3a63b891e0","_id":"@react-ssr/express@0.19.12","_nodeVersion":"12.14.1","_npmVersion":"lerna/3.20.2/node@v12.14.1+x64 (win32)","dist":{"integrity":"sha512-ii0ZhbeVIdEuS8b+wlz+yJMV1+zPV1JoCMHlBt/VCHLbKV5J7x//fvKPEkJdvFHPLfh0Kzpk+jKYP8PENBh6zg==","shasum":"5eb23281806ecb631729d2a787b3872dbae9cd21","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.19.12.tgz","fileCount":8,"unpackedSize":15794,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeXWLiCRA9TVsSAnZWagAAux4P/Atms5LHf9/B7SQ0dhhh\nMtYsI3QrgHZcrfa2VS11pzgqI/VVV5Jt4nS90WFxcPTr0zjFWjAmk4MDgK2m\naRP8DbV2e4ii12ouYOql9yvWrmqTXiYdl7NUR0Es8WdshwcpCVyM8hdWexeo\n3RBPaUTdnTaOKXC/Aunjta1Y5DN4Ra+33LLhPoOtZHlLoh62SWPvZUL1NoY4\nk0OLvrB4HQgYSycOErwY5+5iKyOidfqiIZDDQ8LNZTCqTwuGTmO9i9gsIKp/\nmsaw8KWZDo9fte2+XIC5wzNiY4kClKpxkxuLZnLHgVSg/L0TrLmxe1dcNLJI\nc2K0T6tnci7g64vuidDmU8UVU+l61Rsf9nCES5bblWuuQ4Ip0gQMpo/Sm++1\nNF/FY3zyMw9alueZiUp6hhRN0W67zS/AwYLXtJyos8Tb5UOO2jMvwbLQmzpU\nidcb9BVng462FxTH9RmOa4sVR4Xqna0RafSVfVHmL+0KKJb1hTyWxttkfoDi\nqU+EBfjpXqLvjXpLnNBxHQ5OAyWptbh+rXybwWTSqlUhsxDHfrG4xAKExiyf\nyjuA/vPcVT70JxLdO9wEkYKqUx9fnvkTF2Ee3trqmp8n4iy25OAxO822JAZl\naq6UEotQA09GKyGs2ZSnFg6h6DWKewZdXmmRokjcYm0pYUDGdDdci9Xz0okW\n0E0K\r\n=8TI7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDYFfbyv6oAytubJeJVMfbU3P9Lvlp8MMeeKX2/jUsc7gIhAIEIsUSATZimnVyJszyFr6TJKFk8isla78VNrIvokSud"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.19.12_1583178464962_0.2821349828892119"},"_hasShrinkwrap":false},"0.19.13-alpha.0":{"name":"@react-ssr/express","version":"0.19.13-alpha.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.19.13-alpha.0+8344bf1","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"8344bf11dbb3343a5698b59c89bd69db4d870e73","readme":"## Overview\r\n\r\n- SSR (Server Side Rendering) as a view template engine\r\n- Dynamic\r\n  - `props`\r\n    - Passing the server data to the React client `props`\r\n    - Suitable for dynamic routes like blogging\r\n  - `Head` component for better SEO\r\n- Developer Experience\r\n  - HMR (Hot Module Replacement) when `process.env.NODE_ENV !== 'production'`\r\n  - Automatically reflect to the browser as soon as you save the scripts and even if styles\r\n\r\n## Usage\r\n\r\nInstall it:\r\n\r\n```bash\r\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\r\n```\r\n\r\nAnd add a script to your package.json like this:\r\n\r\n```json\r\n{\r\n  \"scripts\": {\r\n    \"start\": \"node server.js\"\r\n  }\r\n}\r\n```\r\n\r\nThen, populate files below inside your project:\r\n\r\n**`.babelrc`**:\r\n\r\n```json\r\n{\r\n  \"presets\": [\r\n    \"@react-ssr/express/babel\"\r\n  ]\r\n}\r\n```\r\n\r\n**`server.js`**:\r\n\r\n```js\r\nconst express = require('express');\r\nconst register = require('@react-ssr/express/register');\r\n\r\nconst app = express();\r\n\r\n(async () => {\r\n  // register `.jsx` or `.tsx` as a view template engine\r\n  await register(app);\r\n\r\n  app.get('/', (req, res) => {\r\n    const message = 'Hello World!';\r\n    res.render('index', { message });\r\n  });\r\n\r\n  app.listen(3000, () => {\r\n    console.log('> Ready on http://localhost:3000');\r\n  });\r\n})();\r\n```\r\n\r\n**`views/index.jsx`**:\r\n\r\n```jsx\r\nexport default function Index({ message }) {\r\n  return <p>{message}</p>;\r\n}\r\n```\r\n\r\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\r\n\r\n## Configuration (`ssr.config.js`)\r\n\r\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\r\n\r\n```js\r\nmodule.exports = {\r\n  id: 'default',\r\n  distDir: '.ssr',\r\n  viewsDir: 'views',\r\n  staticViews: [],\r\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\r\n    return config;\r\n  },\r\n};\r\n```\r\n\r\n### `ssr.config.js#id`\r\n\r\nThe id of **UI framework**. (default: `default`)\r\n\r\nIt can be ignored only when the project does not use any UI frameworks.\r\n\r\nSupported UI frameworks are:\r\n\r\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\r\n  - [x] [bulma](https://bulma.io)\r\n  - [x] [semantic-ui](https://react.semantic-ui.com)\r\n  - [x] Or any other **non** CSS-in-JS UI frameworks\r\n- [x] [emotion](https://emotion.sh)\r\n- [x] [styled-components](https://www.styled-components.com)\r\n- [x] [material-ui](https://material-ui.com)\r\n- [x] [antd](https://ant.design)\r\n- [ ] and more...\r\n\r\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\r\n\r\n```js\r\nmodule.exports = {\r\n  id: 'emotion',\r\n};\r\n```\r\n\r\n### `ssr.config.js#distDir`\r\n\r\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\r\n\r\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\r\n\r\n```js\r\nmodule.exports = {\r\n  // dist folder should be ignored by `.gitignore`\r\n  distDir: 'dist/.ssr',\r\n};\r\n```\r\n\r\n### `ssr.config.js#viewsDir`\r\n\r\nThe place where we put views. (default: `views`)\r\n\r\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\r\n\r\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\r\n\r\n### `ssr.config.js#staticViews`\r\n\r\nIf specified, `react-ssr` generates html cache when production:\r\n\r\n```js\r\nmodule.exports = {\r\n  staticViews: [\r\n    'auth/login',\r\n    'auth/register',\r\n    'about',\r\n  ],\r\n};\r\n```\r\n\r\n### `ssr.config.js#webpack()`\r\n\r\n```js\r\nmodule.exports = {\r\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\r\n    // we can override default webpack config here\r\n    return config;\r\n  },\r\n};\r\n```\r\n\r\n## Custom Document\r\n\r\nJust put `_document.jsx` or `_document.tsx` into the views root:\r\n\r\n**`views/_document.jsx`**:\r\n\r\n```jsx\r\nimport React from 'react';\r\nimport {\r\n  Document,\r\n  Head,\r\n  Main,\r\n} from '@react-ssr/express';\r\n\r\nexport default class extends Document {\r\n  render() {\r\n    return (\r\n      <html lang=\"en\">\r\n        <Head>\r\n          <title>Default Title</title>\r\n          <meta charSet=\"utf-8\" />\r\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\r\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\r\n        </Head>\r\n        <body>\r\n          <Main />\r\n        </body>\r\n      </html>\r\n    );\r\n  }\r\n};\r\n```\r\n\r\n**Note**:\r\n\r\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\r\n\r\nAnd then, use it as always:\r\n\r\n**`views/index.jsx`**:\r\n\r\n```jsx\r\nconst Index = (props) => {\r\n  return <p>Hello World!</p>;\r\n};\r\n\r\nexport default Index;\r\n```\r\n\r\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\r\n\r\n## Dynamic `Head`\r\n\r\nWe can use the `Head` component in any pages:\r\n\r\n**`views/index.jsx`**:\r\n\r\n```jsx\r\nimport React from 'react';\r\nimport { Head } from '@react-ssr/express';\r\n\r\nconst Index = (props) => {\r\n  return (\r\n    <React.Fragment>\r\n      <Head>\r\n        <title>Dynamic Title</title>\r\n        <meta name=\"description\" content=\"Dynamic Description\" />\r\n      </Head>\r\n      <p>Of course, SSR Ready!</p>\r\n    </React.Fragment>\r\n  );\r\n};\r\n\r\nexport default Index;\r\n```\r\n\r\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\r\n\r\n## Supported UI Framework\r\n\r\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\r\n  - [x] [bulma](https://bulma.io)\r\n  - [x] [semantic-ui](https://react.semantic-ui.com)\r\n  - [x] Or any other **non** CSS-in-JS UI frameworks\r\n- [x] [emotion](https://emotion.sh)\r\n- [x] [styled-components](https://www.styled-components.com)\r\n- [x] [material-ui](https://material-ui.com)\r\n- [x] [antd](https://ant.design)\r\n- [ ] and more...\r\n\r\n### Non CSS-in-JS framework\r\n\r\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\r\n\r\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\r\n\r\nAll we have to do is to load global CSS in `_document` or each page:\r\n\r\n**`views/_document.jsx`**:\r\n\r\n```jsx\r\nimport React from 'react';\r\nimport {\r\n  Document,\r\n  Head,\r\n  Main,\r\n} from '@react-ssr/express';\r\n\r\nexport default class extends Document {\r\n  render() {\r\n    return (\r\n      <html lang=\"en\">\r\n        <Head>\r\n          <title>A Sample of Semantic UI React</title>\r\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\r\n        </Head>\r\n        <body>\r\n          <Main />\r\n        </body>\r\n      </html>\r\n    );\r\n  }\r\n}\r\n```\r\n\r\n### With Ant Design\r\n\r\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\r\n\r\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\r\n\r\nAnd then, populate `.babelrc` in your project root:\r\n\r\n```json\r\n{\r\n  \"presets\": [\r\n    \"@react-ssr/express/babel\"\r\n  ],\r\n  \"plugins\": [\r\n    [\r\n      \"import\",\r\n      {\r\n        \"libraryName\": \"antd\",\r\n        \"style\": \"css\"\r\n      }\r\n    ]\r\n  ]\r\n}\r\n```\r\n\r\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\r\n\r\n### With Emotion\r\n\r\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\r\n\r\nIn order to enable SSR, we must install these packages:\r\n\r\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\r\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\r\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\r\n\r\nAnd then, populate `.babelrc` in your project root:\r\n\r\n```json\r\n{\r\n  \"presets\": [\r\n    \"@react-ssr/express/babel\"\r\n  ],\r\n  \"plugins\": [\r\n    \"emotion\"\r\n  ]\r\n}\r\n```\r\n\r\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\r\n\r\n### With Material UI\r\n\r\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\r\n\r\nWe can use [material-ui](https://material-ui.com) without extra configuration.\r\n\r\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\r\n\r\n### With styled-components\r\n\r\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\r\n\r\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\r\n\r\nAnd then, populate `.babelrc` in your project root:\r\n\r\n```json\r\n{\r\n  \"presets\": [\r\n    \"@react-ssr/express/babel\"\r\n  ],\r\n  \"plugins\": [\r\n    \"styled-components\"\r\n  ]\r\n}\r\n```\r\n\r\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\r\n\r\n## TypeScript Support\r\n\r\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\r\n\r\nThe code of TypeScript will be like this:\r\n\r\n**`package.json`**:\r\n\r\n```json\r\n{\r\n  \"scripts\": {\r\n    \"start\": \"ts-node server.ts\"\r\n  }\r\n}\r\n```\r\n\r\n**`server.ts`**:\r\n\r\n```ts\r\nimport express, { Request, Response } from '@react-ssr/express';\r\n\r\nconst app = express();\r\n\r\napp.get('/', (req: Request, res: Response) => {\r\n  const message = 'Hello World!';\r\n  res.render('index', { message });\r\n});\r\n\r\napp.listen(3000, () => {\r\n  console.log('> Ready on http://localhost:3000');\r\n});\r\n```\r\n\r\n**`views/index.tsx`**:\r\n\r\n```tsx\r\ninterface IndexProps {\r\n  message: string;\r\n}\r\n\r\nexport default function Index({ message }: IndexProps) {\r\n  return <p>{message}</p>;\r\n}\r\n```\r\n\r\n## Examples\r\n\r\n- **@react-ssr/express**\r\n  - `.jsx`\r\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\r\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\r\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\r\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\r\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\r\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\r\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\r\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\r\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\r\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\r\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\r\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\r\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\r\n  - `.tsx`\r\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\r\n- **@react-ssr/nestjs-express**\r\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\r\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\r\n- **@react-ssr/static**\r\n  - `.jsx`\r\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\r\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\r\n  - `.tsx`\r\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\r\n\r\n## Starters\r\n\r\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\r\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\r\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\r\n\r\n## Articles\r\n\r\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\r\n\r\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\r\n\r\n## Related\r\n\r\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\r\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.19.13-alpha.0","_nodeVersion":"12.14.1","_npmVersion":"lerna/3.20.2/node@v12.14.1+x64 (win32)","dist":{"integrity":"sha512-tmSWiXukqBeFhrcmdcD3GEMQu2ToYWyo8abNrjac6lDqYDK2tn8SKdSnC/gCV97isHdl4uuS7qYxoEyBf5Ae5A==","shasum":"dba1f45865508d3c916837615c38a740d40bd182","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.19.13-alpha.0.tgz","fileCount":8,"unpackedSize":15826,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeXWWhCRA9TVsSAnZWagAA4egP/RI+xtgONOX65GnvSOi7\nAZOAqeiMzv48PG/wYD5UHWe+UJ//XNqSxigSoCsAbz8PrGoQ7mePZ/pxxbmG\n1XhAq+PJ60ZX86Wit+jR8vgeY7unDUKakLN38d5odJz5PvzXw+BglzEkFVy4\n1Drh1sOfMmEQMbo3x32hRnSl5g62DNaDVEnqWbG0sRV7Ysf+NL/7KQGyYXCO\n3EFfx3EKON7UvLY8tzNYtebn1b58dFoxh+7acJjweiDz6lg9ovpKNNdNRwpJ\n5eutk7vYbi4doGGPUIhsADqlkevbxdGilpe6xaG/OJT6311AG5XItMAiAG/n\n2Dp65kWSQcAf4cHEaAMR7aj1MEuhJKm7lrhUCVkIpnDSJEjzYG+QInkDLfUe\nNFNA/jaAaveKJ1tzSjr1sKxU7aA04uhxTwH55+FIxTgbwo3SDfMGCzDvUcQt\nNeyW1InTJB3Hjt1TwFElneRZY76RgOSvJSeVwL6KFn8CWub4irixqDiNyN2y\njPKI6TxreGiVcRobh7525BYDlH0oXPMudcZRjXkhScBzvGSG1CmYo5Nlt6dj\nrexWFpJ9hYj+0x/x3BQo3bbnC19SZ7U76F34pO0tS2X6+e/ToZjOXRdpKfNY\nasjEHHi1wKJzv4YKZQTxgV0DG+cJUPQDs3f3z7XQH56ebDXNa1gSu0JG7JzA\nW7tT\r\n=0ix+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCXE07DqFDdITsLI5+LZWCKXB6X+gl4eaB0xxBL7c164AIgUTzrfWSsnw7sCOFQVtbJ3pTrV+/6JmrbOvgtPtF+MAo="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.19.13-alpha.0_1583179169051_0.8414888316135858"},"_hasShrinkwrap":false},"0.19.13-alpha.1":{"name":"@react-ssr/express","version":"0.19.13-alpha.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.19.13-alpha.1+14d0b78","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"14d0b78a06149584af6ea68b86671f82d32e270f","readme":"## Overview\r\n\r\n- SSR (Server Side Rendering) as a view template engine\r\n- Dynamic\r\n  - `props`\r\n    - Passing the server data to the React client `props`\r\n    - Suitable for dynamic routes like blogging\r\n  - `Head` component for better SEO\r\n- Developer Experience\r\n  - HMR (Hot Module Replacement) when `process.env.NODE_ENV !== 'production'`\r\n  - Automatically reflect to the browser as soon as you save the scripts and even if styles\r\n\r\n## Usage\r\n\r\nInstall it:\r\n\r\n```bash\r\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\r\n```\r\n\r\nAnd add a script to your package.json like this:\r\n\r\n```json\r\n{\r\n  \"scripts\": {\r\n    \"start\": \"node server.js\"\r\n  }\r\n}\r\n```\r\n\r\nThen, populate files below inside your project:\r\n\r\n**`.babelrc`**:\r\n\r\n```json\r\n{\r\n  \"presets\": [\r\n    \"@react-ssr/express/babel\"\r\n  ]\r\n}\r\n```\r\n\r\n**`server.js`**:\r\n\r\n```js\r\nconst express = require('express');\r\nconst register = require('@react-ssr/express/register');\r\n\r\nconst app = express();\r\n\r\n(async () => {\r\n  // register `.jsx` or `.tsx` as a view template engine\r\n  await register(app);\r\n\r\n  app.get('/', (req, res) => {\r\n    const message = 'Hello World!';\r\n    res.render('index', { message });\r\n  });\r\n\r\n  app.listen(3000, () => {\r\n    console.log('> Ready on http://localhost:3000');\r\n  });\r\n})();\r\n```\r\n\r\n**`views/index.jsx`**:\r\n\r\n```jsx\r\nexport default function Index({ message }) {\r\n  return <p>{message}</p>;\r\n}\r\n```\r\n\r\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\r\n\r\n## Configuration (`ssr.config.js`)\r\n\r\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\r\n\r\n```js\r\nmodule.exports = {\r\n  id: 'default',\r\n  distDir: '.ssr',\r\n  viewsDir: 'views',\r\n  staticViews: [],\r\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\r\n    return config;\r\n  },\r\n};\r\n```\r\n\r\n### `ssr.config.js#id`\r\n\r\nThe id of **UI framework**. (default: `default`)\r\n\r\nIt can be ignored only when the project does not use any UI frameworks.\r\n\r\nSupported UI frameworks are:\r\n\r\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\r\n  - [x] [bulma](https://bulma.io)\r\n  - [x] [semantic-ui](https://react.semantic-ui.com)\r\n  - [x] Or any other **non** CSS-in-JS UI frameworks\r\n- [x] [emotion](https://emotion.sh)\r\n- [x] [styled-components](https://www.styled-components.com)\r\n- [x] [material-ui](https://material-ui.com)\r\n- [x] [antd](https://ant.design)\r\n- [ ] and more...\r\n\r\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\r\n\r\n```js\r\nmodule.exports = {\r\n  id: 'emotion',\r\n};\r\n```\r\n\r\n### `ssr.config.js#distDir`\r\n\r\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\r\n\r\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\r\n\r\n```js\r\nmodule.exports = {\r\n  // dist folder should be ignored by `.gitignore`\r\n  distDir: 'dist/.ssr',\r\n};\r\n```\r\n\r\n### `ssr.config.js#viewsDir`\r\n\r\nThe place where we put views. (default: `views`)\r\n\r\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\r\n\r\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\r\n\r\n### `ssr.config.js#staticViews`\r\n\r\nIf specified, `react-ssr` generates html cache when production:\r\n\r\n```js\r\nmodule.exports = {\r\n  staticViews: [\r\n    'auth/login',\r\n    'auth/register',\r\n    'about',\r\n  ],\r\n};\r\n```\r\n\r\n### `ssr.config.js#webpack()`\r\n\r\n```js\r\nmodule.exports = {\r\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\r\n    // we can override default webpack config here\r\n    return config;\r\n  },\r\n};\r\n```\r\n\r\n## Custom Document\r\n\r\nJust put `_document.jsx` or `_document.tsx` into the views root:\r\n\r\n**`views/_document.jsx`**:\r\n\r\n```jsx\r\nimport React from 'react';\r\nimport {\r\n  Document,\r\n  Head,\r\n  Main,\r\n} from '@react-ssr/express';\r\n\r\nexport default class extends Document {\r\n  render() {\r\n    return (\r\n      <html lang=\"en\">\r\n        <Head>\r\n          <title>Default Title</title>\r\n          <meta charSet=\"utf-8\" />\r\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\r\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\r\n        </Head>\r\n        <body>\r\n          <Main />\r\n        </body>\r\n      </html>\r\n    );\r\n  }\r\n};\r\n```\r\n\r\n**Note**:\r\n\r\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\r\n\r\nAnd then, use it as always:\r\n\r\n**`views/index.jsx`**:\r\n\r\n```jsx\r\nconst Index = (props) => {\r\n  return <p>Hello World!</p>;\r\n};\r\n\r\nexport default Index;\r\n```\r\n\r\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\r\n\r\n## Dynamic `Head`\r\n\r\nWe can use the `Head` component in any pages:\r\n\r\n**`views/index.jsx`**:\r\n\r\n```jsx\r\nimport React from 'react';\r\nimport { Head } from '@react-ssr/express';\r\n\r\nconst Index = (props) => {\r\n  return (\r\n    <React.Fragment>\r\n      <Head>\r\n        <title>Dynamic Title</title>\r\n        <meta name=\"description\" content=\"Dynamic Description\" />\r\n      </Head>\r\n      <p>Of course, SSR Ready!</p>\r\n    </React.Fragment>\r\n  );\r\n};\r\n\r\nexport default Index;\r\n```\r\n\r\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\r\n\r\n## Supported UI Framework\r\n\r\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\r\n  - [x] [bulma](https://bulma.io)\r\n  - [x] [semantic-ui](https://react.semantic-ui.com)\r\n  - [x] Or any other **non** CSS-in-JS UI frameworks\r\n- [x] [emotion](https://emotion.sh)\r\n- [x] [styled-components](https://www.styled-components.com)\r\n- [x] [material-ui](https://material-ui.com)\r\n- [x] [antd](https://ant.design)\r\n- [ ] and more...\r\n\r\n### Non CSS-in-JS framework\r\n\r\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\r\n\r\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\r\n\r\nAll we have to do is to load global CSS in `_document` or each page:\r\n\r\n**`views/_document.jsx`**:\r\n\r\n```jsx\r\nimport React from 'react';\r\nimport {\r\n  Document,\r\n  Head,\r\n  Main,\r\n} from '@react-ssr/express';\r\n\r\nexport default class extends Document {\r\n  render() {\r\n    return (\r\n      <html lang=\"en\">\r\n        <Head>\r\n          <title>A Sample of Semantic UI React</title>\r\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\r\n        </Head>\r\n        <body>\r\n          <Main />\r\n        </body>\r\n      </html>\r\n    );\r\n  }\r\n}\r\n```\r\n\r\n### With Ant Design\r\n\r\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\r\n\r\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\r\n\r\nAnd then, populate `.babelrc` in your project root:\r\n\r\n```json\r\n{\r\n  \"presets\": [\r\n    \"@react-ssr/express/babel\"\r\n  ],\r\n  \"plugins\": [\r\n    [\r\n      \"import\",\r\n      {\r\n        \"libraryName\": \"antd\",\r\n        \"style\": \"css\"\r\n      }\r\n    ]\r\n  ]\r\n}\r\n```\r\n\r\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\r\n\r\n### With Emotion\r\n\r\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\r\n\r\nIn order to enable SSR, we must install these packages:\r\n\r\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\r\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\r\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\r\n\r\nAnd then, populate `.babelrc` in your project root:\r\n\r\n```json\r\n{\r\n  \"presets\": [\r\n    \"@react-ssr/express/babel\"\r\n  ],\r\n  \"plugins\": [\r\n    \"emotion\"\r\n  ]\r\n}\r\n```\r\n\r\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\r\n\r\n### With Material UI\r\n\r\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\r\n\r\nWe can use [material-ui](https://material-ui.com) without extra configuration.\r\n\r\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\r\n\r\n### With styled-components\r\n\r\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\r\n\r\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\r\n\r\nAnd then, populate `.babelrc` in your project root:\r\n\r\n```json\r\n{\r\n  \"presets\": [\r\n    \"@react-ssr/express/babel\"\r\n  ],\r\n  \"plugins\": [\r\n    \"styled-components\"\r\n  ]\r\n}\r\n```\r\n\r\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\r\n\r\n## TypeScript Support\r\n\r\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\r\n\r\nThe code of TypeScript will be like this:\r\n\r\n**`package.json`**:\r\n\r\n```json\r\n{\r\n  \"scripts\": {\r\n    \"start\": \"ts-node server.ts\"\r\n  }\r\n}\r\n```\r\n\r\n**`server.ts`**:\r\n\r\n```ts\r\nimport express, { Request, Response } from '@react-ssr/express';\r\n\r\nconst app = express();\r\n\r\napp.get('/', (req: Request, res: Response) => {\r\n  const message = 'Hello World!';\r\n  res.render('index', { message });\r\n});\r\n\r\napp.listen(3000, () => {\r\n  console.log('> Ready on http://localhost:3000');\r\n});\r\n```\r\n\r\n**`views/index.tsx`**:\r\n\r\n```tsx\r\ninterface IndexProps {\r\n  message: string;\r\n}\r\n\r\nexport default function Index({ message }: IndexProps) {\r\n  return <p>{message}</p>;\r\n}\r\n```\r\n\r\n## Examples\r\n\r\n- **@react-ssr/express**\r\n  - `.jsx`\r\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\r\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\r\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\r\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\r\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\r\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\r\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\r\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\r\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\r\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\r\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\r\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\r\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\r\n  - `.tsx`\r\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\r\n- **@react-ssr/nestjs-express**\r\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\r\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\r\n- **@react-ssr/static**\r\n  - `.jsx`\r\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\r\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\r\n  - `.tsx`\r\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\r\n\r\n## Starters\r\n\r\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\r\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\r\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\r\n\r\n## Articles\r\n\r\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\r\n\r\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\r\n\r\n## Related\r\n\r\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\r\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.19.13-alpha.1","_nodeVersion":"12.14.1","_npmVersion":"lerna/3.20.2/node@v12.14.1+x64 (win32)","dist":{"integrity":"sha512-Oj2lpQu+b45TL2TQ0gWOp36GU2Fv50l5uEM8h/OuiDz+EC4CA5/w57noWiJa84A89w3UtGHEfKx5Wa3tp5iAYg==","shasum":"b96fcd2b114e3a7f4d7923459f212dbc7e05a82d","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.19.13-alpha.1.tgz","fileCount":8,"unpackedSize":15826,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeXWZmCRA9TVsSAnZWagAArFkP/1JfQG9Dt7I8nnenUrCa\nVnijt++FOYXhXS1W/5bUSFjqbtP1ZFYxHEXGD5aPTgDeMjUtYJIeuwp1PjP/\nYdK0bymFMi1kj/PVLEZe8jlxAgQ4fQkFqmTz1787tMg+S3SRcH501CvLnxEC\nscxIh6BpLLWJYWUWCKDP0LALEMzvVdEGJijjcLdZx/SdG1k5t8xFJ4LoO9DZ\nVrVa/yW08UzpRH5mxPLvlDFvdPkY6sI+LZ3AiIncvrhFZkERXuukNJWdx582\nHzXrrRXYXl4lABTNOQZrqVQ1L8/KuBSSZUJ9+WmVYMg4CFV8qPeMGI1+Madn\nRa0mcWQ3u83hw9buGHBPrYbugIcVnhOlB/R2VpshwfR5FyU1nOCtmm9ntyEz\nIWgAJHoear3twsF2ILA74xaxN171o5NozQ66OAX8CznbcNggI90P1KcmxRKZ\nl+US2j8tEJmL477UbJb+18b424kvtP40C7YlJSeLxomBrtfsrWu5YollDegM\nV6ol1x1UOwXNsxEo6zKP472JUYUoKuFk6x+8aKBmXrf6jcyoD1ydJBdxMwlw\n1B8Kc8//4kVAQrMPzE8O61YXTc49V0eTOgVAUXzKhbcNg/XSHzlwjpuCEZzb\nBwv6BcPCRh+mXYvm38DQM4YbAYsCJpSAasra3S2xI42352CeOulWkQx/ixzw\nHwrr\r\n=+Oo2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCOgWGEQzZoNRWLoRUVjjki6UxmqqDteARhLwbIuSMsbwIhAIEdAYmmmTDU1CjWC3ok+S5DP/4IAxtR+Jo4ktIN306I"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.19.13-alpha.1_1583179365863_0.7657374883054071"},"_hasShrinkwrap":false},"0.19.13":{"name":"@react-ssr/express","version":"0.19.13","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.19.13","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"d398a76dfc14860b1170b737aa061d84e0a73d9a","_id":"@react-ssr/express@0.19.13","_nodeVersion":"12.14.1","_npmVersion":"lerna/3.20.2/node@v12.14.1+x64 (win32)","dist":{"integrity":"sha512-wJ15NQjUED0WIddvhtXjjXIZLuS/O7hHFXzrJQkpmzMmjZ+ysL7esKxPYSjUCSeGE6AOAHgGSL7F2PjlQQlx2A==","shasum":"a7c1dee72347c07fb4324d08d91d8a7f5bb04098","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.19.13.tgz","fileCount":8,"unpackedSize":15794,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeXWcDCRA9TVsSAnZWagAAGWoP/3xi9qh2Nls67+Fn/FW2\nKBL8EyMGYXTCNvXVRDQHKoFgcfvUddUqwUIv0cbIKaHa4bH6X4hr/TDaJiAZ\nZbLQbBxyWx3f/Um700CZjZzcGgGCfeoHshsAgsy98gARDzvHraM3ub+jvX+G\n1Ri4Esh0MaUkaY2C8oCbbKnV3Huj0eEuHFuVPyUaF2ieOoE+5P48HmsMkKze\npHejf1zc+3ZcXUaJbX+6nSKi/sYpSI/ab0sIrsgP8UHHRJmZc/ejXAIzZhHQ\n6dlXPCOZ4boQElCZtrNo8gAW745xw9XA7/iQotq8s1ZmNUhyMq9P/dGh/IKc\nEQlq86MJPKH8K6bvqe2EEhCJX6ucsiTJ8ruCrcncEbEUPOB6qwxrMlSLajtx\nr37Zx/9zXMuDQIuIPh5vCqymSO7U7x/7wXW0DCElLKXMNbMOu46UIfQ7USyJ\n7j0oJwKF7zpWjIJcQkeH2CZqs4c4nu8UGOTZzQYcX10Pg1NU8chilMHMWpN/\nSo0bYyTjkAgLGv3P+gNT+ABxc32/YV3m4soEDpDSkjSpyDwxaUgKq/BszS4J\nHURS6KXdjY5t6CantbjajH5nIJG/sUZIqV/cx+HAnHHHDvd5s7ww8QSwQ5E8\nGFHptTproG3hFc1wlqttjswrEcP4i1ltfALzzhNl3zhrjQddi8Mq+8lTqalV\n8/5g\r\n=rGgd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGVYYxWmnpeS+AS66i/PBAHIWlq3GiB5qkeZjvItIabLAiEA3ciwfgEQX5zrGdXKFpa1JsApypd8AqW0XLFAtLEfB4I="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.19.13_1583179522681_0.9042797847189312"},"_hasShrinkwrap":false},"0.20.0":{"name":"@react-ssr/express","version":"0.20.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.20.0","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"c10b3653232bf64179f329b2f9db622e0f8a020e","_id":"@react-ssr/express@0.20.0","_nodeVersion":"12.14.1","_npmVersion":"lerna/3.20.2/node@v12.14.1+x64 (win32)","dist":{"integrity":"sha512-HTVun2D0oYW9Y0ahJupRKM/ANbihgUOVoKeyewYlu9Qa+J8AM4WCrytk/OsCDPKWxYV4GfmgaG1I4XMSQOc9uA==","shasum":"d093fe089311935ba78d9aa8f7cdbd5c7f8ff3b7","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.20.0.tgz","fileCount":8,"unpackedSize":16118,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeXW8wCRA9TVsSAnZWagAA3RIP/ir6czcMuiS9RwJqjGWF\nv7pf0/RD2DFHK1q0uUiYnTyI0Nj44FlBoPSMsfmuU/iJRajhjk/nPFKkmiyr\nJWPOlXP2BTGV1n4+e7K/XrrVJ/Vu1jJqV5vVbpgpc87s2SZbVgFSMCF4fvZ6\nZGuhAIZaDZXLA61eYSGnRMosbOs91dTx4vWKh4ZHadTvLiBfEMcoYORKJbsu\nxSLc9pqfJIXrGWXTMyh920qe74XYwf6Rq5AGnoMcgAizpwvKLoaN45wrO6w3\n2J8+QYE7osPXpFwkth25kYapyZyP9R71IhoUCWdpPUM1jfnssCSQ1v2C0pFK\nHCP1VQjQ9fvS751h/N2/8AgoKk7ml6aXf/32btc1P8hQHa5PL14MriE2gXUE\nqF38Y4w9DBshlt0sv9NsKIEsMKzpXOj/JaMTgbJkwcKsJ+bAsUZMw5+ieDS1\nidBXbg2WEhJ4/ARaORsy0myjwNe/UsPiptLdMeWvrVLToZiBRRefiFtKugdN\nSCzQthPuXZy2BC/M1Tg5jHzJx30HrRtGQravYMtN8NQbxsBSI8WImdEA7KgY\nVap25HqU0XZX+CfORXd60P7jUdgogUKBrnyYzznjwx5NdRXYJ4fFtz6iaJrj\nMjq8KB9YlGHA4g6RaE6aPzXXm66gcYEn6N9o/tivlI3cBOZQTF43PrV9ziwv\n1IrA\r\n=cQ1t\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD9Kfy73kpaBttl1ZyYsfTKZZ/ZFepmDv8IQShXo7CgqwIhAMtZuKlmwtmpnem3Ph16V1N6kl6g64M89Z2hXJCGkn36"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.20.0_1583181615878_0.8562128742332615"},"_hasShrinkwrap":false},"0.20.1-alpha.1":{"name":"@react-ssr/express","version":"0.20.1-alpha.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.20.1-alpha.1+4e648ba","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"4e648bae9c827145519f03c4d5844cd1b52f5ab4","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.20.1-alpha.1","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-ZNn+F0Jv0DRI4lRhu64mvGUJ67YkWGt2+i0URT5kp32X0GxYAtwb7YmHPeeA1MR8poNUlsHLCPZ2qyW8W0znPg==","shasum":"f224d31cf1367ceac15e13189ae8219131ca8604","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.20.1-alpha.1.tgz","fileCount":8,"unpackedSize":15633,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaS8ACRA9TVsSAnZWagAAF7MP/3N4vuESghoyRLsZzAuB\nInCNj/1yi8K0HnP0D3W0WfxsaJb4HPAmgvUVROCXzA/FjMX9Fq3jF4mB77Hm\nIxlabm+InLXxVHbop4FH/qwAmbqwTLO+v1UskV569pK/TU7ULNtrdBwIFY05\n+Tsgf5iYx7jFCRzc92fklXRYz0M6mhJF5rjLr8qK4u8HqPOuokkkCoE9JfPS\nAaloUmtCBPLkNnU+mJhscA4Ah49L3fCPc93d09ySLMaB4zeL50UwvYXp4x49\n6IPemhBCk4UejdmMrzAkPPQeLL7I5l5vxUQnHbH7ZnPaTV57iC9V32FGte+0\nU8Ql8HLKey1VB4L/JnYxjLI/gTpip1uoQrxv7yWjew7YloB3wZ/yWK9OoiF4\nsbykxIdxjTuQZJgCeRgnIjZq8vgNQD57q2Dscy6HNSGkNHujfvzqDBO+nFS6\nodauHJOYftoFS4B4XeCfNFYNoD8ad7TQXHgNsrExR4Tgu196/wpksV2cK0kB\n+/ItK/ZNNiJYo16keMJIDO7BERiiD7t6fthaXicLOKGml+KBEsBW6YfmPgOe\nzWUrLOAoIt3936PMPDT4pkZQ7urS7m7njMHXQXB25FjA1RWRGtrYYr6fN2iX\nFc3m5eSosDOyOGjsq6Bqr0AYBdoJYrIGXkJGlVK6zCd7OK1eXdpBcnKdtJuK\nUXob\r\n=yNPP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF2hRwr2dwuLPODBG0rVQ5o+Y4kXs17KZgGQM05oS1CwAiEAvRcDKkhv/tLACCfKetHMMemTJwDVO2pGsY//sLTuQC4="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.20.1-alpha.1_1583951616188_0.5954176517852485"},"_hasShrinkwrap":false},"0.20.1-alpha.2":{"name":"@react-ssr/express","version":"0.20.1-alpha.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.20.1-alpha.2+2a4924d","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"2a4924d405b19c5e61496e785273dbf80788b165","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.20.1-alpha.2","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-tJ93PJVBoCtrsKcUT5u3h8EE3bIgKYWKnMJ4Qx9RMcvHvr/LY+PFwwUKio7HR2VCQuXf5zIr7vI5NXMZDJWngQ==","shasum":"fbb30b373346fdf992b796ac6b2e917fa3609654","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.20.1-alpha.2.tgz","fileCount":8,"unpackedSize":15633,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaS+sCRA9TVsSAnZWagAAMj4P+wVOgB+RB+XeIVEB3fU4\nLbTjO23iDUAoD+qFwwoNP3dV67WVz2n/8OMxcFvtZ/vL55u/30KOAWgZcVup\nnnjRDKIyW68vMOZnHjmUXVKe4pb6sPLWlL1aW91uKx2s8DdpKHG9m8enpyhT\nUdvSv5Q3ZlVml1wWw4nir7Qq03EORIHolqZl7REedisC04bcL0oZxWJySian\nuO9kBGmKEhuOah+Wzuaw9zZ92Ir2Cwx1EK60fXxvZhY/mEcLvSte1gTxEs74\nTNpWii+aM0TEPQB0B3xhsWvNWVLlfVkHZ8xxX1GkeIa9b5pkJs4Zih/2Cyjy\n/idXw0OgpuBlVxMDmJdNcm4xlnZ2HO14FRWu1hbieof8MHHaFeY6hV3LlShY\nw+9ZUe13tWFrD54RLIxkzXtadSAtBcrPeAaVJLoHjYdYJIqgomKodwwnFMAH\n/ZHvzl/GEtO6dgOhogfS9lNndc/Xat7XS6VQWWIA1ZVDiNrxsyAdgfG5JvOz\nFM1Oou15J1Qa6+iwkY28y2NsPVJaN+mbMwK7IGacTI9tIt3yeKnf4fUp3Rim\ng1P/mRY48J6pNYiqMKjZS+3enfmxpkmS2b6/ZquzIHWmmkGbvdLoyYGGFFFm\nPh2zv78DTY3kl36FEdc+9Ut7wG8tV0M12QUoq3DufFocdYIBDBRDa6lQe8eb\nHrt/\r\n=4d4x\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCpCj2Q6x87cRDNFd2xwZ2kzIQZdy1mn0Ik4CRpFjZ4lwIgHkUEknl4KQj0LNNI4ySQvptYgcnbLTxseyvIkuZ1CsI="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.20.1-alpha.2_1583951787641_0.9101452407803026"},"_hasShrinkwrap":false},"0.20.1":{"name":"@react-ssr/express","version":"0.20.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.20.1","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"18b4c95afa75a283f8184cba2208c07a4b7a7257","_id":"@react-ssr/express@0.20.1","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-ruuHC9Y55DmXydGGzesxYwB2LwdPJzQOrIP9kJepCVQua8WwQFTKkkWzdFEda0YbBIcepIwP4jjFHDPY1cE7xw==","shasum":"8853c0f561bb1d13f8bcfab8eda2af7949a5f1ce","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.20.1.tgz","fileCount":8,"unpackedSize":15601,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaTAmCRA9TVsSAnZWagAATlQP/i54ThK1E8kEHxDlAHZT\n5d2dqOlK4C/1gvvFizqjHUkqJEgSeQoRnvuPUHVZh5ZKbdQdZ/qyr/OlYG7N\nMCKS4DbFKPaW543kOeUEgqdK4XSbOzh/+/4O5aurvgJFU5zJxdJXdTS3ySGy\n3wNHv4ym2EMmPDx8kzx1K6+wA38fRKNvZ/XckPE2JbqClXpXf8s7J0J5C7Mx\ntFWDqnbGHPUOYmSZcz7WEL8MHsB5jhhNiTOFVhbBJ5PEswFKineSCuJXeHu1\nQSJd4i3cIUNXKWwdXFhNkCgL5DysK2pcgz8O+eJxZrz0zkrrL9nNP2i4vpY3\nToBG3ZZ3rhJpEOewxWfdKGdWMUYUmDiLaiqeI3LqA4xg1AWZN39A3CfrX8Pd\nsQ0F3k0+MwW6JYSlm8kmFSSEb6/bRRWd3Og8H1sHpi9qmdqJ8S3FOaGG5WTx\nxDoQF0q+H3/Ke19m6Ltt7NZU8t6i+rKbBVmOccT2Az2KOVYXOHAYSQWsNBsj\nuxegRQ2OOIJOzh11JdVWYAUFypvuwKxNdRMvACjkcYwFWGsWshhxfGAx7gE2\n192mkUYaP8Kkh+DYnm/c2oOeyfLIZR2gOZ4FHkAzVVi9dyCCNm9aIwBU9kHg\nnyQ7sIfBhpXA2kKP9g37zzZUycQrfsZy1QtlcOtMLwONAzJYr8qDENOna8HY\nw7J/\r\n=HuHh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCWJoqotbBszVMfy8HeQzlMutJAP0/O6zPLMRNz0h3eYAIhAKDj63hOivxYcgImrUaR/l4yXBqR64+INJi9REvqCp2P"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.20.1_1583951910568_0.7578917427787961"},"_hasShrinkwrap":false},"0.21.1-alpha.1":{"name":"@react-ssr/express","version":"0.21.1-alpha.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.1-alpha.1+c692746","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"c692746a1fdc158e4b3d46220634fd3bd7f96d1a","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.1-alpha.1","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-3ymBtIr6Uuk+w2btFTHYSELMwjZ2baVhvmrDVqIVJ7FGbis6v9Eydwswa+eqMnoPzXRhRVFXWHt882J1AE2+Zw==","shasum":"154d165230ddd5c83a87c2e48b6d578aa2d896f5","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.1-alpha.1.tgz","fileCount":8,"unpackedSize":15633,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaoBCCRA9TVsSAnZWagAA7pYP/021i4h9GQ3S371cyVXz\nhBziB97K3dmyXB1nqh292bs0ij9lKonaCNXQCGwCEH8ppngzDGxJJVn8hhvu\nhRX9hK3LZTc28zH4/DeEc2qGP7XzXGmPfCHSa3/LRdx3P+REVbfLFPJr9gV8\nF42ilg2aQRp+1SMGR6N98I9oH9kFLyN7dCMOHb7GIA+w1JIzowRfGQYuQiuv\noQyBdiPKEmHDxKVMtvpqBhw3B1SdTxpdG1iCnc0mXTxZWTeEHNeyMqYD86wN\nlPR3wFPaZwdZtMNt1jNvy5QPEqwZeXQskXIKBl1KaG4Q44FFG0ra7jaWFfVH\nzjM71jBFPFO8eG9Ef6439gNKH6temGP9xUAcFim8Oux1P1TVzVIu6JMIjwZ3\nZPWawFmczcuqRBVZHwXkw67GPxPfP5sQPbukX3u5S6nOl/qr7xdepl5vScLL\nY8juaOJeDHr9c6DLP8SIxC0Wu9nxryujqvvRbfjMuO0/NpaHYevxQiFtt/oB\n/BdqqkYkT5aGtWrXhakv1rQxCM+UZMRn7LCJQyOnwadfOK0EIOGz1b3r80gL\nMUWeeQQbmCMEwq5ekJTsN0NLNKn0wCoryuQG8CyDR1O8BNNCks+C3/vQBuXP\nmwMB/2ZWPJTz3SCvU1jAanEyC4+ZJPI3z4sHKzBx9skK15FiRw4bkEitvtMD\np/MZ\r\n=DjhN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGIiGFKxMf9Aeqi6kHeoqTT6lwfGaYQtSIrBLmoPmQ8HAiEAst7UKdmS+EwrkHW3ApA56/LDwOL49uZGQ9D2ozB8eOI="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.1-alpha.1_1584037953849_0.38548319029317524"},"_hasShrinkwrap":false},"0.21.1-alpha.2":{"name":"@react-ssr/express","version":"0.21.1-alpha.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.1-alpha.2+9c73f7e","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"9c73f7e67944b2750d053429c86d420f24f31cb3","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.1-alpha.2","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-d4L4KlbchWgPNYfZP+dTdhVqEukN6e3imnixmDe2hEfj+vm3c2zkMm08Em0Od0ZClQf/pnd38jp7evhCrPP4pw==","shasum":"28385823861bb9cabd5ebbaece1ccc38f0276510","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.1-alpha.2.tgz","fileCount":8,"unpackedSize":15633,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaohnCRA9TVsSAnZWagAAvVMP/02dapmRndc5wwud+X5v\nuAst1Jaw3uUEN4sDAn3ZhNoY+h/CSdGOoHI8m/AFOWH9B3uefZFYXe0yi3eh\nJQ7JYdYDXcZkhtpmcGAL6fBmAeejRNxkGiGvR0hBaC8nNDXkDR7CGNI11DT2\nvSDs/WBQk25PER2+22nCAFYE5Zk5J2Yj1hLpYurc06nyovISnOTxRLQYY7zr\nEARxYhWTFOZfsmBL/qtfF+vfFuzFEVREOsU6LfUdNSbM1xLAuISZEHsMdt4F\nzSaxgwZ8kI00+X2mJ8Kjl1cSlv1TW2r9tbMfOfKZQDcbM04uUPG7akqM46Nu\nSOYO3A6q0xhJ1NmLaJH9meMl5FPPeR6qdkTDW+XBTQiG5nLWVNvqmKpgdzEi\n+hRJMYUJSkMH1Ycz7jU+AmnyhmgW4iJ+TDPmDUv25YAAiK2QIqKQjLU2Lwph\nI6acg7tMxDrvC4Np+kBxmAVqZOw+LI/iZGwatNqEKVHTlOuFIZEUJVqO3V5D\nyc9MkgLZj8/92fiXEfhmKnLj9HuwbwUW8IIAdRt/bYBDcy53Yzy2EtpCFBpk\nLXLK3IjRWI5F5O6Zp3gcpKv9YRj64ydMxRPvJTg8G/I+WTnAyplWdwEHBljN\nq/dFo+XRxwZqadS4wCzmqVcy7kBuYiSYic4ogLykq2VRAqSozVPWvXSFdPr7\neFQy\r\n=1VCk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCOk/F+KTpYNDDDMHVbs3IdwO9jgaMRVQr8AysjSpGSMQIhANYBCc0XOUYpyp+xl2rkumvWTrUTzMIwFtrEoW7KX1rO"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.1-alpha.2_1584040038550_0.6505072928178648"},"_hasShrinkwrap":false},"0.21.1-alpha.3":{"name":"@react-ssr/express","version":"0.21.1-alpha.3","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.1-alpha.3+957c7b8","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"957c7b8979993c27dd1018dc25d3dee0b0bdf587","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.1-alpha.3","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-JUIIYKBhN6juom7dVefdXHS2Wj3jI98iDb4gGKmCuGfX4S1yvWzxoBRfb/WEs4Nd1FEolnLwU81DzyxAnr5cbA==","shasum":"e0e388e616b6a319d0acc260d430d99b06e8bbb8","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.1-alpha.3.tgz","fileCount":8,"unpackedSize":15633,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaopjCRA9TVsSAnZWagAA/mMP/1HIxs1xHi4cJAUgXRgr\nLpU3DSLd/3Sjn1uZXxCLtG0gR2vgLlmiSM8voe41dAhRnm3F9LxZqYGvLD3k\ns3LX+cnFqikwbsz353wRaGYOTGR9JfJ0ah120P1x9YwUaDWCvCml1k5N0x8l\nx6k/36Zs054ZONiY1ylvK8d33ZitgZyOXTCsqfKEgBIRCxPrlOsEiw0QEkRO\nzUYb939i7vt8gUjkjINoF4mp5zt6qgW65r7noz1vYQ4Fpb1F3pVtY3Mcw+rI\nQkhf4v6FPdpDcn6pYzwfFE7Nl2EQszd0OfQsiY/0mxcegIR11nPz+rBSvUU1\n11tI1EU41t+NKB4ykuMWtvaFA25NNtdNwQ9V2CN15fVda0TacTNUGWTraF8m\n21qVOm2jsB8+C2qFTHTXq8r/NkAEx6cDmHG2NfzzkTl4K4uwJzxl7BqNvhyg\nLFvmaaMTKziKoIVTfE55texwyMPTSG2zEeOuHpirnF0uqIGLWDZO3HoAVkqB\naxoBX+y5/7aEyCnthpCI2KLXe8Uwo2oNR0NfU+H87KPDrYXBg/yRFJA2DRWj\ncBW/oYGpRhYR6er21RGKPs4IRjahNxs7TjWFeTAJ23IJe7wATGbI6spqfPOr\nHIdDLb2JSOBO9abw16l1MIiS8rrVZmKgMdqX8l0Z8jIYfkAiKSLjaxrRjSPJ\nH8ep\r\n=BgcT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCSvVTnIRImZRpilSj7T+hHX+wUED+FNDPunVwil6XrQwIgMdlWPmGNWNVqhq12OGe+YLaCd1O9Yf5FK3bimb8u3q0="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.1-alpha.3_1584040546308_0.6847304094253159"},"_hasShrinkwrap":false},"0.21.1":{"name":"@react-ssr/express","version":"0.21.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.1","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"bebaa2d5212784d0644d40db060a328a8eaa0f2f","_id":"@react-ssr/express@0.21.1","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-+md1yXHebtGyKEJzZx7BvmgEaW4Mxv4Ji7ar9wsW6qmZOHj6RcjXLenGJanVdpFCjGrLsBtXpXjCkZ6g2Gf55w==","shasum":"6545b462bc747287c50f6fbecf87e2654462f1d1","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.1.tgz","fileCount":8,"unpackedSize":15601,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaoviCRA9TVsSAnZWagAA/6UP/2jsw5t3mMoxxOIJ/q5F\ncAOOIiFZ/85SIxMTvvptkJJBjI15I8FX7VRihtZ83S3Y+9EcHwPOp4k9rT2d\nv40oDyGnuBYbkNUXKRLJQBCaZfb3zXiTcQosrmOHYlqB3WuGN/zRb8aYhMdl\nZQhzev4oPqmSALC3z95rpN8QWw9k+m4hgbWSWbND2XAA9CbjxXNaAT1OngMg\noK3fbURIddfVo7yENIt4OkJ3RYFDWD+3CPeQk+A1Qwt32vG3rVaLOdN7kP6O\nyCAtGWev8BhKM5B7TXgoUrptNgycYhEAbVXyJZ/fn8Sd/bAT5D+YF2wOK9Hr\nJKjxtpnbVV4SUVnSU6zxAaGHgCfQMJCvBJfKy9vvImUudvw/oB4wHZcplajl\nMmz33bzJT7pLCl+Aw44yWCmSVsblOSPAMyZ8Y9ot4iDx14t0rNuxaih12Cea\ntD/55svo9yOhIUCQtWxnW15WZRMq+nOu8t/LXvwGQGfb2FZsnLj2cOZTpMdY\nZw/u+shtAXgx6B7bNuaYgxPFVjZRD8m+myYI/YbVsks/+Fnei2wx/ridzkBb\ncMkSOsnSbdDs5LttR5UPne/kHlJagiZshH2SnbkiRrA4vmIJC4L2AleEJQ++\nRoekApHslcg4MBQIxbpyG1ACv9iliOHDHU7wy4UW/X/IB/Pi0O9vL59EzWMm\nnudT\r\n=W9pt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHbnjsElG+wgs7rJzvdS+tNQiOzCzucyiVrUo23XxJ03AiBS8BczqeUMHfTsH/h1LNgi3B7/apX40x5a9YabQUPBOQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.1_1584040930163_0.7820903559991952"},"_hasShrinkwrap":false},"0.21.2-alpha.3":{"name":"@react-ssr/express","version":"0.21.2-alpha.3","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.2-alpha.3+db00c75","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"db00c754bd70ad05b4fb9f12459b7f3c8ee46369","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.2-alpha.3","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-vEJBtWY4JD4XbHwfp1ojPND55YJR4jK3PEXPkYRKfGgk1Kv3zajrMs0vNTseYcz3kaCsFQEhnP4VWTE5jooe1A==","shasum":"95ba85c0aec131b34912fa478533510e6bbf8e22","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.2-alpha.3.tgz","fileCount":8,"unpackedSize":15748,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeapZCCRA9TVsSAnZWagAAYFoQAJ386Ngpph5OwoMRKp1/\nidTZpORa0E7pleWoKlM4oodtwq2ZRi9xCOQXkkoqlfZG502chJ37pN1uIfNH\n1BZm9SJKn1/G8EeF8d59BoNEZgpyEvXSmGoPdASLHqh+pe2v8dEZYT20Rcwh\nYlb4ovRA7nLNN/eNFS8ox6MZmQVmuoRw6tiglTRX44Kcb4aE8nd0iyuzb9A8\nnL0VdxAzqRdvKj+5Q3nZY/b3UbLuT96GY2I4QP6qlxiEKocSm5A+jKak2VB+\nrVv4g01XjaIXMkqY00R39NlbOJLLJhZocrnO30GrfsI4pWPPsilgmbL0526W\nSSK35i2ghLAIjepN/VAZZzKvr8o31LoBbnbGRMlxbYuOpV3j6KcU+VJ8mt2j\nm1vaE8oHV6SiK0zN7TrkxPE6soiUwWvVbrwCDjalZLdEaTtKS3aD/ZNxohgI\niIw5OcAO9K1TYJRaDPOEVOFRec/2w+NwqqZMH0yr3q+kSBn2JgX8733Nhglg\nx0z/jZZbHpxodmqBBjL+gy94SFC/WBxe/J+OzvcaADSiRvZIpC9byvOaVPe7\nhCCUu+EgdtUi9ZnoCizeFAxp0j6A1lVv8qj50/nX6shxtl1OBQUy89aSO4vs\n2vtnOznxVy29r/DNhsV/+QWepzMJHVbEpFUOY/XxtLrjcrmXjGe1DuyuU1+P\n00NY\r\n=xbeJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC4Z/ycRRhO9R442g2ktUJA2LtEYT7tM8KdUMKztx/mpAIgEuE9rRFTaUVNP3fkr636uKrpREK47i2+HsHxuao2NSo="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.2-alpha.3_1584043585825_0.2486553554247397"},"_hasShrinkwrap":false},"0.21.2-alpha.4":{"name":"@react-ssr/express","version":"0.21.2-alpha.4","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.2-alpha.4+6ec5349","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"6ec534960c970cd2fbd657e09f72d4ddcfaaae95","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.2-alpha.4","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-T5Pm09TUT+sO8E7qdXbBFsm3Qhblh6JU2Qjg5XFcBuAs2vWJsrPAbpRZPXiKK56GD3F9IejoOJUjjUwf4Yup0A==","shasum":"48eac8abacf2e56cf9c877387f31990c0484d2db","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.2-alpha.4.tgz","fileCount":8,"unpackedSize":15748,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeape1CRA9TVsSAnZWagAAtFsP/RqRFwKkemHjQDOEaCoh\naDBI2fvGtKOCQrTticIffjnQlsfZz/OlvWt3gf81wivIf+K6lcSRVJbX3Xn2\nhx2e6aFqbsKpKjtbGVpH4I5xWkL4F6KxGEU8GEH3s7DgDgNxap5kdLXGDi4B\nVFqNVgPUN/SbzCOHl+N99AiFuiRPVlmO6m9ZbfyvG4l4zrz+XPc5yK/6ietk\nL4zIHHRSlZqnl5R3fiuJeCTTiM76l3aEDz2sRIZ2MWtPYLgpjQmuGZ/R6/js\nAhXh11R4fTeL7RRfaIzoKWsrfETjFvQ6TL6/Wew/DKUUI874yyV4sbga0wCX\nEK0C31Nz0WOyQ/nn3Lq2+n5BfJv6Vxphv24+myhJsppSbqTHlaMCjTHETy+s\nVrg665UCCNN+0RP4w36wP29tzFjfJ9Dz04tCzkIUKvzGKjZlN8h5fibFl/by\ngnomhhwS41olTJtL6P9YCmmxqvOxOxnNYQ6hkd7Q+7PIgEEMv0U9VY8Mztke\nWvv/DJ8ZF9UaKxMmhZLOTnEYfR7iWgEi88qRnHiCIea6x1i8NdSx7YcGH6LF\nkhrEBkBFelpNNM0KdQ3mnUWC0IIc+m3fHU/a3IHo5oHoIqMauEHDL7pSBhuy\nMmPVymgQCsR63M80C4auchEdipT+oXFCH3trKm2TfM1i9DKmRRKW9yFdZLXZ\nv3yE\r\n=d5Vv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAZkKSHXQQ8DeyDiNc18XU3Agkw+G39lT2Qjp0POBzwWAiEAnKCISCmCIg+oIbIbYUmsFAT+ABnIziU0c24MPcA30b0="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.2-alpha.4_1584043956803_0.28497724095063726"},"_hasShrinkwrap":false},"0.21.2-alpha.6":{"name":"@react-ssr/express","version":"0.21.2-alpha.6","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.2-alpha.6+6205f20","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"6205f203c6e214d851f8263b1dd10327c70da700","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.2-alpha.6","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-bshjvSTl0NS0H9+0kOmJdp+F74NEjozYgWikELaRW7CEix5cErvG7DXEuVLMeLX4LAGicAqCjHicNdy+rbnjEg==","shasum":"f5ae26609a2e2971b7afb0b7a7102fb90bc8c23f","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.2-alpha.6.tgz","fileCount":8,"unpackedSize":15748,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaqBnCRA9TVsSAnZWagAA4lEP+wW2CYNb2e40QAMiOYWd\ngjzJ0b2yxq1lTRWhDw6SKEY7n9eertnCdpuTOcanLS+HDDU7MLRqpX49iW3/\njuHscADp7EaVoyALPhxEMF7nhPsi8Awu+LUz02+zwln+IcRF89dsdStGdxri\n0EOKncS8zLd/iO5It+T1GlnD3vYDR4461C5eK9Vc65REulNymSceB8yCuUSR\nSAakJhR+jUeauBTn+5kROyGcErqm0L7UbdfUWc9mWk+agmK/DH38L7qhf1hF\n5eI/bCLmc//M/b18ORgxofgKUyOw8D3OS8Wbkb7Fr3z3ZE255SpAiQU2R7Xj\nJeMVOUelGyusrwRyR6BuzOQsL43yso2X8ikFoG0521Ia2R6GLR6fz/FQe9h+\nWA7VSKSQjoP5YJhyAamVkWGfQEkfVxLjWvm1CGpBCdvZVtnmmiqfkxWJyhZk\nqcumqPHXkV654PjJzhuyz+ujfQE30LdLdkqCCtFqCuJGtOCCxvZsE5nMRuB2\ngzkxEv1ep9nRZfT6oGD/Q3LzXaTgpkDtqsWhJosOyW/SfImx8dsOyEcw3x4c\n6QPsFHg8jsvVS1irFwu8YisEntfGKy1GXotGWzL9GvISeXoNNdy+QVxpSv7w\nD8QB8XcaTsMqTttXsBYkdZLmdjxNQSSkU9JKl7YyTuV94HaUAYvegfe/G7iN\nqXj+\r\n=T+xm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCD/mswohrDR+vnVxsi8jTy3b/LPAya94/fVPK6dAnu2wIhAN1k5/SJeeFFLnxluGXL/ygaxLzS8lqgEsLSMc3t9xh/"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.2-alpha.6_1584046182767_0.05718663931432166"},"_hasShrinkwrap":false},"0.21.2-alpha.7":{"name":"@react-ssr/express","version":"0.21.2-alpha.7","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.2-alpha.7+32e6c70","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"32e6c7050ae4fa9d06e4154569ef8ca7638604d0","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.2-alpha.7","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-2sy1j34zJiP4I6oEd4pq55oBkkxWrwUNdA2aCOkful5MIeN4kjlJZ4z7J69GPrGPrmPckMgYBjp86imJO3H3aA==","shasum":"e96da1aa4868c800dac90b62aedaf300b9c00eb6","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.2-alpha.7.tgz","fileCount":8,"unpackedSize":15748,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaqGHCRA9TVsSAnZWagAAqDwP/ReaVdHullz8vdc3i+O6\nxuHcE04v4exlEzs4I/7eROld32A82ZEiz79B1wx0nzgP/8Di0zhY67Fq6bEU\n6pimwJMeo42JxnXuuloF9GtuU+KaE4hg8SP431gMWUEQci5tCobf+dxmEXWk\nHxGo8bWRYkOOzwiQRvFLRzDsQQaVVWDQ5vkVM2mkvVylxTTzml61MPCp8/6Y\nFhS64CHqLXhuYNCLjxH6tpXqlAnHk3BO31LIWS1HRiZTUc48O6xOzDsPBPNR\nXmtF3r4J72t7cCoIkA5iIPWi73U2ilJKexmCZhMPrVti2/60IJWbpLuTaqEm\nb3barpA5UO8QoVJPOuGHQRU9bXZCvzz0/QolnJYhjqNXyMsCUa2XHAtpmtfr\nfwQXI/TnI0hbehf3zvHtqkiPCsLphI4SbTXuzEqjA0NOyolTuenqg+0dN8X4\nV0RW3pGKyswhEUpaI0iX4dxKbZv6LwjqUxWN+HbVNLCMb52X7UCUe/FWRqAY\naeyXHGH/XlDCmw1Lp0UF5n8F1IKoAOT7cGWSjJaR83kZUCY8A1uvbJyvjBur\nURwpcKAfzdMr21jKEyGFbxi3SGcdlGIZ7wH7xU6qP/DbB1RDiFv0h3r+bHi7\nEyS8KPjtpvfBbmqhSl3EgrBHrxoKWBu3f0egPAaSpoSIeNTvOEzrMx4iOkz8\nW96C\r\n=t65K\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB07sCJr6qI7xYk0Vopn96jv6aMEUeWuW4j1Qvy77JMOAiEAjsJVzzSE/I2OZ4ndZay/OFayguGj6/AGOGpEjPDHHKI="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.2-alpha.7_1584046470975_0.9603158214855119"},"_hasShrinkwrap":false},"0.21.2":{"name":"@react-ssr/express","version":"0.21.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.2","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"a9617070a4e6f502178fe8a81a9add4b88299459","_id":"@react-ssr/express@0.21.2","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-5XK1GDa4cy7ZagKeOvr0B/awW1cbzNG4OfFa3UnWW3Q5jthC1CSqFiMgr7dmCTv3wMC17rRfmxfWvrI58JtNBA==","shasum":"8a0c5d73b35b8dc118707bda398dbf5d412f0401","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.2.tgz","fileCount":8,"unpackedSize":15716,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaqN2CRA9TVsSAnZWagAAljwQAIzfAefq9XfqRpGycON+\nh5v2h2EsXzGN2wElMaaKDrAqWgiT//CEDEogpUigTsSmsh+ROfmPvVFxG7Gv\ncgea1/Y+9DQUC+7kVzXBv3pHakSpJ2vTg9wsb5706HapZ+SCnH6D7QQOt9Et\n8aGU2ldMCT6kOVRl5IO5HI/RDob4EkX3+DJ6au381KoLLbIKNz3M2qHLPxjx\nqxJQNcwPB4IjZMrGSFeOZwf6bq9Awbae/dWCEeLTqQTNtV2xy0/5BsFMgEGZ\n59aeGEGyEj3iYcqk76Re0hqyuFUgH69Setb1Mypb6rNnwhC94FzhaY2DwSXY\neTThEtwbbeneVW+UFPGqQ89Lq223UwUMkp5j7asQ+09Ltv7Y6t7c/+OZQHCg\n3k9Vm7Ap6MGpB+mdouqrUDlaK9BG59EPfK7L4bIR8Fv76tpjTJatJ/aeO1O4\n2eXvjWtyOnqom6n817wjEpeic7afcpDNu2PLcp9MOE34vhfyYia9+wGEHfrj\nKBNPKcRnkSw7RKqOkPOTEEgTzdHhr41S5MOelPK+vtwEQbTYRVwdXED0a5o6\nTmOcTOcjUJWXRPOmjOyBHyCdCVvps5iS0P9aBITTohYHjjBP3zkbVr6s4I2n\nnrcc2V6YeaJ1JH3ffb8Slot7LWa4QiQrp2X6Oh3STf190qU+gRRzBmjP6gGH\nRNjw\r\n=YvrQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDaOlM8pItwbUz5nUiJY9BC8DS5tMnb78zdW5P73+fDSAiBqX3OwAv78+HmmMHZ03LOomg6sX5NmYMAjWwv17+Y+PA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.2_1584046966187_0.30012293893788344"},"_hasShrinkwrap":false},"0.21.3-alpha.0":{"name":"@react-ssr/express","version":"0.21.3-alpha.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.3-alpha.0+1eead26","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"1eead2671cbfb9ab74f75c602e40fd0484be8c69","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.3-alpha.0","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-iEjHilsuicExm83SJYcLtD3dhNPDLqbvqHj3TisWbeKUxmDNtXPPyV/uwDEUselyhpCu0WKM/iyocPEZc9YjSw==","shasum":"6cde63edee43af6740c939c2aeb6f1766b125693","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.3-alpha.0.tgz","fileCount":8,"unpackedSize":15748,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaqcMCRA9TVsSAnZWagAAcIcP/2ELA3A6lLMa8jnLRpOH\n9gTJ8QBPTkYpUXtzKAfQwNSg2zPBqw4axJ0RbQSqYiVOZqZMBaqkww7+tNSe\nFiydnPqepqTW6OfriMsGEIpDvHEez+yZubqfxaWH/vLU8sxTCWOkaKbJSs44\nTLQhFiV4c8lLzNIPzfPbaJP8OSscWrqh6pq+kcWtin4JT3RdvhfWy9Pwx1ZH\n3I3BBjUAIQ+cjv/IjRsTaE3PzWmPdx/NhUhk8dLhNIpHbQaQPONPucegcfaY\n0TxuZom1OhBXnc11PlSvQfGHKCDU4MeV6J692oezobpw7PE5Eqq12/4nJ0oa\nj4hjkaBbEqhWgBNQtnYDS/V0G9MEy0dUf906TC9vhuK3cuBP+Ki62gCon4VW\nL3gJDCo/1urAHF/L9qrfpp8uddGEaucHvoRhtW3YbRDY4+9lCTuqI6D0q/Bv\nVSnZhPsgAQOkVGvtHFEhCvhTuq8Fn7FuOo4UocViwXUQDTL/MCCz7IvEkQ/w\nzTHYskpwOBR1+j/uy7XOHgdJvk1P5UYCfurMy/UrsUUFnyu0+a1DKr5uCLwl\np5zQkiQCdB4Dm4zZa7cr4GL6d9V5ZmW2RzV9BCkQJRjIRyjt+PWBVRRkVKIj\nniKI7in6eJt3xcYGtI67Z+rpzyVKIGQ4NzXuIggbb00cO9dpIS1RUPGBvEob\nrfF8\r\n=p0Fs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDJtR3Qd0/S92a0U4JrRRGD4AYbnOW3RlYUceZol825HwIgI0q6QuiYIo/gzL7fBeA1D9fhXFtvX9nU4PDuUGuQQcQ="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.3-alpha.0_1584047883521_0.6134404626240357"},"_hasShrinkwrap":false},"0.21.3-alpha.1":{"name":"@react-ssr/express","version":"0.21.3-alpha.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.3-alpha.1+6da2718","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"6da2718b3608751d80beb24d515fd4b38d3ee066","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.3-alpha.1","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-H0YcWWrfO5T86ZGxwDoyJ6/RRQI2SkqeAgDCRIxtMTHb8iimbwAAYbUyhNGm2aWAolMKP6z1baClk1CPuRmuIg==","shasum":"9edddb120f9b1d3cae11ebfe5489e96e12dcbf3a","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.3-alpha.1.tgz","fileCount":8,"unpackedSize":15748,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaqddCRA9TVsSAnZWagAAUz4P/2D5LBbvEUmR/JmrISYW\nTc4QvS7K5nID9VKMPxYRllpKzC3m01zVHA6UQdGePCuWKKr2OZnxq6/S9Il9\ndCwfoPqinvD6Gk6SON9gdRK0Vw/w8HGSAxZ/+dL4z+GDUTydcFgQgefjATAJ\n8GhrGOjs77q5kkmUsC8aAMUcne+sM21tlVsm04/TBDnNSAsuNnAigsEoo/UI\nFaoRvuLkxHTG8mXNVAusdAeMrjZMWFa05WFHxzM7puBXifCB8ETeODEslgIn\nK0/FT7Lg1uayOGyQtRmvae9ju6zLMwMUnB0ZbF5E92XECopkxbqvV/qrd6zc\ne+A7IO4CcHzb5jSbaUH49FKYCnsCjicQTMRejSOEIZEHCQ/g+FyAzvC3M3EP\n7Y87IrTI5TfBgvWZYqwE4WCz5GCeZ1pDBlKO150GncTnH88agZSY+HCMenv0\ngvg7mmWoiY4RltK2qlBxBe5Se7pEb+JfWJBNuN8hP4alMRb44pmDMAC9OTNJ\nYNRG5+L+mZxiIKwqX83l8PZFBgWWBHISaCuX6OQuWWFTATWY2cs+JnQf/mHn\nXhIueW+xZLFpWPO+Ne37fURPIWqxvQotKg1UbsTNPkaRIwyEDxoOJlzUgY5Q\nOXS6B2f5hNyTAms4jUznNo8AHs+28fUekpmYMVtgsiBWA1m9+stiV8ku7/0k\n9euu\r\n=m+sv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFkwWjILdXgD31kbYY/R0fJZH29YqZhX09Yf9W8uD2J5AiB7i4Z7Ocs9ElsKykjt9slRSi6A72pirdRwuocGnFy86Q=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.3-alpha.1_1584047964548_0.5001695469686795"},"_hasShrinkwrap":false},"0.21.3-alpha.2":{"name":"@react-ssr/express","version":"0.21.3-alpha.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.3-alpha.2+b87e29d","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"b87e29d0ce04892d2379d19be36b3480e82ba0a1","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.3-alpha.2","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-hZgLr4Ut1qErsJ04ZFT3xVZ+wg8zn2U2ESVGwMlq11OeGXzCkYXP/v9JVP3UbHTmjnQWZuovfVGxjV7RKq533Q==","shasum":"687810644747e3398d2437c490747b8d3690eef6","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.3-alpha.2.tgz","fileCount":8,"unpackedSize":15748,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaqhqCRA9TVsSAnZWagAAkH0QAIDOfLZ1wfTaS7N1H345\nTXDLWJs6+YbR6Vix6HAg0f0xDWsCXvACX/1LtRgk0YMao1QbFoBGFGX/oPb/\n/W9HC7E/89KeWGOpJSXr+Yipo/b1ykUoryb5mRy1fvJ/5QXpbgd9lZuEg50y\nSuM7nzz62qeMmK2741ezcCXkxwOlGrkmwxcv7ZugLmS6VMFzPPujhASMh453\ni5LPRIAHQOujv50wYwEgpWHpw90deBYPemN9d3y6oPDNql/43RbvnyG2tAw3\n4uKh6DMe8TdRqPMN8XwXx9lWB5FjzpymgUZp3aJnFgqRAiOLXWRfGMMmbk9p\nSootF5L7E2+oZq/Ru6EkrNcNr2bu820hQ6Fh6HSgoGtPwMs6BD0jc9u0esBS\niVhKhBt3m1Kztrr1wlmAqavFLsRjtNbxGNwhq/2RAAoRkqwOYCg5nkJ3wM7+\njWjHnR2vQcghEb2xOWd7gnf0Uv489lCNbmKgjbSCn1DbGcPwOFx+/ADJOXNM\n8OCMXXOSvxu2Q9VdGMOM7lWcx7LNlS0IJTuU1+1U1+vzqiKmjd2Oeft9BuHB\nSX8melLTKgfIauYBKJfDcKMHSBZndRLIDz6rlD/Wq78D94g79HvdoCmzfrFJ\nnB8D3QqLmTdDM4xWqV5M9zd4O0QoEC4teJIP6omJKiP7c/G+h0hdUS4HNDqa\nn2i9\r\n=pvFi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDZeL1nuCU5A0rVE2t20iciPNLhH1VoByi4IxTXIiHXfAiEAh92b+v3MGT/E+UcFcPsI1tGhacGFqZxCw0GwUi7UoAY="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.3-alpha.2_1584048233883_0.8926785010796705"},"_hasShrinkwrap":false},"0.21.3-alpha.3":{"name":"@react-ssr/express","version":"0.21.3-alpha.3","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.3-alpha.3+be4a84b","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"be4a84b9de6322cff41b8f23bacd3e8eb5f6ca30","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.3-alpha.3","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-F0nNDxa8PMeU781FV82NJZQY9MbM8EP+o9Ab4dnehCN9MQONhn80C4M55DX3txuVdEUqtrLu3wms9WiSZnO2Wg==","shasum":"7e016eb7fba75b3ea17f6ba95b37394cdf241c5b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.3-alpha.3.tgz","fileCount":8,"unpackedSize":15748,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaqkxCRA9TVsSAnZWagAAb/QP/2lsy5aApI2AIonE1+Wk\nyTZT9bTq70q1xdiH/q+zY4FgCEyX+eK8I1L+AdQPnjRNqG/by6kNWmJG55+V\nVrW6zIys56uHazRcgdi/oOJtRgQjTPELGvKFqUnei0TuIrjwyPSkSRG3oZah\n7o8s2K7DZxLfj+LYdJFbH577jCcR9nM/iCraBSI6jhe8K39Uhl7efrG9O5SR\n5xtonG/kWe3bk0X8697lroFBNp8qh3tWUm7CiDqoDyYKrpcA+GEVAYB0psNT\nLZaFDf7A4WsngmHL2pUDPUtzjjmDv0hDY18E64DN5MWX2JAiK1ccaL0ysACD\nhzSRBqDKCTNgPnUa6I2vlqX8pjtaTVREeihjnvdzTa+WGc+ia5tQ2r4a8bBu\np3FDFlxxNNfzDYVBekH896Afjb7q/P+OGLqMJUk0GV5ZBlWeHPZe+usunKyy\nCb2y5W1nl6M17uuo0oF+cPtfOzeSwuN3/jxTYUlGtPrsWdVNdcBtyVfrFyh4\nFYMhKJ+rkf1naxPU5FRqtcgIdXkksTS7WUN7pep0qy67KKlo1RRT3DsvJrd4\n5TIQFGDDcMSmehDVbROtqeseEZnvc58vbDGqqy/dS63zf3mmpg5mgNkHrze4\nef2EZv4SAct9cGiZZLlKvgR1ADn1Aiec811D3m1+memeANZIQre/ynHfTWrF\n62fk\r\n=pYd2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCLvlCEfAF7lukL7EG1tDTa5fokkWNi+RTtEg++kj0TTwIgdWtHoP5JmqORl8wul8wddSHrGKl1/hw3y5d8P+llWrk="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.3-alpha.3_1584048432862_0.9093753159070888"},"_hasShrinkwrap":false},"0.21.3-alpha.4":{"name":"@react-ssr/express","version":"0.21.3-alpha.4","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.3-alpha.4+64d2dbc","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"64d2dbc1d43be4522f6827ad3d4377f404bd3a5f","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.3-alpha.4","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-ph7Q5iaaMZjqnbxLh8ub4+tyAz15zLgNbO1S4pyt9UVVAK8vyLOMNd5boiHLRdGoyOK4IMThPRv8J00XW7VA4Q==","shasum":"5b03c90c8384bf948c71734719447daf459bdbd9","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.3-alpha.4.tgz","fileCount":8,"unpackedSize":15748,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaqqHCRA9TVsSAnZWagAAU/oQAJ2IlxbjvCdQtVLbkZPn\nhn7LhCIqvtecawa+AhEjxJ4zKaMcxRtwikGbGO2K+AtkZt44MyrAXfa57OOA\ncIMe1T8MB3vy8vRBiLSUzpHbFvrhkPQvufy09vOp7YeKljFSCbdbZfwxNK1I\nw9ZE6HEQGNC2ZwbI74AE1L5zZIWkZlFfc6YrdQj6PrB/JETam0dKvM7MsAmC\nDje14p40nViL8SCBYSuFisBikLOZsShfR6N3fkp5KRaBDwrn7qRdnf+3pVQJ\nlvhzvuKrr4Hmp+3NdoEwzesm6xU3yPtQFPYryjCRlopCfU6A17RRlw/cP4iN\nDnE+XiCgMEXra/z5driYvGU07N48O+gt4s+jN8mXiWgvzmn+G3ynHfuZFVjo\nPS89DFYqTb/Lteswcja8d61Qn5viZoH0cD9wxadSUJR/czVXDJgueG/LANro\na/0wzRiwa/Ib4v5QC+NKKYJohupV2R5UY3uy1KyfXRXvlQDIRTljCqEeapsX\n6QyCWmVd1OHNKpmYc1exfMynWYsiobJIUFPw0cbN/0QL1NTwWCU/bIVQmg0A\nlzRq5xljOhVrhNiEwkkh9Z54UMvjWcssoNOVW7lNi3ke94w5CNm/52LkLI7O\nHLPNrNA6OdGte4t+BStReFhcY3Gw+yl7cgO8GY2cz75Vm/4rxpNsU3Eop81Q\n7owQ\r\n=FApf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC2YZajDltfMGLfSRUHTpRdj/u9y6hPNgz1/GuQ48d7+AiB047wnRja6/+0Dq0mh4YP8KVqI9lueTSpnC9Zx6M/rYg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.3-alpha.4_1584048775249_0.1318907534985827"},"_hasShrinkwrap":false},"0.21.3-alpha.5":{"name":"@react-ssr/express","version":"0.21.3-alpha.5","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.3-alpha.5+df8b579","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"df8b57937b45c783de2e5e11bcb190b842f405f8","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.3-alpha.5","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-FCLbiUYg1EZ+/l6tcUIOy1w2werQwZN7dyYOlVnT5SZfxifbh0Y9BnLQ73WPoXmk+TULzGZEPMlZdcVcukY/mA==","shasum":"cc2453fd21aa0f823eff40fc02b248963d351963","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.3-alpha.5.tgz","fileCount":8,"unpackedSize":15748,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaqtZCRA9TVsSAnZWagAAAIcQAJcNhBcb4cryWTEtpM3V\nsC8/1bRa3SVBHixtaz9wJKYhsp8gZ1wXxHZfM9OSPtWebgN3KguGrgOgT7/P\n4+iNNoiVbrAXIN0IBJCbzkMiBL0RNpaOTXAQJR7oc0x3I8SHl/3yzQ3+H0eV\n0fj1cYSfrzj8HYU7nhW5JC0Nm+PJo4vsNixSHAW1tnEGwTfUdbbyFNhtkF2e\nADD0yJCoQJmHrsSi2UwLsBWBBL376kVDX9WbireLnlOM59ywPtkdzj2ZJVfc\nHW5Kee62ibikioapxHXnqnTBRF96yJEy4MrHgW7HerS4RSmDnxt5a2J479qA\neHtYC8UrKYdesP1f81+zLt3LeXEechRn5FWLhIT+b5uzOi/iE7BJhiS1MxRm\n6Bx2EcFH3sLi2v5JoVit+kfvKLicyrKFA30TK2JN+vZjTyxM3G4KIa6H+GPr\ngnDzYAm15oksmXK1f42KmaBqDjdZzV0Lnfa+0Z9vqm6rHXRL1VqAKz90XKJ4\nZFrBcUplRaDGMbNrxcNHTCP6J4SINScajSuLr0OD9QKgCE+Tvn0lxPwEmy0x\nUT/sYzld3opfmu+CaaM2mBueuLDMwmPMBGPCYY07FiFnJISIHhzsOVSBQo7n\nkaas8XEBUNhZgJjoMQAjI9OP+89FXeFmDG90iMC01AlOU/L2V4ob0Mimb6qb\nnEFZ\r\n=bPIi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCy8nTGQWef4Pc8Xq2aTpaLUzXRseoYqAgqymUC1PTZewIgFaI1xp1IV62MJcnNbuwhYNM9b+bTuJlS0i20Rvu1TDg="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.3-alpha.5_1584048985212_0.11121908216786958"},"_hasShrinkwrap":false},"0.21.3-alpha.6":{"name":"@react-ssr/express","version":"0.21.3-alpha.6","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.3-alpha.6+7f35c36","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"7f35c36b39b29ea8596613399971aaf7b39b31fb","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.3-alpha.6","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-Lgm+eim+uGFjtCqm6ladBKil+SnH3jCVygYxJWYrGlebG7s2ci64K45nYcGD5nsBvuacVs923SjwkAT9017fEw==","shasum":"7dd10f0e5083e9e83078ef6ca3493747b55a4a03","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.3-alpha.6.tgz","fileCount":8,"unpackedSize":15748,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaqvYCRA9TVsSAnZWagAAgGYQAInM7hO6GchNwZ0NAlHu\nb64tAzLt1sEpCUDSAxPXAol/YzsNR4mj9OUcWTfMTdXxuOEd+L+hqrYdtCJ2\nKKWE+NCdLPiCgNpZ4m5SZRxVE+hPrWnIzkUmHR7vaRf2Tm51ecTV+21mQ4yw\nxrMLZBGsKpoWWaz4Wyx6ITdLUjmWxbqPtrzvGsTqw7O9cmCIpLZZ6fCRSbkq\niJbTW7k7/dRePLsuAP7qzaISWbleJMC5euYKLA9RzwDO7b5/KCROVy1A9Evr\np3F1jzb806Syp0O0gEiuqVP9QkQuZFfCc0T0q/deiIfs1hlGzOskP8pZdZLs\nFymYBnukyt1kfTj/laC5B9JkmKK6S3H3K7AeqvV2y4BJj1Tt9Rpo/Ctn6IBm\ngfjmcLlg/Wpn6esuFkM2k0o8JP/vKzrjuy8+zti8PJWbpUKT5cXkpZOt6wzt\nbvSEW3yZ1D2s+8bU3qB+DaXXCH0FuwnmrRJOkj2FrBP6j3yEjowMgUth42VF\nIeKU7WqyEYgol+xwEF87h+dYVy4/LcD3ECjLGplL+jTG1xK27IzBJCHQq/7q\nrI8n5jjT4IQlWxq4Hr2wwDCmLKRz2B2ijSoTjLkaZtFAjmVoFyyp6OpRUXep\nU9DQAuoqGmMjsGnliKdd3wdJEz5nkIfk4AXTgYGLzLFLUMf8K8fFncn61jPB\nL7V0\r\n=msYR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCVcwh/iMlRoEYLs4a/f2Rd4gZvGi5oBKEjYrvTo11wFgIhAL3263Tr+fAyUtYwYoRSsCC7Na34MD9woU479D3TpxDD"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.3-alpha.6_1584049111848_0.2843606321330967"},"_hasShrinkwrap":false},"0.21.3-alpha.7":{"name":"@react-ssr/express","version":"0.21.3-alpha.7","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.3-alpha.7+b36c022","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"b36c02204fc380e10ebd8c0a60ee7394009efd44","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.3-alpha.7","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-kB90JTw+W9NwYbDaLA2CfTR2Jm7T8f9yzzrmt3h5xBGIsxIGlit+uVI4nKCoMmP0dp++RJ2TcjixfyFC/sJ7qA==","shasum":"122edbb192c1530f5b093b7d0b27bab6483a8d82","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.3-alpha.7.tgz","fileCount":8,"unpackedSize":15748,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaqxwCRA9TVsSAnZWagAARGcP/Art9TwNISYkEv9pBWy0\nx1ul6lSxRl0lYpsm4RhCk4IXv8sMc8G6CYTB1BQxMeNAkGmaSwk8MIQLrqng\nGZzVkUCi+1XqRjzmtj9eAjf8U0e5Vws/G+sEk7nt9y4Rn87QQcdMzHt3OiNQ\nUdmZxJbxf+8gSmp+DBUwHvs1z+SBHumr0LFmCssRL9HVoitsRSzr/ZwfD0pn\nv925wfTFIKFiQWGd51NSgVdMs+bceyzx6KZnTmPI5EV7VnDnYiLpHXRpDUDL\n9ZmcXA15yduDxxoLDRKghjiA2U2vpqh5QBDVdzsRJ4l8iqHMOqap5698heHN\nudnZtdytkdeFQJSkwoxDXQO35aoVXmAC6jqtyKx+TzqirrooTwGX9MkzNeDX\nQ9s3SFmuOBBKCp3IXEhg0kY2trFWr37YyUdLR81D14V1NoXtyr1os8q4GZdx\nA0OftISkcNSAJ+PjNWpCAvBvZ/i7/NMKVY+MNP4uDPZvIpC3WdFAoV8sTO9G\nP0jzN/9EWVRpUdLqi/8p6UAo7r2iGoj63VHpwF6Xuty63+MPivIssc0f/VzA\nGM6ztOeZF9kQ/wjxAcgY1gAmhx2lTLLjL/12ndWGnD5gbKHIeZTEw3dXzMvN\noFfYq2vtwx1yz47bf/hBMBuw9uCFXI4Ly2RRVPu5/sk7wNOCuRWfcsuiNxt5\ntCdv\r\n=hKDI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDbcyoksTg92nC2ADQ0ba3D2MoieMwlcfiKpXiNlCqmzAiAZSwQ7perya+jVaCGuHYol3s50f2TqG05FFHtChAxupA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.3-alpha.7_1584049263848_0.4366381407628883"},"_hasShrinkwrap":false},"0.21.3":{"name":"@react-ssr/express","version":"0.21.3","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.3","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"49ef54e33f0c2954cfbde2187defe5e1261b744e","_id":"@react-ssr/express@0.21.3","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-r9BI3j7p91mOyJd7hQb+rX73nnSpNYLDG3idqwg7gy6r47YtV6Lk6JD5McH6YQ1fGvOk15abnlT4z1QEZkTycQ==","shasum":"43c96ad15034816325402b908040127083bf558e","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.3.tgz","fileCount":8,"unpackedSize":15716,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaq0rCRA9TVsSAnZWagAAbdMP/ApK4c9nep03TP2eBd9W\nL3IvxRRaZGj2luZDhubXbpaL01BDdMiBPf1CFGHFzzDjWrMnFJi2Ib+CjjOv\nHVXQkUnPsKRNSy28uYyvA1dqk02jhRKVY3dWlbeapnpJPsOHakLnG8tW4SHU\nYYd8cobP0sEHinAO6X+8TaSJpcV59i60ij+ZG1LLUf1JAfOZy+ly73ad5FQe\nDKh1gC0fi3STZMmLKW2kKF4pYA/6C3KVWk/ep8j/zU4yhCbivYMSoHRIV324\n/cHWoof6MrakIaT1ZEMxhQNdzNf+ec8wZ4X+1GlZOctEjFen28+Ac+06Lpo2\nX2Z44/lXqpG8GGSP81xVdFrGxGBf9f/WKwZDnQajODPmWLFHM26SBOr6O87P\ndQlHkGMxzkdCWl1kvy65dSOfBCWLhSAjgxQj+WF6OLt8eg5JsbufzzGNNB+2\nngDefezTvzpaXkQ+4g24LDnJNx29rDzy3MPr9FSbyddFpTCNhkQMuF4RiIux\nNzGfUgBmclrktgAFmHAcRg8rlt24NKizGzBPweJ7k3z5saQnvTetcyD3i2ae\nWGmtibrmW4XoGcQi+4DWkm4BCRgwuOSoG5N29HIyR0uN30C6uCxeRZX5hBT3\nu1EzvL2TuC0fOjwhQ/tpnhAH+ip4/5gbDNiWCxlNQGzhkFykp3f+0OPKqRaE\n8fzz\r\n=n01C\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC/o760N9cfurez7i/8ylvGmKqsF2wDOlv1wHHs/q1xLwIhAMqcDvvuv/53Bie5RLcI00mzOFpP/gwb8m2lCSL14ebn"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.3_1584049450994_0.5676803776714676"},"_hasShrinkwrap":false},"0.21.4-alpha.3":{"name":"@react-ssr/express","version":"0.21.4-alpha.3","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.4-alpha.3+af8e47e","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"af8e47eacb6365014c7aa933ed93a8b9a7dded31","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.4-alpha.3","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-UNZM0asN9NYWdVvTdSNTiumFLVHQ+MJqdVT2hqW7yyQtLUdILI9Zw108scB1paeCENw83+nYJMAurxw1ZKVIQQ==","shasum":"fafa9ec94ec31255435feb228114f77342ba1271","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.4-alpha.3.tgz","fileCount":8,"unpackedSize":15748,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJea8NrCRA9TVsSAnZWagAAwckP/iRBvhyHuuX/iw8y6Ada\nPSrm0Jo7fhBvqE/7oJn/ZNJGskPh040BNIIm0ZA1KNQMF++RJxQU7LQdUF8C\nBIHExnMab+nJEIxyCixgIiatM1ce++NopuU9liAYw34fVW7fQRFc8bmklSRg\nHf3qHqSrJlnmPD4WGteCfBzack3+9oFk8CuvHj/0ygHe05beRlZgHKjrYJIw\nlAiNsPS+KjV68ku2ZtFctZrgED9vnedDH8MyzcznSxau9tTKJzW0IEllXSom\n/qm4in6BCPrtIcy4NnP6bHd0+wg8yPrUwLbdbnicrMRMPtErhi3KbqoBRACc\nkPYbi3UpunT3mBU0q1ahls2TisOU/vdfLoFegMiSd9XmElh6FR9BY59S0o2b\n7A212EYxobr5xMFJu9lwsFTdLPKdd0YdKJRyGHvjeYTb+kdaO5zw3EDLAo+m\nYoivubzqzflqGoI9CnlDhixjm4QMwcaD/18Oh+v18tmTK62bS8QMUaL124Hg\n8q3Lt5W1eSv4wldibwfs84fA4M3i5ksykHQ4NXDkavbfgug4ploofuz8JGhm\n/TvkNhd5IeiosdRr0qxTTthAE8sIQfcBIKZ9SP4ajWk3yyWYIuyxJwyJ1oN1\nlhlSbZbmmDV04S6hP7nzngqQyxIwyHbo9ZknwXKwDO5YpzHhysvV5q7npm0k\nAu3D\r\n=WjWJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCuq379Iu9fPTqX+Ju7fsw+PAU6qopVU8Jb7Oe7JIJDtAIhANifk0cUNRPBRI71sJ315e4KnuZw47do170TanKqH5aQ"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.4-alpha.3_1584120683122_0.9636643262687423"},"_hasShrinkwrap":false},"0.21.4-alpha.4":{"name":"@react-ssr/express","version":"0.21.4-alpha.4","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.4-alpha.4+6ace760","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"6ace760dc99fe801acf633e78d913f2e5af4ab78","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.4-alpha.4","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-k05frsA4ZyZ74yq+qMjStiQnBmW7x49ZPyIlPYP/G3QpSLlpcJMgNR8p08Wuj8i073f5qfqHHFmHDev1WM/7Cw==","shasum":"93de580bea5227d9faab0d8931b098fe69ab9cd8","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.4-alpha.4.tgz","fileCount":8,"unpackedSize":15748,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJea8PHCRA9TVsSAnZWagAA5ggP/3g710kS2sIum6ffk1+w\nOXF4JjvY4uSy8CevW8z/NaowSIcMzsV17u42jN5IXdZWjvuI3AqTuJh0l+qQ\nZwd1hCc3547mIVxi+F5SscNw998KmmvTPWiW6awoSUARorsXew/UGeco4vEx\nCm4UNlhIdbYmre4TBEsYZlLTK1s69FuRvxd2JMYpPadiaShu2QDRzDdkMU5P\n5CHaozmHYzaoQ74Bj+MoMa1hmHexFxXfDU8GvlpP0e4Mu6aaIWZx2//F4NZ4\nNWsxnAZ4N2E51Y9K9Ti+qBJM2imctumW5QwNBgqg2xvt/ZyKKHNGN1C5Botp\nhnzZ9HmVG1rwFUzsGMuo/YafsPQOYDdny4c6owo0uAp6JMWQkdzBLn8a4iYz\nV7X5bmitqM3EkRpVQld1nqC+HOfS7MSrzUwr8fSywY88Quz1QVfJrpSz47oj\npCQ89o7vPYcpWdD8CO8hL8t/i3E3cKxh3EZX9HZLLjIShFKSgFIKFREzxKAf\nDkiBbaJ2ZpsPajZaRuKsnnukzxK/p+wlXcxFCR3oH4e2SSDufqLp0WgkKWM2\nmX+uDiUTZ5GpChYd74MRODgfoaRIpDUgfyRccxU1B32GOvdb2UQ1FKQSictT\nGENGW6I0bRC+UvU9r39LRdtdNY8VRgiwlz15DNobYF6VCDGcYtg5AporDR/8\nv7pP\r\n=96iw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCpEITxr94aWuFtxH4xYptnP3cxMResfK8xMH5aXuWaowIgcdF6FeBUOrg7ZIP4SlSRJql1txVBV+UR1KWSU47qXlI="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.4-alpha.4_1584120775083_0.5942847011920389"},"_hasShrinkwrap":false},"0.21.4":{"name":"@react-ssr/express","version":"0.21.4","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.4","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"73315b302e5f5cd9ba1ca1583d177755802aafc8","_id":"@react-ssr/express@0.21.4","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-dMe4NR97XZpCrI/S934jz6rPdx9ScD82GAtSPULhob17S0nKrEzBjUWSfRLYvfiuu+i9sm4/qevdamZIQYt1yw==","shasum":"5ba8f18c907417055a80dbe8ea4d0a2f23607e6c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.4.tgz","fileCount":8,"unpackedSize":15716,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJea8SXCRA9TVsSAnZWagAAF1IP/2uQaDNK022zkZrTQxK/\nERjPRFAjkCDio/p1HhZtAQ10UApaAvQp5oT2sAeZgrQRCBVpj110DMnhJ5/8\ngkrHHyHbqJQu5hRW2u/eX8OKjXqpLmx52cljjIgngrybOeWoXZ6HpGtCz/OR\n75rsQNDA58oiswwTftPM1gyqiJEOwFOq2NaSJWTeQfb/Og1b0MjbqrXjbAQB\nOz8zgP5X366fSkunQ31YdKOWS4WWtJZzP6gYUYoVw153haBpRwhjU/LlgGom\nzpnLq0g6FwKDN/Qz096L8aPzyNs915C9W7Tnkvrqn3yb13QggaHOILWxGVR4\nnkvboDroIMW0GzTr+Kbth2LwpAKLMAOsneLzTJgEN5vZltBiReg4wQgg9lc5\n6JLQvEZQN77Fhezr2kRjZkwoHm4SIW3Cu9ic56KvVJiYc+KA+4fIXcaeg8wP\n35fc8zClJUOyNBqoGmric+AC3lt59BYnSV1/HMn9r3nuv4R0FbEujba8fY2P\nlnusg8BTg1OOJOkfGm15eAJ8rV+4edQ/u3806sKE0+73O+oz3cdPo0Oa0FQB\nsnPCd55w9fZZM0EYFxu4DCadjHyaqq5yUw2icfca5+nFszSnsY20qlp06JhL\nBlBqE1qCj05/+SjSl+toe/78EwU0btmyc+lVANu07ttDwFwHumqjOLmr0bir\nrh0e\r\n=qTx+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCPebOl9ICNPsVyVdcW02drGso+/tTRUPMgND5ciNWKKAIhANRiZwr2aTxIn17kwDH4b7jmFNVEVOu5u+fN+vJ/ItIi"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.4_1584120982667_0.9852518040736422"},"_hasShrinkwrap":false},"0.21.5-alpha.0":{"name":"@react-ssr/express","version":"0.21.5-alpha.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.5-alpha.0+f0f4952","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"f0f495221c01f018252a8a00789eac7f47ec2edd","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.5-alpha.0","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-fHNDSgAqBm8Yf19tZnR9xFXQTrjbPrXbNFtQ8gS9FLhxb6RrjbhdKZ0eAwZy0KCeyelgJusM0CM8z2bx5KZoZA==","shasum":"94cc8662eeac9669a486fe8144edf4e4fa99cac8","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.5-alpha.0.tgz","fileCount":8,"unpackedSize":15748,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJea8b2CRA9TVsSAnZWagAAOfEQAJE4LFAXsyx+wQCpUN3A\nm90Tb8Sple+MvniIHPahmNw47XX43QlF0yCPWEEqj67yEMjEab1LVfQ2/BVV\nqa2OXf/0OQLGJXGcitvzagEf1yC+/wOb1IdA3SG1mGlTVpWT6j/bNp34OrtH\noP+LqFSPga3p3oHITmwAf22tnzY6OOsgIrr5gaT6T1cppCcShPRoSJ6V6g7p\nDXXApKD3r9UXCeq899RyMqO98oaINJtDBgLR6Z+QRqCo9BD3z1mFf93XcIoo\nVV1UFeu/TpM8mAbLM6MgPKWzye3RgpnvIW/n4y5CXEPGVv9jPoXsxyXhtB0g\nhtWuIrDzDTxoXOfbkBiTCHGdZzG9Pf0nStD8cMFMEtgtE/ANNgqrTyg4l2uS\nZk85Cp5FxNl1AhrCOHzN5AEdnuI+BBKnNGawEbhtacOGL9PL0aNFn77lEg35\n4ujWlrNunG0MFIl8/vRV+x9VAUaFxNhNbrY1P6rsFToKex1MzvviNK/hywk0\nTw2/f9A4eIk/Aa1V7/+Jhle2+n007I1ytwmbf1EENUueGqYRv72YYkWGnoJK\nOdWYXC9z+NfZGUlxAEoN//CIrubtJohyV1S1lcKM/CLW7AVR2AKhF5IoKA51\n8e3FfNR03nryKt+cegvaKBjcZZ8A5wSjxClzcvCwPV0ThE4BdbUnqPhOUlYc\n2b+k\r\n=vK8P\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC3RxbcmnytBC5aiBVcGHIJO8PY92EGVxyKT0bFS6KYIgIhAOCdX9ISZgW9PEqeveQ6C+xWHR0O6w3eD3I34JYq/UH9"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.5-alpha.0_1584121590358_0.29439521337488417"},"_hasShrinkwrap":false},"0.21.5-alpha.1":{"name":"@react-ssr/express","version":"0.21.5-alpha.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.5-alpha.1+4cd5e7a","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"4cd5e7abd820248699cb2458fa1ead79b6da1584","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.5-alpha.1","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-tNhd5vXfH4H84mkJXa6YWx2WTLYEAi4ca8SjNjheAPKNrkd1hO7gaLrTRNJMPPYKVY0U9UfOW3mqrKgDrPg+1A==","shasum":"35600a6de8ced07640d10be85eb1ecc2bba1b56e","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.5-alpha.1.tgz","fileCount":8,"unpackedSize":15748,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJea8jmCRA9TVsSAnZWagAAidwQAIWTaLshAIsf99JRmHt+\nQj375xTVuRRkbbN2N1viquQ5U0z9fewIUxkci/4nA9Cvchb8KRP7nW64nD4/\nSFRLLa50y6ThIfUtvGWSmt26e3MBq8VqpDHaFCP+kAkZavyPyNpPGHfMk0Gc\njRN4UFQmI3otB74csshxNNMuoyA0FRSEf2R3JCItnpKad4n7zWujx6i97t1p\neWqiksbFiw8Cfvr+v3InruO0ET45gcX1kR85BieANTDe6Z9nPts4Kn6fq2ai\n9SqHk9vWZz2qFPJWcUtI7ILf6Qa3bDGyy/p/9fLEYQ4mQI8nZJ38Vu9Eevtb\nU5jYVauwB7f2mO7CFmoMAZfDqTJRxW11rVKrtfKRLELePomLLFng4UQ90Z2L\n0PYwUn6xYFvnAA82BheMkXyyUMKT02BJ/Hk46S9OP60LJ2Ogst/ZugOuA3fo\nrXWlSimKDKw27M8uwYWC9f1bHnzY8+qp/27qcQXQcJP2qhx+ffdgLX6trJPg\nQjHRJBH2s7SwO5+MOQ4y5sBvOLmX9V8TGiECjByl9pthy8n6XH4gwg1S3Giu\n+HnJYzDFeQyAgtmAlZIxbJGlMmcf1I6VfM6BZIwVMdxDO1GNIvO8YPuIvGEK\nR6GQGkiqerYYulbmw1KgM4QPtSbVw8WKTdolntz4VFpzlq9yYG5GIpUqJ6VT\nxCmR\r\n=OUwW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDHNcFOJUclrYEIdF2TMmyuObtwmd3JnOS06AUtf1A98AIhALe/aYuQ51I7UUQ2PCb5VkT4Bxvp7F6FSR4vLDNIkS1B"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.5-alpha.1_1584122085615_0.5025149212603941"},"_hasShrinkwrap":false},"0.21.5-alpha.2":{"name":"@react-ssr/express","version":"0.21.5-alpha.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.5-alpha.2+0d69e6e","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"0d69e6e92e9f14e0139136380b15ceee31fe144b","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.5-alpha.2","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-hnn9kfiBNrvq9UZnMBLffcjfsbcGgl5EWMFhKizX1Yqtv5MivJYT3ZwFyFGzl+21JPwww7L04vXbbtCSbFY0+Q==","shasum":"b95aa5c32303a981b09845ff3e168424cfecfa5e","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.5-alpha.2.tgz","fileCount":8,"unpackedSize":15748,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJea8mjCRA9TVsSAnZWagAAdP0P/3xkQoLFw9IpvnPKoyHz\nlf+iL8a4pgCIS5UuTSMUPIHAGaVXGtrptm52EF4VL7TKIPRZ4yYZRTbXsiCh\nM3XJJNLc/j0ZrQ8fjWPmJxj6c5dQW/udMkrK1tZbEu+SOtaDV18WjeuInvwb\nW+gM+ZJXkFL96pdvPS84dbsDl88ujULNbe68oyoiMILAC3EVlZaH1b/zL4Hi\nrLdttvdZaowc45O7TRJF58Usohm02ygq2DiMBrwjkIVs/9aTwL19W4l1NfXD\njaiZ8bGlqT5my2iNjDh+t79XIQfgx2rNYc3RM9O9279GtBVbxnJk+5mzpRf+\nJbw0qe6j5rp1dhatzGSjxBF8RBLBioCOfc2npSIsuCiySST+CuR4SsN/TEsf\nwz6Y5+8zSU/6qpYa9+5Dia6g9tpYYrcdFl7wCvlY06H4itzwNrIB71L7FjXb\n5F+C4NpVPRkwqzAYfE4I3nt81HtrjTYS6jh0J6evF05j32OGGELUzNFKJOy4\nDMqX2ujVkqHrhTZRa+wzocqBiQzVswQAmmwqhxQ1OkQowxsECuK2/yjTURS6\nqHA/fteW7VabwU2PoMW2HqD/zY/qXwn0ToKJC4TF/y9rzyWpKkyezjTQW84e\nVzdwAPmLrSxZS9GuFzFKcheTvG3qHgHuw4PofNQ3+ijOO3HIRTqIXQ9UGrlM\nRLQY\r\n=eBDc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCtePi+a3jpHXuTsr95m7gqdWLevWBURyjkYf/13p6xKgIgLEirCXAdrYwRCbQlY1I6EMzu8ce/7hdztsITyfzLHsA="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.5-alpha.2_1584122275063_0.16224624896831452"},"_hasShrinkwrap":false},"0.21.5-alpha.3":{"name":"@react-ssr/express","version":"0.21.5-alpha.3","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.5-alpha.3+18146d3","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"18146d3f7d9a404492213bdaa0ec35a9dcc1d1ec","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.5-alpha.3","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-IUysV06l3YCapVcJjretv5mSkYMF0/mYyr06umisMegMDq2ydaQwP09fsIn47DdlZMzSmM9paKAnIViRZDJ4bg==","shasum":"1ab55b842f4fa4fb2c5e33a0da1a6a039f8ea16b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.5-alpha.3.tgz","fileCount":8,"unpackedSize":15748,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJea8pvCRA9TVsSAnZWagAAdNIP/inUH9D8b0jXhEY+CGP2\n3NA1kSfbBM5SM0Ow1AP3vcvYe+ggRnHgAcHsDn/cP7ipRR0DAMWmxDjDDPlm\nfp/zVKNKMWlcFWcN2ipK76UYQ3ig/iZmog2QLUDQyZ3H78daJZR73fvNePdS\ndQl7nTs4PbpYa7mdsbZ8JfKunrJgqt2qu43FzpMRY+1JgQDmLJQhUXZJFOKg\nf7gIdWw/txslqJ1z+h71WqqL01SjSBZ/oBKtIvb13Ev1e+gtP9NDGdKSmAEr\nkMZ4JWrm92Kr8MCu1vAo01sqLrBCSAbTqykjMtxGeS8WmPEGlKB2RPf5I2Cj\nQL6DrP2wQZoN0PgtOpG/HTfTKcDZIbaRrRX9SapkyE+Yozn3iyTTpz+wchS6\njBUj+RFTTaqC+ewI2GxxAKhhCdUBgWfUfBTwA84xf4dpJM8fnSjcGMbh3E5t\nT7KDB3Qz1ScBRktAS1BaDhDUVvWZbKt8q68nuoDw9L6hyBeVyYHFDxjXMhTS\nHgolq+GaJBD3i66zgrpv36trUQiPdiSqQfFWA9vSNAEdL/dfNPwNk6Qa3BSF\nKZhb8csxD0GOmsxqch/uZ70IfbI8ovnurPSQq+H0I/j41yI1gsu6i52vcVS+\nEyfZm9W7unR/R5ZJ6V3sGUVpiATy6nkIPTNiarcCx+gDW+j06K5pOzyZw1Cu\n6dy+\r\n=LwWp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDpEHS9//IilvQ8LrkFEPkTLCqswj45h1bmXUBS+Z1b9AiEAwO0zkDPo00Tk4dO+3IR0oYKdHPByrkkZOCKCDxqg+Mw="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.5-alpha.3_1584122478648_0.44039705266942764"},"_hasShrinkwrap":false},"0.21.5-alpha.4":{"name":"@react-ssr/express","version":"0.21.5-alpha.4","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.5-alpha.4+c7ca590","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"c7ca590f551c305683e4f62dc60077a4ef329803","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.5-alpha.4","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-cH0pD1YlNL9L//5HRtK///7XTMK6b6s4lNM6+NiG70uyP1pTu9s5jAcvg7Nu1h9ZqMATUfAL3MudLsu9sHIgjg==","shasum":"ad1721be8357d30f9262848fdbc1a1fe5514b5c3","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.5-alpha.4.tgz","fileCount":8,"unpackedSize":15748,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJea8rpCRA9TVsSAnZWagAALXUP/iAx4olUktJr0n0/yudu\nU6pjzyYmSSl1a4crAQ7i//lS6vQHIuJaLroQwg7Oo10Ck5TsYR4b8ZJZv71n\n++mzlT3Uno18mT4g44OpONPtUYP1Cqs2M2YrKeainP9TOHbvbpmch1mBLzGI\nQFJuwnMdogUGVbEuCwx47VXOybUabSTfSuZG5zIi06vd2ssAfqVmYLjsmsC0\nohaPJiSRCb2XJ98DUUk1uZX9ELoGaDlGRhkp5Y8D/RLVyHKzs7mFZzEw+dEN\nYSYOmrtIqbKKgun7Janeat5apQfuLI30pS3RayxBwUQKJzYAHRLAZfCEcSxT\ncrRmpIX4zaGWImp9BLgPDkHLXExeKWRNZZzNhzsBrw9rO9i/Rcz5nb3xLA5g\nY7PvNRbkdFzkxUvA/NhD5kAluo4H7icfxe5IFmOV9VFWpJAnOVIq/guThno0\ny6Dp/r5ATxdQeQVV5sQWaqucZDdaroDj4nKF4ULYqSJmh4AQpvaFV/zfS/1J\nFjkYE0CzDkZZn6L1+HiLKokzOociha3HQeD4/wQ9Qbt1cbNeAdb9cgbd0XYP\nMwIhTb/PzIzvoGOtaJzKPyMohatlsiD8Graw+hw1eZbwyLMr1EO/jSqRD6m4\nX0Nw0gPb7/auv0iYKqiEnRTMqCVYYQKG4vCCdbtqLPI2g2yliSwyY34vNzlr\n9hqA\r\n=G94K\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGB36Fdy/dOObQCCDA6NdJlIEkLQ0VlOfnWJyjQSweqcAiA2T6lAF/pxqK2DsG8/dq6irYe1IIGapNc+h1W/PK11zw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.5-alpha.4_1584122601357_0.8367252843576909"},"_hasShrinkwrap":false},"0.21.5-alpha.5":{"name":"@react-ssr/express","version":"0.21.5-alpha.5","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.5-alpha.5+4b5867a","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"4b5867a45430c75618219f1520b5623815904de1","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.5-alpha.5","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-e88Gs6XWUGDJpuIoIMtfOb6hW7urk8ClT/jKDRKiIPW6F3Vobq4XVkQvFYfc82K5DNEmJr3FuIQ0GkzCwObAnA==","shasum":"e363824cd3b06a768a363acf2c9422a66cbaaf7f","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.5-alpha.5.tgz","fileCount":8,"unpackedSize":15748,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJea8v3CRA9TVsSAnZWagAAkkQP/iTP5uBxRdJh6V+dwvoX\njZgyp3rFEhUJUifx+/rj/6hb1yLPb0DxkZ8kOHAWuB0JdWBW4a5RomPbb5PS\nojzpkKclLN1Vq0OGCVMu46fWgkZcVCcxp9VqYKUBaGzH/gxMkkgL4Zfh/ZZA\nqEIot850VGs/k6QqJYlxHo8DJBbhuNhFXVOzolJTNXKfZOuf6M36KjN1X0bW\njCqFjuz/+3nuLbY40hX8fkm/kbhYm0rOSv0E4WII7UfCRA+7m1Z4ytZ9jlky\nR2ULH5mSrKsF9dvLK6Yv1e+o9xdkR9B3uy20lkdqrnUM94McdJGkNHEAdwdP\nkRfDa5uZofH6G2TUxDbDiD8R2bFG1fkg9C9CSajESRZEziZvzqMFX2X7vAhX\nIZXWi3zVS/c/wmpp1vcCcj2jMpEATbut4Gd6tqnPkBMPNovMqoExeibsKkmG\n9lvMTYCu8vUyOWy68CRkFbKCkTpEvcnVlfJ87j7EidtdojjsSCUI4T3SP8MW\nx2JIB0CduSa6esz85SRMefbBF+KS+9OEW1UjXNXIT3zYKadB+sNHs1kR2OA0\nZMWhpcuaGg4g24jxj1f6qIanuMXV+tZwg6Z5E3a2VvRmbEpD2MfcXKbl+zuQ\nxAA6MUOoRwRm6EaRo5XzaGe1i0S8ZEmVphsRfHYSaNx0TutiLnJ9/kkgBHA8\ngpDt\r\n=KzKq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCZLuyfvLX313t6ThWl9HaNAyuqB/aXk2VLo32CyZXMUAIhAKLbECYIinM9+KiJjnqKFTAnyXdf3aIGXmaPmHrIaAq9"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.5-alpha.5_1584122870898_0.7644578170117533"},"_hasShrinkwrap":false},"0.21.5-alpha.6":{"name":"@react-ssr/express","version":"0.21.5-alpha.6","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.5-alpha.6+56dad84","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"56dad846be3d290303cc61246a5508e32bce8c9f","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.5-alpha.6","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-EeZpzlVVW5nfnF9xqP5BcS3HKPb9gjIRvCL4MeTmOpgOu8/SrJrweDGsli8qhgdKMCGnngU0TY7ua6UbpHfx/Q==","shasum":"0bfc16416303de079a1e92131739228eafd908b8","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.5-alpha.6.tgz","fileCount":8,"unpackedSize":15748,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJea83/CRA9TVsSAnZWagAAK7EQAIkmSA+H/9KKKJv1uaR+\ntNwGnNafcVeLhlOJKa4D/955FUgF6lkHiovEzALB+tAreGrw7J81VH0b9ng0\ndJtpj9sxhwK7VGc/cKXaVqshf0o/T9SzwpN0RSic7je7YxWatFosZK38tUqB\nnbZzcSDW0NiJkFTqHrxZbUAp1R554tx6qGQeE1udjpqRWufmIy/MA/+H17as\nsQKMPp/UKk0DUqgUiPzrvy2uMkjUCJLWG6mf7ga2Ngyxkjb1JOqZe4KnBmDp\nif7Z+LDjMup+iCUq79veosmBLEQieV6xD1c0UE6tG98jjzy/9G/qjPb+/rDx\nS4PL0LMb0zAJcrdxI72glBHp9M1PAd+Tn4E3GF8+iz9BrmtFP7gxeO8eMn7p\nJ6l9UvQ/nuIo4p6ms+YlaYVdXc1qPpCkBCoA0jQ10ODz4b6J/ZWz10F9h+7h\nznFGGW/rZ6ulAkdzLZa7+1qIWhwZmgfQJd392Q+yhWuadESzp1xUfl0oX9jk\nIfCO5OnPMkUJRcKZgO2KdFhbU3fehhX53SEjgI6IDHARMKoijXOcpVZ2tHm6\nI5t2dTRGq6P11UKjGX0kRmPfzfwWp7loiRpec1H11uN6mm469VyYjkScQ+dY\nH6eH71xQ9pbbsfkVnZR/b2XRuHMPhhS5pb6BbmVRHOcSOs6iKAlTTsnn7mPk\njvqI\r\n=eOxU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDO11uGsCu0+HxlHNylipNi3j5G+kVn8cyfMpkvC8nOvQIgaMyhT44561RclfQ8rdMhXYtIEVQL2oJ21furI1ix2uM="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.5-alpha.6_1584123390924_0.5089929110113776"},"_hasShrinkwrap":false},"0.21.5-alpha.7":{"name":"@react-ssr/express","version":"0.21.5-alpha.7","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.5-alpha.7+f57ac1e","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"f57ac1e1801bfd34a317247b04750c0d41707e79","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.5-alpha.7","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-EriR9wvYd/fg6iH00W7qqxdYdb1tBkVHk6nqPUdhTVWtC93cfzVTk2HnqK7qdXIvhtvYo2oeykwYhQ+36f3/vQ==","shasum":"50429d3959964d77bb432daad8b1abaab76a2c74","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.5-alpha.7.tgz","fileCount":8,"unpackedSize":15748,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJea8/tCRA9TVsSAnZWagAALjkQAIZgDNQlVgEo9HEbRbHg\nhQQkyp/oqVZFf4bHqdWDdsZtTY94F7NnJbppCnWPvSn/3+1AUwed7p3s24NI\nlBnI3IzO6z3svTt73deTnuKOC7B9quoTn2mpDxcj+mPB69DQFFnoGLdIzDPm\n0bL4GST4BkH3+ue8T/zlbv9sT3l/5LLyXbZloDwRH4ksDCiTPVISKu5Bg5oY\nNItUG1C60JdPELSoI2+CDO8aKShdOkR7oBSJRdGQ/WtjNNmKpbzt9/ftqj9U\nPmX0nAPXtcmFVq68c1XyRq+jYIyqncymNtcNJyv3X8P5hMBA8COknHhTOMVD\nKzlCpEDjOjDSFwuxfhhYTMh102HJxGcLefztjlyjyy6eRn93YLodC5I7ALX+\nrOXCl0nUIFsrqkpCGT4gerBV+DXAMzbfA2YBOJ+wg9CyavGXNZYfnRNJRnch\n3nzIHmRiRbiy7BgCPMlyPeibdyEbReOi7gEnic3YnJye7W/AITp2D55SnLqK\nc7PIqKVqbepMKGtfC9LaMob3u5YW8eYg8NEJmm5Y6+lA3j5sFuM8WG2PPZ0m\nRHqGN561ivTMC4jDR8ollZCvLZN9+PDEBgzIzA38RmNx/0YmXY5YmDnBdDPQ\nNdXsto30jAU5BMYtATtyRrhYtnUWHCEQDuhUK9uHVhDnaXlhHfZnqmKNTIii\npEVp\r\n=p6W+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF6zDdx6Jfv2WdmKiISNFblPp9/4hC6LiiMeWNRIHCfGAiBjjOUeyn7lz8ED2djHxq8qm3hVT22ufq7A3g0agmjMeA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.5-alpha.7_1584123884521_0.05450673585709054"},"_hasShrinkwrap":false},"0.21.5-alpha.8":{"name":"@react-ssr/express","version":"0.21.5-alpha.8","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.5-alpha.8+5a3c32e","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"5a3c32ebdb577f5dcb1e75d4a4dcfecd83130cdc","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.5-alpha.8","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-3Tmkr6FITbyrJnuQg5ISG6cafuEw6q+mm3lAa01VPRhCaQycDh0G9TUGFYvFRqFGxLQ1NKbvwL+nOT6TlaqcJQ==","shasum":"0675f915b344547daa39a0fa8f6d11e6e06b54a9","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.5-alpha.8.tgz","fileCount":8,"unpackedSize":15748,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJea9C5CRA9TVsSAnZWagAAyp8P/i97wjKZW/aGH6ySkYOL\nIHrx/Q/Tv5ynoVywNyBU8CvrDaaVWFsfdy+ZJceaOnkvI9BoCXol/7I6btu+\nNOA34G5fUiKxHIYBAZm2Z+0JQ8ueleQMFe4S0Rz4PFr6ShwsDiQw1FtVPHm9\nGyju9ekg6Op3dotbfJapqJm5lGm7W5sqEEotfzyQLo/Lev2JgHfz/06HR8+i\nk63k+UaBVh/GOq+pnR7z5zWiNLN/S0dR3HA1IoBPs51OPKIncJyxEsqtY4l7\n9y6aPXX7m57/vMPZrV2Pq63dq6/lW3ooTczZCVm8pPDGKN2ZsNTXnP1zlB1R\n6NBCIEPODZioDGJB3GNhe7+T6Eo7tOV+/oCUiUjdV5DqsRbd3Hf4h3mEckZd\nce4s5Mz68+Bpo9SmeByAZ3vdn6J0ediD4n4Nj3iHUHUVHOXjwP/wACXP/h2o\nXkylsmuFjqd178ehTpmgYhoy/hH6Li3viKWOnzsZnl5niwRilMk7l6p3BbZA\noMa1vUE4H/ywJxEe6dL9M8EXGyN5E+WJ6OBl1hxMZI69N9FJZnKnkFL9Ayfe\nmgOcgErieCkETE0XNp2yo9sVycS+T8h36ji1Z1t5aZDFq9mmKB7uSTuPSDOz\nsyu2QEOOw7zaTrT6HuGo4bBu8CQFJ7C7ti+l/3g9fW4HhhvXr1XbMZgj+UoV\nghgB\r\n=/oIZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHMJJEjBK3lJuMZx5j/t8+NNCMR+sb3x5j5VTynvjE2YAiAwcnDYhiZEey0cKuqlY/KuiJlsYygxptO2Uqus2z6VRA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.5-alpha.8_1584124088769_0.6284320097469172"},"_hasShrinkwrap":false},"0.21.5-alpha.9":{"name":"@react-ssr/express","version":"0.21.5-alpha.9","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.5-alpha.9+f70a384","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"f70a3842e0eea80c59e03c8bf9d9475e5da88c48","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.5-alpha.9","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-obvC19IV5jlhMZ2O7E8sJbj4S+q4bKa8xGL/S66RUU5g/8ZUydnW4tRLPD/1pV2i/TW4PQ4ORTQEktEDxMuM4w==","shasum":"cd43fcebc1058f3799be4a31c3b17c4a9e788d51","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.5-alpha.9.tgz","fileCount":8,"unpackedSize":15748,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJea9H+CRA9TVsSAnZWagAAPlUP/jAlu7tiVbWdoJ4pOmv1\nyoj+j1GeL4UNOQRx/NfTdCeJkLstPBS+PotxU4f/Bi2NHJtGDWYawpfdyJh5\nYn3HcFu4uMIKmNUEfpD9MW6hmwtdWdVZPj79LTfPdaHjgxd7wynrjuVT/6v1\nfjg3kvXCSvad8WMKYJFZLmfxV4KXxX/zb5c2yZ29UH3xDvt3+1ijCqEcLBSR\neDs6nM0TJIc9QCX86jpQ5cWQY0dqdVsjwLfaEZQ21f3jYlMEMeuEhauoQlHz\nkTFtCUQACU/ttW37AkqmPn62FwxBCafvTd6vMjznqPfyWQy2x5lDihZ3P0Or\nnIY6sl+PX6+z0rIdnf/o2X50KuNVhPdBXyz0PzXVvvlJatFRS5/RbZ7iy7Ds\nfV61mGxX6nDbfXQxcd9dXJngBHq0NkgwDSo63a9THrdaN+gcEAW7Wg8/o6GZ\n+Cq7sQuuuvkpupt2ulVCl9DbHTyPBh4JFltZS/xxari+D+fL37jzKmfHRyiV\n9LiX9kuUUeUjHrKazGN75F+fIGsnDLpB2sMJzJT8ZiVK+QLxf3ejlTQnuH/8\nMLr71cJpL8sKjfVqIxhvqMmhqe3iGm++giQq+oC4nLh2bvZrvlSRZTJrinQb\nu7erHIWJnCp+Ld7EK+rqy5KKLcLAjcOU8X41zQdsjToEDdMJh2K9i7s1tjhx\nOMoZ\r\n=lsMe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD8jgA0+TO3S3QWLrwHq1mPGxzjFqMmyk4DxlmIamH5bgIhALikS8KVNeEXMeP3Xog9OYD0abeLvZO3Y0pnA2qYnahU"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.5-alpha.9_1584124413521_0.7394789867636817"},"_hasShrinkwrap":false},"0.21.5-alpha.10":{"name":"@react-ssr/express","version":"0.21.5-alpha.10","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.5-alpha.10+7e46c0d","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"7e46c0d6fe44242717c975eabecfe25ce0773cfc","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.5-alpha.10","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-x9YwXD1ukagKBUe4y3Dx5/EHS4s/TXLAVZU7CLYKVIYcMcMW/qb2oMgNE3Yx8FuT4ziFyeuE7L+lX9V9tf7Exw==","shasum":"1aa047d1a2dbd07ef1a017204ebf401ab6db2276","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.5-alpha.10.tgz","fileCount":8,"unpackedSize":15750,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJea9JtCRA9TVsSAnZWagAA9jAP/04YvnmjOxiXR9yGg4/d\nZKY4GlawwxC5Ltcc/kFKd+Ig/eGIwuPpRC9euB3HTSVsenfG7MuUtMSbbl1O\nTF0Nm64a0+nFTSgqK32R+3iHG++o8oZ+WyTV0qGxPMSnUqyCaR8ZQ3Fl38qo\nkSKS/gGkHOY1kON2FP8vY6j1X23uyEBhOa0qpMekcxGeU40k4QY6Gc4PGv0F\nUZR1tAlcgmVgoqpPYkvtq6EQNZBW++66ukPKrLYSIeipruAlxVS4iMSihWkN\nDTPO4qxWjcEpd1Ppd13YP1SeLWgR2XG8Xwb+WXE2Gi3Nrfg2tQBdgzY8rSmt\nC2SwimIodDkpGBdCsj7Z5v2Ge20LzljRoLhrabNR91Ihf26hJUwaEIkFr+LP\nBO3muGduq75q/PDXbf6yhHmnlYt9HCcAaI0TlS7fJwvKZYVP4kmLaVmFNiuN\n1oyfmWnkS1rzKN5rFOaMp2y6O6xC+p8uJHZbZsi4v4sQAuTJVS40mwUSLjTp\nq/uOP1n22/5QAa7YBrMYWbVkMeQIhWU7PwvzsqPIwTcnVWTjza0TXea8EB0Z\nQ40mvXktaRjmEfFW31re+s38d7sM1QHJNbDsC57KCTiNHxDxYTxWR9/5Ctzu\nG/FsF7tgpbG5uUq6CMGoS+Vx6/RjGJZ6fpssRtjbqA3Pmf0aVL1tr2A6Z/Ea\n/HU4\r\n=zg+r\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFF/tiv/GMoiItyJ1z8tZGggjzExwivT5g09Gf7+EojXAiEAznonaMxLZJjz5LEw3FQUk4r71boHHf1NY+8aecQd2xA="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.5-alpha.10_1584124524955_0.6769962137595309"},"_hasShrinkwrap":false},"0.21.5-alpha.11":{"name":"@react-ssr/express","version":"0.21.5-alpha.11","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.5-alpha.11+713b6a0","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"713b6a0811524bbcebeeaa408d42ba99c1756409","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.5-alpha.11","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-OPh8tqVLdqfBtwP5RsHYe3X3BWluAnjyQw+Lx7cgV0WnJEyeF/reqkAAuIBKBZqpAk3ZD3NEvQJSBsdNjlpNkQ==","shasum":"89fc124e3cb6323b82fa02b8af44bf023bc69caf","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.5-alpha.11.tgz","fileCount":8,"unpackedSize":15750,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJea9NDCRA9TVsSAnZWagAACi8P/RXEO4NWvpUzjeWl3mwj\naecveJTJjMf1+Mxo5mNdPXbsJ7VbaqlsPCVhVs90Qd9X3aDSoQoYKvL80tN4\nwtN6gJoBR+5nKv3e29uRZ6d7I+TnmiotdwEICIvYPLUT/+Qw9P6fIzSelE8y\niXUVxTUVM0pirTt+Az6tbb+oWvcxtWS1KEVdLV7jZRGIP34tKOL1uGOsE5ke\nvk1zs5Dgob0xZyppoEO60K51AMPlWXAUyXTIhqOQsv/7J0GOgcQsl2rEpc1t\ndtmlTaJ6gYXogUr4vkUzDlljYzk8XfmYbj7Rh/z8B2ekuGJkqO10/QSm6HNq\nfVJmjyhfsdSUce9IMxWJ7PEKv06E8dy5W3uqj9CZpnkaivA/UXA6RXXqajwg\neUyIgZzc2+S53rCksU/1g2UFEQcbSNTybd+BgpObbqMa25D3yuKQDzvyUWcm\nVDWDJ68mMt1e6HMCQXV1eB/PSKwTbG7c/advD7+jj2HmtBys0Osnrc9TmoWU\niIjUJHKlC+FzMAewZgJnUOpGQc1mFN3J1BainkFaCULblqLyvQ4ENc1lkIGQ\nPjMXn5aSyQB9shs1S9bv7QqaFzxjRkWalyWwvt7FfMFSAXuIQDygoWLsKVWw\nMedrLj2MZuX6vxqFOEknduUmgPCc1vfo5gotcZIfhl+Y5bI/NZigk536PgQi\nz5OT\r\n=s1it\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIErK0MFf0+DMiX7w4WqaATXaTV3YldgePbpuMJZImplWAiBDQt2I3xSN0HzH+HDmmHJ8TQJ9n0cZ+1EN+3hvIrd/rg=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.5-alpha.11_1584124739226_0.28722352115332805"},"_hasShrinkwrap":false},"0.21.5-alpha.12":{"name":"@react-ssr/express","version":"0.21.5-alpha.12","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.5-alpha.12+37b5434","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"37b5434a7d0d680c8581e5a54fb322d668f6c2c8","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.5-alpha.12","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-1qsk8Uj6hEMLL3Ihdy2SPew7yIJUpd2a5Ul5UCMWFQ0d4yL/fcOkiJQz+njn4Z0jt7TfFnHZigh1ayQt4HXcrA==","shasum":"c1c406b1da21106031f4b0ecd02622852c379a89","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.5-alpha.12.tgz","fileCount":8,"unpackedSize":15750,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJea9QpCRA9TVsSAnZWagAAlx4QAJysXAul/sTOyLzTZfFK\nERO47pK8ipm36x2oBeAjD38D5/tWyNFjJlALeuRBLXv0TRlt761Jt13gNu7x\n6ebA53HHTJtjYWTmXKSnqNz/EBiOIpL3xQMOiRQBUXJdQg/6zrDkVwHIOxis\nl2ZClsD3FOg6GW6krJoXl35YGpKFRUwOT/r1c4pnapPsKQTpRP0Qq1WOXj6s\nw0QvFCF2WzoQizBeIKykE4V961nUYm+SoYIuEdLZv+rQI7y7hrA2NZtyFPlP\nVEISpEEyi7WMVLUFxhy+xpci72q1G/UTlhdx++R5qc1nLL7DKFLQxr0immV3\nOFmVza4V6dzcjaLDJYx58lkYyUOXI4yThZKM6EhheZIi7CudH9EmVAm5d8Ga\nion8dlYOS621CtJoFiF3QB2BfkFE5csEmD+ICknGNcKGc+sP5PalzWqtD22M\nQYY+X3tRVrhjBNbRB+eBzj9GRjLw2k1QraS3GYvAsCZJfDIfQEy56AJrZfnG\nPXszOZDmByUXrpD4bJon1PfPJb5hvGK1BnTW83FdSTQgdMDvl0j3zANBbj+Z\nmP+4gAt5A2vxMhwLazi39YaPaRhoSUQKkHsD6xksDUyu7dF7gpKqarPvlcRZ\nQn7dRch7sKb+S4C2ny3PXrgcgL3Jc8ZYXgehkqZBBbKaIjVxLrCSVmQqkaWo\nqVML\r\n=MOme\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHP/ZxIZG7Q9hEEwMjBnEiyWVhcQ+s+gLHZlBBj4ZTjbAiBu5wXL7CubQjQ8K81CGH4ldatGPVRg4UbDr0VIIEUZfQ=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.5-alpha.12_1584124968673_0.6955655071022728"},"_hasShrinkwrap":false},"0.21.5-alpha.13":{"name":"@react-ssr/express","version":"0.21.5-alpha.13","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.5-alpha.13+346defe","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"346defe82c2d4618d04f9b416c181c20c8b2455c","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.5-alpha.13","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-0k6wp6vVXc0XEBY8gMXYFkTfzhNkzeL9Fwo//c05fO3qF0bN1MkvCyMUKw1fd9CRtAVu1lvYfjHBFkEpGP4tqw==","shasum":"9c018d5dfe6a2fded8dcbc4f12773033f74fcdc6","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.5-alpha.13.tgz","fileCount":8,"unpackedSize":15750,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJea9S7CRA9TVsSAnZWagAAWvAP/i9wILxbYHFme3iV8XJg\nfqJib04c1HwbTZdcaXoOlklkYJQxL1RlwdHxH9KtUhesMYUI8BRZ8Q2jq/Rl\n1cp5frI/bXJG+NBQSN0+ybVj4C6n47Qx8gAYoeBT6om+40MV3qvuxWxcVEnv\n02euyraecHybcuUJ2/OAiXqrjhoq+6lsoPQOvKc+DQ7r2fe7b+fZj9nrpXk+\n9FCNlUZYzYYyxei6hUkiWTOEXwx9WUOLzmxapZxX1WE7tefnRB2s9VIKh6SK\ndBvub3lXFPM2eeSaw6lfrkK/e2pmBd2WhZH2/REKNkGMa9rmCC6z7motqU7f\nOhkWfi9Sx7rz2Jen0lpJgaFuqKLpmCrwPu4MArbQ6S3TL6exOiEoc1UBNEla\nnyYJm1wuntYbcVZLfPmbOYdziLFOtBfwNQ+OsGqzfCdd2vCdQD83pGvPG68X\n6a2gGMs3v178E77Fzf7/GK5LXlxMZorEoH9Qb2FPUvaTFs+hOa6CbklpeOsA\nXEmJ/6kk7DkbhFrEHzkZO18D4497o85uWDMM6JWPdKksWElMdu9M8rlwakAn\nmwyElazIt8Fca0HxSur4AarXGo78qYdU4HWYu3yR+k7FlXVQOS9ZO1sDl8BR\nTamm7tI+MC7XaOA+qtaHVoAC/oi6mnlMyNcQEpWxpGbb12VN52RRKavbEDdU\nUmqD\r\n=MjNh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDXoVOchL4F9EF2PY/600/1Fh7rv6B6utQXUNw9b5B71AiEAkSWT5w9NjD5fehCTgm5BxT5PF0WRkNzcS30GJdb1Kpc="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.5-alpha.13_1584125114642_0.28499734067603355"},"_hasShrinkwrap":false},"0.21.5-alpha.14":{"name":"@react-ssr/express","version":"0.21.5-alpha.14","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.5-alpha.14+f742f5d","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"f742f5db0b59bfea0c4f32ce8055f2626bfbaf96","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.5-alpha.14","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-ZIgf9rozkj2fhBUJUNmlupHZlewMWDhlBrm84LSG49StqumYcfR9hXdJ7ki+J3ryVhwqAPAtotybV4ilGARNEQ==","shasum":"6241a5c88b419b06100b62794f90ef0569531063","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.5-alpha.14.tgz","fileCount":8,"unpackedSize":15750,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJea9VBCRA9TVsSAnZWagAAAToP/ibsOrdTtC0iT8RYOTNq\n/LSD+8rU5YMcsUZ5ce5ROtjQSl8wzXY+dBaTk4Zyf28A+fm99ITUOlS4OeX8\nqdo2F+WOATacnDKwb438XoVSgNOE+Tr13ZyGivXwqZosaZCi+1ny3r+XwrSb\nA/1QIBJc0Cl/5Mmf/Ty9Mgpodud2LfAaILAWjRF/oN5jpMiQVvAOPl+jVgV1\n97zcoArhVxGYpS214ApodtRIEACaH0hxBTyRPqLbhfunm3b7kVPYRoKeypmw\nWjHB1cXUyHNt2hYAee0fR5cYPMH9NOhD9xsuJCrMaFTH5GBwTTYispe32DP4\nJURV6TNW3eRJahTuAm9fF1JDpNtUz0YgGgqaGpt0RREUihwCReTqRFpLs6p2\novwki816sGAhHWcMZfNdS5w5yA4ngVThykC2U1mTBCCwxKZAVYj8RK7fCOtl\nzXAzjz7YlaoUlr70YmAnEftfTPDAwKB9JFC30q3Hp8N7SkiDfeKM/l0yCDhU\n9O9OVEwocLApkxSnaAUk9ULWBbdXBiVMvREFBDHe4hf4WEXTfhu/5rsv1RDm\nmcBkG7rp15GPg5K4ZxfLLN9pUXbuFiXc9y1xpxtQcGYSMCs1A8MBcrv9Dlpc\n9+woZUkkM39j9tLuYaGJ2zbsHPlljrKxdQ1QB3By1aL3NRcTlWOA+xZUP696\nrnNh\r\n=CZZw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAFScxE93OHqGOJ3q/GGi0jK4p6B2ndg3KFe+ohXQZEtAiBlmz9gW/8MB2TQq0sy4KsgHHRyqDa2ybHjsr1z6AE0ug=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.5-alpha.14_1584125248796_0.7143367847749988"},"_hasShrinkwrap":false},"0.21.5-alpha.15":{"name":"@react-ssr/express","version":"0.21.5-alpha.15","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.5-alpha.15+4515e29","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"4515e29ba23540ee7be3b138d94fb1a2beb891a7","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.5-alpha.15","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-DUH7bXVNyn7+mnMj9718al+WeyLyMYS0mMqBL6k9CGgiTgi+SAsDf/66eV+wz4Xf9nsQ1h2JWuwR3KUTSoZiYQ==","shasum":"bfc7f0e0180c3047264e751389586e72589b20e5","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.5-alpha.15.tgz","fileCount":8,"unpackedSize":15750,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJea9XUCRA9TVsSAnZWagAACkoP/jOQAXlAsUJigWCndigV\n0yQfbsM5qxVahFD1DSTd0Pnq05RH8ttaWd1LRl/SWobMQxcv8NeSNo6O1WrK\nW8lYJYYiSm047zCXv1+xQTbCJn53/1ucXMWPzM1rketa3sEFZRB1euDpjE4f\nKJsR/BHoSeqOP//6FWCQlw7AJ9m6EU8G5Hsx6ZDUbLvlyJiRL7dqxJcxLQXi\n5QmoKQND7nxeAJ0GAwupJAwlq1O9lGxiwEyOyQwiIdSy01JWgWDSpFKMpug4\nrAsiMmVaxN2DTznaAa0z48y4zxNUybvOunsYDYbYdAIgTxUyBp4bk/b6yKns\nJwcnX8mP5WDRI0kQhkz6PAldqinHWNhm58VjzKdH5DRwyMUd2LmPoSFpbrq1\nIGg+hLYlwA47ikbdteGF9gWIfEQ14wSBxbNf5w7/Jk6gJ4SGeRCBYeY1n/dV\nyGn8G+Xz7a2wGTnPYRB9RIvxtOCUvYvbyny11ljM9Y/JpeTjc3fi/jg5qvnB\nK20zKnqYHTAPSYKfJMF7yy4s9ou+7Q4jb9MHv/j34WzGoZQccb+ZdtKwuqsk\nENn3tn6OqLThTLQXwNkQqrFeLXRLYBInUGDEnMEYOYNOHMiWHg1nuYK9Ly87\nYRUwrUAiNFchUb/6rDHtRYlnTpoalAVoWZwr/VFa8JnXCcBZINJK7xQ/oF5s\nv8KK\r\n=nRw1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDKoPzGUHiaPVwv69HqNNZ3DPLmlXWLL86mEiYuhq1VpAIhAJrH1rMs9DX4bAJFQL5G7riZowJ0EwlxeD42azyu8+Wc"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.5-alpha.15_1584125395844_0.5838071613991018"},"_hasShrinkwrap":false},"0.21.5":{"name":"@react-ssr/express","version":"0.21.5","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.5","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"05891c7b1899848affd79507a21d733ef68a5d65","_id":"@react-ssr/express@0.21.5","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-m2KGLvpqty95FiUIRKFi0Ie5/vgUXFKPtTS5Rp/nv6YH4vfWQTwAa9txigLoG4wOXdwUsUa5O1zt1USHFuZzMw==","shasum":"8fa78cbaa4848b74ec8af72ef9c348e49a4f839c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.5.tgz","fileCount":8,"unpackedSize":15716,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJea9a3CRA9TVsSAnZWagAAXdUP/Aj/iDqBgnsgVm6tVJl0\nBvzVOeiHxStn7MZrMQ0AIJhy+IEYukrft8oIgOp/qbGGapEMBr1yhYUl4+Gf\nngDRAFOY7ew2SpTwIvkU4B/8Bm8SBW51/94qJnumJ5mRuKdz3ghUscbtxUth\nNpfjAga4/avPejnRYGfbKfTMA+wBkoxpYjOhqjK6d/8uily4Ee9og4+073Dp\nueTUqIs8xfO26f0bnb7fJwVUrvNu0UusxxlKTZcOtiibtE9Y0nGjy2Ko1cwT\ne1lGrowkh2Vq81WrKZcwikcrIvfqbpP3Idw3gSNMDPCKhZpaohBtCQTfeDOE\nJvhAuDbcx+ohzjJ5UInxoSYwv0lz5kw2x1JFG5TMd/4xAo8ddUFPJDHSWxV1\nQgi722O363dZ4eSxdK3Ee+gkXyf8DYRXXRm3oR1lf/fTrL5mxAIO73RPiAfk\n0QIkWe+eDOfjYxz95HZBiY03mfNQ03Fhuf5KTQuzam+VP0rCz+sVy+GC7egz\nsbvp81IYYpAgVk3z2h3qFVr538BNuxp6331iQIMABGW7bFWjbZ0Wr5K5+44n\nhbbK+hZjFB8XGfu+pSHHH8QUBvTyshkjl7jRZSJRYsa4x5ZvmC8nk2mtDKP6\n7UnR7sv8YcWwtrtqTL/47CERw4bTrZbKuUkN9lFkcgYlJW0QFf7GT4BHOYdf\nufmP\r\n=eTuQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDTJ69t341Q/WRWB5csS/WCG7zeVdjOvyXeBfT1VltvDgIgNqwnaD5VVzQIMdCoayMNMwgpez/lnfjFhuKKRa2plKk="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.5_1584125621615_0.7511811608710095"},"_hasShrinkwrap":false},"0.21.7-alpha.0":{"name":"@react-ssr/express","version":"0.21.7-alpha.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.7-alpha.0+d04e9ab","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"d04e9ab3d11672a72358daab18142089464c9ac7","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.7-alpha.0","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-UZ762V5cPCsMD7cJ8JIFgFmYpDdeafYu+EW6TG/s6VCsSNB59luxiM6q6vGKjyYKUmQpo3BVGQPD35SrWoFZ5Q==","shasum":"9850f4f44b29ae4b192ef9147f2977e619ee8890","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.7-alpha.0.tgz","fileCount":8,"unpackedSize":15748,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJebdpRCRA9TVsSAnZWagAAZgMQAJ995L38CDt9Q1NbQnWK\nP6ROaXRdog1ccjLBf35Ulq1JjyceffCzMhsXvKdkR/+QDgg0uAXzshV00arD\nEuPPy0/EjS5izqmsb59Ore65oWKtKp55R3eAZjn2w6h1R9M0ofPkrIZH8Mrz\nvZ0nH/EUVrIVlcYOI8bJdFZd3LCBcqlzZrsZXoICqmyFObE2hbw8TiYUnbr+\nX4MvNeE5eObCJP3xkwFbvHtu5LRvwkzRNXcNzDaT9NcMUe2R0vPRfhjZGlXy\nph1E3cJhfm81ZoXITGRe8B2+jC0Nc3n+0OQ9+1PmUI6FJG6cAtjCNNNIaCry\nj2v+CYHTrOc829rfD/aAAPVBLgYzSvvaiMinPI+sUPjeBJNZLDsQ/lKJE43w\n//cHyyRXRVtG/3xjMaEjRy+piWDzXAMHaaQj7w6Unaql8fSmqrIfUSsqhfhR\nO7+GhCNZWFt6cwULlcFGarCP0Qqgw6C9h0umctpRuJojvJ6zbulmejStGDWV\nbjRZSpc8Rptb/aaK89g4IlzHkt9q11iY7we3cSkOs1Jj5WBEmEN6lRIPxezQ\nB5av8XyNR0ufeDlwxZbWe7lHRti7Z8TE/0tWahgAl/u2Xaex+N7UzsvKkrwF\n8uXa6DYOGdRLRrVd0cs8x3T32g3ix9ltkSe1DhsREwSGW8V3rSSF44VoE1yl\n2SK6\r\n=gWcU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICSyZxB44iChgCytLSp2HE4U2E+2T2rkoeV8hi9x8BFMAiEA4b5J7L4NoY0+Y2XZpuSrxELIyjEzu3MQU/1aB/Q0n4Q="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.7-alpha.0_1584257616806_0.2679909555846731"},"_hasShrinkwrap":false},"0.21.7-alpha.1":{"name":"@react-ssr/express","version":"0.21.7-alpha.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.7-alpha.1+fa4ac72","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"fa4ac72d13926763806b19630ff7b50077e2cfe9","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.7-alpha.1","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-eb68PxAl6z2Dkuro9y4hqgFNbw9DoQ0q2TKlpxvVROHpiedmzNeASebjntQz+HwwhHurK70HT2hWSlrh2SwAWg==","shasum":"3548769a6ea1bee843eb686232eb3e19484e9ab0","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.7-alpha.1.tgz","fileCount":8,"unpackedSize":15748,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJebdrRCRA9TVsSAnZWagAARIEP/07dTY7+ZTVwQrGx6132\nme2EVJy/yepRVlY/9a+yT2MPzC5enWaoSK8nPirZ//bkBcYKEeuZKWPKaFgw\nKu7g4m/OBLtsQ/ezE5r91weJuVqu7qUnQl5Jy1fDdIytchFyCAVn2Zj4wgZ4\ng0kIhb566bgsmdaU8qysyUKuAAeTFED0FknYtCpPqcS2ZiXgE46eCtsgcd37\nsDmx0t9Djo9o9xVyD4/TSsOWNpeiLd65d5UOv7m0gHxu+PC4GP4wvbSDKdhM\nNTgXIEm0C7HS1qfrMEffuuJbLfjFSMIrT/Qn9+IVBt6DzM3+Mqif7Bn7i73o\nDF/i9Nrte2JbG4wk+Q5g2hJsKH4DzcpYw79+3NCFGVzsymYupnZTXDN8YyVE\nCQsOm9FV2+OLYolWTXR4zTsdMpXNmzBilnCPsamFolzYX3W9ofrSvIAgERGI\nApetn27m9fbBDhkJIeQWqbCZPhfCXTMj9n0j8isLufq/m89G4H14s2SuY/sH\nRc8o6K8OK8XOsIv9iI29UqqZLpNsHd7sd4KZBjNsXV2MKkaHdnEto9fh8mJd\nncHlqzTvfZQh7HM54rC+kVmDVXpSCRP2ha0Kp4QfSpkG2ogCsuPDFxc+mcCs\nZfg+TSf5pH+QR15ncSqmwI1W2J9GiK99IdwMYfptErirOAYeK8qAU6msnPEC\nT89C\r\n=m1nT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAetPmGXUcSMTLx2lPSFBF3OvoBardW5/HobBjZLgnO0AiBMJ0kCbLljB6BRm0Qp/+8JG9Z/hM12SQl2FWUUdVG40w=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.7-alpha.1_1584257745139_0.7158875076206097"},"_hasShrinkwrap":false},"0.21.7-alpha.2":{"name":"@react-ssr/express","version":"0.21.7-alpha.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.7-alpha.2+114659e","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"114659ec1d764069657f5ce09ba932e40a228bdd","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.7-alpha.2","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-D8ahndl1ssCW1AbXUbMdXLzcGcIsntzBanIC/j5oGpOymgpI+dN43tzk+5Sojd0Ko50PvKO0eV9rfyW6z1q+CQ==","shasum":"1198bb488a4aa4a6af83ca5e06c5f2e725560edb","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.7-alpha.2.tgz","fileCount":8,"unpackedSize":15748,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJebd2UCRA9TVsSAnZWagAA8C4P/3yyD2Cfp25K44bN+2rA\noDlhglpgQFmG5IXCzaOgX5J4Hap/vyIO4poszbCwTo+oZWRJgOdzjwvcpMZo\n46FlXHeT1EQkfCYUHZYUuBcnjqHoqRW1+JzhgW0Bdq7xoYz17tROi0+UMZH+\nSStIunpwaRKDlzPdZPEgKlqzp+jUKsc3+EhlfA6TDaEtYp1uFl4cHskhcFlM\nvxFl6f25y8sNee1bOW+3s25gYU8hyQmgfI6NWJSjk8kh0nCZ2QYGSmN9Rdm5\nWVeKjf7vRTrEWQ2dy7wq4phwQY0RVKb/9jgt95FkZ0GfUhd4ZEh84AKHseWG\n8yt4/Z17elHl7An5kQirzfPzByssP617s1sm0gDCFRcQJg+S367w782lkEVE\nfZQbzVLWIU1uEPPUvkDTnXyZLYNzXG8XPMwtQreq1+G0XxQwPuY6cATFJuJK\nJsFgJCA9zXFsfeyWVvKzCttTmyJDqA2pI86IH7SW3dLXq6PMiYVw1w6QoyG9\ngOD7sr8xSevq25ZFW8UGqH8fEuPZyTd1yev2Szjbd2A1/vgDrB0vq1M3M6Pc\nDnkrQbPv+omS2DjOLN7yk0xKD1FJsC3Rz9yBSHW23heMd1z8qASg3swtIisg\n6e5LU8bKLIb+DuOKJ27Bq2vCw0N7CzBK6m9/nS+MxPpXurP+DV+d4m/FaObA\nZ2mn\r\n=fXHs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDy0eLKY2U9uiUoOtj9aLFe7lp1hDJlnXs8NM8RFUq/3QIhAMlpBhWzQjTAisGQAzVj6IHhjP02p5o0PMUPihfkwGvX"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.7-alpha.2_1584258452502_0.9955887161840686"},"_hasShrinkwrap":false},"0.21.7":{"name":"@react-ssr/express","version":"0.21.7","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.7","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"dcca84e04e265f4be448d2c5e2ca654cc361eb91","_id":"@react-ssr/express@0.21.7","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-P/YKlQzWOtEbZ8TilK8Cw9Ql3PWR7itDk4vZhVw0AA6Ub3N01okUXzJ9eCg1fXrrT/SonfpsVTyAVzYLtek1/w==","shasum":"f82009c3cb7ce5a181b1818a196141204f6a4e62","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.7.tgz","fileCount":8,"unpackedSize":15716,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJebeBfCRA9TVsSAnZWagAAoLMQAIv4asExIijyDII9gSax\nVSnAN8LjJKIcfqO5DGJZieDH73RRq12IWngtu4lr/ZwijnBrihICiPCmBevM\nrL30s5tPBjRBY5B/iEoEWcrWT0PPl+ZdDCpjZWKxRjmmIzISo5aROGE+ZNa3\nyX+mI+yTAuweP7sswRFcyCuarIjgmXoFXRUbHTL1bsuKpRGHSxqWzstkP+wX\np1Xfd9lmlSQNquBSBZXOM4hghJaF9gMm0hlcpqFtZ+nkDb+BjSAR+6qLOTcL\n7RTyvOBiCtdSubB6+QD3adJpCSbZTwaJJ8Yj+cmr4Jm34PTrnGEmvXh3P8Ib\nzkn/c+gC8+ZqBYokpoO9WGfh5PwFHCWq1Te15jJaSCKm/saGrJkbuLeXtyE9\n4kOiucfAnE9k0otJzWbRlG7d3HiS56DSx5zpYCgZ478EyrXBfu6p2nF68LI/\n8iiwCmuXPU2rX58KQ2dT1KL4Yc7pNDaZB/gpu/pEOcVPpUOY+iAYdpjdLgVs\ntUIjDMa31WCMtxvP3O87Qkyf7LfWQwoNwtHLW6igITyKN6MqaMaAmrYV9/2H\nBkUfDxhJkI80tpxWiHbPCKfdAdoiQ34urJh6bayoiKB8tZcgv72du+5on9GF\nkX0W8m17BQLL4TTHCncaywMx4uMBtOdBAf2JHGp4bomVQsBsQpWZ139mIdUN\npb2d\r\n=OcTL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC9+codnWScEdQ+GUDrU1DGje5SziGWqUZoEqZBvujvmAIgI0kPeuYpSSSKYTp9noQqSI3VwxK2Wsb7xECZNMOP4fo="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.7_1584259167062_0.49739030518154337"},"_hasShrinkwrap":false},"0.21.8-alpha.0":{"name":"@react-ssr/express","version":"0.21.8-alpha.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.8-alpha.0+ba58d2e","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"ba58d2e7b9004e8dcecc3d02aeed2815e804b750","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.8-alpha.0","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-U6p6q61EoFaE9DGoyAgbdswUFEHQoOIGynWSEg3h0htP6mY8waeLkLcQWNDGfjdLTPGNDs0JmUnSRvG/khx46Q==","shasum":"fe17bee1071e8333c102b8dacd693515c4e5443e","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.8-alpha.0.tgz","fileCount":8,"unpackedSize":15748,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJec0PXCRA9TVsSAnZWagAAqVkP/0b+MEZImhvg/9SBgqmh\nDOevNxQuJ7PSAoK+KU+X2UNy8JV3VQHPmef9Ri3qMOK3LilQxhiv4uHmLQsn\nYHG8wuoJuspQfjtEZPodI/G9nL5BQvOW+zMX3P1D+3ZRfGZ1IdMTzcjpR7Bm\nO9wVVAHAKtM631f/TjbZtGccaApklOx81HUpP140G/AVSwIU9BajdSDqMmGS\n1rxROE3+0pNeGne82Pij/rMBjNLeKolETZDrQ8kzmqcduJdO/tgpUVo6KQy7\n5Bv+47cy+qDFwqVcQHn02+rLJS0GeXBO4KTPaK0rfdnaWSqvJyOLO2bmTC4J\n6mRL2epGetTLU1hP84U2QoRBugwa0mmatXfFI5Bii1cAAusWndMtSpPSQerX\nDntwgXdsrZJkigWJG2IZcDqmNjbZVPXYkns39T5KamCyT1F4/QPehjAZbHbw\nPWv9GDlnEHEZADavRQ9BWhuytO7Ce9L0mkqdBsWRnR64lvwkIiMc1KWlNHiH\nQEKtjfN63nzYPNQ/ry02Y/jr6Bbox1zXWcDTKIEx7mf9q1KwiZJWT7USbmqd\nd8puHhG1yYB3aybMRVRmJ1ps/3wk6Be/2Ko3kRARo2XtcszCYGTns7zMrQGc\nnj5bTue+UmZASEVPp9wcXOpmaRv2wmnd0Ap4Ie+WOwcGYOcA95mIDyXwyeCN\nHB3f\r\n=GgOi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD6iBopjSV92bfBIvY/yvNq1ZW25DBk42E3o7ZqN8pWkwIhANhBCcGmSumW78X6BnIr2Y1yRV5dekIlk/SfXPMpS9Ok"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.8-alpha.0_1584612311087_0.4653430988723326"},"_hasShrinkwrap":false},"0.21.8-alpha.1":{"name":"@react-ssr/express","version":"0.21.8-alpha.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.8-alpha.1+a7bec6f","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"a7bec6ff056a876dfb518a80fb448d0687a9c47c","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.8-alpha.1","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-tuYaO+SwHznxtWynWY4DsdREAIDWiu7ccyb4VT9V+r9/gygpzO4MOZNG1vgr/aixppqsgiOR4uxYxDCgu/4pWA==","shasum":"a08e5f50133befbeac13cdace373db7ac8367743","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.8-alpha.1.tgz","fileCount":8,"unpackedSize":15748,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJec0SjCRA9TVsSAnZWagAAJUsQAIsiJo1BnXk1SSqUsos1\nYmTUEcP8EVZ8ojtHcDDju9frJzcnTrtoWnfYOTwpRoR6xEftH2JMtPMHG3mr\nxIYiyp30YX53VKjALhQsshvm8KGTmSXDHZoFXqZ/shmtxBQdgFmAJQR17x5H\nzqj55MoimghzQ7crqo3jdksTUkbH5nTn7d1OdAnDRwEuyLZWao3gHeB8P367\npE+8/kpEL7/WyVeZ1UfUO1nATqILtR/fwx6Ul2IWtkJ+Cpby59yYZgrx2Vr1\nuMgm+E17BM2L/uOFgsA9pdLV4VJPtKm0tdugPpwY0MR2V0uQ4Az7zWtypMUw\nX1Uv9tkMQ64V2alCodEPNE8bXCWcaYTmpMiZa06XKfGIzxqQM/k6w0U5L2Xc\nTd9BlaDk0hvqVckfSMHdn5MdnpMU4z5rDaOLCwBSn1WD1WU1HoI1qdeoxY9W\nIbO8Xfkw6W25BMfw0Kk7ju9QAkel5COT+x6h8DYJsREmqnq6dgOfqf63Kvx0\n/Naj7PhVT7PsNLSG+G3Cm1Ha2LbQYmGKltgG8Dvniv0ZeJuxMT7gcYgcCL30\n/K3hZObu6cxX56SRpAp3eYWvgeEt32DcVxmh6OjU6k/A2gH1Nc6mJ1kpf/Mi\nX5+Ruz6Ew1yqLw7PEsokdyKNnCeVEZIf1cza3X7cWibI+QbG9ABuZy1npvb4\nZEvc\r\n=I1Pc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCtcW/9qtSH6lBNU32YgdDx79ASXp4nroe5AL2Wg7PcGQIhAIm7kFOU/2YPZUoJqzTpfQGPY3boi1nNFU39FmybI1/g"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.8-alpha.1_1584612515346_0.35011073315389263"},"_hasShrinkwrap":false},"0.21.8-alpha.2":{"name":"@react-ssr/express","version":"0.21.8-alpha.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.8-alpha.2+2ac6f8b","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"2ac6f8bae872fcb2845a997bdf849cb6408ddb6f","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.8-alpha.2","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-PP42CeNZi7V8M9l6z0WjfPKwk36topx2lnpIxKxBqdTiVwCYxAv/hH0guoBH2HMm+7Ea19oTqS/g46bfeiTZ4w==","shasum":"40db76005964f353218ff5b028b1b05ce9dc9b7a","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.8-alpha.2.tgz","fileCount":8,"unpackedSize":15748,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJec0WnCRA9TVsSAnZWagAALMoP/iOEjG8m0m36mX4lKNXj\nz1+AIPpn+rUP87nr4Vg+aSrwDbHtprb+Alqo0n/9dv4jZ2DttzR3vbb2tt5o\ncXkBlZGiQ58Ik6OOvbEsShZuWrZ3+NQ8jEGy5qWKe5CxjObriEw1vhsOHCWI\nt/iClM6ZQfBVoXBrmzldha2SdmscJAyxvP7cTcbqVak2OpfbAspmhEGYvFeI\nozlvV2W+MyoM6xuvPla/JVlLYn0OK8wJljYBYGIWPT9ycurOzGqYAqspGQPM\nvbR3Bt7y13AeQ7rhji4SWBVXpNxn54eak80M20j9vqKGp6qvG+dKXqG9QwFh\nI+SqV+870ZU16xmW25Lu0D9tCr0Wk8pKlxmPQCwoZFAUVsvS5rMyMHKIoefk\nmHLuDA4XvBN5kSpZNi40mLRcr6Cdc9ipTkIkuLnx8FILpwHD/j7bB9FAq6cK\nv5LKrcV1gv+heSF+lDnRtbplRfAZiYTo0wOFA9MZEL2P+wdjF4UPw+H/svtB\nHhOV3CjgBc/5oJJtho8ElrSlp2vP/DsbIt/v+i5MHSFnwTbbYU29kllgvawb\n2m15XPtKderiKdOh5enHhw/G3qPuydzwmLgKCzmSEj7u6DRPBmtCk/HPd3U8\nGKKWn0t2uxF+JaR0pMS61GjfUwACytXqzPD4q818FukaeetDOom+9Zm/Pj4c\ne2Jj\r\n=x0e5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDor4tlp9mvpX+8QpUWROHv5mN5T2B9xud4OtNQhR6BVQIgHFa3wVPEGMnbb/N1GTNzl0eu5U/aCBHQIgbHyyr+KV4="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.8-alpha.2_1584612775179_0.45013677126094453"},"_hasShrinkwrap":false},"0.21.8-alpha.3":{"name":"@react-ssr/express","version":"0.21.8-alpha.3","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.8-alpha.3+3ee5044","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"3ee50449a40717d159d52c1ae1fc8d7d391d59ab","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.8-alpha.3","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-EV4rbJsgVPvdfOhy+ZuWpoSFDaUUlplOepVtYXAPOgp3VGj3FjzEMmigflwWWWoMlqB0nC9Ocps5/Jw3WNtt5Q==","shasum":"53b2f1abfbaa9f9e45791ab3f72931991adcdd26","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.8-alpha.3.tgz","fileCount":8,"unpackedSize":15748,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJec0liCRA9TVsSAnZWagAA57gQAJ8xgz/WbQJWgH6j4pAt\nbsNZhtfyJDm4P51SCKjUky79sbOWY8MnmcwiXnpQZQVkMQp0/4Fjc8fpurZ/\n/2R0WlMcGZgkauK16UINlEIgoyulih1MVaenLqQiknigjx+DWnAMCszDFy/1\nhVZWLu11bFA6I0oubPbjAruK7q0Lr2Kn+DHAu/k5aMkY6NOF1E7Dndcd3IQg\ntuFhl3xC1osDOCxQpfFS179CWFJVhwGMW9MsJzeWA6f1ESVzWHqVPRhLB5/w\n3Wv2wmxO+dQzb189cLSv15tfqD0wLDuyRYvIbXEIcOJqIHwdbi8NG8Z2dRi6\n4ZBsFXRxrDtPF2eojrDk21SN7jW6K5K+0v1w3RhAsdKxRH1bkgrjKYrauZnh\nSRcVYez42rVd1ylCUuu94Ye1Zi37QojHpvvbw74U16+/haZ0iScH1SLgZpWn\nqR4MJmqIxwmvIq1tyCVRoi8y5QKJXw3Xl6HLF6GH/Z/PRCGzS88fpH//UW2O\nRxH3QYlyzhziCrflgXgJxZg8bIoizTXcHXoG5Q89ZFzlcv56F4S9ex/mFiFL\nO1HP7nl3WxvRS0k82qTUgAhYiyWIu8yFOlydsRyI2wu70YzjsVyLFWnTlnsA\nGsoHcULUZaKw4oegB+Uh8XbgaN4I/t+TfsQaOqYm/S1x5bvupzPLTxxlQtrw\n9gL1\r\n=E6n4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGiyotG2u9CWY7dIVGd7f981TlsyCkK158lRIxLJMz2YAiEAne4gcmSI4sSuW1zwCPFyMlwmzGa8SuEzgrn6hbLiDIA="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.8-alpha.3_1584613730541_0.9978665270256053"},"_hasShrinkwrap":false},"0.21.8-alpha.4":{"name":"@react-ssr/express","version":"0.21.8-alpha.4","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.8-alpha.4+93857a2","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"93857a225dc7d888f9d8db2a41a214960b384e86","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.8-alpha.4","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-tqbLpA0tIZJDFL6TqaEFgIyo/K4uFrm+borr/v8M2IYqmkHSgVmeEndpBm1Z4jnC8gRbomTslWsHkJ0NKZ/ROw==","shasum":"70bf9622dda11b030b32af0215562a53555f0feb","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.8-alpha.4.tgz","fileCount":8,"unpackedSize":15748,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJec0sTCRA9TVsSAnZWagAApSIP/0UYl6gH5+xIJYEXTnYB\nXG0y2KOV2JM6zLV5Mj+BXmI+rNMxxm8RzvB049o0lXzAEdhekqnElt08Dg64\nflQWyGJ/ecgPBlyIh8LP3bEMcCebUIWfEd4OkVuVLSeDQmBcRK+V90ChB9JR\nQi+tDwqKkGZfOEVvusfEo8yBHQmxu4+C4aXaOVhdEmBonx5YB7tDTJ7Cy9wC\nnXWC34bvqCTfQOD+YIFDgA4uTqJZf/lD2YiRwZh/n0ZtJ1Lb6iGAEvMUcBv4\nLYmlqc11SXAX65bQ37ClCEh9r5y9OrTsA0Eu1TDn9Q++yts//W8btMLhRveD\niNZvqMTI8TAhzC2wrkx8kg9iL9Fw6LUoDAiQ09vF427JFKyDQhtVyC34gkRp\neSN2NIDlJgJ/EUp6hjmVb7KLLGMzMAzDdyC1+185FgsRzvULUeuRcFCadMPL\nGbaU36IY0arB/2+cebLowG7ojVwDpCjkHkqXQR023FImGQhakz45eNHQzj4m\nsu8JqK3d1SW3O8pgpdSjEkAGULNz3Jqksg3W4zgpGQ+nbQQxv37evj28hLs4\nODOn51iME/t8kbvx+nWVkpVKuQWLzuD99m9EiDsKleQhXcWjXp0NNCsF9tgV\nzXEKVKx6i2iA8NxlOpcLB/zOj7+qMwkrJxbPMoVgW5Tu9yL09lTLgalufoPq\nG5Zu\r\n=M+as\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD4ngrBGWYd4/evvZnqh5Qo4Ave2n6qH/rhiUf+TQr1fgIhAP2ctnKKpPwmum2HpL2fdtoX8dm4zhPs3HlJ+rYZ2RnO"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.8-alpha.4_1584614162461_0.32856724789071223"},"_hasShrinkwrap":false},"0.21.8-alpha.5":{"name":"@react-ssr/express","version":"0.21.8-alpha.5","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.8-alpha.5+f4c628a","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"f4c628a6c48a767016de0cb019f831804a63569b","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.8-alpha.5","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-UWIPbhq1511iAajKTqGy1WOFZso4ed1fkEdJixlqq1bjpNQXYdvbPaODe8ZsRdMzrPx1XDntqvV69lztmR/q9Q==","shasum":"4d94e751b7e8bbb6cdc0c71fdb440b9215c7f5a7","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.8-alpha.5.tgz","fileCount":8,"unpackedSize":15748,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJec0u8CRA9TVsSAnZWagAAUMkP/11jYbfS01TrhidQLuHb\nnKuxBMtBoZ9JragTqCB2BthcKtJR8jCbuiG7i4QIMCZuQeo4g7aiLZr54Ujn\ngKBaLzpz0syC2pw3HGDJqafb4YToacu5IxTyfR8OPbHSElDiR909VWr1wl3e\nU4Wh194i+mjAa+2LUIyGT+HhUz/p2zIJx6TAQpZH+ZhSoZ5pBeEqYt05HfeN\nTosKX3Xsf4OBO4z7Ln6Fpb6uD7jEobNRYiue6FxzvFC+Cc6X5eec2YOWCIFD\n5Yq0DK0yHnTu4SminXH+ZYS6gsF/Jin9uzkzouQAREAM1Z/8DsshxV5Mmb6n\nrs5CiSYo+nud57pkRPwlR0x9CJ5W4RXKvnlmCTHsFuenXEfsJhRN1a5JUVA2\nGD6wXk/aASbFnMuRGUqFBGOz64TSzJPdXYouAT10eveMcY/KH75mBmf9hAvL\ndxhqOAAejvTQKgT2qfH1dzuRUmdCiIeaunJlmE3kearwAiBJKky76BvzKOmb\n+c/jT4bsghpBHQkLyspJHcGQPBSYbzIipsV1mgQ7uLgP8mtD5ggcfPMN0fja\ngv6t7o8xWQHR9AF+CowLXJwkTpRx9bPfGVd8CYCeKrJKiVONykasDqmAnAUI\nNA/W/How+h0v9gLDpu/NpbWNbbD5Th7YNaFaPBkIvQ4HbLijBW0KXlEvvloB\nwUSh\r\n=VuhF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDx4FzEc8WcF1d4GsQguLYMm1+8OJGfFJQj4sq6Vgut1AIhAJlJtMRjvtAcciI+6n8+f8kvGH4ybkaQB7U43t+VETyD"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.8-alpha.5_1584614332354_0.523679112597391"},"_hasShrinkwrap":false},"0.21.8":{"name":"@react-ssr/express","version":"0.21.8","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.8","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"7e68def8797666530b7a3614652215ed5bf92c4c","_id":"@react-ssr/express@0.21.8","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-o8OMDc//GS17ylZC8enjln5zNJipucpYX0iTNTAcKKr8yp6+HX4OzwkdNigdc1nk3P/w445haU0pDmZRX+0RVA==","shasum":"b149b0a02ed04a7030f8eaca3d32f52f06283acb","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.8.tgz","fileCount":8,"unpackedSize":15716,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJec3L+CRA9TVsSAnZWagAAAHUP/3oyWZ4AQuZTdMR9kI5V\nNYReDP0bZm+OmraRvz6PctLLcQoXhBtfM1jtKipaztIQmusgwVMZr49n80PA\nTyRjM/+bS0qMHzmBONhXdEPvALcGkfwzUozpi0bZxaeSepBsOKdNFpGEL+Sz\n3mo/DdJJUtCQQxqlona1u6eCfiM3R2fZmuM2cLyzxVUCc0tm9jZ1vG7fxUYs\naoOfvnr97OmycIvlWI7Fgiuo8aONaVFe36qd25RxFwzp3GMzlZBySBjETIni\neKAdnOBSB4FCeUk4eYN82IVfQ09RXvIFU+3lF5hWDQDB9hSPZzHAun5Fmbbu\nPYVDlnmSwj+25T7bYIydspLV2qWOJ48UdCSRxahIu7lh+tRYdjkGuzwT4Ci9\nOoz842QT3YCsUcj7x9CIb1I3W1FC7R6lsFlQo4ftz8A9tdH/zhlGqUAr40fx\nCdXSQ43ej9kpopY7y+1pmRpVa4Zyss1I5Zgpvo50fwxzRsUWuFN9g5Zzns2J\n1GsciniLnNwzOu9RK1hcBT0LWpWmrGO2GLn0im7TS7tL1lwXVoD98fTVwC55\n5rh9tX7pVblVpN38CTt2brxV1z7rbEJa8jL+WFHhKoHXkZ4dALW33X+GWySg\nTf0ZAaLqg5S2QdCrJlgyVTwxdsFX7LNGc5ubZ923bH1prAf76lDIdEjvcT0M\nGXL5\r\n=OO2v\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDNmm0sdBevlzzuXb4yp5K5GcgrVh2l0aqeVKp5OsZh5QIhANcJ6+G9xbVjg4hsX8giwOXCiOELeYpMR0gvjo3D84IH"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.8_1584624381968_0.38030684493726197"},"_hasShrinkwrap":false},"0.21.9-alpha.0":{"name":"@react-ssr/express","version":"0.21.9-alpha.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.9-alpha.0+fbb8fc5","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"fbb8fc51da02a80ca09691d4aca1ed73d624234e","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.9-alpha.0","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-bcaOEZwdukBsipwsBQ3fsc+jkFHCJk8JZHSpvdNwOB48iHrrxU0F/jBNKpEIWTm3LJsUoRE8WBuVZV6Yp0RzPA==","shasum":"990cb966657344bcbcc78d344289af7c956bf2ad","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.9-alpha.0.tgz","fileCount":8,"unpackedSize":15748,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJec76HCRA9TVsSAnZWagAAi4kP/3hIt8QpJVQNFro3bm6s\nIGEOOdC8HC6xoXDhhYtyVLbK2HSBho2xIfD0V4LPJtxgcO0W9r2loCUFn83b\nu6d3iLcUZhOFuCBxjWbDHZAg71/PT+BiggiJq7Od3i/3ihUjP7H9f9W7XFl+\nbbeWrCQA9xtCMtjhvn1EV4hju1pPV4tliavPi4+UKnONMSwA0freKS1Iiz6a\nDYd1MEpMayyZ0pmDIarWe4L8VY9NfQNpczaSqDmmUdMF5lZ72DpAauVTzgp3\nNXrJghmg+t5+HZ7f4SR0MnLAEyIRTJ5q1wn8apskivNqtNZa3+oAjZjM/rWx\ntMp/J6ZR9D6F/9TU9ownhgLxj2pRf+0Y6o+1oPoxbpGJwht90pBipv5G2e4o\nju4PdF8wOhoKLMNpLxjs8X9f2F8msdSzAHQBIhQNNce/X9JdTnk/IlXJ8Kc9\nfaCHkN7gMTRFVnzdnnR3R1K3Q/fymj5ivQbknk0PwqLO84vN14OL76c3BxhW\nmE4BWq6K36jGsTknW2P4wW/k8VIo24JkrIECJNaudXeo4QBrmhX/b6Kede5D\nQMsCG3/GD9cIQKN3dVlPRuyRcl52iJpMUnQfnSDAl9Vd88xOnJgmlF2KTF38\nD91TkoygWLdq3nVXjn8CribtRsiXmrRsbiZv7a6OT37/m8ffMP9K+tHBSObO\nN74/\r\n=HKTx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDovACs1q8cm9fzBlJhYNm0U0oebwI+NMOpe5J3lzHRRQIhAOmGuc27RU1iTKrkdOhcsxifKorOrW4U2XTytFOdM0yj"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.9-alpha.0_1584643719197_0.9264794007674348"},"_hasShrinkwrap":false},"0.21.9-alpha.1":{"name":"@react-ssr/express","version":"0.21.9-alpha.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.9-alpha.1+cbf966f","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"cbf966f62adde490980f43822b25d9ca43395742","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.9-alpha.1","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-thjINIphFvMUsQOzi9kGB6ux/pXSOkCukAIVjvtGGzHfzCf+5WgOk7OM9nDL9Bx4kkYNDQAGB50mXbpNlkQUfQ==","shasum":"cbe0e465c1438421abcd692a60156f2e3f5766d5","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.9-alpha.1.tgz","fileCount":8,"unpackedSize":15748,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJec78hCRA9TVsSAnZWagAAF2oP/R98CJUMafvuRNTY4liE\nVmixn1WCG3ctgr+tOuKGtK0QW5epqWlllKSod+jM7OO6/HR328iasfN6TDIe\n2b6Kco1z9sE9NfM6aSk2cbWnjpwbj+J8jZAxTmNO2aHz01JsbQINPWkLFfB5\nesL8PX9auiI8Z28wBkDxR9qp6ExxjwxaPXgN6YcECllutT7zCC6ogJ8atoWP\n+zYmL7aTSdn66aQWJgBYlVmMtcpFI36Cz2oEUbc/8NQIN+M7vO5YbiS8FgzG\nEec5EtrDyLrRy0ugM8/UQ+A0+aObz8nILcnA9rcR6vUdtcZ2VioriWAlxY/A\nuJ2ipmk1tR7BelQUG3LmThvlC182kmfx6b8SZnBzYfHnOkRB1hpTDmBiZt10\nfFYuA/8i5+m0Lwxcs1lkPbwKjK4OQMYipmC97XxyAjdb2wro0p7OrCem1PUl\nLxDDKN+ebqyCncsGQO+BCwKv1z8sM3xDhrDihI88lj2Sgwkrn+A9NqQU1mpS\nf1yvbhMwvFkdqHp4Dvc3Q8Mfx8K4B4MAiG6TolRXMUk8UnsXIpCw/vfB43ZY\ntzRaQt15ZsIFGIHVOGEmkHxmBY0+beceyXgMXrodvIDLqLgkiVVjyBilLw3+\nCHECFrrHoMh9qM/9kfwCPe4XnL5NtT6j+CXg1bpowwGLPz+lgZiaOGZsZ41c\npWdR\r\n=A2Hh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDrAatU/1VMxlmfTLWT5GGVK2wRay41iRwl15lqlT/xBAiASMNVPfrka6KpEseZ1nMIKqsmayXSshKZbaK1fGok2Dw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.9-alpha.1_1584643873310_0.10971427420262203"},"_hasShrinkwrap":false},"0.21.9-alpha.2":{"name":"@react-ssr/express","version":"0.21.9-alpha.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.9-alpha.2+339ac7a","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"339ac7a51ab629987b8842214b2cc3ba32eaab23","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.9-alpha.2","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-EqyUK9P6meGKa9iRoQQiHdhbWNQKx6bIJcMT4Xy0rLk3xUz6Bsx6i0/dR8IyqlZoB40Kf6uzEjSnMUGGW6kCkQ==","shasum":"7638c5c69ae25c661f5e638a9fd3eee30c22db92","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.9-alpha.2.tgz","fileCount":8,"unpackedSize":15748,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJec8qCCRA9TVsSAnZWagAAH7cQAJmHYt/gXcArYIjZi2SV\nMDKDZLlyJWxw+P7vMBqUYExpYQa9/pI/efm7/Ycy2e89vvKReGWPwbPhqJVj\nmzy73EkMKzCJ0dBJHz15IqbuUkLysbIGst9SNRRzBIFXW14rYxrBh+V2vG4Y\ngf9ScrjUQPHVAXkX83Yf7WCnAWdf1pa3VTDrirrqYPYThAbHd2nMCJrtt7cf\nYgyOFh6KfyQSm126hSu92RY27tgkxdgVsFnGIMOGpgt+BjZe5kfoiiSSFKCR\ny/1C8Bc1nziJg/jLF6xniZTEMPnPsOD+jnF9H1Pr68jXPWbMeY8waJCueBCJ\ndxUCcXowS6ZQroCcGQl2NSvx4pJkH2yUB85S8sqo9eRb8v5pmGLpiX1erc1U\nECsl4M2HubVNbxO/4ChnLKYn6EXVYTCzWMFgGqnsKnyOBS+1uvhukL+iIgQc\nHK+/ZNoG+oGxIYLGepyScYVZySltsn4hJwRMvcjSJjVtYrrppbyKRKasyO0r\nck12K3PKMj5ryJm+Etn2JaDpNEKoWN/0QOLrKMsMsp4QOqV9jUtQPOAxkTmx\nJN4k//uucPZl7FlNdmg+9tqU96AuQkvKBv2ge3wPasS12jqBkQxmboqAuwYn\ngC9T+2hqCQ26kbr8cHZKwi4v5xvUpbalN6AqKcwy2zIAhW5VYIIXyZ/3SRfb\nwbGf\r\n=Y5d6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD/eV1jCswk5fR6UazRIauTsIPTbsvv8Z3JejM0fkX78gIgbr/cFcbuqYxq+frFc6eSOK2FQg73bbt50i78D8QnwjQ="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.9-alpha.2_1584646785859_0.2779288600149179"},"_hasShrinkwrap":false},"0.21.9":{"name":"@react-ssr/express","version":"0.21.9","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.9","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"e81beb8adc30b86e4dbff618dd4397f6efd9b88c","_id":"@react-ssr/express@0.21.9","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-ROKbD9rsVoFFvhHtKcdXPcS+Lq7yODZbF9qP+7qIsDDJ8x4aad1MBDXOPiFRSwVi0YEjFynrnDhIrGXCBAougg==","shasum":"5d4563a6df1afa3bc06938f99c13bb96a84511f4","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.9.tgz","fileCount":8,"unpackedSize":15716,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJec8uaCRA9TVsSAnZWagAA4xQP/A2XgbtCbm6MYv6I5f46\nXeb5Dh2lp4uT9ZwoqYUjKfMKl+KtGj2L8vS7Grn6tfyW7oSFxU42AXpXr9P2\nrD/XEd8ccmyzXD4a1/ckEexUgC4jGv3F4qSy5VWkeX+R8YTzTcA9O/aCXfMu\n4eZj4ep5JAap5QoZaVTIHs1LBRjylnEOAwn0PLPSIlm/FH4VDv+gHwOtILM3\nuAb8G6X2wkw+chxuaMzULHnIxMLc7zH/ft9H8/HwPkWsHSCFv6o6NBx/2lIH\nAH58Fr9axo+wJwUBhV3TydpJnq4mndxJbqgbpKIxh8F/tvDuU/3RLZKkHxD+\ntDfV/Ygbnf2rB63H07sdSqPOxPOBfqlpJmtpgX84ZMKqgoPRUPfL519ewTTX\n/+3NL+foojFMXMWAxLHMtdIA8olyxqy/kQMcKTbBOGCl/74FednmRFjPpmsk\nFyfj9KmNO0kuPypwprUZjXK5v/40mJOIUl6w0QP5K0C9//8Y+VQGdVgpRNHV\n7UaBUbfqMRbkm7ooDQFcJOaliqzAKf+spYdaDuccNEfwUUtWepoal+NJvGsT\nHQQVp0mXdPh9nqXMGC438DO1MWSU3g53YhQIW3+KSojst63EMPWdAos9cH5b\nawv4mwoyKBCReWsDz/NRAVBnyMwBvrmTs6pmaBatUOCWb/kP+HzXxRG0H2L7\nnVdc\r\n=a3ME\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE4754Fbc43i2lRLnrmTBpaXEC+Fi4Qj18sKPF3BMOVQAiEAq49zUhrOkBI8edeglp6kBp8aoAyKD+zIjGuRtIBjJcE="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.9_1584647066216_0.3742216493765942"},"_hasShrinkwrap":false},"0.21.10-alpha.0":{"name":"@react-ssr/express","version":"0.21.10-alpha.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.10-alpha.0+bb530af","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"bb530afd63e07098ba4408dab102b69fd86e053c","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.10-alpha.0","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-e8VSPlw1ZyMogM2o2lFNNnpk9VCLhCaIsF/mUG6k8DGxw6QmKhJ5Z5eiJIeAYD8mKDW86YNCjkHyvFeHJdmZYw==","shasum":"3a95a58e7399b6ccac08f4de89aee099e2cecd13","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.10-alpha.0.tgz","fileCount":8,"unpackedSize":15750,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJedE+DCRA9TVsSAnZWagAAh8wP/0nEQ9szkrV7ZsUVZLVM\nGIec1ZrK7b24YmYNca7dz7UrxnZuUiclS6e0gggJoX0FJDt2OAMMXS+69bBH\ntqonLaoCL3k25dxt3SpoAA1m+aeZu/TpMZBQRMob/mr4F7keeJJ5U4mX1ICg\nhvI9SxBTOOhXncbn9naQ+1oqiSEjJNIBqSQXN4rx+h4SJVm8/OsU6Hsrv/fi\nmWGhghDXligSdyVAe4pi/jUP/SOdsH28brJxnTUF6LSKOoZYcsgONfW0W2WN\nZhSZWI7FC6DBVINC5XFggtb+rwqVxM91n+QCaRtgOpUa48iUahmLyaOtW8nZ\nYZ51Ap0stdwppBlqm+pVxnSOL0s9apXLD8YMyhQHeDOzowB/hz7imY1B2Dzl\n8DI2E12p7I/UQch7cCWq2wbqQutdWVikbxpJkEZnPC3cRxJUczoVOq4/xE/k\nyB954yelOdLo992q0HuxMssuroDhIFPneIxwKuJXOHWr/hEAFgpX3m9eNHq2\n9csSr90EVXiD/a2I0q4Qf7gVC6juTST6EwPSZoxLR19iV93sb5deTcLFdaxk\njzrguEOzOWL9NtegbX5CMl/fRpFsOlXNeavZHeREyhE94XWAtSGwmwHaMhDn\nXKDPgE/Vatwrcb3SapdajcOk7s7asPtgUMk/6S7R+6shBI6D7mBFNMs8tDSF\nG65p\r\n=rM4V\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHRQ2ulbmePK8GtKCluRi1nmQ7GOQID292eMuZUX9BIGAiA14yP/Nm1ZEZEc0LIXfI+2l8PPir1jMGSLOLViRwbUow=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.10-alpha.0_1584680834736_0.18530819065316306"},"_hasShrinkwrap":false},"0.21.10-alpha.1":{"name":"@react-ssr/express","version":"0.21.10-alpha.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.10-alpha.1+8c163a4","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"8c163a45c4e6c69429cac869b271a770dbc84ed8","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.10-alpha.1","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-1Kk9eeDblGKhznDm8SI0a6RogLNw3JM8jSxoBT+x303rqJ8rV7zvC0Xr20S7Ow9XlbY01kEKE3Ux6FdoJUhR4g==","shasum":"d3a1bfaf36072674b97c9afaf8eee160379f25a5","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.10-alpha.1.tgz","fileCount":8,"unpackedSize":15750,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJedFDmCRA9TVsSAnZWagAAg6oP/jAQV4W/PxRnll6LLUHi\nFKnImslF0qTfLdQbdFDDfFhMjm+62JRN2QHokjUVNk2fL2QCfLRmSh8yGGty\nqrc/taFaMWsQeaq9MdlEteNd/rWTQ+bv7Ui0KHMD7Lv0sVrZ2/Xoef9bFP4w\nrA49XUNcSrJoFNNHuFGBsGDzrxuKQwKPlii2GDCD2Vwaq05iNmktsVzR6589\nXidCN+xX2FgwUhC8qVsOBnkVrG/tDfTZ0TfMeY/Z3Tmh/n3pV1v1CClPGwIH\n03hmoRIRkFcUB4Cqf369bZtzdAWcff6IQ9isVQv5JP3MW3UnufOogq4V8iFQ\n6/iZUeZ9EvdQ29zMbBVePI/Rh2McCZ4iNhPPyfWNPMUr1f1A1zK3Vru3qp6B\n+AW1FtViXE21kPslUQNEb+X9fTdPj5vxJCROX6PQWpBHMVEs2NzBBSUjRW46\nuIcsmaHp5em0y2bVkRt7exk53yrcW3KDj1QRtlUn1Ls5Oa1NNgewYzHOnMkQ\nZTX5c7Ze5BOma173rBe2pQ0z/b396/9Fv+CT2kr3z3piURWWDwKLwWGJ48Sf\nVCt86jCBIubXskZRSRyieWFH1wTdydSZWAL3hZN7rka5UOQHaDthuIFLM+jo\niF6pmdA8Y4xWoZB8tztM5MF6lFd/mP4WPDP5PbZXZvPXZ7Fztke/JfNyzWb6\nnRdF\r\n=tjsa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB51Sa0pxwJi3jJGCBTOlQYMZWBwWoHPXPWs0Q2fNsiVAiBJRawWJres6xQ2Qtofz099IPZFrZXVaNfld9cCKdtTnw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.10-alpha.1_1584681189907_0.6256959884822368"},"_hasShrinkwrap":false},"0.21.10-alpha.2":{"name":"@react-ssr/express","version":"0.21.10-alpha.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.10-alpha.2+060a13a","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"060a13aed8fb9d5f73313ca9e9aabcf920e22334","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.10-alpha.2","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-kfIqAK6Gd1WPOaK+5ZuyofEoqBkysnsXa2LsvGjhV0GyFcovT1TzKz7Pnqin8ZsZbteF4S3lelzh4luv1x/KYA==","shasum":"82f6da099ab48b57e6ca98adad7b34cb0b3fd58b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.10-alpha.2.tgz","fileCount":8,"unpackedSize":15750,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJedFJxCRA9TVsSAnZWagAAWXUQAI9YnKgja8Plv3LnEEwm\nsZzvE5eEpxpJws/GYZRDM9Fx0aM10Wz/NY3KBXP+a9QIIfBdDAfzf3OWcVbH\n3uA7cPkFCklNBcQMd6uHJ1gJWR7p59iAG3oXBSJ04PqCgfI12D2ls8MQVeyp\nD/KnLwV9Flg/+FK4YdtfMN3TG3uqaE/cwtD4dbUqNXDKTu4vm489NAj1VIh0\nMaX5jbcE4RQWHZaY/9QaJlDdb95fTwe09AyaM40smHMcaqBPRzqxEA+1BaI/\nn1OHx2k1hpojfCR1I7RAYPM/EARMekXzDaRE03bu+EmClBSYIHSAVbeISw01\n17WKs8Z+0+lRE4kjyWCnYOUQ7NU0ADFJpusi3ufSMFHv4FvsHlfHqqsT+EbY\nV4dZI8MuDo3J0idd91ZKpLmJ2oMawZVerJdwaW8rmzOQ1Doh8P078C85fgsW\nixaDjKYM92WhSsWnQhsRajHkFC5f1Umks2mZwM+Y7FWoI1/lJscHdUtXaiLT\nkuZ3Fh8JXr3E86Szs5TSVzFXKeE0zaBenF4KdCYX31r6/e/ga9AdY+0p+6vP\nFncpgMGzPe1GGsf97zjPsoOTx2ewGWmy7EAngHUZAkG+Gt++Ub/Uwosy9bLJ\n22F7aDH3g8ShPj0IpZwsVVvpTzrp5icH0Nd1SR/qTrhuPBpDBJc7uXrbUoMC\nFbVS\r\n=P3pS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDxgvaoWyAQgPHlHAYTGYwFcoSvtYnKe9ZSuoDVVQX/qAIhAKv7Ljkbf8DhUqKFnNXqHKulqa3mnN8G9lqo7M+KYd5L"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.10-alpha.2_1584681585174_0.26769882493182373"},"_hasShrinkwrap":false},"0.21.10-alpha.3":{"name":"@react-ssr/express","version":"0.21.10-alpha.3","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.10-alpha.3+0a2d23e","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"0a2d23e54d999fc6e2b4def7cdd89a21b21e476a","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.10-alpha.3","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-mfTAvSAPbxYD/McuPO4oAjkuCY0M262fh9rOkM5m9a8TchiIVw3kE+bRHVRM4456784e6dVNJuq4evm+KGqbqw==","shasum":"d48377d2c5b84e26a9abc1896c4909ccc1b89019","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.10-alpha.3.tgz","fileCount":8,"unpackedSize":15750,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJedF8YCRA9TVsSAnZWagAAXwgQAJ4nsy8bol7b/Z9m8VU0\ndAzW4a8Eceqwgf7ACq10enaibZ5JM9ZkN738yOUsjJxLVCTBa0pE0AF0qe4T\nxvUyBHDIbQHe4Yrk5IE9isprY0oXSEbGLn080KsngcpZQyR9ZGnqKHpoZKZT\nZ5AyFYN0AZhAQbzbx7p9g5yX2rI/dbS2RB1A5/MrCoIwmqmojlFsm8iAHhd3\nMYPpK2vJle5snvGaAz2Os7eb8KRwndOwNBvLz5M/3HJw8AgEHuhJ5xP5YgMZ\nyvymfSg8gUCw0rp+RrHEtyuwodzVKm086BRBwjvzsZqWiX046OJNZldZLiXD\ngQxPyrVpvWXXOZtN0P3GgiavtvKeBeG/Y+L3VVWxBY8T/zUMWBhcZWGw1Y0e\nQSn6I+43x0bha9+lszdlsm2vW3bLFjMXU0M4WA/+xcrxSTii1OsPV89VcQbU\nspmxeuaHI6sjyb+thAgU85jr9AAhaMFIcGDozx6M2sxdnRNkkAJCkXa5tyII\ne8hz5CM7VKOLcl7DnN7upecMWF2f5wZP319FQTdXewPSfbtUOG9HSIDftmuC\nOjc/Sm3zOmJKNbNnXRtP3u2LXnegHSc+QwC9Hy3MoNgs9Q88XscvSi0QxAjr\n2/kxlbLJ6uebsTyggRlJujrVumRQ+F/64AdKWlHjmYGjmnsHF9RJGqmdSGEU\nk0Rg\r\n=8KYr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDD0T+JndUi6/bQsh8eBGp3e/zxGHS+x2PT4DrdcgcUzgIhAPk4Q7ZPjgeXQWXOArnp/j0HoNSRj+im+L2xGpWF+kNo"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.10-alpha.3_1584684824048_0.4453049773844058"},"_hasShrinkwrap":false},"0.21.10-alpha.4":{"name":"@react-ssr/express","version":"0.21.10-alpha.4","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.10-alpha.4+dcb3dfd","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"dcb3dfd3e56f8a2915bdfd251a361097a6eb58fc","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.10-alpha.4","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-MKnamj96PNyeTH3aOGwhBStfuzijwaEfi2O8Q/7Ou1Hfx2BIHaYU8U4QdCTE2CPxkVrwiRzCjI6s35+QhadBYQ==","shasum":"2a205f1a3f22198063368cc0032a3a4643f5e594","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.10-alpha.4.tgz","fileCount":8,"unpackedSize":15750,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJedGEpCRA9TVsSAnZWagAAGk4P/iS1v4jjW4qrIIi9lFHT\naGyOtY2hL/e9ckkS2+rKrpL4E53LZYGof1ZSIpE2YUGKwXS5adm/+Lses5jE\nu3sxCT5LJVM5KU7TRov1QdHOmlIrcYHs8306MJzmluL5XrvzFAW8OWOn1WpJ\nuWJg6AKczxbpsHn5iFhv0m/wgD4KEGr6GqyHVGE31O9fUkLoSkiCNFC9g5Pl\nIMKyloArkdmyuBpZeLcwco3hOB7ktlIOLGLbRfbpQKYi43DzuWzrvVr/tGBR\nPs70C8GDPJjMhtAp0tmaH7fk7whrwfVZ6dQgxgVIgxzmQEGyhzD0VBJ701u2\nw+wo+YohUoaGRuNH3VviUYroeUOzYkDtN+piucDnn02J/n7hZ6+X7kcPNKNG\n+iXpuIejbuI4Jo7EqHxn+Tz/4ic9BjO0zJfyxsMyzre3eICk/stY9oIBB/Bt\nWX0mzlrP+CHm2qeCZMlqFwQX0ELK5+VAmEyjknUtNKtMx0bDUXbQ6kYVijhF\nNle6O/vhRlK70g7sR4rZbJUeQAOCcautwNEhrEG7YAtj/5YvO5RuNmoyGtzD\nQRPECW+wEObhrRyPI9l0WwoaABBGym34GiIICVZ/2zXBDpqc1xh7uc9O5GwJ\nyN26Q6pDvmb3pyjvwSMcBr5WD+KTEp7WvssFp5Kt4U83rfmfenhNsiD61CMI\nZ9H2\r\n=BcZm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDpqSFKrGod7sj6UkBYDmIMU0bOhbliSMA5UWQbxWfC6gIgM+dQsbNkgwvidqhVOsJtVZzxpEtBgHsvi8icz5H3gz8="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.10-alpha.4_1584685352907_0.4176544896858454"},"_hasShrinkwrap":false},"0.21.10-alpha.5":{"name":"@react-ssr/express","version":"0.21.10-alpha.5","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.10-alpha.5+68562eb","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"68562ebc042c509c095b91dab014cf36a6872337","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.10-alpha.5","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-XOKGBmnMcolTaI/sUUKnzYdCYvLmzR6leHnEdbBSLaiQsNaGGh75XWrsBv4W0nocYuehmx2JDJC/IqTgM67P9Q==","shasum":"1de264c9943fe267c4aa12424e24fb3a1b6edbf3","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.10-alpha.5.tgz","fileCount":8,"unpackedSize":15750,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJedGT2CRA9TVsSAnZWagAAKBgP/0Hx1kCjP/0aAz0hYCD6\nZDuKztrOCC9cJwgiMWJT46I91U1nnakcYclK7qg1BlpxNQfyjYqTJRuNMm1c\ntiYYDhM5M2NdPJUjObHFTUWkj2vZY3dQQ+irKI51KNCQS0CUiC7lKMbxtUXO\nXoNbIxPDzDh09/Kgai4CdTQcyYQYpZY0oQYP2wWn3gT/ZfkJ6SsRhXlao3mO\nTBolYqk9uznzKtTnHzoJHZC9DkBbt29A2iSFTsrosRAyAHB84WhDAdrH2V8/\nA5qxv8+D7iQqfAswjbdc1frfvKTHcbz3munjRFEJmj2elcKxPBZjwxQoGKdv\nwnRgjEF26eEuAhc7vdtKSaxGCUZUA/tDw5hynu70YOY1057DuvxTQ/+7DbKm\n0m8+809Xp/8M24kYNEp4L9L5rZ9VeiuctRBTj4LXsl2zkHlTjBM5akN1Dc7Z\nrqYppCmISJe3toFxynjWiaDLaWHOT2Gi6QfqpiUsHfi9GaSFC1Wm6LQ7erVe\nCHeLI9qT/rxItB4ISRTCV3bTf8x6MO+UEIOKgyJp5YzLPe1E9lP9UDusU1kN\nsHnXOZOtQMH82yRUIHRfJNJY8Uh7DnEtjMIc/Et3ko9kX1IT5M43c8yPy87T\nJ8TlTfv2nl6VSfoMVl6xmNT1jFDpPaTSWrCYC6jmm4MMOhdwilbN5sQV3pAq\np5d+\r\n=WT9a\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGfa/zfAP1exWWbIF9guD6Vd0rN8cTjiZJ3hA7DQQjLCAiEA8OrVl9Lk/iUJ97zEVZ3BeLPBfKGY3L+hsH+s8gffi/w="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.10-alpha.5_1584686325684_0.47467036563567166"},"_hasShrinkwrap":false},"0.21.10-alpha.6":{"name":"@react-ssr/express","version":"0.21.10-alpha.6","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.10-alpha.6+7cc2c8e","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"7cc2c8ee99af48dba0bb034bda1f162584c7a265","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.10-alpha.6","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-TRDsW+lPK4kI+Eu6k5s8CsFrefSxJeUTY0Q2jHiqyin7xUKwGvafh6UgSvly5gLdoubHHejgFNi6da9Uoy36pw==","shasum":"a66911d15b98115888864a4ebe4ba8ef87080ed3","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.10-alpha.6.tgz","fileCount":8,"unpackedSize":15750,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJedGl/CRA9TVsSAnZWagAAtcUP/j6ZXppeEs68o1eZG3XT\n65MXqNTeixTB1s468m76YkGMF4gznr5YZ8gqwu7O4cAEb62B5vPO4b/+mAhe\nT6U8ieKBlB0Wru9pjnD6hNcJCdZrj01jdvplpWb8CGf+4bs2ig+gjnib9XjQ\nH/228IsMgLxHTnGnD3/SPYXg+p512AsHKJU+FE6J2iWhX/OOXn8a1jQwTgKX\nMvFI4Khs2drI5MHz8idqqh+RnU6dBoYalRUhx6HjM9E4h08TYEZKoRyN11Y7\nX8fD6znSAsQIy6dQqbjAy2lfdMfn9740WJh/iQ3ERHcHCro7mOpeqG2Ar9O/\n3v4x+1jzB6F7WIDghT74/1v9etOQ/uELou041STJ9N/aADAhaiNb5k7bDcqL\nFL3moUzoeeHXlfkZCXDI/iXH6y7wjqi0YKa6S/fY8MO1zJbJpmDjxQhgRd3L\nOFp/vcsydWCz0wOq7zSXdGq6Gykx08oJC1Nq+fARgipmfC7b4Mm66TNOyI92\no+UUf/RWyBfDCFRQmlglcFlL7i+EtqsObHkeTohsNNBdtFk4zErX0Sz7DDVE\nTxhV2RaQ7Aa9sUp8/IFjn/RcolLZyNj04kKc0dqJqSbovLsMtZShzxvinZ0q\n6n6aT6PdgJ0YNGFYB4n04LPVoQE7mlvRkpTyD0b1A1ezSEePalx/QqogaaZd\n2Ugj\r\n=Q5PA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCfYQ4ew3iuPSMcLWDszwFgzozkU3H/ui/3Pva/WJ/VxQIgLB/D2JzhiK1+ta0lf42A3Uf9w9S7h7P/kWvqzVdJdTs="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.10-alpha.6_1584687487246_0.35981599038666134"},"_hasShrinkwrap":false},"0.21.10-alpha.7":{"name":"@react-ssr/express","version":"0.21.10-alpha.7","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.10-alpha.7+12826a0","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"12826a00c65837fc2206162cba595dd2e1819365","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.10-alpha.7","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-4UHt8Cpgujeh1z9jEqOga3uMkau61+N8+s3byyvTx4SRRTM74jxAgYIVSdroskUQJfgYifqYLnu2PcH7Ji6nmA==","shasum":"9649937fc47565e159b9e707139c19f2d966c5fb","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.10-alpha.7.tgz","fileCount":8,"unpackedSize":15750,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJedGo9CRA9TVsSAnZWagAAJwIQAJjky+lTmTLKmAu1YW/0\nMrEtwhk1qfAWqq3+hW7dy/eZvYH7jwewKVhTMIcyOiTFQUb5SMKRLuPIuC40\nnWgWX4c0zqlmFr8yHYn6DYd8XtBlQ+UUnlvDw1DCD9t//HfO9fXwQVcMxt/z\nHxPEcHZ3XpdtKupoHou14flTgHVR+G68aa7KLzqXWKBHXmtaaGGAQtjTxjqn\nbus7ow4C8KmY6Fp+GUPOFdZdTB/5m45W7MzWax+RvWGpD6Ko3wiLkbyuzfqt\nxX56iulihPX+CrIHTds0YXhwT2DPUxK5k6rgHCf23nyZyOIHxIRI57FD7CM5\nxpCtzP7q0nLEvY4CsP6EhZx7Y3gosEGmdrGI17dhhc3LcmBY2V6UgKRZUOV7\nUNEOLFOdqL4SYGji6KDWQ7i0MxcIYbE3Kw5ZhsW6cy07/FaX+Pnu7fhsgHk4\nNYm0EA2Jq7DnDT85d32+rDPMhpZ9JLnkJ/r2S+/2+8x83cYvgoR/QDJlIeu0\n85iAP6DMHPo5tmrtJLnRh1Gi4Xe3uSoHv9p67HmqKnl/XjQRtm7bLa+JSEQx\nPlCdJk5jhnUtzfkIwjf/jRSpqFGVQc8s2pCbuIX0RQIgKNV0+5Urr6gNzS6f\nxyNUfgh2wVpIs9t0ONEO0N1651KWg9+00QTjTK6d+8Ib0AdOzt1bGrbQXiyb\nfdGw\r\n=L/8K\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCSYjXQloji2mf7uEIeGlrvY3xo/fQqwqoaDki+M83/6QIhAIEZxvXTDTnfY8nxKVcXfw1Q29/ywTIVQlThkA0/IP6O"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.10-alpha.7_1584687676990_0.38265528907031254"},"_hasShrinkwrap":false},"0.21.10-alpha.8":{"name":"@react-ssr/express","version":"0.21.10-alpha.8","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.10-alpha.8+75f67b9","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"75f67b9e8b18c8b98862f3365495282e36dc4d3a","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.10-alpha.8","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-Vs51jM1OjQpHISsFdOY16xrhr97o5IF0Wg42mes48nt1bvLITNa3C9e7pNLaydYxuxrDDlji0RnBZKuMZjo/3Q==","shasum":"a305da064157846fe5663e40af8af2c16870c092","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.10-alpha.8.tgz","fileCount":8,"unpackedSize":15750,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJedHDoCRA9TVsSAnZWagAA1+MP/j2I+t5iznKTRQsNKWp9\nqajiLk0d6boGCe5WR1ojbityltBM3IMAAVimW8hWsOTLWIVubCJ68z9yNtSt\nL1Tk3Hxm5Nf+JNrxzhsXU2GmRebErdYl2Cb+zdTqyDLD4Hy7nTp2+zhHgiWz\n0Mq1DNouOiaqxIf6vUfvWscAV5VdUl8hA+x9XCzT4qTk91821lGxsCuoZWgy\n5T7Xg12DkZpKtyBlr6d2pKC5rcc0NZwXu6raovml1cN18VpbkEIxUHgQmRjH\nqhp9eMRy1adGlsMe0rghBW/I4HaaroYDjugyHIbkm2frhiH0O2VWMhICxMn6\n4L+sbBg9SddFvMeioKsGIJEOCugfAAFJ5IF7Je2R7BGqgnHry4Cjm8PYqA6a\n5kA41/0w8+4FZX55NjbG7tqKatIDW6dlNZwrvd7tzHFg7jNX7fB33ucjia8O\n+K1Ks35LgapK9qw2b6pwncZMQl8CW68hz2aPSuUFMs1QXviGk3fhDGoJAhvz\nUNkXii7Usmxpr2/5sgnwZdKHHKpIOPH0hccfqIOzb2XX2iWjwMbGXuGt2CGB\nOUDfZv/wPn771zN8azf2T29Pby0Fs5ALbItcWoS8vk6atexGNiuSxiOXw9kj\nU8tVX4uCitAVSIz5oFQUmwCImMIHM9a+1Zep60HVgo8NeffJXohkVR2SsghV\nJGLS\r\n=BLbl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEUt4isfeFBYITfKNxJVeDIiUyvcI8hN8Nl+W+dUBK90AiEAkfK1QRkw2YuFWbMqWHKYUXsRGH0gwrsHp8/v0gm1H4w="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.10-alpha.8_1584689383432_0.14202526426184825"},"_hasShrinkwrap":false},"0.21.10-alpha.9":{"name":"@react-ssr/express","version":"0.21.10-alpha.9","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.10-alpha.9+42bb2ab","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"42bb2ab09bdf95cbf96f0fcd53213cdd5f5bf88b","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.10-alpha.9","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-htXcMk3b/8rMCaOwM5FEkD7F2tm5nflVmSY8ALarFA5hbWEqmPN65OfFlFCqtYWHO+QnSpNMSEu5Pg/oWpZOMg==","shasum":"39b1422966cae8a8388bc40318f1830f5fd480cb","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.10-alpha.9.tgz","fileCount":8,"unpackedSize":15750,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJedHHPCRA9TVsSAnZWagAAzskQAJJVB+P7U8jTKrmmSO1A\nBjQWAqFXL/lxxRwXst0U2QamAXtfmEExkmQPjyNjg6PBWWTAQSKUO5ExVnlM\nE82N6Lv//N9ehFZ9FRGQ0tmI1eBd+RuD6HspbEEjKBzpmQ1PD+Eivv97N8ed\nbJA83k1hSD0vWWxyfqONpIBLw4Gfw0ac6pko+YsNSgEXJRX+Hmfs8fFztSxQ\nh2yqygfMOdEaBji/yWZMmPw2h54tHpwwYF3slGNjJ6eI3XhJr7nSwYA494R1\ntPOv0aT/7aDJ7gE/9GYP9CM+8OQ6vYkRapgre/yHky2cTg14zjzOYo7HfJYQ\nRdSr0YMax9WnpwR3G6IpqwKsM+AzoTDRvCwsfKuVmgpSMK4U6nVFRuX02L7d\nGJmtvTjX/xM3FG7fPkmHcROmby7BLKSbPHd6NTpPCKLbR0j+nPCeyAn7LDul\nMVwHEeHhE8OfX43LWkEYWcGlp90HvdpKvlfEIcqgL2t0XWObFAzwG0hpEQMO\nwFFJgKuD3bPkAE6dJx4HHEbLv4lq7nn9sNFeqRgvvm5mWVmuLPce08uGTODG\n+LPQgT+owgbbE1ljexGzjMzeyAOaUtvCjLzOOFso27EoXh5UUgAnZvRteYSn\nnVpL/Zm2r/l4PmvY+dWeOK9d2AtGyi8h7pttqeiofn6LMJmL0guNBQSjlYhC\nfPjg\r\n=LONV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD6T8PqWu69OKi0bRkcRMFMVQyxaJdJD1G+fewvE24zNwIgNoydCrFVogdg2cr3NQI0zRvaMZCOYwR5lI8HFuw2B3o="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.10-alpha.9_1584689615178_0.8645546568391618"},"_hasShrinkwrap":false},"0.21.10-alpha.10":{"name":"@react-ssr/express","version":"0.21.10-alpha.10","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.10-alpha.10+f51acbd","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"f51acbd6edae7791cfa9edfdfeed342c9ecefd06","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.10-alpha.10","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-SMj7BovurUMiJHKwSA7K74/jvH9CDfy+ignWsURfuUq2tGHtxhWOXKQoC2/YAye6LgT1X9PBCHWdZs7859d86A==","shasum":"5e69227aa331752dc7a28afd69c0ffc422ff0886","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.10-alpha.10.tgz","fileCount":8,"unpackedSize":15752,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJedHLZCRA9TVsSAnZWagAANC0P/2v66S57e1BzxSPL7hT0\n9QY3p5bUEAXoqdmIrk0PQj1kNRBI/hW4ccStB8KylDm3/dGIvPFeJcxdHq8b\ndvvpyK36nBdw0EFPwPbpKJxGYg8BxrrAQ/r6ocqYxxQz7rc/4exmUfAv92lm\n/x9yxTtb+/AKNilRaK2MScHMJxRQogy5qYO7RZyv2ZBZ7968uMVDYi91ojza\nN1D67Nr7D8yFl8tTuglEUC7pgRDXuLRmyIj5Uo7xlDvxTp3cYLFsIz0rNeyb\n8DHTXxeDy83+p8yhBC2AKAC8YJM0+OadJ7QWF1dkJJK4wCQ2PKfrP8jt6Vt/\n4hp80MSwQoLV7ou9fi45iVlioG+PA4AW3NQDs4+xwuBIF2yh53msnLRenfT6\nzj0cB4/qAD2nLRi0zNwZN4MMtjoWMnbCCuYDrU1rt66d2NW1+v/IAlWqdNBa\njxAbM6Epo7518c0lNIO5gCLW/B0TUP0iQA30aPl8BG3LGfEFFShrxtW2Zffz\nl3CASJT/j0G1MEBvcPXFk1hUERS1u1pYyHGiwK1KHmpx6OhfQ2PZ9sZ6AiLg\nzWK7Jp/SmIrZN/+COkgshVE7XptoRC09N09+LmbeJmLfHC3C9tKTvF0jAk5i\nvzz//NRU6HuxnfAI3g2eEjptcBnff+LfAFBMz0FnCZg1u0Au5R5MWtnsupbQ\nF+O5\r\n=H6so\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDTFBJYoLEGmzcZCf55MWbJDZsR2hJJegRNP7GAgRzNogIhAOrv9R6lJGl4sSDXqDmlM5AtuG+c6aH1xqzGDMwzkP/F"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.10-alpha.10_1584689881005_0.029997506767949877"},"_hasShrinkwrap":false},"0.21.10-alpha.11":{"name":"@react-ssr/express","version":"0.21.10-alpha.11","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.10-alpha.11+cf4a375","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"cf4a375ea1301dff3080301b4705370dc85c95b5","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.10-alpha.11","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-C7VKer/ygOJ3lM2hCXqYgX6ZHih1aeSayKNH8roSMRlCuRYa208TYAAnJo7z0yWcdulKhJ4I7LTzkYI2Yd3hsw==","shasum":"b8e1479f81336ad711fc607955d9c06398a6f722","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.10-alpha.11.tgz","fileCount":8,"unpackedSize":15752,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJedHT9CRA9TVsSAnZWagAAchAP/3Vch1O5e4bMiD3hBAGf\nsu5ekLCQSlSZtp88hsiwm3R8iDOgFPyIiYW+D3pXBgsyj403w9qixy9NcsZ0\nP9zPciLb7dYM+4260jkOpH+6IMP1oOLqd5Q4HUlXa+qUJx7J3q5mdzDCSeqr\nZeNh50YVcJ5gZK+bJRf1OzwvT33SR0bS+4+qKuAOZGNsxc+Avf1QMGJaDuDR\nShO1OHOkQiQgvjhr4o/EBWKjyvuH5OZZ638JjajM6JbWMMDWgVaq0L1s26Xl\nlqKEPLTXrNf90LZxzA5TFjdWMszR+TEWMMi9T0h+6ZnUjEU9OvXksgk5Jw9j\nitg+n3OKad8fsnz5nGs7kH1f79vTSdn3J2s3KPOD3WWWg43l+AfdsRZwgZyi\n3EMW/GUowLlcLTA9LBoiJnN+U5r+B3EcMfwsl/cXvlMG5piYq0fAQ/r7Y0az\n64w7NoO8Sa39OrwdTQKXHVavIe3TmEX9awXo5V/26KkYTHRoRnvCrtcazQBc\nTEF1MLm92HM+mTedavVAra+/83Qh95UBmlxv/DiVtyiO6Wz/RhaN0TJlMb8U\nT8kpDU1HbDZ8eZRgLegkN9R9eQJ1uBAVEMpc1Z7a002VAn7FwkVVKV43V85d\npc5s/Cgnt1VC9REh+GFEBrmNq7ry18eH+jEDL/znAnHNQEXl1qQ/LJBU4YDJ\n2Q0u\r\n=A28/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEiys2GZp2PvE5kwIWn4FffTvjzUQ/P0AcULBIPE/JHsAiBBMHDKzks15IAxXkRdWL2D3bIdMnI4bJmlDQ/duw3ylA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.10-alpha.11_1584690428743_0.10648347065721087"},"_hasShrinkwrap":false},"0.21.10":{"name":"@react-ssr/express","version":"0.21.10","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.10","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"86b22e71a170083a3e8a04059f8dbb66afcafcd9","_id":"@react-ssr/express@0.21.10","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-W4zBZzrpSeLs2ZEHZfZrzKDzs+XkYVCT5jubjQo4wyiGycRttiQfOapszNxcWEmZy3HPkXXLOb2bXWm/sC5Kng==","shasum":"8a52650d13e55431e613bbe4b32ba71422ba8f1c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.10.tgz","fileCount":8,"unpackedSize":15718,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJedHW3CRA9TVsSAnZWagAAe6UP/RWMMYPhdPRV/Z5aDkU+\nzuRYgCnrgznwpmzLHnM+eL1MecX4Hev5Arx3e/Al5RlQLSpL+IUVeR4+30Hk\nqqx48NR6O6d4tbyJ1wYFu5QX2LPsAxBZZUvnkTrj7zDpnH1NykIlSpSxYhAQ\nFLgdief9GCJKMOK8g4Le1Lo1n40recasNRG//PTiEQONVFIq0H6TenAmjbCJ\nguHTfhaqz2p13tTFycKdNaoHj6rGMpnU8u5RwTmqkFJIw82AFppHHrCpOnA/\nwNswM6j2318lWe8HyH7HwxqHxfwt2JDGkvt71aqf3VRoeRBUi9wEN/IpUJZc\nfxnVkDrr70TaFBILBxMkj0BFrV1KJdlufF56SToVMWATIU/lRlju6M4DP33O\n4GjHhWzJGfawWDmJwWUgm6MDSPBA8ZwIf14VOKQBS68lI2jqJLeNgzVepcFh\nPoxl1j01ajQqc7B9U0u5dOSgnWH2uGHrITHNSMneTiGY2gHBs6TIkaa4Rarz\nvYQ5GGu5FFk6JHXqX6UHE5SjoLz+KFwd9lYkPtR6P0U2jpOJP4L9lRYpWE0D\nV3RTjRAlfJ3MiYIo/h5j3ZukBR5qVMqOwR4fHl0lD2E2I6TTCm/aaUTE1NXO\n77rPOzMFUCbue/BRAqcFMByKbR9HjANMB0UpyOlK4lN3XxgJ4Sn2QTT3WmNO\nAbAV\r\n=caZ7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDfdKGcNCMHUBheW3D0w+Wg495h0HJ9Q8ZV/WTfW4E6wAIgT9KwYBYv902X4zlsLmwR8zobom4IlyJCyMCrWl5RltI="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.10_1584690614658_0.25753561647318257"},"_hasShrinkwrap":false},"0.21.11-alpha.0":{"name":"@react-ssr/express","version":"0.21.11-alpha.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.11-alpha.0+8b23930","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"8b239306487ee0a93ab291b2d6f84471ea1cb258","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic\n  - `props`\n    - Passing the server data to the React client `props`\n    - Suitable for dynamic routes like blogging\n  - `Head` component for better SEO\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.11-alpha.0","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-Az2KVufqOBw9cuISxbhmmcaD4Fk99xEx78nG2/B4eoEOF9wv4Rj0fK5Tjq/qmY6L3i8M6nOK4ygGFBTSUImHdA==","shasum":"47d1c1a9cec05a3f00c43ab25a7ab964894628b1","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.11-alpha.0.tgz","fileCount":8,"unpackedSize":15750,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJedJicCRA9TVsSAnZWagAA33AP/3FtyyKvvVQJseglgcMu\nmMHmTi1Fcv6iVA/7ZUgd9MviZMMV0XnijCtsxjE7Qk+WfQGDqG1zASyyaH5A\nAOj7ynzUh7Mr3NgvEoljHZjGdHn9FdXw0DJhxFV2NZaVuH5xeOmX8dEbKKHX\n+y0tcDhXRdlr75Dd7hTA5uKXbhNnorpkSFhlH3ua5/2D90wXUr3Npg5KpL12\nNY7TpeEArb0ubZfSN8yTTzG4jDjlnU1QFNs1M0Zi1/S6eC9eugCWmyNo6mWm\nINy+wHvxyj7r4feN0rUPy1vDCfnvfJBp7GGFabtzUyQg7r2F0KwrOCxbgSeR\nc5R6lh9IxD7euIU9sSQkawiaXwT/oTkkaw2X5xTl2I44C2vBwumPuwID7WFz\nPC5L3UXJFACbFHX1YytpExcTIbAR9BFl7CrkSDNpBGXhipikT8IGpn2vpRWd\nMHiXRksmyw9lQ0t3WZO1Q9Wd58x1VuxQBuQTjHrkj8MQja67B3udjNPUO3Yx\nLgwo2A/CEO94g+gIgDrcvYWzm1DhSTu/sxWVWZI9EXCnAVMIza4Dpm7Iwh/h\n5/y0BEd6oJIeqHoOlM8wrvz+zUK6Fs2tMKEiMT1l32ab5aIz1MR1tLQ3ZblN\n70G6YMJxPc8uaHSUdx+biwmw/dDAvXI68Rh2MA3kEcw3kWOyhvHEmszYrV3k\nfV6V\r\n=H9cX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCIjQkaVGe/PvmiTqBYL/cQKJsBdMpJqmCr9i0GFLZmwgIhAK6n3gjEibxuDI1CquqI5sYAFsrjAhhwMAytTXWqS8ID"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.11-alpha.0_1584699548146_0.38998595462826224"},"_hasShrinkwrap":false},"0.21.11":{"name":"@react-ssr/express","version":"0.21.11","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.11","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"6f92c563eaf8124f8134e252613ec48ba3248410","_id":"@react-ssr/express@0.21.11","_nodeVersion":"12.14.1","_npmVersion":"lerna/3.20.2/node@v12.14.1+x64 (win32)","dist":{"integrity":"sha512-EGUePwNKK3+i9VmK+E90/EEA8R81wB3Ik9PssrjSqmowzLqMAD2as6c5h0I4pgC/kHaw8650/0lINqRwAymLAw==","shasum":"cfbfe733f36a0fae03834efe35b54c1cacfde08d","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.11.tgz","fileCount":8,"unpackedSize":16236,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJedbj3CRA9TVsSAnZWagAAgqYQAJg3na+5ub8QaqsRPdwL\nWlh6DoxiDiDsHRPwmAqw0lIyYOO7Ptdw6VOBriVc/9fPyxX5P/gBnKHCqlBt\njwdemnSlsI46KOrCRUcKXllCwb/U2ilu5yPcUuCL7QGntir4TmfxDUMIFJon\noG8Hp2oVTN/JMH3n2X8udZLWe6HDqPz/yhi0zF5o3cCThJq79YBGxdoD7m3R\nJ/69gr2s14DTus1E9Ckh4BApURRhPvfNcbm7T1pa+pKZmP5WKCMMWY0qTSOb\nUk8jVuC/knvmcarA8k0mIzi1ZpVi9d8Ezohh1jTekP2NkE2L6QtVwb6uEd7j\nryGwPAseaG39jz6TP6FrCDmeq2IDW68oG8ve9/vXroKZMEeFX27yE2mOALjk\nPWxLfdmFuKhLkAEC796L+xI4mWPWB9OvrdhkqHFSqXu/PsYkMwcd8zkl0gh8\nF7QBaJqUVlUtiEXRRT76YFErsqcUpSFgipAVbojdWlgHbH0deNXLqsKywYhV\nWcxphtnoIVqLmQTUkg4aknbL+GB+agrBG+1Igq7DvLxHJ7BbF3Ji3D/zqjQa\nd0YTgcRKYyEyDXL75fDoVDpiIgMylF2AqjYU7sIlv13++yjpaF2Pi8Mw8GIt\ntbEbuL7qtmJkp55WELtidgBEuiRQSqR3LIPMQeVa+/GHpJBLRzfyG6px4L6l\nqqnt\r\n=ZxL+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICyO31Gh8iNKIuVfDpiIdzC4bsxcDBj5OmTC5ylgP6u8AiEAsje+4GgeEKLhfKsRADVeC0TedutCXBuxa323eawMQEI="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.11_1584773367375_0.5141145975688326"},"_hasShrinkwrap":false},"0.21.12-alpha.0":{"name":"@react-ssr/express","version":"0.21.12-alpha.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.12-alpha.0+9c07a44","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"9c07a444758ca06b3735a3cf6dc820065f0b7795","readme":"## Overview\r\n\r\n- SSR (Server Side Rendering) as a view template engine\r\n- Dynamic\r\n  - `props`\r\n    - Passing the server data to the React client `props`\r\n    - Suitable for dynamic routes like blogging\r\n  - `Head` component for better SEO\r\n- Developer Experience\r\n  - Zero config of webpack and babel\r\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\r\n\r\n## Usage\r\n\r\nInstall it:\r\n\r\n```bash\r\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\r\n```\r\n\r\nAnd add a script to your package.json like this:\r\n\r\n```json\r\n{\r\n  \"scripts\": {\r\n    \"start\": \"node server.js\"\r\n  }\r\n}\r\n```\r\n\r\nThen, populate files below inside your project:\r\n\r\n**`server.js`**:\r\n\r\n```js\r\nconst express = require('express');\r\nconst register = require('@react-ssr/express/register');\r\n\r\nconst app = express();\r\n\r\n(async () => {\r\n  // register `.jsx` or `.tsx` as a view template engine\r\n  await register(app);\r\n\r\n  app.get('/', (req, res) => {\r\n    const message = 'Hello World!';\r\n    res.render('index', { message });\r\n  });\r\n\r\n  app.listen(3000, () => {\r\n    console.log('> Ready on http://localhost:3000');\r\n  });\r\n})();\r\n```\r\n\r\n**`views/index.jsx`**:\r\n\r\n```jsx\r\nexport default function Index({ message }) {\r\n  return <p>{message}</p>;\r\n}\r\n```\r\n\r\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\r\n\r\n## Configuration (`ssr.config.js`)\r\n\r\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\r\n\r\n```js\r\nmodule.exports = {\r\n  id: 'default',\r\n  distDir: '.ssr',\r\n  viewsDir: 'views',\r\n  staticViews: [],\r\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\r\n    return config;\r\n  },\r\n};\r\n```\r\n\r\n### `ssr.config.js#id`\r\n\r\nThe id of **UI framework**. (default: `default`)\r\n\r\nIt can be ignored only when the project does not use any UI frameworks.\r\n\r\nSupported UI frameworks are:\r\n\r\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\r\n  - [x] [bulma](https://bulma.io)\r\n  - [x] [semantic-ui](https://react.semantic-ui.com)\r\n  - [x] Or any other **non** CSS-in-JS UI frameworks\r\n- [x] [emotion](https://emotion.sh)\r\n- [x] [styled-components](https://www.styled-components.com)\r\n- [x] [material-ui](https://material-ui.com)\r\n- [x] [antd](https://ant.design)\r\n- [ ] and more...\r\n\r\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\r\n\r\n```js\r\nmodule.exports = {\r\n  id: 'emotion',\r\n};\r\n```\r\n\r\n### `ssr.config.js#distDir`\r\n\r\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\r\n\r\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\r\n\r\n```js\r\nmodule.exports = {\r\n  // dist folder should be ignored by `.gitignore`\r\n  distDir: 'dist/.ssr',\r\n};\r\n```\r\n\r\n### `ssr.config.js#viewsDir`\r\n\r\nThe place where we put views. (default: `views`)\r\n\r\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\r\n\r\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\r\n\r\n### `ssr.config.js#staticViews`\r\n\r\nIf specified, `react-ssr` generates html cache when production:\r\n\r\n```js\r\nmodule.exports = {\r\n  staticViews: [\r\n    'auth/login',\r\n    'auth/register',\r\n    'about',\r\n  ],\r\n};\r\n```\r\n\r\n### `ssr.config.js#webpack()`\r\n\r\n```js\r\nmodule.exports = {\r\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\r\n    // we can override default webpack config here\r\n    return config;\r\n  },\r\n};\r\n```\r\n\r\n## Custom Babel Config\r\n\r\nWe can extends its default `.babelrc` like this:\r\n\r\n**`.babelrc`**:\r\n\r\n```json\r\n{\r\n  \"presets\": [\r\n    \"@react-ssr/express/babel\"\r\n  ]\r\n}\r\n```\r\n\r\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\r\n\r\n## Custom Document\r\n\r\nJust put `_document.jsx` or `_document.tsx` into the views root:\r\n\r\n**`views/_document.jsx`**:\r\n\r\n```jsx\r\nimport React from 'react';\r\nimport {\r\n  Document,\r\n  Head,\r\n  Main,\r\n} from '@react-ssr/express';\r\n\r\nexport default class extends Document {\r\n  render() {\r\n    return (\r\n      <html lang=\"en\">\r\n        <Head>\r\n          <title>Default Title</title>\r\n          <meta charSet=\"utf-8\" />\r\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\r\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\r\n        </Head>\r\n        <body>\r\n          <Main />\r\n        </body>\r\n      </html>\r\n    );\r\n  }\r\n};\r\n```\r\n\r\n**Note**:\r\n\r\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\r\n\r\nAnd then, use it as always:\r\n\r\n**`views/index.jsx`**:\r\n\r\n```jsx\r\nconst Index = (props) => {\r\n  return <p>Hello World!</p>;\r\n};\r\n\r\nexport default Index;\r\n```\r\n\r\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\r\n\r\n## Dynamic `Head`\r\n\r\nWe can use the `Head` component in any pages:\r\n\r\n**`views/index.jsx`**:\r\n\r\n```jsx\r\nimport React from 'react';\r\nimport { Head } from '@react-ssr/express';\r\n\r\nconst Index = (props) => {\r\n  return (\r\n    <React.Fragment>\r\n      <Head>\r\n        <title>Dynamic Title</title>\r\n        <meta name=\"description\" content=\"Dynamic Description\" />\r\n      </Head>\r\n      <p>Of course, SSR Ready!</p>\r\n    </React.Fragment>\r\n  );\r\n};\r\n\r\nexport default Index;\r\n```\r\n\r\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\r\n\r\n## Supported UI Framework\r\n\r\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\r\n  - [x] [bulma](https://bulma.io)\r\n  - [x] [semantic-ui](https://react.semantic-ui.com)\r\n  - [x] Or any other **non** CSS-in-JS UI frameworks\r\n- [x] [emotion](https://emotion.sh)\r\n- [x] [styled-components](https://www.styled-components.com)\r\n- [x] [material-ui](https://material-ui.com)\r\n- [x] [antd](https://ant.design)\r\n- [ ] and more...\r\n\r\n### Non CSS-in-JS framework\r\n\r\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\r\n\r\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\r\n\r\nAll we have to do is to load global CSS in `_document` or each page:\r\n\r\n**`views/_document.jsx`**:\r\n\r\n```jsx\r\nimport React from 'react';\r\nimport {\r\n  Document,\r\n  Head,\r\n  Main,\r\n} from '@react-ssr/express';\r\n\r\nexport default class extends Document {\r\n  render() {\r\n    return (\r\n      <html lang=\"en\">\r\n        <Head>\r\n          <title>A Sample of Semantic UI React</title>\r\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\r\n        </Head>\r\n        <body>\r\n          <Main />\r\n        </body>\r\n      </html>\r\n    );\r\n  }\r\n}\r\n```\r\n\r\n### With Ant Design\r\n\r\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\r\n\r\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\r\n\r\nAnd then, populate `.babelrc` in your project root:\r\n\r\n```json\r\n{\r\n  \"presets\": [\r\n    \"@react-ssr/express/babel\"\r\n  ],\r\n  \"plugins\": [\r\n    [\r\n      \"import\",\r\n      {\r\n        \"libraryName\": \"antd\",\r\n        \"style\": \"css\"\r\n      }\r\n    ]\r\n  ]\r\n}\r\n```\r\n\r\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\r\n\r\n### With Emotion\r\n\r\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\r\n\r\nIn order to enable SSR, we must install these packages:\r\n\r\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\r\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\r\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\r\n\r\nAnd then, populate `.babelrc` in your project root:\r\n\r\n```json\r\n{\r\n  \"presets\": [\r\n    \"@react-ssr/express/babel\"\r\n  ],\r\n  \"plugins\": [\r\n    \"emotion\"\r\n  ]\r\n}\r\n```\r\n\r\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\r\n\r\n### With Material UI\r\n\r\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\r\n\r\nWe can use [material-ui](https://material-ui.com) without extra configuration.\r\n\r\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\r\n\r\n### With styled-components\r\n\r\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\r\n\r\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\r\n\r\nAnd then, populate `.babelrc` in your project root:\r\n\r\n```json\r\n{\r\n  \"presets\": [\r\n    \"@react-ssr/express/babel\"\r\n  ],\r\n  \"plugins\": [\r\n    \"styled-components\"\r\n  ]\r\n}\r\n```\r\n\r\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\r\n\r\n## TypeScript Support\r\n\r\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\r\n\r\nThe code of TypeScript will be like this:\r\n\r\n**`package.json`**:\r\n\r\n```json\r\n{\r\n  \"scripts\": {\r\n    \"start\": \"ts-node server.ts\"\r\n  }\r\n}\r\n```\r\n\r\n**`server.ts`**:\r\n\r\n```ts\r\nimport express, { Request, Response } from '@react-ssr/express';\r\n\r\nconst app = express();\r\n\r\napp.get('/', (req: Request, res: Response) => {\r\n  const message = 'Hello World!';\r\n  res.render('index', { message });\r\n});\r\n\r\napp.listen(3000, () => {\r\n  console.log('> Ready on http://localhost:3000');\r\n});\r\n```\r\n\r\n**`views/index.tsx`**:\r\n\r\n```tsx\r\ninterface IndexProps {\r\n  message: string;\r\n}\r\n\r\nexport default function Index({ message }: IndexProps) {\r\n  return <p>{message}</p>;\r\n}\r\n```\r\n\r\n## Examples\r\n\r\n- **@react-ssr/express**\r\n  - `.jsx`\r\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\r\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\r\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\r\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\r\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\r\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\r\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\r\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\r\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\r\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\r\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\r\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\r\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\r\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\r\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\r\n  - `.tsx`\r\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\r\n- **@react-ssr/nestjs-express**\r\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\r\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\r\n- **@react-ssr/static**\r\n  - `.jsx`\r\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\r\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\r\n  - `.tsx`\r\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\r\n\r\n## Starters\r\n\r\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\r\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\r\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\r\n\r\n## Articles\r\n\r\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\r\n\r\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\r\n\r\n## Related\r\n\r\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\r\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.12-alpha.0","_nodeVersion":"12.14.1","_npmVersion":"lerna/3.20.2/node@v12.14.1+x64 (win32)","dist":{"integrity":"sha512-6/AKX5cGaenRg2ek8C44HatZKqr/7MUFtT+3aUJuhhhOf7ywUMw/T/nrIov8fa/o9q0WrLMeJdrts/24QIquYg==","shasum":"0102319377a3097f979536c96b3e90f63f0b6a73","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.12-alpha.0.tgz","fileCount":8,"unpackedSize":16268,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJedbp+CRA9TVsSAnZWagAA+5AP/1/bEafM5dJudyXVrOGz\nywTPVTsrZVgt56lQpzO+bVORtlUJoEBDi7I8vRys1Mf5Dq9DVBRk4wXCOOTz\nOf9wtKIXtmq1sDx/UVDQ26EdnCDuJ8xoxAAXdkIcW8oX63IpISuzbiDj7pMD\nbQdCSEN3TvE8IVnsEy2WRteG49Vc5sI09YU7khdByuLxDlEzvAaEjLYNjSQb\nFL97Jd76qqOMJV9TpRnlWs0jCQZOmpKL28snTXL0TKSvzGOi7wgoFAzVJI15\n4ZzdpZj1aIm6Ikmmy4rkSN7yOupAGlKxSIiVAFeobyFAZiOlK96miuJU0lKv\nR9z0ir3X2BsAb+/WQrQSCfraqyC4lWAw5nc0j4amuos5aMlJq+xuoxI6h5Fp\nrcCkH4GSQwxFO9PDL9Tt6xjPNrVZ8tcZV9FwX9U/0IQvVzZuI3vOxtq3n7L+\nU5vvOjKeTF25InHCGX4ISc7tKg1Gp8N3TWW1nZ0n07TI6hbrb+5R94bq2ROd\neACJ3lIWMVGp9MPg2R6g3cC/Ylz6jrGpCVatKUS6a2d4PPPb2hdzIKLivr8a\ndVu8wGTYlGfKRwNFT9IcWXjtFnHn9W7g3nFDsS7w++ywfM0tk3FAPzb5xXYm\nV+VqnvE+xUUSPegFMNh8KeP8f9zTIexLJr1uVfJfo+9Oo+RxWwdeO0I29jqz\n7rQI\r\n=fHal\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDR+iaGwUAixKt0kot72DDQlLbJxXiERbBUnfJm6Gba4gIhALocySc5tH/5d9CVFMwNYnxAMKb+edUKtUcJqzODlAmG"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.12-alpha.0_1584773757889_0.24786413061461943"},"_hasShrinkwrap":false},"0.21.12-alpha.1":{"name":"@react-ssr/express","version":"0.21.12-alpha.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.12-alpha.1+21f14f8","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"21f14f84761179cf8ab185cef98037999ac6a654","readme":"## Overview\r\n\r\n- SSR (Server Side Rendering) as a view template engine\r\n- Dynamic\r\n  - `props`\r\n    - Passing the server data to the React client `props`\r\n    - Suitable for dynamic routes like blogging\r\n  - `Head` component for better SEO\r\n- Developer Experience\r\n  - Zero config of webpack and babel\r\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\r\n\r\n## Usage\r\n\r\nInstall it:\r\n\r\n```bash\r\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\r\n```\r\n\r\nAnd add a script to your package.json like this:\r\n\r\n```json\r\n{\r\n  \"scripts\": {\r\n    \"start\": \"node server.js\"\r\n  }\r\n}\r\n```\r\n\r\nThen, populate files below inside your project:\r\n\r\n**`server.js`**:\r\n\r\n```js\r\nconst express = require('express');\r\nconst register = require('@react-ssr/express/register');\r\n\r\nconst app = express();\r\n\r\n(async () => {\r\n  // register `.jsx` or `.tsx` as a view template engine\r\n  await register(app);\r\n\r\n  app.get('/', (req, res) => {\r\n    const message = 'Hello World!';\r\n    res.render('index', { message });\r\n  });\r\n\r\n  app.listen(3000, () => {\r\n    console.log('> Ready on http://localhost:3000');\r\n  });\r\n})();\r\n```\r\n\r\n**`views/index.jsx`**:\r\n\r\n```jsx\r\nexport default function Index({ message }) {\r\n  return <p>{message}</p>;\r\n}\r\n```\r\n\r\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\r\n\r\n## Configuration (`ssr.config.js`)\r\n\r\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\r\n\r\n```js\r\nmodule.exports = {\r\n  id: 'default',\r\n  distDir: '.ssr',\r\n  viewsDir: 'views',\r\n  staticViews: [],\r\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\r\n    return config;\r\n  },\r\n};\r\n```\r\n\r\n### `ssr.config.js#id`\r\n\r\nThe id of **UI framework**. (default: `default`)\r\n\r\nIt can be ignored only when the project does not use any UI frameworks.\r\n\r\nSupported UI frameworks are:\r\n\r\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\r\n  - [x] [bulma](https://bulma.io)\r\n  - [x] [semantic-ui](https://react.semantic-ui.com)\r\n  - [x] Or any other **non** CSS-in-JS UI frameworks\r\n- [x] [emotion](https://emotion.sh)\r\n- [x] [styled-components](https://www.styled-components.com)\r\n- [x] [material-ui](https://material-ui.com)\r\n- [x] [antd](https://ant.design)\r\n- [ ] and more...\r\n\r\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\r\n\r\n```js\r\nmodule.exports = {\r\n  id: 'emotion',\r\n};\r\n```\r\n\r\n### `ssr.config.js#distDir`\r\n\r\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\r\n\r\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\r\n\r\n```js\r\nmodule.exports = {\r\n  // dist folder should be ignored by `.gitignore`\r\n  distDir: 'dist/.ssr',\r\n};\r\n```\r\n\r\n### `ssr.config.js#viewsDir`\r\n\r\nThe place where we put views. (default: `views`)\r\n\r\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\r\n\r\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\r\n\r\n### `ssr.config.js#staticViews`\r\n\r\nIf specified, `react-ssr` generates html cache when production:\r\n\r\n```js\r\nmodule.exports = {\r\n  staticViews: [\r\n    'auth/login',\r\n    'auth/register',\r\n    'about',\r\n  ],\r\n};\r\n```\r\n\r\n### `ssr.config.js#webpack()`\r\n\r\n```js\r\nmodule.exports = {\r\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\r\n    // we can override default webpack config here\r\n    return config;\r\n  },\r\n};\r\n```\r\n\r\n## Custom Babel Config\r\n\r\nWe can extends its default `.babelrc` like this:\r\n\r\n**`.babelrc`**:\r\n\r\n```json\r\n{\r\n  \"presets\": [\r\n    \"@react-ssr/express/babel\"\r\n  ]\r\n}\r\n```\r\n\r\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\r\n\r\n## Custom Document\r\n\r\nJust put `_document.jsx` or `_document.tsx` into the views root:\r\n\r\n**`views/_document.jsx`**:\r\n\r\n```jsx\r\nimport React from 'react';\r\nimport {\r\n  Document,\r\n  Head,\r\n  Main,\r\n} from '@react-ssr/express';\r\n\r\nexport default class extends Document {\r\n  render() {\r\n    return (\r\n      <html lang=\"en\">\r\n        <Head>\r\n          <title>Default Title</title>\r\n          <meta charSet=\"utf-8\" />\r\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\r\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\r\n        </Head>\r\n        <body>\r\n          <Main />\r\n        </body>\r\n      </html>\r\n    );\r\n  }\r\n};\r\n```\r\n\r\n**Note**:\r\n\r\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\r\n\r\nAnd then, use it as always:\r\n\r\n**`views/index.jsx`**:\r\n\r\n```jsx\r\nconst Index = (props) => {\r\n  return <p>Hello World!</p>;\r\n};\r\n\r\nexport default Index;\r\n```\r\n\r\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\r\n\r\n## Dynamic `Head`\r\n\r\nWe can use the `Head` component in any pages:\r\n\r\n**`views/index.jsx`**:\r\n\r\n```jsx\r\nimport React from 'react';\r\nimport { Head } from '@react-ssr/express';\r\n\r\nconst Index = (props) => {\r\n  return (\r\n    <React.Fragment>\r\n      <Head>\r\n        <title>Dynamic Title</title>\r\n        <meta name=\"description\" content=\"Dynamic Description\" />\r\n      </Head>\r\n      <p>Of course, SSR Ready!</p>\r\n    </React.Fragment>\r\n  );\r\n};\r\n\r\nexport default Index;\r\n```\r\n\r\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\r\n\r\n## Supported UI Framework\r\n\r\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\r\n  - [x] [bulma](https://bulma.io)\r\n  - [x] [semantic-ui](https://react.semantic-ui.com)\r\n  - [x] Or any other **non** CSS-in-JS UI frameworks\r\n- [x] [emotion](https://emotion.sh)\r\n- [x] [styled-components](https://www.styled-components.com)\r\n- [x] [material-ui](https://material-ui.com)\r\n- [x] [antd](https://ant.design)\r\n- [ ] and more...\r\n\r\n### Non CSS-in-JS framework\r\n\r\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\r\n\r\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\r\n\r\nAll we have to do is to load global CSS in `_document` or each page:\r\n\r\n**`views/_document.jsx`**:\r\n\r\n```jsx\r\nimport React from 'react';\r\nimport {\r\n  Document,\r\n  Head,\r\n  Main,\r\n} from '@react-ssr/express';\r\n\r\nexport default class extends Document {\r\n  render() {\r\n    return (\r\n      <html lang=\"en\">\r\n        <Head>\r\n          <title>A Sample of Semantic UI React</title>\r\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\r\n        </Head>\r\n        <body>\r\n          <Main />\r\n        </body>\r\n      </html>\r\n    );\r\n  }\r\n}\r\n```\r\n\r\n### With Ant Design\r\n\r\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\r\n\r\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\r\n\r\nAnd then, populate `.babelrc` in your project root:\r\n\r\n```json\r\n{\r\n  \"presets\": [\r\n    \"@react-ssr/express/babel\"\r\n  ],\r\n  \"plugins\": [\r\n    [\r\n      \"import\",\r\n      {\r\n        \"libraryName\": \"antd\",\r\n        \"style\": \"css\"\r\n      }\r\n    ]\r\n  ]\r\n}\r\n```\r\n\r\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\r\n\r\n### With Emotion\r\n\r\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\r\n\r\nIn order to enable SSR, we must install these packages:\r\n\r\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\r\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\r\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\r\n\r\nAnd then, populate `.babelrc` in your project root:\r\n\r\n```json\r\n{\r\n  \"presets\": [\r\n    \"@react-ssr/express/babel\"\r\n  ],\r\n  \"plugins\": [\r\n    \"emotion\"\r\n  ]\r\n}\r\n```\r\n\r\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\r\n\r\n### With Material UI\r\n\r\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\r\n\r\nWe can use [material-ui](https://material-ui.com) without extra configuration.\r\n\r\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\r\n\r\n### With styled-components\r\n\r\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\r\n\r\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\r\n\r\nAnd then, populate `.babelrc` in your project root:\r\n\r\n```json\r\n{\r\n  \"presets\": [\r\n    \"@react-ssr/express/babel\"\r\n  ],\r\n  \"plugins\": [\r\n    \"styled-components\"\r\n  ]\r\n}\r\n```\r\n\r\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\r\n\r\n## TypeScript Support\r\n\r\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\r\n\r\nThe code of TypeScript will be like this:\r\n\r\n**`package.json`**:\r\n\r\n```json\r\n{\r\n  \"scripts\": {\r\n    \"start\": \"ts-node server.ts\"\r\n  }\r\n}\r\n```\r\n\r\n**`server.ts`**:\r\n\r\n```ts\r\nimport express, { Request, Response } from '@react-ssr/express';\r\n\r\nconst app = express();\r\n\r\napp.get('/', (req: Request, res: Response) => {\r\n  const message = 'Hello World!';\r\n  res.render('index', { message });\r\n});\r\n\r\napp.listen(3000, () => {\r\n  console.log('> Ready on http://localhost:3000');\r\n});\r\n```\r\n\r\n**`views/index.tsx`**:\r\n\r\n```tsx\r\ninterface IndexProps {\r\n  message: string;\r\n}\r\n\r\nexport default function Index({ message }: IndexProps) {\r\n  return <p>{message}</p>;\r\n}\r\n```\r\n\r\n## Examples\r\n\r\n- **@react-ssr/express**\r\n  - `.jsx`\r\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\r\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\r\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\r\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\r\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\r\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\r\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\r\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\r\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\r\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\r\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\r\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\r\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\r\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\r\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\r\n  - `.tsx`\r\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\r\n- **@react-ssr/nestjs-express**\r\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\r\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\r\n- **@react-ssr/static**\r\n  - `.jsx`\r\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\r\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\r\n  - `.tsx`\r\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\r\n\r\n## Starters\r\n\r\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\r\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\r\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\r\n\r\n## Articles\r\n\r\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\r\n\r\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\r\n\r\n## Related\r\n\r\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\r\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.12-alpha.1","_nodeVersion":"12.14.1","_npmVersion":"lerna/3.20.2/node@v12.14.1+x64 (win32)","dist":{"integrity":"sha512-hXiZHWAAeqhr4jGlqYp1oP005NXrkqVG7r4SlBa5jtdIRqgc+DYJjvNuvh98E+nmT++NAu0t8N/irq/SGGALwg==","shasum":"4a4ce6c2453db456aff26ad9dacd5c398ecded82","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.12-alpha.1.tgz","fileCount":8,"unpackedSize":16268,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJedbvVCRA9TVsSAnZWagAAbaEQAIqpdaLdIf22+Bshv3r/\nr3OmLvXCeX/YEBQVCGAt+Z7lSG8JpqmNID1cVPWtpedUbciCfR+sQYswuJ8C\n1hWGkJQ32BZB/WC0CchOEV3G1QoAhTATxPckyR/BzBvuDV+W9+w37dQkaYvR\nUtxldBdJjktThYyvmA2oOvBvHvvt9JJ5lXSOWii5oVMH2otO1qVTuiFrkrfb\nyRY32fLty944tXg/UAJA4a52/UDbBWyODD7tJEw4nO55sBnGbLIjcd6EPuch\n8zDT0dDvacJSQXaabDXOgeO6AITvIVs1z4AXDf6/5BMis1WyBxCTEtKxzwNw\n2AdpGLtQ1L6NpS6ahfKhU9vTuJOajYRJ/O7B7rBQkeOKpmuYRL8o89M+3wTK\nAQAPEjTaXxOSHNkhhhQnPc2b7T2amnGhuggIZT2dlSlH77OFfyKLtfDtMwjH\ngXICXWhpwsJBprXKUtirx1AYL9vhWVds1m2Vv/+onCqZEF0FiobiEm/85dyK\n021WOA9t08mw5IzjoTD/aEZMVC0mvRfB0f0QhdROdBVmVrNScUroZ0Ny37EV\n35dkilblzjAgR5Ivh9iYonzJHuElm02Lr1Qk+/SnEUFAJvZBW7A4SHahEj6Y\n6Ty2/78q8gEXdtoXX/OiMrM/M7yqAkLFzUQ435LaOwbV+0CbjWUhP/V2EA5e\nYFC/\r\n=Mm9u\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHO3uj8gTc49/rrrjsplQe3QSOEHEDJQt7FpyRFwlXeQAiAra/00Fyj3xxkujNu53Dx7sbsvlZD0siX0ua+F1X6+DA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.12-alpha.1_1584774100794_0.30607144304560996"},"_hasShrinkwrap":false},"0.21.12-alpha.2":{"name":"@react-ssr/express","version":"0.21.12-alpha.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.12-alpha.2+7aec641","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"7aec641f77d0c0c311091276dcf6d76a40ab68a0","readme":"## Overview\r\n\r\n- SSR (Server Side Rendering) as a view template engine\r\n- Dynamic\r\n  - `props`\r\n    - Passing the server data to the React client `props`\r\n    - Suitable for dynamic routes like blogging\r\n  - `Head` component for better SEO\r\n- Developer Experience\r\n  - Zero config of webpack and babel\r\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\r\n\r\n## Usage\r\n\r\nInstall it:\r\n\r\n```bash\r\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\r\n```\r\n\r\nAnd add a script to your package.json like this:\r\n\r\n```json\r\n{\r\n  \"scripts\": {\r\n    \"start\": \"node server.js\"\r\n  }\r\n}\r\n```\r\n\r\nThen, populate files below inside your project:\r\n\r\n**`server.js`**:\r\n\r\n```js\r\nconst express = require('express');\r\nconst register = require('@react-ssr/express/register');\r\n\r\nconst app = express();\r\n\r\n(async () => {\r\n  // register `.jsx` or `.tsx` as a view template engine\r\n  await register(app);\r\n\r\n  app.get('/', (req, res) => {\r\n    const message = 'Hello World!';\r\n    res.render('index', { message });\r\n  });\r\n\r\n  app.listen(3000, () => {\r\n    console.log('> Ready on http://localhost:3000');\r\n  });\r\n})();\r\n```\r\n\r\n**`views/index.jsx`**:\r\n\r\n```jsx\r\nexport default function Index({ message }) {\r\n  return <p>{message}</p>;\r\n}\r\n```\r\n\r\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\r\n\r\n## Configuration (`ssr.config.js`)\r\n\r\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\r\n\r\n```js\r\nmodule.exports = {\r\n  id: 'default',\r\n  distDir: '.ssr',\r\n  viewsDir: 'views',\r\n  staticViews: [],\r\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\r\n    return config;\r\n  },\r\n};\r\n```\r\n\r\n### `ssr.config.js#id`\r\n\r\nThe id of **UI framework**. (default: `default`)\r\n\r\nIt can be ignored only when the project does not use any UI frameworks.\r\n\r\nSupported UI frameworks are:\r\n\r\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\r\n  - [x] [bulma](https://bulma.io)\r\n  - [x] [semantic-ui](https://react.semantic-ui.com)\r\n  - [x] Or any other **non** CSS-in-JS UI frameworks\r\n- [x] [emotion](https://emotion.sh)\r\n- [x] [styled-components](https://www.styled-components.com)\r\n- [x] [material-ui](https://material-ui.com)\r\n- [x] [antd](https://ant.design)\r\n- [ ] and more...\r\n\r\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\r\n\r\n```js\r\nmodule.exports = {\r\n  id: 'emotion',\r\n};\r\n```\r\n\r\n### `ssr.config.js#distDir`\r\n\r\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\r\n\r\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\r\n\r\n```js\r\nmodule.exports = {\r\n  // dist folder should be ignored by `.gitignore`\r\n  distDir: 'dist/.ssr',\r\n};\r\n```\r\n\r\n### `ssr.config.js#viewsDir`\r\n\r\nThe place where we put views. (default: `views`)\r\n\r\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\r\n\r\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\r\n\r\n### `ssr.config.js#staticViews`\r\n\r\nIf specified, `react-ssr` generates html cache when production:\r\n\r\n```js\r\nmodule.exports = {\r\n  staticViews: [\r\n    'auth/login',\r\n    'auth/register',\r\n    'about',\r\n  ],\r\n};\r\n```\r\n\r\n### `ssr.config.js#webpack()`\r\n\r\n```js\r\nmodule.exports = {\r\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\r\n    // we can override default webpack config here\r\n    return config;\r\n  },\r\n};\r\n```\r\n\r\n## Custom Babel Config\r\n\r\nWe can extends its default `.babelrc` like this:\r\n\r\n**`.babelrc`**:\r\n\r\n```json\r\n{\r\n  \"presets\": [\r\n    \"@react-ssr/express/babel\"\r\n  ]\r\n}\r\n```\r\n\r\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\r\n\r\n## Custom Document\r\n\r\nJust put `_document.jsx` or `_document.tsx` into the views root:\r\n\r\n**`views/_document.jsx`**:\r\n\r\n```jsx\r\nimport React from 'react';\r\nimport {\r\n  Document,\r\n  Head,\r\n  Main,\r\n} from '@react-ssr/express';\r\n\r\nexport default class extends Document {\r\n  render() {\r\n    return (\r\n      <html lang=\"en\">\r\n        <Head>\r\n          <title>Default Title</title>\r\n          <meta charSet=\"utf-8\" />\r\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\r\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\r\n        </Head>\r\n        <body>\r\n          <Main />\r\n        </body>\r\n      </html>\r\n    );\r\n  }\r\n};\r\n```\r\n\r\n**Note**:\r\n\r\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\r\n\r\nAnd then, use it as always:\r\n\r\n**`views/index.jsx`**:\r\n\r\n```jsx\r\nconst Index = (props) => {\r\n  return <p>Hello World!</p>;\r\n};\r\n\r\nexport default Index;\r\n```\r\n\r\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\r\n\r\n## Dynamic `Head`\r\n\r\nWe can use the `Head` component in any pages:\r\n\r\n**`views/index.jsx`**:\r\n\r\n```jsx\r\nimport React from 'react';\r\nimport { Head } from '@react-ssr/express';\r\n\r\nconst Index = (props) => {\r\n  return (\r\n    <React.Fragment>\r\n      <Head>\r\n        <title>Dynamic Title</title>\r\n        <meta name=\"description\" content=\"Dynamic Description\" />\r\n      </Head>\r\n      <p>Of course, SSR Ready!</p>\r\n    </React.Fragment>\r\n  );\r\n};\r\n\r\nexport default Index;\r\n```\r\n\r\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\r\n\r\n## Supported UI Framework\r\n\r\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\r\n  - [x] [bulma](https://bulma.io)\r\n  - [x] [semantic-ui](https://react.semantic-ui.com)\r\n  - [x] Or any other **non** CSS-in-JS UI frameworks\r\n- [x] [emotion](https://emotion.sh)\r\n- [x] [styled-components](https://www.styled-components.com)\r\n- [x] [material-ui](https://material-ui.com)\r\n- [x] [antd](https://ant.design)\r\n- [ ] and more...\r\n\r\n### Non CSS-in-JS framework\r\n\r\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\r\n\r\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\r\n\r\nAll we have to do is to load global CSS in `_document` or each page:\r\n\r\n**`views/_document.jsx`**:\r\n\r\n```jsx\r\nimport React from 'react';\r\nimport {\r\n  Document,\r\n  Head,\r\n  Main,\r\n} from '@react-ssr/express';\r\n\r\nexport default class extends Document {\r\n  render() {\r\n    return (\r\n      <html lang=\"en\">\r\n        <Head>\r\n          <title>A Sample of Semantic UI React</title>\r\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\r\n        </Head>\r\n        <body>\r\n          <Main />\r\n        </body>\r\n      </html>\r\n    );\r\n  }\r\n}\r\n```\r\n\r\n### With Ant Design\r\n\r\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\r\n\r\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\r\n\r\nAnd then, populate `.babelrc` in your project root:\r\n\r\n```json\r\n{\r\n  \"presets\": [\r\n    \"@react-ssr/express/babel\"\r\n  ],\r\n  \"plugins\": [\r\n    [\r\n      \"import\",\r\n      {\r\n        \"libraryName\": \"antd\",\r\n        \"style\": \"css\"\r\n      }\r\n    ]\r\n  ]\r\n}\r\n```\r\n\r\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\r\n\r\n### With Emotion\r\n\r\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\r\n\r\nIn order to enable SSR, we must install these packages:\r\n\r\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\r\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\r\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\r\n\r\nAnd then, populate `.babelrc` in your project root:\r\n\r\n```json\r\n{\r\n  \"presets\": [\r\n    \"@react-ssr/express/babel\"\r\n  ],\r\n  \"plugins\": [\r\n    \"emotion\"\r\n  ]\r\n}\r\n```\r\n\r\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\r\n\r\n### With Material UI\r\n\r\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\r\n\r\nWe can use [material-ui](https://material-ui.com) without extra configuration.\r\n\r\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\r\n\r\n### With styled-components\r\n\r\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\r\n\r\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\r\n\r\nAnd then, populate `.babelrc` in your project root:\r\n\r\n```json\r\n{\r\n  \"presets\": [\r\n    \"@react-ssr/express/babel\"\r\n  ],\r\n  \"plugins\": [\r\n    \"styled-components\"\r\n  ]\r\n}\r\n```\r\n\r\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\r\n\r\n## TypeScript Support\r\n\r\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\r\n\r\nThe code of TypeScript will be like this:\r\n\r\n**`package.json`**:\r\n\r\n```json\r\n{\r\n  \"scripts\": {\r\n    \"start\": \"ts-node server.ts\"\r\n  }\r\n}\r\n```\r\n\r\n**`server.ts`**:\r\n\r\n```ts\r\nimport express, { Request, Response } from '@react-ssr/express';\r\n\r\nconst app = express();\r\n\r\napp.get('/', (req: Request, res: Response) => {\r\n  const message = 'Hello World!';\r\n  res.render('index', { message });\r\n});\r\n\r\napp.listen(3000, () => {\r\n  console.log('> Ready on http://localhost:3000');\r\n});\r\n```\r\n\r\n**`views/index.tsx`**:\r\n\r\n```tsx\r\ninterface IndexProps {\r\n  message: string;\r\n}\r\n\r\nexport default function Index({ message }: IndexProps) {\r\n  return <p>{message}</p>;\r\n}\r\n```\r\n\r\n## Examples\r\n\r\n- **@react-ssr/express**\r\n  - `.jsx`\r\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\r\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\r\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\r\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\r\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\r\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\r\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\r\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\r\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\r\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\r\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\r\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\r\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\r\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\r\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\r\n  - `.tsx`\r\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\r\n- **@react-ssr/nestjs-express**\r\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\r\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\r\n- **@react-ssr/static**\r\n  - `.jsx`\r\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\r\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\r\n  - `.tsx`\r\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\r\n\r\n## Starters\r\n\r\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\r\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\r\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\r\n\r\n## Articles\r\n\r\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\r\n\r\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\r\n\r\n## Related\r\n\r\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\r\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.12-alpha.2","_nodeVersion":"12.14.1","_npmVersion":"lerna/3.20.2/node@v12.14.1+x64 (win32)","dist":{"integrity":"sha512-3LqpXk/NeTlVpQR2ynT3HoRLL/nFMBpEDlJfB9ymhu006hVWNM8DnT3sQiaF9Vc9BGzunanFO/Lt4bCz4RYizg==","shasum":"fd2f4c5d4bf19c8e4162652b71fe65d1b3cefcca","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.12-alpha.2.tgz","fileCount":8,"unpackedSize":16268,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJedbxjCRA9TVsSAnZWagAALv8P/jcklR9Vv6psusJbphS6\ntc7atahGS4yr0vLZbIUl/QLZa+zv00pga9mfIcMsajGg9X2n/KGxehxvE2QW\n31CSNfBa0JId7FA5e3gmBsq81LESgERRoqjOBQbb5e3+PGmvbx4OMb8axzPt\nIr4WT9pccmKdvUPKj70zkB7kFbfVw2Ou8XSVUvUp0SL96fEC1egNnyJ+LioZ\nKCzU/1jxqKH/epVO3MR94zoGSlm0KacjIxbDp+fzB6KC2FGVyaNX3jR4cuuj\np2ZApLqaaR7fnyGo+5mpPqeX2K1SfVXg37JW7jdfrfPDxy0D3LAbQu6E132B\nlf3CTrR51z+fJVgNaWG9zt7LMhCaRxsaJ/N1kjCQ4Thg2S6PhM25Wdd92Xm5\nzDqTPzW2JPzlrS0ITDvm92qakjnzsRsq/e8KFBEPwpk5yH+kxNqizwKpaz/V\ny6+iPsJ05w4DU1IZoxlOIBTIczgvhDrYuW5fQPmVZUpGXtoldlkQHsuYm9/Q\natRlx8xJEkWt4INBBEs1pwY+kVL3JqVTz9fBwI1NTRAhdhIJ/cfO915S0HHL\n1XAPifwNR6G7rGC7F4TDqq9AfrrDdy9gDmNXWXxtMgjJh6/Pse22ijCxchji\n+Z43o14iYk+5uxvx4ogkYZHJAZ6WBM9N1P7DcyRVYmvU69F1o0NE95VBMJ3U\n+chu\r\n=tXqe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDbCiaLfTPVZX2cPaAs29ViqUE9p8milL/9zWl+H+cWnQIhAMOQc3ElUMFgd8KK1QZcqMWqGJfTil9fK3EGbIM0LP4W"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.12-alpha.2_1584774243073_0.5331699097528231"},"_hasShrinkwrap":false},"0.21.12-alpha.3":{"name":"@react-ssr/express","version":"0.21.12-alpha.3","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.12-alpha.3+9cdffab","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"9cdffab9311b6bb05e45c585a8014812c6b5d80a","readme":"## Overview\r\n\r\n- SSR (Server Side Rendering) as a view template engine\r\n- Dynamic\r\n  - `props`\r\n    - Passing the server data to the React client `props`\r\n    - Suitable for dynamic routes like blogging\r\n  - `Head` component for better SEO\r\n- Developer Experience\r\n  - Zero config of webpack and babel\r\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\r\n\r\n## Usage\r\n\r\nInstall it:\r\n\r\n```bash\r\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\r\n```\r\n\r\nAnd add a script to your package.json like this:\r\n\r\n```json\r\n{\r\n  \"scripts\": {\r\n    \"start\": \"node server.js\"\r\n  }\r\n}\r\n```\r\n\r\nThen, populate files below inside your project:\r\n\r\n**`server.js`**:\r\n\r\n```js\r\nconst express = require('express');\r\nconst register = require('@react-ssr/express/register');\r\n\r\nconst app = express();\r\n\r\n(async () => {\r\n  // register `.jsx` or `.tsx` as a view template engine\r\n  await register(app);\r\n\r\n  app.get('/', (req, res) => {\r\n    const message = 'Hello World!';\r\n    res.render('index', { message });\r\n  });\r\n\r\n  app.listen(3000, () => {\r\n    console.log('> Ready on http://localhost:3000');\r\n  });\r\n})();\r\n```\r\n\r\n**`views/index.jsx`**:\r\n\r\n```jsx\r\nexport default function Index({ message }) {\r\n  return <p>{message}</p>;\r\n}\r\n```\r\n\r\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\r\n\r\n## Configuration (`ssr.config.js`)\r\n\r\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\r\n\r\n```js\r\nmodule.exports = {\r\n  id: 'default',\r\n  distDir: '.ssr',\r\n  viewsDir: 'views',\r\n  staticViews: [],\r\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\r\n    return config;\r\n  },\r\n};\r\n```\r\n\r\n### `ssr.config.js#id`\r\n\r\nThe id of **UI framework**. (default: `default`)\r\n\r\nIt can be ignored only when the project does not use any UI frameworks.\r\n\r\nSupported UI frameworks are:\r\n\r\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\r\n  - [x] [bulma](https://bulma.io)\r\n  - [x] [semantic-ui](https://react.semantic-ui.com)\r\n  - [x] Or any other **non** CSS-in-JS UI frameworks\r\n- [x] [emotion](https://emotion.sh)\r\n- [x] [styled-components](https://www.styled-components.com)\r\n- [x] [material-ui](https://material-ui.com)\r\n- [x] [antd](https://ant.design)\r\n- [ ] and more...\r\n\r\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\r\n\r\n```js\r\nmodule.exports = {\r\n  id: 'emotion',\r\n};\r\n```\r\n\r\n### `ssr.config.js#distDir`\r\n\r\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\r\n\r\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\r\n\r\n```js\r\nmodule.exports = {\r\n  // dist folder should be ignored by `.gitignore`\r\n  distDir: 'dist/.ssr',\r\n};\r\n```\r\n\r\n### `ssr.config.js#viewsDir`\r\n\r\nThe place where we put views. (default: `views`)\r\n\r\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\r\n\r\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\r\n\r\n### `ssr.config.js#staticViews`\r\n\r\nIf specified, `react-ssr` generates html cache when production:\r\n\r\n```js\r\nmodule.exports = {\r\n  staticViews: [\r\n    'auth/login',\r\n    'auth/register',\r\n    'about',\r\n  ],\r\n};\r\n```\r\n\r\n### `ssr.config.js#webpack()`\r\n\r\n```js\r\nmodule.exports = {\r\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\r\n    // we can override default webpack config here\r\n    return config;\r\n  },\r\n};\r\n```\r\n\r\n## Custom Babel Config\r\n\r\nWe can extends its default `.babelrc` like this:\r\n\r\n**`.babelrc`**:\r\n\r\n```json\r\n{\r\n  \"presets\": [\r\n    \"@react-ssr/express/babel\"\r\n  ]\r\n}\r\n```\r\n\r\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\r\n\r\n## Custom Document\r\n\r\nJust put `_document.jsx` or `_document.tsx` into the views root:\r\n\r\n**`views/_document.jsx`**:\r\n\r\n```jsx\r\nimport React from 'react';\r\nimport {\r\n  Document,\r\n  Head,\r\n  Main,\r\n} from '@react-ssr/express';\r\n\r\nexport default class extends Document {\r\n  render() {\r\n    return (\r\n      <html lang=\"en\">\r\n        <Head>\r\n          <title>Default Title</title>\r\n          <meta charSet=\"utf-8\" />\r\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\r\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\r\n        </Head>\r\n        <body>\r\n          <Main />\r\n        </body>\r\n      </html>\r\n    );\r\n  }\r\n};\r\n```\r\n\r\n**Note**:\r\n\r\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\r\n\r\nAnd then, use it as always:\r\n\r\n**`views/index.jsx`**:\r\n\r\n```jsx\r\nconst Index = (props) => {\r\n  return <p>Hello World!</p>;\r\n};\r\n\r\nexport default Index;\r\n```\r\n\r\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\r\n\r\n## Dynamic `Head`\r\n\r\nWe can use the `Head` component in any pages:\r\n\r\n**`views/index.jsx`**:\r\n\r\n```jsx\r\nimport React from 'react';\r\nimport { Head } from '@react-ssr/express';\r\n\r\nconst Index = (props) => {\r\n  return (\r\n    <React.Fragment>\r\n      <Head>\r\n        <title>Dynamic Title</title>\r\n        <meta name=\"description\" content=\"Dynamic Description\" />\r\n      </Head>\r\n      <p>Of course, SSR Ready!</p>\r\n    </React.Fragment>\r\n  );\r\n};\r\n\r\nexport default Index;\r\n```\r\n\r\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\r\n\r\n## Supported UI Framework\r\n\r\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\r\n  - [x] [bulma](https://bulma.io)\r\n  - [x] [semantic-ui](https://react.semantic-ui.com)\r\n  - [x] Or any other **non** CSS-in-JS UI frameworks\r\n- [x] [emotion](https://emotion.sh)\r\n- [x] [styled-components](https://www.styled-components.com)\r\n- [x] [material-ui](https://material-ui.com)\r\n- [x] [antd](https://ant.design)\r\n- [ ] and more...\r\n\r\n### Non CSS-in-JS framework\r\n\r\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\r\n\r\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\r\n\r\nAll we have to do is to load global CSS in `_document` or each page:\r\n\r\n**`views/_document.jsx`**:\r\n\r\n```jsx\r\nimport React from 'react';\r\nimport {\r\n  Document,\r\n  Head,\r\n  Main,\r\n} from '@react-ssr/express';\r\n\r\nexport default class extends Document {\r\n  render() {\r\n    return (\r\n      <html lang=\"en\">\r\n        <Head>\r\n          <title>A Sample of Semantic UI React</title>\r\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\r\n        </Head>\r\n        <body>\r\n          <Main />\r\n        </body>\r\n      </html>\r\n    );\r\n  }\r\n}\r\n```\r\n\r\n### With Ant Design\r\n\r\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\r\n\r\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\r\n\r\nAnd then, populate `.babelrc` in your project root:\r\n\r\n```json\r\n{\r\n  \"presets\": [\r\n    \"@react-ssr/express/babel\"\r\n  ],\r\n  \"plugins\": [\r\n    [\r\n      \"import\",\r\n      {\r\n        \"libraryName\": \"antd\",\r\n        \"style\": \"css\"\r\n      }\r\n    ]\r\n  ]\r\n}\r\n```\r\n\r\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\r\n\r\n### With Emotion\r\n\r\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\r\n\r\nIn order to enable SSR, we must install these packages:\r\n\r\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\r\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\r\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\r\n\r\nAnd then, populate `.babelrc` in your project root:\r\n\r\n```json\r\n{\r\n  \"presets\": [\r\n    \"@react-ssr/express/babel\"\r\n  ],\r\n  \"plugins\": [\r\n    \"emotion\"\r\n  ]\r\n}\r\n```\r\n\r\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\r\n\r\n### With Material UI\r\n\r\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\r\n\r\nWe can use [material-ui](https://material-ui.com) without extra configuration.\r\n\r\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\r\n\r\n### With styled-components\r\n\r\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\r\n\r\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\r\n\r\nAnd then, populate `.babelrc` in your project root:\r\n\r\n```json\r\n{\r\n  \"presets\": [\r\n    \"@react-ssr/express/babel\"\r\n  ],\r\n  \"plugins\": [\r\n    \"styled-components\"\r\n  ]\r\n}\r\n```\r\n\r\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\r\n\r\n## TypeScript Support\r\n\r\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\r\n\r\nThe code of TypeScript will be like this:\r\n\r\n**`package.json`**:\r\n\r\n```json\r\n{\r\n  \"scripts\": {\r\n    \"start\": \"ts-node server.ts\"\r\n  }\r\n}\r\n```\r\n\r\n**`server.ts`**:\r\n\r\n```ts\r\nimport express, { Request, Response } from '@react-ssr/express';\r\n\r\nconst app = express();\r\n\r\napp.get('/', (req: Request, res: Response) => {\r\n  const message = 'Hello World!';\r\n  res.render('index', { message });\r\n});\r\n\r\napp.listen(3000, () => {\r\n  console.log('> Ready on http://localhost:3000');\r\n});\r\n```\r\n\r\n**`views/index.tsx`**:\r\n\r\n```tsx\r\ninterface IndexProps {\r\n  message: string;\r\n}\r\n\r\nexport default function Index({ message }: IndexProps) {\r\n  return <p>{message}</p>;\r\n}\r\n```\r\n\r\n## Examples\r\n\r\n- **@react-ssr/express**\r\n  - `.jsx`\r\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\r\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\r\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\r\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\r\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\r\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\r\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\r\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\r\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\r\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\r\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\r\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\r\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\r\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\r\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\r\n  - `.tsx`\r\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\r\n- **@react-ssr/nestjs-express**\r\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\r\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\r\n- **@react-ssr/static**\r\n  - `.jsx`\r\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\r\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\r\n  - `.tsx`\r\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\r\n\r\n## Starters\r\n\r\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\r\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\r\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\r\n\r\n## Articles\r\n\r\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\r\n\r\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\r\n\r\n## Related\r\n\r\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\r\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.12-alpha.3","_nodeVersion":"12.14.1","_npmVersion":"lerna/3.20.2/node@v12.14.1+x64 (win32)","dist":{"integrity":"sha512-JH/MMogXZuoJ48xt6tRIH2fFmFWdRxvtbfiD5BTE/whBB4IDjtcORrdpdeBXm4K/Bu4GcLIlGDZqp5n1FwWo0g==","shasum":"7826e4fca9e5e5f89c8d1c786f14d5106edc4737","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.12-alpha.3.tgz","fileCount":8,"unpackedSize":16268,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJedb0TCRA9TVsSAnZWagAAlwAP/3NSxHfBObSrQ3ObAkVM\n4M4bKYFNbejwYaayS1DhcHyWFG9BMm/illqmpiYwdDplRpVyMPGSGTcJIpBh\nraWfBo0cEJSN9VKBd1rjmg9wmac1xprKIHmOl1OxkDzflhYCvzvRWZ8k0vxU\nbNobWz+pdxS2u4Zyah2jlQ+M81795NJcL9ob13s3mkVKJoQ8agvynVC8jp0b\nzmuQSokuaBRSjzqeKEq0Pc25AUvF7fpWXnva9rX2O7DsBrdm5lQCFr270kzn\nEeH0dkoGcmt625UAg8iQMlIYvr27wWfmnuL2H2rcCMuisNDkLyMx5a0sgqBn\n99YXmAi3pX3dwiw7gpicmuvAokByMwtNJnl/T94zl34u5WekH4EExdcdPCwE\nPAED1g+k8aKPzEXk8b+Ua8tAI4tsGOjEEUJHkDxQDc3D1pyfue9JpylvDsRH\nali+eFK5bfarF0V4EhRSX+ZunvwZd0MGj6GDHtdlW48gZqO9f/4N8gtPV1c7\n6vOCDFOEMluak9akrctZkr8wzMBG/zIKjr7aGZpVgepCltkzeQTogqFDqj90\n1xn8aIk6BPLyrev9vgOSLxcv+jq5cbUYLgefrJQTHzGcBsPygoQ6uWlI8m7N\n8rKSgT66TKxrimRtdQp2GmGzHKWmN2VB3SLYCVzBirY8ZW+V22U7+vhRJCjR\nUV7f\r\n=FOps\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBBKJUJwQ4B7FsTMFmRWBAom42oMAuOPaQ9IerFH2lpFAiB2hWrWE/IMmZbnWyjJDDKT00a9fLYYVwWP6YziC+89Hw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.12-alpha.3_1584774419476_0.8261969954971926"},"_hasShrinkwrap":false},"0.21.12":{"name":"@react-ssr/express","version":"0.21.12","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.12","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"d146aedaf198146783f3c122a94c7f7e41f2ed2e","_id":"@react-ssr/express@0.21.12","_nodeVersion":"12.14.1","_npmVersion":"lerna/3.20.2/node@v12.14.1+x64 (win32)","dist":{"integrity":"sha512-yXcX4xxzgqmNVe6VaKgtyylaov2Kvw6aM8VNz3TTEIVGxOeowTywTjGyNLHmwMBTi+X1AHy72EF44XDo/p06jQ==","shasum":"4caa75423764953dc56e12cb63848e892bbec6e5","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.12.tgz","fileCount":8,"unpackedSize":16236,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJedb3iCRA9TVsSAnZWagAAQu8P/iguVIjdD+t0Q6lhfxwo\nt0iQjSaiWXyIyPEgx3to4kUSywMdLIONGmtdWnXqSY9U8KpDzr+M4DC+br1L\n5Htlb73BofPuatAMMi5HWZXhPBavQu0B1fBnF+4HlqZpz/S/YB7zdgauU4Mu\nwj0fOZVXdHgKxQBEp2htmGJobmPF5foIk4MIiB0KQLbEAkgfvBJErfCDXBNN\nrp1aOEaZNB10BvPOsv8hHCvvQGGlOsR9p1JmYxY18obP/xbMqQEDg4IBeviH\n8ux4rkm5A3cKvNkng4o/BJUdImjallN2gSpm0Utg+OFaahWRo18rCbjJqBbR\nP0X1kvaIFPUDroyrA3DpaesoBS3X6gT1PhHpRxxfj15AGLiuED2Hds6DW/zn\n5Ydeqxxq5rRHMemHv+AX/Iz/5fQsn1vxU2394evXOb4M6OzNMg399nPY2XrO\n2i7byWJ5iV1K3z2Je5/Bl3DBR5PKrEklyCGsNe2GfLYSPhUfHyCbypSQcOdo\nRl+nrxHmZxXBYYWTbUG+w6FdLIkI6Z95hi9u/I+Z2ReQXH/bCR0xWyI8jnrx\n4SvjLN3btAcQItdEICuQcgkXWMupRk1ved+Hm50chZVFIFpWrptqBHylSshP\nhNHUqwLFDx/wJds6gy/ighbuUcN/5KCNbsACX1CaU8mnoUA4+3f2+ZVGRcTW\neIVk\r\n=JFmW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDgCyeoyQya5h6UEOpJZ+yCp2Tkgp3KlyadjUDfDsVsTAIgFLAFia6zWNZRdVzkYewvwJcejNM+RC7sZ3ujPX+CLBY="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.12_1584774626400_0.8984503336626162"},"_hasShrinkwrap":false},"0.21.13":{"name":"@react-ssr/express","version":"0.21.13","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.13","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"e3d9be1eb41b8972cc79bcb16c03311b6df3344e","_id":"@react-ssr/express@0.21.13","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-ip2zMiRxQRyHtMeSBb4U5UH4SfY5isxHOmSTs+IuM93qyvvF4VRE/MKObtkL6Vk8ZD1tGASspTyWugbSjJctuQ==","shasum":"823118eb486ef804c34254ca057409fd643ee1a9","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.13.tgz","fileCount":8,"unpackedSize":17090,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJed7L9CRA9TVsSAnZWagAALSkP/ivWl5KlUR+cc4pmHjwO\n1U7Ht5T0ipHOcSLtncJI4gMxToc6D8phwcSGDbB6vo6Zlom/uLmasuCzq6qL\n4r1JHiq02yHVX5N8OFLW+Vy8hTbcH1zLk3vCgfIgczFZE78zzcFJi4i2Jb/+\nEo9s3YO+IGcPGHOvOn2VVfqkRl92ZdA4TnCyIvXIoh0KxGioiZSo0HLLKhQj\nb+IvrO5g2OVuMYGxpgohLCpuic/fmxOxnvMvAZMgkDy6/Tl3Zi6XYlcMmlFA\nENSlJPXGKcAZsqZ4DC1TLd6DQL+MtP4Mrcd48ikaghVxTVSoEoKuebZtAIwq\nb0uTEY+BPZKQ04uNALUwHAFFcW6jiXFphpHPio/r/E/+/0NdDlT1f5NpowfW\n27ER0rGifHINpV6qH9hWBOEMgX4Snu5OBPKC4bwytOlGQLL6SLr9ZDEXNxuD\nmBlj6pVF4duQxlRJx9wMiBlfvrZmTcWYvlpaH/IRSOckbKzSEEMoh3rAVZg6\nc3C4hf0sRh/FTIWVyTzKQlzipXee8Xm+VPWYZ3M2VJVay3bjlnbRHeMrI94t\nEDeCSSR34yfDekUFLDGgBrpKL0z2aQ7XMDt6W7BLiyVWbzbU4FeyPYpHsBYE\nvlCnUwU86Y9GIGwTfTGgO1m5nM0KvBWUlwQzqLRwNSAANVYzv+bzAQBC0gbR\njYUA\r\n=+YTs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHnjkkw9mxfeN+VS3bEDYabDJ50l9Q3GsL655N7Z29S2AiBmpX3dKgSrm/LKfZeey+iP+syxsvEss19fjXMLDtb/CA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.13_1584902909238_0.4251015093865105"},"_hasShrinkwrap":false},"0.21.14-alpha.5":{"name":"@react-ssr/express","version":"0.21.14-alpha.5","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.14-alpha.5+303c339","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"303c3398e22ef79ee432eb1743cde56a8c8e23e0","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic `props`\n  - Passing the server data to the React client `props`\n  - Suitable for:\n    - Admin Panels\n    - Blogging\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n  - Built-in Sass (SCSS) support\n\n## Pros and Cons\n\n### Pros\n\n- Because it is just a view template engine:\n  - It doesn't need to have any APIs, all we have to do is to pass the server data to the client\n  - It supports multiple engines like `.hbs`, `.ejs` and React `.(ts|js)x`\n  - We can use [passport](http://www.passportjs.org) authentication as it always is\n\n### Cons\n\n- It is not so performant, because it assembles the whole HTML on each request\n- It does not support **client side routing**\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom App\n\nJust put `_app.jsx` or `_app.tsx` into the views root:\n\n**`views/_app.jsx`**:\n\n```jsx\n// we can import global styles or use theming\nimport '../styles/global.scss';\n\nconst App = (props) => {\n  // yes, this `props` contains data passed from the server\n  // and also we can inject additional data into pages\n  const { children, ...rest } = props;\n\n  // we can wrap this PageComponent for persisting layout between page changes\n  const PageComponent = children;\n\n  return <PageComponent {...rest} />;\n};\n\nexport default App;\n```\n\nA working example is here:\n\n- [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.14-alpha.5","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-PVhHa/GCDFFW09/UeTXZVJXOZMm9CSFQwKehMXneVzFe6THQEAHwJMtqBawKIi3KsdBg8p/YBHLyKEsPLBUhAw==","shasum":"e3f023b445d8c08f171e08b2cff8ec1a792d737c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.14-alpha.5.tgz","fileCount":8,"unpackedSize":17122,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJefHeFCRA9TVsSAnZWagAAwM0P+QByN01zeSKiOWc6qsC8\nyA9gFBWf9YdUooFscAXFkv2e0vkbsc05ziwbXxLz4WIWfTDEuwxqolIFrmre\n1kmxh9QPyNHatH95EiULhRqAEVs7Xn7PoeHRyjFe+iBMIdlPiC4X5BnRFC9P\nRR/+ef9nz2SEWX5IjLNX11KRRIJju8px9Z78j9OOefqpCCLQqFITkp0C9yFP\ngpTQL24Mgy0f+ppF2Y7QVnuYMu0YemyI7DLC1umIAmduVHi7rOA5OZKq3K5A\nBszOor4AfhobPF0I5Mv9Yb8Ue8LmqQtf8UsSMg34JKpjeZwdBNoTAixbnCAl\nFwrbxX8w4HJeyhDZXaG9+b9BEjaIWJ1/me4BUmZ9MMTHS/ieh88L9iKhSzrM\nlBOvGUYOvnfbRF0bF3dIRm+K4VEFncsAl4ttTjHN1ms84Xe7ufUC3R/5oaYi\nHLbPD2/XHDKxwnhmp7dNKu7SX/fnfVXWvFFLVTb3jMCc/UprNZAAsBi/aPaQ\n5a1llmPaXEhTRQITsTIC12kjif/RrJ41RBHmlbsq77qnBaAclgitqkxnXmy0\n4UUCkTYKcbRY4CGdIIe3nqO5BG7XQBLwI1BKXav/U+k1XS2hpnVyRdhmFsi9\nY8X9sIs1xfjYwrrqzEi01YT2rOlVL1i20lSwMzOBuH5b4U+j8dSHICDSYQrb\npVlq\r\n=Ri2f\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICDQe7s087adesDbMrZ30kKkbjRE7b3IeZ5j/RTXa0s2AiEA4q9w4X+ZVEX7XCVo09tH3baSDS7hZmg5F1F7ZGwsznw="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.14-alpha.5_1585215365389_0.855352259207032"},"_hasShrinkwrap":false},"0.21.14":{"name":"@react-ssr/express","version":"0.21.14","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.14","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"e4399255389d9eaabcd96e3d8ee7d3690126bbe2","_id":"@react-ssr/express@0.21.14","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-QmHYBZrYGuA92zO3QXvB7HcP9b/jQcJoIrN6mNYQxUT2mQUTxyLV5pC6UoB04URm215w3oE/vT3pktCDrPauUg==","shasum":"1727de678e77c6d7a2a2a78f85b40ff151bd36f2","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.14.tgz","fileCount":8,"unpackedSize":17090,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJefHh4CRA9TVsSAnZWagAA4DMP+wc9kjd+C0AVzDX0I2bl\nfBph9deUO3jEGJNPfnhpR8cN9WzYrk9IH113sSzop4bkIZdgpwEA7mpjIv6m\nlm854vAQfd8tc1CdnmmFYdAI6ziHf73beUdNAvZjo8hBCM7uokhXraiA923o\nGCw8I32USkmgkZ+bqdiQTu2pO7SkkzOHNin4VLmN1E/iHEx/yLL6nkA4L+yR\nJYJVfdXA7lGx+VK4T4boNJBwFNa1PE807aj8bPlDIN4KTeJpz79xiZ/egGIk\n8GlhllpHztznU3PIpekFVzCa2kAzI8s3o0yIJG/eLTUDGXB/aQFc2ccH6/JR\n42Kii5u/FMbrTXt8u/JRTLWYecN4eQXW9PT3q+oQpJnfd1ypbC5FKrCeuNRA\ntl5WyJiJ7BZCIv8/pzUA4JjYtBFelMMBpV5wbYaxAxufC1/1mLScM8Kf2Eji\nrOIGlkql1S/3M4ftR7BQOa6ojF90w1oF7COqthb3B6pdh1NBrIHdOvW8TIsZ\nmdPW/O0//BKXATBG7oOPihpKcx4ISuCIXNXeSuwuKj+VGplGMrmiHRNVpERi\nCDCTFzLNq4cmDkTIzfDVYIlqoa02vGnix46R8uJvP5Zr2Esw6a+es436qenY\nJlru/QoC70LQSz6QtWoK6cYm1RXLj2KwiQhEKwDTD5LAw9fcgrRjhQ76j/Nb\nyKcz\r\n=quez\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCT/RZ4YTjbcSuv+qnFn8XMZqJVboTOY3/p5xvct3YXfQIgbrcvKtl3FAxON3PPA+vKJAz/bxYZOF6OVAoa/lhatuI="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.14_1585215608402_0.3526226215544761"},"_hasShrinkwrap":false},"0.21.15-alpha.1":{"name":"@react-ssr/express","version":"0.21.15-alpha.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.15-alpha.1+8cf3f31","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"8cf3f31f5fd58df0ecd40c91364e80aaf34fbba3","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic `props`\n  - Passing the server data to the React client `props`\n  - Suitable for:\n    - Admin Panels\n    - Blogging\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n  - Built-in Sass (SCSS) support\n\n## Pros and Cons\n\n### Pros\n\n- Because it is just a view template engine:\n  - It doesn't need to have any APIs, all we have to do is to pass the server data to the client\n  - It supports multiple engines like `.hbs`, `.ejs` and React `.(ts|js)x`\n  - We can use [passport](http://www.passportjs.org) authentication as it always is\n\n### Cons\n\n- It is not so performant, because it assembles the whole HTML on each request\n- It does not support **client side routing**\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom App\n\nJust put `_app.jsx` or `_app.tsx` into the views root:\n\n**`views/_app.jsx`**:\n\n```jsx\n// we can import global styles or use theming\nimport '../styles/global.scss';\n\nconst App = (props) => {\n  // yes, this `props` contains data passed from the server\n  // and also we can inject additional data into pages\n  const { children, ...rest } = props;\n\n  // we can wrap this PageComponent for persisting layout between page changes\n  const PageComponent = children;\n\n  return <PageComponent {...rest} />;\n};\n\nexport default App;\n```\n\nA working example is here:\n\n- [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.15-alpha.1","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-QXMtvB2jUvcFuS1YIRPh5ue2hvRWM83l/mEdq4RMmptK3u6T8AsR+4gSbYRTN7IfUX0HZd32Lu6CWla4DMk8AQ==","shasum":"9e3ae8fd8e864a12c2713baa4648324a397bbd78","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.15-alpha.1.tgz","fileCount":8,"unpackedSize":17035,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJefQmECRA9TVsSAnZWagAAJLsQAIOkWVEKqywjGjfgYSQI\nDFTBw9OpFieWE6o12c+lUoBaIX0gKK+stzEQlhoqa85sL+6AE7+TK8Yp7G0R\nt07uFMiQVkXlV3WCKJSduByeJ1/JCLQxI9+QPC58XjTDch8tN52vQwwlaWUc\nd4adaQlWjB01+dlU4J1J1j6qD+jL5DKS+QLmnxwA4CO1Fwf5WRze0CuXhjVd\n7X7G0gySBhpR8BBOXVQlau0Uu8RtUVsQz5MHcCOAB6QJTNfqPqmmLPolJJXb\nae7ZnCTENio10njKiCSk3+ajlflmcWvtsCgXoZi3BEBxwYDadSqYF5CYk0iV\nJ6uKB6BTgmcxk7OuFjgxZRcBwFB3C1c7/5vqPv+OYkxz3jB1l9oqSErt2L1s\nX+o0IQL194M1VYGq5NGl1gZ0oNpDKCnQR4hdg9LjYsDGCFOpuEjhghye0QIx\nabXPg0AQ8YAnZSF85pBcZpJMNDnVV358G7Ma1vbHWq2QkY7TsobTfRvqT9Er\nFV0VRPZ3z9Ly8b4ZeGAliAJdJ4grIVc/u1EHuPpcb4+0NP5rQMmcw9mkVA7q\nbCr2AKfc5m/Hcx7aWFiTYlfB//APmwOr+SUxVFJm+Kd5ALYvWev9KqfKu2r6\ncXitvN771j5rOajQlXyByOG6v2s8HuEIeaZQ5mdTF5hYT6K86Pr+rAsMSB87\nCFtf\r\n=olgK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEHwo8kqIeaym25aONCVJEKY86OrHUSCu//jmIzzBZeXAiBGkjM27bRWIxdTN52TFiSSJdvdHGkXoNY3my+8NFD/cA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.15-alpha.1_1585252739695_0.922406816127521"},"_hasShrinkwrap":false},"0.21.15-alpha.2":{"name":"@react-ssr/express","version":"0.21.15-alpha.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.15-alpha.2+009b3cd","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"009b3cd9c8a9441617cd01d371c3cd539ef55858","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic `props`\n  - Passing the server data to the React client `props`\n  - Suitable for:\n    - Admin Panels\n    - Blogging\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n  - Built-in Sass (SCSS) support\n\n## Pros and Cons\n\n### Pros\n\n- Because it is just a view template engine:\n  - It doesn't need to have any APIs, all we have to do is to pass the server data to the client\n  - It supports multiple engines like `.hbs`, `.ejs` and React `.(ts|js)x`\n  - We can use [passport](http://www.passportjs.org) authentication as it always is\n\n### Cons\n\n- It is not so performant, because it assembles the whole HTML on each request\n- It does not support **client side routing**\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom App\n\nJust put `_app.jsx` or `_app.tsx` into the views root:\n\n**`views/_app.jsx`**:\n\n```jsx\n// we can import global styles or use theming\nimport '../styles/global.scss';\n\nconst App = (props) => {\n  // yes, this `props` contains data passed from the server\n  // and also we can inject additional data into pages\n  const { children, ...rest } = props;\n\n  // we can wrap this PageComponent for persisting layout between page changes\n  const PageComponent = children;\n\n  return <PageComponent {...rest} />;\n};\n\nexport default App;\n```\n\nA working example is here:\n\n- [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.15-alpha.2","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-ItvspMYzyTN9MXRW1r4GqcQGE3waV0W1zH/7/7grDHAfUsCX539BeQS9AhQV2eB8xXmDzZTY1Q4YfZAaInS5Eg==","shasum":"aa44664ef8335b9ec33f7fab45df982321f31c20","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.15-alpha.2.tgz","fileCount":8,"unpackedSize":17035,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJefQoDCRA9TVsSAnZWagAAqaEP/idSG4svLULiLkBtOulc\nPvV36V2QGyjYy7RX902xqBMFRshoQVvvHFSJ9CW3vV9k8QQNeKqWa3cW93A5\nXhZool0qALn6AsM6h1lFeF3JZJnU1zokAOHkF9VFVlHw929ugyLkxttiDE1l\n7JeO3fMGqDM4CQp3EeW0obX8/XXd3zsMqvxiTPxHPcDwMVMxut0yq9iO9Hv4\nwSljD37zf77O21eEkNSQGDB0/Gg41skvxgKww3JtOeYB6YDs6S7YPntVtJpz\n7mol+L5X02w5eAcVHWkhAqZKfE1RLVhp0nllmEzSgcGn1NAhlvrZ/AlI61Iu\ney3odTrxiX6c257Ngrtr6yfDCuY6pmIrMcGPSEhY5Oj9RqKzyCalpBNA9K7/\nIZO256NWbBGPIIo9+5AZVRpWOaxUPTrS/nTs2reiEkvKBGzkDSB1cQQ2rI/+\neemoAs7R7m1MfBrozxgsQCflfi+X/Da/OI9Fgi7sXxQcme0EZbUbrfZ/0eTm\nxevRO1PfX1D/ymnk7iOJi6K/b4G8KP2ZYkpXMg+95R84MavjYL8pprl0f9i7\niEiQr4r++Y/YxLx9DhK5CPrTKB61uXXZ6t6meZaARroeKs2ufn/AWRIpgNNk\nhni6Q7G0KBcUy2xH6nnTY8NPJd7cbYkbTcNduIQ++wd/TWvrd27BENtUo0DP\nhJAe\r\n=wEgO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCicMbSftuw9bctcxwmcpP53ARoaGI4Bap/0m113IfdiAIhAMo9DxNExD5KE0iT5+VUW0BYlw3aLQlrEbvTIh0o0iTq"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.15-alpha.2_1585252867254_0.05129388829971182"},"_hasShrinkwrap":false},"0.21.15-alpha.3":{"name":"@react-ssr/express","version":"0.21.15-alpha.3","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.15-alpha.3+7f5867f","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"7f5867f620c0bd280deb11c8d70c68ced1b4bc79","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic `props`\n  - Passing the server data to the React client `props`\n  - Suitable for:\n    - Admin Panels\n    - Blogging\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n  - Built-in Sass (SCSS) support\n\n## Pros and Cons\n\n### Pros\n\n- Because it is just a view template engine:\n  - It doesn't need to have any APIs, all we have to do is to pass the server data to the client\n  - It supports multiple engines like `.hbs`, `.ejs` and React `.(ts|js)x`\n  - We can use [passport](http://www.passportjs.org) authentication as it always is\n\n### Cons\n\n- It is not so performant, because it assembles the whole HTML on each request\n- It does not support **client side routing**\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom App\n\nJust put `_app.jsx` or `_app.tsx` into the views root:\n\n**`views/_app.jsx`**:\n\n```jsx\n// we can import global styles or use theming\nimport '../styles/global.scss';\n\nconst App = (props) => {\n  // yes, this `props` contains data passed from the server\n  // and also we can inject additional data into pages\n  const { children, ...rest } = props;\n\n  // we can wrap this PageComponent for persisting layout between page changes\n  const PageComponent = children;\n\n  return <PageComponent {...rest} />;\n};\n\nexport default App;\n```\n\nA working example is here:\n\n- [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.15-alpha.3","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-TfqhYCmvuk6pcLAgBXxDizOB7pr7zGarLrLh+qXz1IhCNCFZTtCJ0Ek8YUVjGDQd2tFrfgvUfRUfeYmh7PeZ6Q==","shasum":"567bd17d52fb48dadd53d5d7d554a7160f4a1430","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.15-alpha.3.tgz","fileCount":8,"unpackedSize":17035,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJefQqDCRA9TVsSAnZWagAAatQQAIGtRMyxMVOqQav0HEup\nwm25HK9UcwblbCZWxEi5nxc9CDfJDMldZMGbXEb29qamN9Zk2YkZQVI2yvY0\nKZOgm/E6UfsD8MVhCmXGHHdZXz81a7RXdtoEPO/AqLSIVWSAoah9n+iT9vXC\njSIyvEvDKddphohOSA/5QXeiYjZZlLmI7HLUxrjpvxZDKmjBLdKHFdc3KCE6\nwn8wIituh5aLWm12zNM5D3BX0Nju7ux5nXV0P0c2mBx0l2ol6EvEheVvyzOo\nF1NBSyyjdGh5CL70Iqerfsq67eOc3CrEL5eboCUxUGO02dy4y5AIgfFhoLK1\n84cOkfmWD32kFNLTeG+iFqjRv1hnWLyrh43XjyIJlSW3LUcg2Xv80Wl7pmX6\niOn8Ao+8ES+9Kgenbb5UklC3MNiDaW6zU9lioH93HiXsMn1so6CQTBradwy3\nWLHsJ3mU4lMHOYahmEptisVcm12mMEhkrPRON0AgzIBGNh/x2u4qlC6lyT6v\ns43qqr2X3pczDGMUPWKahz7AXLt1+RW+XAxnKOK6DZYfST5eb5APZ6sHPYwX\n2Knwazc+DrkEIZgSidUEoowOqyXFi3ZumB9S0VM5w5+CzGx33FzpqLU0PNu7\nGK0m60rN9yrvns1RTbWR7aqUHe/BILF7ugsdUmvJhEspx/yWIJWQvIoQItEg\n7Am3\r\n=zSu2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC+XcjmJPCnMcoLMYKPgDAp7SPc7vRz/2AZutH5rl3XdgIhAKyUYq6mBVDRCSwphhWvPfVlXdb/9zXMWNh4Bdy+42X6"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.15-alpha.3_1585252995094_0.44291937756400923"},"_hasShrinkwrap":false},"0.21.15-alpha.4":{"name":"@react-ssr/express","version":"0.21.15-alpha.4","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.15-alpha.4+ce0d814","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"ce0d814c62f2aa5415522ba3394673993f6c36b2","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic `props`\n  - Passing the server data to the React client `props`\n  - Suitable for:\n    - Admin Panels\n    - Blogging\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n  - Built-in Sass (SCSS) support\n\n## Pros and Cons\n\n### Pros\n\n- Because it is just a view template engine:\n  - It doesn't need to have any APIs, all we have to do is to pass the server data to the client\n  - It supports multiple engines like `.hbs`, `.ejs` and React `.(ts|js)x`\n  - We can use [passport](http://www.passportjs.org) authentication as it always is\n\n### Cons\n\n- It is not so performant, because it assembles the whole HTML on each request\n- It does not support **client side routing**\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom App\n\nJust put `_app.jsx` or `_app.tsx` into the views root:\n\n**`views/_app.jsx`**:\n\n```jsx\n// we can import global styles or use theming\nimport '../styles/global.scss';\n\nconst App = (props) => {\n  // yes, this `props` contains data passed from the server\n  // and also we can inject additional data into pages\n  const { children, ...rest } = props;\n\n  // we can wrap this PageComponent for persisting layout between page changes\n  const PageComponent = children;\n\n  return <PageComponent {...rest} />;\n};\n\nexport default App;\n```\n\nA working example is here:\n\n- [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.15-alpha.4","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-OzGxvMKJKyqakdjRJXglHiOlXosDsK9ZaXb72PYwN17FXd1PNKGwauqWqeOf0zo1q/SzfBGJcPIa5qGXZSw/qQ==","shasum":"089e9099d189a40969fc8303d8b96b659e5da6f0","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.15-alpha.4.tgz","fileCount":8,"unpackedSize":17035,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJefQuyCRA9TVsSAnZWagAAnBoQAINyJu0gQ5k6p0HnG/wz\nWL1jW5f1c3Nc466aDp8bRqINjYxcG/xTk05wYyYhUWWxOWj015dupap97kt7\nQ9RXIDBaSUabOKExM7dJzV23SJyh/tRx6b5QgTLfV/W0HNyZWTm/jutMLpvw\nm1Q8Td7u5R/TLbLOcPgcvpWVr2jeTaYIZ2xR7uHOjiWtwWOg2vjpK2N5IRmW\nyGjbKmJ3XkOb5yngUvpb6OftUAqgYPqlt2kwstSecDeHrBDs5ZYVrN27Q4VQ\nhKd4x4i1eZapEZbr9577i779OPGi/RXVrl8ZYKENoViZULVR2lHApJeAxw+H\nNeFb0Hr2LLFxgPxAul35uq7y89ExbODz/z70n9X9SmA0GzWKIzfFPC8oJTHf\nP6zm2pyXU3P0Y4mUlGehiof9stQAMHQ4yR8/UAtee6I9T6eW3LCVZglI5YBP\nvV0lmYgjjhyl380/6WFUehsjnGx/3Q6HPkGHyPsIC9ursHLIIUZY1IYjZ/XD\nYWV/LrJdmPDThin0L9IFNZicRBJq3i7Gv4zreh71CuQFta6R3arMf9Tkm1P4\nhLBqEEPQW3CBOxD62XWGnNCnnsjLAakPgWClOqFdbflJak9gnFe45zPemvuM\nTgBgWjPvgVX5Kw5dKOHgXuVNhslnfpAcw/247rT1NqSlzAZTdAOLJ/YzkgwW\n3UHc\r\n=021R\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDFiL1NcyHpDRJgvt6uMJMo33/1vYvX3waN3hRwd4fKogIhANuYXmHccY0sCCeyRZ4eGWq2I0amOZ4fHLfOSWPzHHWb"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.15-alpha.4_1585253298252_0.9099028422293642"},"_hasShrinkwrap":false},"0.21.15-alpha.5":{"name":"@react-ssr/express","version":"0.21.15-alpha.5","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.15-alpha.5+a8f5070","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"a8f5070be6080ec79dfd0e46ed2722288049f4cc","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic `props`\n  - Passing the server data to the React client `props`\n  - Suitable for:\n    - Admin Panels\n    - Blogging\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n  - Built-in Sass (SCSS) support\n\n## Pros and Cons\n\n### Pros\n\n- Because it is just a view template engine:\n  - It doesn't need to have any APIs, all we have to do is to pass the server data to the client\n  - It supports multiple engines like `.hbs`, `.ejs` and React `.(ts|js)x`\n  - We can use [passport](http://www.passportjs.org) authentication as it always is\n\n### Cons\n\n- It is not so performant, because it assembles the whole HTML on each request\n- It does not support **client side routing**\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom App\n\nJust put `_app.jsx` or `_app.tsx` into the views root:\n\n**`views/_app.jsx`**:\n\n```jsx\n// we can import global styles or use theming\nimport '../styles/global.scss';\n\nconst App = (props) => {\n  // yes, this `props` contains data passed from the server\n  // and also we can inject additional data into pages\n  const { children, ...rest } = props;\n\n  // we can wrap this PageComponent for persisting layout between page changes\n  const PageComponent = children;\n\n  return <PageComponent {...rest} />;\n};\n\nexport default App;\n```\n\nA working example is here:\n\n- [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.15-alpha.5","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-MeekkDVcfHIWF7g7VPjl1y55iDbSB5ekAgMUbDPiEgP/PquWqstNHiFjrCqfd1ncVeI0yLyMHLrPCMPRAXfsug==","shasum":"894cb1554b53e319e2160e49bffe7113112fe9e4","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.15-alpha.5.tgz","fileCount":8,"unpackedSize":17035,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJefQ0fCRA9TVsSAnZWagAA+4IP/jggONTYBP2ULCJ33Sy6\npniG/knfHI8PEnH2kMBFPMR2azzpUGYAiS4CqANyHnDpdIyj3zbwKYbGoIgV\njIb3zbGdYUeevSnD0OODEKF9OL1K0WAHgE6sbs/erSq1CWFlVBTrB3ywE530\nCnOffx2skB6u1tEXtmoxFo7jPJzugUGFOQNYCZ8NZzgfu7pyaSSNQpBa3378\nPSNN7m/APtwap9r+I9Y59utavO22f9naOELCq+Ob/7fhmYVLEv8ixR7Fs8uN\nuwSIUmJQw+6lR01TCk36ndrJfLv6NRJsLm2V+C69Z1viX7exb+KKeuq2Y+cG\nMc0dnmjPkeUlK34eN1h7Y4WWryLGAvNfhUjj5vF1G6srupBkibWHayQFy4hP\nUiSSBOBuydgdkh+BG7ngUwC+FQB1jwGvaHWOtaeIt4UysV4s4UjgnM8eSN4T\nwOy9kgelhEEePa7xcmbV3N01TcuMfaKwUuMpymxeGXEooV7gbRJFD6eTPVd3\nvKASZdWMnusg8JdetwKkdWoAr9dZuNqfjnW/1MEllB+BbM0Vwtd/ytJ3i/kS\nDoujgcQm/5MPvUNwMg1JWz31/pUzqO1hpcLDN6nvGyqgnrDZN5Wy48YDag/+\nKU0rskQtyaUMHft9pZM7jTA0K5SEQqc4BgRG+S6EmnUvuAzUmrWZwFh/eDwy\nx37Q\r\n=XNnz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDZCQJbGTjL1p/AQO9ko9bWrcUdtlBzLlSOH1FBuBnuaAIgfNpz43L0jRld62yomkWvkXcAjIHGRl3xEQIXI+YMoCs="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.15-alpha.5_1585253662670_0.6895946747203245"},"_hasShrinkwrap":false},"0.21.15-alpha.6":{"name":"@react-ssr/express","version":"0.21.15-alpha.6","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.15-alpha.6+8d23210","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"8d2321043e4ef74a1ca9e36e0fb3cd5a7fab0ec5","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic `props`\n  - Passing the server data to the React client `props`\n  - Suitable for:\n    - Admin Panels\n    - Blogging\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n  - Built-in Sass (SCSS) support\n\n## Pros and Cons\n\n### Pros\n\n- Because it is just a view template engine:\n  - It doesn't need to have any APIs, all we have to do is to pass the server data to the client\n  - It supports multiple engines like `.hbs`, `.ejs` and React `.(ts|js)x`\n  - We can use [passport](http://www.passportjs.org) authentication as it always is\n\n### Cons\n\n- It is not so performant, because it assembles the whole HTML on each request\n- It does not support **client side routing**\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom App\n\nJust put `_app.jsx` or `_app.tsx` into the views root:\n\n**`views/_app.jsx`**:\n\n```jsx\n// we can import global styles or use theming\nimport '../styles/global.scss';\n\nconst App = (props) => {\n  // yes, this `props` contains data passed from the server\n  // and also we can inject additional data into pages\n  const { children, ...rest } = props;\n\n  // we can wrap this PageComponent for persisting layout between page changes\n  const PageComponent = children;\n\n  return <PageComponent {...rest} />;\n};\n\nexport default App;\n```\n\nA working example is here:\n\n- [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.15-alpha.6","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-YaUwGR8w1Fy7CwVkCzvKLZKqbyYRjaXKplRa/OBx57rlc0qQzx10tlFqoc3PiA3cqB0N5s7Kjwnmgr6f9TpnHg==","shasum":"5394fbace69ae04f4d4188d6f8b4ac825cd380c9","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.15-alpha.6.tgz","fileCount":8,"unpackedSize":17035,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJefQ7QCRA9TVsSAnZWagAAOTcP/AkUgQBlmYX5P9fJfJor\nFceLBqUuXOf48NXV7k348xBNk//3pLS41hq5+6hxDZiaokoJfwA0dyoTngbh\nWeb6axLd//jusJuk/E1ZSbxr5thfELIkn6QvXCJsK2wjC6umeaXVLdAujxDs\nZ25MS0TZpHBysaHt/7tUQfC9GmJ4lpSYsFOxOJeodbsH+qsglvTnxV72ILOB\nwdEbuclwrdmxhKuj956K+RmJvnvpea81ROlqL8vh30R8PW8eldOC8NmHdCRI\nqXB/Z2+etrLOMk1F0u3x2dpLmUcFav6HZ8l4nbDKauMk/99/wT8j4BMF5XQ3\nd6GvezoDCRZhu0lPWzIqiLhHhVq88Xy5IFHIkQf0IE91HBahyyE0Fp63BTtC\nuVNhbE35DQNmBIsZEh2gCX4FVp2BsRV+9AQHxG3/dAIcpmZ5B1Jm4tDITpEG\n4fwvm8Q9n0ADrXcjgVU03Z0twML7daN3xvZbfcfqSLCrRn64hkUP81WxI9FS\n3cFxO8d3XYvDwrXQI7IHLmtxAXkh3KBCdPdCH6vYsJ5R+OasUCNkRtnE+uWn\naAbp0w0aJC3e74oaLBks6dxpiA0qL0dq3UHoTlPxNT0hTL1bsNuwUZO/fyeJ\n/PMFxkASubIsGJsC/ZLQwK9Ko6c1695Y3O2DrZzwpc41b7EtBN8NsD/KeA1z\nNrfj\r\n=6C62\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCjPzcptfPpIGIbD4ZFrfyy45ZYUUqpJo3b8FgA5zKSGQIgZq8vXGsYdgRexMnTyRVTf4HgZf2Dbge0h+6Oau3zoI8="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.15-alpha.6_1585254096284_0.5535623573764386"},"_hasShrinkwrap":false},"0.21.15-alpha.7":{"name":"@react-ssr/express","version":"0.21.15-alpha.7","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.15-alpha.7+fb96893","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"fb9689333efcd6fad5e1b0031ea93116b821601a","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic `props`\n  - Passing the server data to the React client `props`\n  - Suitable for:\n    - Admin Panels\n    - Blogging\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n  - Built-in Sass (SCSS) support\n\n## Pros and Cons\n\n### Pros\n\n- Because it is just a view template engine:\n  - It doesn't need to have any APIs, all we have to do is to pass the server data to the client\n  - It supports multiple engines like `.hbs`, `.ejs` and React `.(ts|js)x`\n  - We can use [passport](http://www.passportjs.org) authentication as it always is\n\n### Cons\n\n- It is not so performant, because it assembles the whole HTML on each request\n- It does not support **client side routing**\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom App\n\nJust put `_app.jsx` or `_app.tsx` into the views root:\n\n**`views/_app.jsx`**:\n\n```jsx\n// we can import global styles or use theming\nimport '../styles/global.scss';\n\nconst App = (props) => {\n  // yes, this `props` contains data passed from the server\n  // and also we can inject additional data into pages\n  const { children, ...rest } = props;\n\n  // we can wrap this PageComponent for persisting layout between page changes\n  const PageComponent = children;\n\n  return <PageComponent {...rest} />;\n};\n\nexport default App;\n```\n\nA working example is here:\n\n- [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.15-alpha.7","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-kWwXFMPlSOj5wt7hlHGlN5tTPg49KU4+8tiloFAKX2D9mV8LRoybV0Cx6dNMrz8EQ8vOS6mLIb1MI8cHxQ10Pg==","shasum":"007ce5c8a884ff8c4d8ca44520bf7dd4665df6e4","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.15-alpha.7.tgz","fileCount":8,"unpackedSize":17035,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJefRCtCRA9TVsSAnZWagAAVzMP/2w8CUFx1kCZfIOXqOzD\n6uBKRX2NXBX6YlJE9OtS5wavoHktTXprSSp5kHfntaEGMs8+o+piFpuE3S2o\nWRLUGttYwTlosFMhbFPKf5fUR/HPeXz3wVbId/m8xvC6QAVW2sC1GYGik5sq\nQAoQcwY6EqUWvxQ3H04tS2wQyVFkV0DkmBcFG+Btc2GyAt216qkJmJtS+vNP\nF3bVRm9AzoECRQ5mXOloEj8+bsNQ6nhmzOi/+kqvGprDipupwHNqDLgkrOEf\nDehn6Z3367ZVw3BD+pILrlBBmM4lFMpucrIe7FEj1wHXU9HlIY7+aPpelNLS\nXLamd8zBQqitm1UYQzQd3P6weTyD+grPOZZwHwX4W/fwJmhyg3mXlMWcyN7h\nrDbYToLqdHxofGoVeRkdSBa0AONZjsAUY/e0EM3D5mETzGI4rXgvsGwDLlfA\nKAdSFoBdxMFXCuBD7Nn4omkj+FPepE4POSL1xrF6sybjGXeCUO/BeuGuV4YK\n7/x5NSOFxI7t3Apou7TMU6B34crrErMk01lyH/hLTwPhtf+gu1/dvzzPFoox\nRZvt1XlkevEoS9xQ8QfVXKG0PINRGoz3Bywht5Z2K4w2Yeq2wAXiuCSYN5db\nLOJl8PZcPac5d1ItViPFpjwHTTJkpK2NcZwTyHRDl7iTKkNAEk8CQgvp54k1\nX2ry\r\n=pF7W\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCmEHnNhmyf5L7J69dOjoezm75uNj0VYzrdoqZU93VhsAIhAIjP7SxALcRSFTsRP8UtqkEi88nJVzQQqxbrFSg9z5+h"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.15-alpha.7_1585254573463_0.6076377282505256"},"_hasShrinkwrap":false},"0.21.15-alpha.8":{"name":"@react-ssr/express","version":"0.21.15-alpha.8","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.15-alpha.8+9d180c7","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"9d180c7dfbe6d5e12a7aaaa870af34eec732bc6f","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic `props`\n  - Passing the server data to the React client `props`\n  - Suitable for:\n    - Admin Panels\n    - Blogging\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n  - Built-in Sass (SCSS) support\n\n## Pros and Cons\n\n### Pros\n\n- Because it is just a view template engine:\n  - It doesn't need to have any APIs, all we have to do is to pass the server data to the client\n  - It supports multiple engines like `.hbs`, `.ejs` and React `.(ts|js)x`\n  - We can use [passport](http://www.passportjs.org) authentication as it always is\n\n### Cons\n\n- It is not so performant, because it assembles the whole HTML on each request\n- It does not support **client side routing**\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom App\n\nJust put `_app.jsx` or `_app.tsx` into the views root:\n\n**`views/_app.jsx`**:\n\n```jsx\n// we can import global styles or use theming\nimport '../styles/global.scss';\n\nconst App = (props) => {\n  // yes, this `props` contains data passed from the server\n  // and also we can inject additional data into pages\n  const { children, ...rest } = props;\n\n  // we can wrap this PageComponent for persisting layout between page changes\n  const PageComponent = children;\n\n  return <PageComponent {...rest} />;\n};\n\nexport default App;\n```\n\nA working example is here:\n\n- [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.15-alpha.8","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-HfTNzd03M0qlV7dSjv6a0vUxmD0ytxMQEzErhEMW0bLUHMsnYNfwvnr2SzESKDGeLwrqfaJ/36omj+kddVMXjQ==","shasum":"b482335bc9ec24282e2f7f901b0367d66d740dcb","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.15-alpha.8.tgz","fileCount":8,"unpackedSize":17035,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJefRGZCRA9TVsSAnZWagAAv/IP/3G8YVkSn7ZmZeWlVVDa\ndEH3Tdcdjix8ZWK/FQcxq69V4r0LSqoNSVCDyrUktcVCX1kUto/zY4/BzbSU\nByTJtkCz2ct7Qy1BQ9ciBjm/msaa6KJD54LuzczZNcmVlrv3OJFg/8EUZNPn\nyhiJ0tbq7yyqH3w5q4oRMSnDU6wWmeWCzRpTZOqYVRLQRFBgKc9zY2pkJSnu\nxUhdJBAQ5JpqjMRl3EMIKLfUlXOsn6WIAajQdksfivqq9KLkGKv4UX9ZfQZG\nijqJg7V5mWGRvBxhkrJKWz/PoDBVf6uyAoMthLCuTF+euwJLxLLuxmMppftk\nppMqLYs0AL291TwzQ+YyM4VmK3/JxTX+kdXKWX+85ZYniSCriZEw5OhN+poC\nftse9SYEiMAmeeBwRM6q9T0kYK1T57pxaStAmOhopwCvasgH8NBSLsB1LqXR\ny2DWwK4cC6SerEAUxhjzFb3Brjz5o5ZyhnUR1NAmtJmRP0ATdSR4/sgDDRgu\nL3l8cJr2BID3oDdUMdY//74z5e80fNUJPqRTPjnsPYjfYifreHqZ5VnJe/Dn\nCUNZn6RUb0KYphWQKmT1P1hJsOFEbQpz0J9IvIhEe9/wyfXhKCBBXjDb8A8n\nFN8st928Meb0hbW27iyWf+Q42D91vcvnf22LcjFb0BaImtYjxmaqUKjmaKzA\nWv7p\r\n=ClDe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEXd18cYJ6I5EdRnzF71y4fiD9E59nsjCqt7cObpW9y5AiBm9F+03rMT2iqFwUva24xz6AtggayuXUUyaAh298P4rw=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.15-alpha.8_1585254809234_0.7190708647016009"},"_hasShrinkwrap":false},"0.21.15-alpha.9":{"name":"@react-ssr/express","version":"0.21.15-alpha.9","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.15-alpha.9+3763a1d","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"3763a1d0120ceb12dffa4cc57318b22305127a4c","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic `props`\n  - Passing the server data to the React client `props`\n  - Suitable for:\n    - Admin Panels\n    - Blogging\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n  - Built-in Sass (SCSS) support\n\n## Pros and Cons\n\n### Pros\n\n- Because it is just a view template engine:\n  - It doesn't need to have any APIs, all we have to do is to pass the server data to the client\n  - It supports multiple engines like `.hbs`, `.ejs` and React `.(ts|js)x`\n  - We can use [passport](http://www.passportjs.org) authentication as it always is\n\n### Cons\n\n- It is not so performant, because it assembles the whole HTML on each request\n- It does not support **client side routing**\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom App\n\nJust put `_app.jsx` or `_app.tsx` into the views root:\n\n**`views/_app.jsx`**:\n\n```jsx\n// we can import global styles or use theming\nimport '../styles/global.scss';\n\nconst App = (props) => {\n  // yes, this `props` contains data passed from the server\n  // and also we can inject additional data into pages\n  const { children, ...rest } = props;\n\n  // we can wrap this PageComponent for persisting layout between page changes\n  const PageComponent = children;\n\n  return <PageComponent {...rest} />;\n};\n\nexport default App;\n```\n\nA working example is here:\n\n- [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.15-alpha.9","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-eSzfki4yggNqELVQ8B0titS5Jkh9Tu8whzYExBJUuEaONYrS6BKheMUVYaJL+2O/zTGubewrC6bkogtmtWM+Mg==","shasum":"c1cc40fd712fbae785cfe2163479ae3964444e66","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.15-alpha.9.tgz","fileCount":8,"unpackedSize":17035,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJefRNUCRA9TVsSAnZWagAAkBUQAJWLw7S8Fq+0hU2YQDnl\n92nSYtpvlmPC6Qmji83uh5vwjVx7CjljCwGDGx6eAuAOZ9EHW4wEZ0iLyEHz\nYxKaq/GVthPqH4DHorm6BUDEbpCgex1GHqk/D+XZjz5wfhoyabek6c4nLxsf\nl6LovPi2j7+nIs1bYNUG3YMtV0Xzi3YFOPro9obiM9+BqmtGXnKqB0d2xchZ\nmXZqP0bdfvZmhgam7TjlHDso1Ju5KxwJT3DEuuCiey2EU9cDBPZiVhziaJ53\n2TtjcKrtSoBlnmTPMhTr4DbvSo9727L9gxDU5AKjxgltcLE7RFlQGwZ0tdLz\nhGa2Kl1le/2IUDieQZAc+WXQ2dZnBrJ4PefO5x8nzzD2yUDOIQVHakqXAxGB\n9IQPnbzfeZ1rx+SgOZ3gU1qGwjx6qc79DU2ErDmr1lD9II0DDsfJXHN1DNTt\ngqssj4pBOh36GnepAWpcp5TmmgTVDMBOi1JUvr2dj1SrUM0Re1H3oMI62rSB\neqdhDdN6YfOY0vbqLaJNkNwejei9fL3cadyp11/yTTeRT9Eac3JwkXeW3gZL\n4NG4xI3OwS5hNgFDaNC6rLjdQABbegXdv1k8lHx3yTnbhlbEUTGrCvFEQvy+\n0ITFGkduoqTuILWwDNXDXATbICVTpnRE+6uHrmSZeBEv/r5crBKbL0krPC+D\n4qME\r\n=ylv6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDLLKQkPKvNxxZUrKT1fweMbNmoFHqMlYnKwNMgg1a0zgIhAJ3++Cl3JYX1qoLAZbkbUatrO6qQmyIAHVuNunUyw6fR"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.15-alpha.9_1585255252238_0.16536701016688227"},"_hasShrinkwrap":false},"0.21.15-alpha.10":{"name":"@react-ssr/express","version":"0.21.15-alpha.10","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.15-alpha.10+deff777","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"deff7773d3e513732c5072ef06152cd4d693bbe2","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic `props`\n  - Passing the server data to the React client `props`\n  - Suitable for:\n    - Admin Panels\n    - Blogging\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n  - Built-in Sass (SCSS) support\n\n## Pros and Cons\n\n### Pros\n\n- Because it is just a view template engine:\n  - It doesn't need to have any APIs, all we have to do is to pass the server data to the client\n  - It supports multiple engines like `.hbs`, `.ejs` and React `.(ts|js)x`\n  - We can use [passport](http://www.passportjs.org) authentication as it always is\n\n### Cons\n\n- It is not so performant, because it assembles the whole HTML on each request\n- It does not support **client side routing**\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom App\n\nJust put `_app.jsx` or `_app.tsx` into the views root:\n\n**`views/_app.jsx`**:\n\n```jsx\n// we can import global styles or use theming\nimport '../styles/global.scss';\n\nconst App = (props) => {\n  // yes, this `props` contains data passed from the server\n  // and also we can inject additional data into pages\n  const { children, ...rest } = props;\n\n  // we can wrap this PageComponent for persisting layout between page changes\n  const PageComponent = children;\n\n  return <PageComponent {...rest} />;\n};\n\nexport default App;\n```\n\nA working example is here:\n\n- [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.15-alpha.10","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-iHpcBrfv97mR6AYwUKbqAV0vruJQWL9LJZ1JwHcMeg6NX09GVPgPPak2a1jPchJu3QnSohAHoTqt2i/CfcwdqQ==","shasum":"ab53322c7aeaa3781dda9b2f1eb77badf878396d","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.15-alpha.10.tgz","fileCount":8,"unpackedSize":17037,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJefROWCRA9TVsSAnZWagAAWXUQAIyl1NmNQ6ugTJy8YHLo\nBxDH6vxFHLEHcp+JS8rh1q7PvjZWIx8Ydp4Xv5vU9MVaKKltusZGqbx3b9B1\nUSjCwdd3vwjlsJgcgzqsyZNOrBI9HiIp9OpqAUk61itADJHs0o1zKE2MS/qv\nuHO1YTXlBZYYWKtEit/7gQD/tjZPmNKtV49zxS7Pz10zGlkKm8OKKorwi0py\nN27wX0NDxaQOOwWWobvRwNP8+gJpxFsv0/PfpvM+X3XMuDBneZU43i2LZUSn\n2QmoZu99WFKw0z3o0Tsl/Oi5Su6AI0bzc93tjDGWv3xO/WlznZEFcHoxGSwO\nSRNWYIsNUZwF7ZEKFj4uo/tMuC3L/gPjCan1f9+tgAa8DtSgJCK5QIkPQxbq\nnM7VSjNwhCXjAu9oVBxKBOr/5diQnn7A/n5MptAq1Ycuflwh9IzSJuE5JWxT\nTVeCUuzLvT6wtRS2ahVFrmKh6tCJ6ZqnuLAyh3kGHsld4a1Q+YQNQ/79FQEO\n94AWIf23uCSg1qgA3BdWgSZE2RkUjUXw3mDlhVy179d+Xb646FHCjQeO2dJ8\nJMWwy+4p22snF765I3ww3D9kkut3ZZF/wJvwZ9sk9Ue5QIHPfqZ3Xxs8AUgI\nKTuWT8TMweRXIUMPpT7y9IooSkb/KEjh86AZQLCAPkljcUqXgt8j1n/ktopn\nJ0G0\r\n=c1/I\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDg86vygV6zgWYFMC1Ewu5mCH/aWbsk2pgxj0Ge6nnW2AiBQYRlAgl4BwZ3AbtN3rwQ4mWARq8vqEWjZbGno3ZgcAA=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.15-alpha.10_1585255317693_0.4258209209668298"},"_hasShrinkwrap":false},"0.21.15-alpha.11":{"name":"@react-ssr/express","version":"0.21.15-alpha.11","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.15-alpha.11+8e03a50","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"8e03a50213d05b8f43e40c09d8e3a6a00111f3ce","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic `props`\n  - Passing the server data to the React client `props`\n  - Suitable for:\n    - Admin Panels\n    - Blogging\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n  - Built-in Sass (SCSS) support\n\n## Pros and Cons\n\n### Pros\n\n- Because it is just a view template engine:\n  - It doesn't need to have any APIs, all we have to do is to pass the server data to the client\n  - It supports multiple engines like `.hbs`, `.ejs` and React `.(ts|js)x`\n  - We can use [passport](http://www.passportjs.org) authentication as it always is\n\n### Cons\n\n- It is not so performant, because it assembles the whole HTML on each request\n- It does not support **client side routing**\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom App\n\nJust put `_app.jsx` or `_app.tsx` into the views root:\n\n**`views/_app.jsx`**:\n\n```jsx\n// we can import global styles or use theming\nimport '../styles/global.scss';\n\nconst App = (props) => {\n  // yes, this `props` contains data passed from the server\n  // and also we can inject additional data into pages\n  const { children, ...rest } = props;\n\n  // we can wrap this PageComponent for persisting layout between page changes\n  const PageComponent = children;\n\n  return <PageComponent {...rest} />;\n};\n\nexport default App;\n```\n\nA working example is here:\n\n- [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.15-alpha.11","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-8BGlWdCKG8gKMmeqfDyTKj9SULjcPwqqpkEUI1r+sGhzcpbkdYj948nc7GHUYWOm74E+4P4XEF20jp+hD6JYOg==","shasum":"ed7a994f3c2db20674ec5a07409f8f8955f0a1a6","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.15-alpha.11.tgz","fileCount":8,"unpackedSize":17037,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJefRkSCRA9TVsSAnZWagAAvsYP/0pADedeQMmyq9dcXPNS\nZXq5XP/2vlDajN2yZ7IuhtQwrPPmx8XFpXWmu8UGR43hh821YgoIDhCpenci\nWMR4uQxAJLMoXR5AH8YYDHSzpAO8uWtjMjuXI8yjlNeyPsppw3MNMYQScB+r\nmqFP8P/2kBWmSnRAofSF+maFtFnNFiqWgcHhm6xfGohTXS4vYb1iuv052toX\niNX5jvhg/C2xp4sr6a37RVbUkbDJXA0HKsAWCtb87GGPxgNqhvfyeI6F2ndQ\nmQGcMePuspFGgUVBnkbFN4ZR0tgJFw21NWLxKeyMZFD/MBA2c5vfsw+8g93a\n8iqXwLzsRxLOEgkM/K5wgIe4qo2o2IL78EFnnc4n7a6QRYZyUwkH2oKqjSs7\nI5rmFxBTIIuGACgDgbfAGAJ4/uQM6i1n9saszmLrJaHyLVSQ8MUKK5TM2jjG\n+fhYlZxU2bgpJYAhaCNF4Wx7iWJexc2U6SPWxURTQWmTnqQeO/N/iiPDCGHa\n8bf1vK5gz5lt7Cg3XK3KuflNOlINl6yCjQc2HiMrAddVU3p3faOB/6gZQtfF\nuHzPIl+Apdtx5oOOJcKSiZsuwJoPMpWQTF4xNUaPZsneT9A4+YrgdPc0FiTD\n6QmE0HKuyMSfMgQtOdFTylnBKijkE6c77FVejhcv8NqTC+5PzpyJZI+XE0H0\nMCm7\r\n=q1mh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDLNuun/wJeR1w+XSPuSzG72kRTJag4ViwBnVNnVpUGQwIhAOQ6DCQ9OQTqGj+nK925FBnwL9D5PBaoEWPv+vD8WZB5"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.15-alpha.11_1585256721980_0.5162903863273203"},"_hasShrinkwrap":false},"0.21.15-alpha.12":{"name":"@react-ssr/express","version":"0.21.15-alpha.12","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.15-alpha.12+6f8b36b","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"6f8b36bcd598f3235a2af421ea09a7252e668d12","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic `props`\n  - Passing the server data to the React client `props`\n  - Suitable for:\n    - Admin Panels\n    - Blogging\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n  - Built-in Sass (SCSS) support\n\n## Pros and Cons\n\n### Pros\n\n- Because it is just a view template engine:\n  - It doesn't need to have any APIs, all we have to do is to pass the server data to the client\n  - It supports multiple engines like `.hbs`, `.ejs` and React `.(ts|js)x`\n  - We can use [passport](http://www.passportjs.org) authentication as it always is\n\n### Cons\n\n- It is not so performant, because it assembles the whole HTML on each request\n- It does not support **client side routing**\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom `process.env.NODE_ENV`\n\nIf you set `process.env.REACT_SSR_ENV`, you can separate `process.env.NODE_ENV` from react-ssr:\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"cross-env NODE_ENV=k8s REACT_SSR_ENV=production node dist/main.js\"\n  }\n}\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom App\n\nJust put `_app.jsx` or `_app.tsx` into the views root:\n\n**`views/_app.jsx`**:\n\n```jsx\n// we can import global styles or use theming\nimport '../styles/global.scss';\n\nconst App = (props) => {\n  // yes, this `props` contains data passed from the server\n  // and also we can inject additional data into pages\n  const { children, ...rest } = props;\n\n  // we can wrap this PageComponent for persisting layout between page changes\n  const PageComponent = children;\n\n  return <PageComponent {...rest} />;\n};\n\nexport default App;\n```\n\nA working example is here:\n\n- [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Starters\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.15-alpha.12","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-AzxFI12Q+vIagfAiZQ1Ad8vy4/Z6wlBZtLGzPijLxfuo4+VOGAJvz2T1RYzpO7D6Ntuv2TqVkifnFv6XjM/IGQ==","shasum":"91f26e1ab723654dfb88c1fa1908be5b6f432e58","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.15-alpha.12.tgz","fileCount":8,"unpackedSize":17303,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJefRskCRA9TVsSAnZWagAA/DcQAKNp41+iG4f9FmljxEhT\nEFX5K6mjQw2x3X8zCNDL9mT9MPrUTtL987vP88/xx6SpZf9Idteeo1Uty9+P\n6THFj77loTcW5Rfn2hnIFLI6w5cyY/vaVANCcSnJRsDirmgttqKKkN2CClgt\nFqcq8cXIoKElwjyYPICpup61aifZk9+q0fAU1oVVHFv1QrjiMXLM+QtBXRDi\nx1H7zJshhxahN4Voedc1bMT4R8ZG2UKpe8N5kg2x772iGwd+o0Crwe1M/DSf\nRyB1CzQYGnTm3zUqZFpIVVB30AShcs7hFbqWxtusNcnd/fRqo67uzFATE61A\nJj9bgk9N93nGs3NYUo/HqN/Hu9JYBFU8maE0eNDzzgk+4zFwVnBNu0lKuyFZ\nQcMHZcPbJoSyzJWQ8UXepCrp7CUfTpVWs1ZbCNz0X17/JU2ZQViZUKcr6CuX\nUCIJk9fo+4xoMuahiLn3lX1x/NIorHOKHj7c1swjyFdO2L8YCy/frdUyTRWz\nZDPmGXBjyZtysYv9wSmsDTirM3cINnS430Qx18IHtpKWotKJ5wfjOEV0a1JF\nB5zgU1UeAUUevCqSljMbODxoXLI3jZakqa8sUrX4QXeHFvroBReiFmp6D/GW\nKsOrkMHvJ0jpc5KC0dL3YyNvVkaj42fwI4dsCWhYi4VG68Yf5zn5hWyM0gqh\nHgLJ\r\n=hsgK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCWnxlbiYsbgXEjJz9gYCQsK5ldZtL/xu4Dnvkr57DTwwIhAImYxHWvBoWO9X0SgsU+u4OTjj00zvXtX4Ry+xdqBkLS"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.15-alpha.12_1585257252182_0.027201499544855068"},"_hasShrinkwrap":false},"0.21.15":{"name":"@react-ssr/express","version":"0.21.15","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.15","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"6ddb0f387f3e1bf25c2874e21789935ccd5cbeef","_id":"@react-ssr/express@0.21.15","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-jcjeFQBLkQbQJcQbWde/JTKxrQNsrmptfhp3NBHq+jpfAHjTlp0vPvD/LE+I7B/b5mJpioMuZ7Aq5y8fGlUCPQ==","shasum":"e2875a36f2b4e56e6878a837608f479f00d8479b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.15.tgz","fileCount":8,"unpackedSize":17269,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJefRweCRA9TVsSAnZWagAAFSMP/iYsfeRB8NbhDcjSuXRa\n64RupKnvJxtM7URXP/o6nZpU8j/Tjof7WEUbXcejtQ7SX6GPH+Ji5H0+g8lr\nMPjgbyUoioIBNprLIFrjeYL33m8aGq/gaK5Kt87N7xEojYasXvP/wzr3QGuq\nPQlA2ViVmLo8WMCHpBLQUFNOcpEDzSFrgwubCe2Ww7WAZC8743dwCoQXvKqV\nT+FHvKqrZl6skY7U9S/BhYzoLI8WxfJuAj27TqmPkNLI7Gx94q6SIfixxP31\n9hYmqlalG8fxPm4mv3ahOs/zvukOQ/fO8xkwu/JpFz+FGhbVwa5gaXV50hIo\nRAFRrSurQC+I8lVHaE/KWg2J9Ki32AVbMcLc/d6PlF/Qvc0bMd+s25lzAVIw\nIFhQttbqGU2s6gyZoADo/wvcnR6BCLEnpOCOvUyR+bzdgk25s3v6PY5E3TXb\nUZMwd/O4mH2vewgNJ/quo6bU1EzaGSPyLXItPtHEVnMZryG9ZOijyWyo2Qux\nLjCzspHQIqkA+6gdfhGqhvkgm8EwKedPjKHgHhJ1BU1l6Ul5DGPy0m/4D82R\nTyqnoB0LiSoXQHJwr5N74GPiGBXUKq33S61BLQWma+tG2dctRSEZK/onWkLO\nQ6CYFFr1D9DgnFDek08JTaZo+jqbwGeOa8Ew/AJAkBqUpCIhZHXrNF0RUO04\nwLDH\r\n=kMm/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDWLo9KLiVfFmY9RFNIJsUm7tH1celrXwfB+xmwrm0YdAIhAOKUdxNM3DoLCTSDfcoY1lNEPZ4z7RUAn+TemaTXWpdq"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.15_1585257502381_0.24930638085578405"},"_hasShrinkwrap":false},"0.21.16":{"name":"@react-ssr/express","version":"0.21.16","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.16","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"b974f353c6169bb387938354c2c1b673cf89dc28","_id":"@react-ssr/express@0.21.16","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-eUMnosUYwUPkRhrtL//YqTc15QbYHe33kIaPn4fVSJ7bP3gyw1cfDxuh/F8w84giR/m64a6HuCXnxg8IXZjUmQ==","shasum":"72be8ae9a6f551b442a6b42e4b7a3979386ef28f","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.16.tgz","fileCount":8,"unpackedSize":17488,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJefXx+CRA9TVsSAnZWagAAOscP/AoJqqGtM989X47dKwLy\nS9WMu5HXjzXqSMibL1HRKuhgjbcjZMq2yXsPQj+OL2PEf+/Q4OwVxS6VQxlU\nhqODgilBSbtA6XltvYqF0OvvWJw0++lzhP3TDYBQnTTme6YjPxe9LuihsZzM\nk4EChE8+xw1rUPY0BkV+0CAsww9dZE3atsHGNJfS5C91yFA1vXMgSZkKK4uT\nlcyep7l8QNhWG4KdmgvVhaTk85KAnk5MLZ4QorWsadcGCf6QCXBEYFLHJTln\nUMBo1Yq4Ey3Mh+pj7NOTKJepl9WJl18yOEpgjTjIgfbyKvAvGKQVRH9VoVVG\ndEQK+2jZFGgCzhAM4yVdbCI2d7bT8AGUvso6zpfR5kdq/v8mOSo3JSIH3nmt\nHH99Rff5okhXGmaEgut847tYwgcJyyX33LTi942j4EesX2DCjcfPFNJAN+DE\n3g35IrZCkKU7+NgqVapVJVmPpUh9GLtLPtpIV5qDR0FqQQOhCqp1DTbguRfM\nMWYAQ9Ct91Ypboj4gakIkwGV35M30JYfe5ZUpvQoknePxdkBELl0ZepJzWKO\nwe/zvH8xLnFlmBt/f48UqwquObRD0GYYa6u6s5GxK4G1c53YaFgz3iWVaSEV\nONW8258ntLUQ1/6HUp4z6OguquZVmLbPHOVWAQMG2XXi6hBOvqGW4OHBGo3A\ng2rn\r\n=myl7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEfLK7MVaAH3y1KgAps2TGOaXaW/ExJqAzOuJ56ccu3sAiBfRce9xnjG8PkzPaHM/XS3nr4inMO0WPtdIyGNmUzs/g=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.16_1585282173704_0.6129251945059593"},"_hasShrinkwrap":false},"0.21.17-alpha.2":{"name":"@react-ssr/express","version":"0.21.17-alpha.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.17-alpha.2+2474884","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"2474884164d5434bd1bf5f85418282fad9b647c0","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic `props`\n  - Passing the server data to the React client `props`\n  - Suitable for:\n    - Admin Panels\n    - Blogging\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n  - Built-in Sass (SCSS) support\n\n## Pros and Cons\n\n### Pros\n\nBecause it is just a view template engine:\n\n- It doesn't need to have any APIs, all we have to do is to pass the server data to the client\n- It supports multiple engines like `.hbs`, `.ejs` and React `.(ts|js)x`\n- We can use [passport](http://www.passportjs.org) authentication as it always is\n\n### Cons\n\n- It is not so performant, because it assembles the whole HTML on each request\n- It does not support **client side routing**\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom `process.env.NODE_ENV`\n\nIf you set `process.env.REACT_SSR_ENV`, you can separate `process.env.NODE_ENV` from react-ssr:\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"cross-env NODE_ENV=k8s REACT_SSR_ENV=production node dist/main.js\"\n  }\n}\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom App\n\nJust put `_app.jsx` or `_app.tsx` into the views root:\n\n**`views/_app.jsx`**:\n\n```jsx\n// we can import global styles or use theming\nimport '../styles/global.scss';\n\nconst App = (props) => {\n  // yes, this `props` contains data passed from the server\n  // and also we can inject additional data into pages\n  const { children, ...rest } = props;\n\n  // we can wrap this PageComponent for persisting layout between page changes\n  const PageComponent = children;\n\n  return <PageComponent {...rest} />;\n};\n\nexport default App;\n```\n\nA working example is here:\n\n- [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n- **@react-ssr/express**\n  - `.jsx`\n    - [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n    - [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n    - [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n    - [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n    - [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n    - [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n    - [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n    - [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n    - [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n    - [examples/basic-multiple-view-engines](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-multiple-view-engines)\n    - [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n    - [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n    - [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n    - [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n    - [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n    - [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n  - `.tsx`\n    - [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n    - [examples/with-tsx-redux-todo](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-tsx-redux-todo)\n- **@react-ssr/nestjs-express**\n  - [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n  - [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n- **@react-ssr/static**\n  - `.jsx`\n    - [examples/basic-jsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx-static)\n    - [examples/with-jsx-static-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-static-bulma)\n  - `.tsx`\n    - [examples/basic-tsx-static](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx-static)\n\n## Real World Examples\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n- [react-ssr-redux-todo-app](https://github.com/saltyshiomix/react-ssr-redux-todo-app)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.21.17-alpha.2","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-McwjVPhKbZC6YhL/qLnA4Zj6DichgpFWydDuh/SvvLAjYH3HJ1+Y2TIzCLrzRz9RVDR1SmK7EpqGZhUQ9HYmXg==","shasum":"40f32f9be017264e4e988a8c6559d51c44204d92","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.17-alpha.2.tgz","fileCount":8,"unpackedSize":17650,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJefflbCRA9TVsSAnZWagAAgcgP+QBGfgbr9dwm3JAbJ7rK\n6jHaU7HPGd5mT/8Cf2abi9gIzjtG/FPGmTekNeULkvotuVoobQJedrxk1PG4\nblXvfTa2zCrzHP/vSN5mpIpqptIRpRAwI+q0kx00xSUcERxiu4d/iUV/SsUD\nzI9fokZTKhAhdwb1zb/jFz+DT0IGR3kWGtDRl+TtC3TwDDPozLAVaBvI6L7e\n4WFg/cjNQMcIragGuJosHvNaipTI5hjGBOD/dL5Xmc/dEIvDme6xY4MFwlke\nHizA7Jm9vlSvYsnyNu8VAEX8vDThoSCVFek2zF8TgnzdTcO9jITdQPkM37KV\n9ez58MhxaqeBlxxGCSmBVHE9BfzJgYyTHfp6A5OSP6KRnU3qiwoX1C0MaZF+\n+ZgUPCjTt++kYoHDeClum6gpcvGh2PLNIDX1mkAdPJdEskkCjsODPfw7AEuv\n0uyZ2Eh7GCDqB67JtsboZJt0TQ2A0SrMMF44wiXXFkdLUSH9PeEjmQhQj+g1\nzU2WXMeZLnksdZanHDjTeKOOV4Sgtn1KqXQCwLlqqX4tlfaJi2GRw4yReZ8V\nu3Fqz2A4ZY/N53wn/fqgzTli7tz4dgCydi6a+cBu2xE6wcUmcKA57OgWovaR\n6jaAN9oAAPfp7HL8wzdyAdSWU+34jZJeoPmfz1SM2X9uA+dQYLnKhLmQLBHi\n27+x\r\n=jz36\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEH7nMK5P0jCkfhz3OZGoYgO3BW+WqRHMFQ5xp2xkJy8AiEAxHkUXzubS7j0lTVl26/RNH/EV0qkJSHmjC5qgU+sO50="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.17-alpha.2_1585314138931_0.051982795862899334"},"_hasShrinkwrap":false},"0.21.17":{"name":"@react-ssr/express","version":"0.21.17","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","devDependencies":{"@react-ssr/core":"^0.21.17","express":"^4.17.1","react":"^16.12.0","react-dom":"^16.12.0"},"peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"aef50e23ab7b49d9419cc5e12780192d6df14e81","_id":"@react-ssr/express@0.21.17","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-h+QTfNpLAqzMbeCPwoEm0A/EEgczfAg9PmQdLbyOEPw9iJYZpZHJyKsUurjyjdgOeaJQTjuRv8BfeZx6YhchWg==","shasum":"6dc3488f230424ba7b3c8b51cf3a59d57d0033d8","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.17.tgz","fileCount":8,"unpackedSize":17618,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeffoeCRA9TVsSAnZWagAApGUP/2kD7vzivBHOs7O9UGUf\nwkLX6zWC09hrlecn3u3sNiioDlyUuC34D1j+TE/lSIdVNPLX6jGoHUHDS3o8\nxmQow/W+01XT5oukcztwhPza8VPCZA6Y1QBiyF4cWsmPj4okE9k0xfUQ32+n\nk4iaUeCq0MqXltp8NrTwT6bKP5WPIVWTTRA2uAw4VfB5zQl6B9VZYdY2X5OO\nnb+NOBGDygakTOuK+5lWG2VutciB58pz1MgJ0hiCEZnq2K0CMkCj0a9jaDwq\nlpnxChYmEgCIfnCR282Qwx5FuXZLPdZuKrjVN+Y5te1stTzrXgB7mjsLjUOV\nM2ab3hlJIsT2d4GIO3RoeHbs37ToEO3oSiEM1hn9RKrDDdKdNNVLEPUn/8OH\nxwxorvVJ99J9sn7pA8bt5UJ1R82kDE64wc+zsVRF2wwznTdbBOiYVGCYHTJ1\nmUcEcWoHtwzXD796wzHpaX19t9rgdjBUkLwdbvGzTxXFIo231nxr09msCLR/\npHMrjQJfz4uJT1zmb6fZqFWYvYC5s54Gu8dLB/IVZGbSWbae0I+6yrmLxQnp\nmAlfVz2fArxgdYa4ZEgmYNPAPe44G394cPkVInxWi0MZI7l9k+s4I311Ob4c\ntwYDVhglQvvhp56TYjUDqLogMd2jIVvX/GeCnurwY9xMcBNMq2m22Vxz+r3i\n1LYK\r\n=dJBm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHq/7NQBBYKVHslYlDPI/mUA43/9Ij29ByI6NVx+w378AiA4y8DDAJ/FP+9VLS3bMGv4q7B4vZ81rJ1yp0P7jfSx+w=="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.17_1585314333570_0.6266481034160669"},"_hasShrinkwrap":false},"0.21.18":{"name":"@react-ssr/express","version":"0.21.18","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"0dd2d24de76527ceba13edbfe1b56719d32408ea","_id":"@react-ssr/express@0.21.18","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-Vv8v4b+ZieYVCGkhcykIQIl42ohBTxYS1lyfaWN7uPY56rOn76B0HCdaBS/74bVqWYxxwdCppexVXGXAcppQ4w==","shasum":"31d198ad3933c4c3bd6c14aa5098eb277997e2c5","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.21.18.tgz","fileCount":8,"unpackedSize":17132,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJef75cCRA9TVsSAnZWagAA5YgQAIrYYz+V1PRhNxozJaaY\nfNs/cP4XFhonEwGCQ+DKlsER//d3dh7UC/O6B4ebGecTCTjesRFcjShehYkV\n7Zx11j+RYxy9cM3N3LBYzQbuHRG/b8koADb6YbaJ92of1eCaXtluSb51DHZh\nRSTvkxjOxo3pWNgZJd6pQlUuqGbo7rnVYfXkM/quR+X4OvUxOJJEbE3q6gtI\nLDsP/yYkkbgDG0p/FBMXaNaHmv4lFArq0og0rfIJGbWdsN4X0r9YTpsCL918\nF37e7lAJ6gkXKXbTN5w5J7obA2RArE2Qb/iZXGHcbSal6hmjRSiA6Qjs2MUI\ntl8iRAk3CIaDl/VTAFd03jwjsVw7pwHOVov+KH73h/TLDrHwHgzZs76ZkhU2\n7b0IWvhVLtOgeBWd1sVWIPl6VaUZ8LQI9s4wEzem0LI5Lic1DtKEZdZ3bGWX\nTsuhlnfdLk275GMlmXdPblKMhLacZveh5Iup9+k+zXOIVikh20oUeb9wEthm\nGsJCNvtBIoqKQ6AUcylh8vdp2sWZIq0+Z2q9JYq53xyTLCQNBAKtQu1oVOHf\n9lK2PuobKS5SN6waju5wYj51ViPI7iL50lmZUTAb/2KoK6UIrKHfO+nQuBa6\nNnRGpL80S8gpTK2bx2iiBupdDy55GVq4SGxKV+kK6nwXnwvU0Ft//QjsKtTm\nQ9Qf\r\n=jek4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDlem1koYsLqGLcizjV7ii3u5vYiFdIVg2/nbCQ1UUGBQIhALeXYINHGT/O5iuSt/tQeCc2QQgaO9W05ADfTAipfjbX"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.21.18_1585430107742_0.2770994973766807"},"_hasShrinkwrap":false},"0.22.0":{"name":"@react-ssr/express","version":"0.22.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"00bbd456f0572dcc5294c7afcaf5bc68e3b08d3b","_id":"@react-ssr/express@0.22.0","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-AECLZxp1qADxYGFHKSR+yNhupPzpbH5hIhYvx6qd5i/LMPPlC5Rot1Ru40G1UnyF8rQAjXQaOw9tI7Naezr7xA==","shasum":"de8bf3ffb63b1cc8407f0b50170f1ef5d4a545f8","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.22.0.tgz","fileCount":8,"unpackedSize":17131,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJegIU0CRA9TVsSAnZWagAAbWsP/0S+o8LiZwhLf/ICWr2L\nk3QttqL8xXhL3vu3tb0H5k3Sd1L9HUzzD4PoCwyjUCx3YOAVbCkCcprVTkQ/\nfKINtk6/ypeWRllI3+J+cV0c3x8NMRTro50TmVg5RHzakJA8BruhYNv7k6Te\n3pviIzcfIwjRaoui/iZ7evpMh1aOR6kzyfZ+eNLW8Jma4Z9nJWzh9e/AO8mg\nZimzixb2Mhgi+jnSc7ewktoHZ3IRi2RZV2f2phargHub5nZIofyMwMUT0jtL\nwZ8PqiX5rnQKs/i3+e68uv1B14W1MEfqYS56JymGPTZDMYygyDrcvgYHNQSv\nDEUjwLNPk2ezXO+btVZGv2i87nwJ5K03UGcrEPHXnuuHMoFlnDwE0/W1nSk7\n8oasSUhPDcQN5Yk7VodJAYP/qJ15tobn7qyhgx46DxxTpLteVy9G1WAQ7tub\nmCv+W7FyxPhRFg5t0Xnx6ZD5vc2yaV8sVHyduiYr9zcnq5qUHH1UA15Pb8fO\nq4x/4gvq8qUC96IkHz8Biq9He3QVJ9doSWjwgiY4pMt4RAKX78EjLV2NE5S0\nj5Ygz3OwFq3zatQC/ell315vLYaRAQ4wspLMzIwwJL04m5+ARCJur5sLLqps\nX6pUGhWPeSCg5zvIEwwkpvBXIO7EdCa3iWCzFM1ooT4dv/LzH0JrbMKcYB0J\nGAn7\r\n=k8nC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHhk+vsz+9JzZZ0YjqgE6zLT3PzNYo8OPEtQyXZLunmpAiEAq+vdNbPFCOoeGddKbMFBsREKiXY/UrcWGtvwb+tgPw0="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.22.0_1585481011893_0.8925893170100594"},"_hasShrinkwrap":false},"0.23.0":{"name":"@react-ssr/express","version":"0.23.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"52e2ac772bc00dfae297d0a115303bbf4056b9da","_id":"@react-ssr/express@0.23.0","_nodeVersion":"14.4.0","_npmVersion":"lerna/3.22.1/node@v14.4.0+x64 (darwin)","dist":{"integrity":"sha512-OksT6FA4Rzz+2Ky3njTtlLtBpvw81lJjdUkC14xgVoZ1uwTNctb6LGeZNicWgZb5EoePg0ZJkhcrs8tn+ctioQ==","shasum":"4274caa29bf783d4b66c4fbb75c0518bbba97cd4","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.23.0.tgz","fileCount":8,"unpackedSize":17131,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe4IIgCRA9TVsSAnZWagAAvL8P/j/8LyUVZ5UYz0wZpaq2\nBCkUyk+1+bagLAxwoYEd5hJChdyMGEzu9Gq7LeeT8IoMQ1YluSNg22NBRXbO\nAzefiBeEwz2jBrSaKJrU6JwYu6lsfTLXrDkH/pTn4qf2mt88GlZu7GO6qmT3\nOdJ90RCsslIOTrRYA3kmH1gJ0jFjHJ9VM6hR202qjDgAGtnfKShrWQkHJV+q\nRN4WGDFIS/xWcISvvO+Fws2jmcDyPNWfcmjhX2Jq1uu92gKIz7PzbhtmiCJd\nm+mWL/Vs90BoAnel3TqV/mCS3VqPqjHmNP/EqoxkcyuqZpCzah8Vya/xG3qz\nAvtJDck9JvRQPiGb+GxOnQQT+/CKDvm4c4TDTfKc7r8SdOrUF92pRvIaf4ZN\nalkqSz67Vxn86TU47+JpMAxplR/nRBetehHXjFdPERmBcyD3qF/PErHPQqKw\nt0iO+Ydd61STPhrMcJiWcSZfxLZOXXWCOrk6BsGgFUTOwsHqkk2iGTl0G7WB\nbSVzxcEmn08J58CWjVQ7W3I3NI4KWVp/inhV2HPQtxJcBPTNG9K7NKhiAcik\nRqWNXGy9rpqnRMPpTOmsqhRGuRLzjCARIUe0LtfAFPZTzZR+re2TnFIvGKCb\n5TH547ySCRlLjINfReaIt+8fiZw0FtYkXSeNp8d6Pb9aynGV5NIynhuYTW09\nfJS0\r\n=KMiw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDndhkfADs6ijbGWKkEe3/yqY8TMWrGMO+I40RXB6/plwIhAPXM6Nu90UNeuBKt2Vn7Ve/Xyqx1kMtRJ08lv8+BKvhG"}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.23.0_1591771680127_0.9720359062436033"},"_hasShrinkwrap":false},"0.24.0":{"name":"@react-ssr/express","version":"0.24.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","peerDependencies":{"@react-ssr/core":"^0.*","express":"^4"},"gitHead":"8fff8d68212ed10d563fe7b9b0de6ba7000c8bee","_id":"@react-ssr/express@0.24.0","_nodeVersion":"14.4.0","_npmVersion":"lerna/3.22.1/node@v14.4.0+x64 (darwin)","dist":{"integrity":"sha512-LCkJB43qdz4ZPIyHbXzBCAtFLOVbGL6E7mWOVCUq5ho08REPpVsj5wrpCb5YHvASXw863KNvUutEl5As8R8yvQ==","shasum":"c274840121a4da8d5415c6e8db9030b8de30c6f2","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.24.0.tgz","fileCount":8,"unpackedSize":17244,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe7S7yCRA9TVsSAnZWagAAWAIQAIqU2tLUvyhEE6dua2AK\nY9P1aKLguw/y5CkQddF0hKGXYAGnnSd2WUPHb+awQ/jTi/E8dIVduaBFHP6f\nAhnC1qhpe4BbN0sNsfwqwyCbnNiBVagIp3d5aOr3PHf3dHFbgWiG5c3x69G7\nhMvaZ2VTfVFpJGyW8u7zBrz0gwVbz/i6NaY/UhHuUstVfMgjxvTes5dRuy+e\n30iYHWMCSyPzsPCnIuhaEc8c7u0BvOBZH7bxUsymISj6vjDPUVIxGakPOX3S\nxK7eM4zg5q0SLOdxUlwgo839/4/v3D7KFWHSSyhz/HARq191da7eNS3TDeE6\nWaHgaeKFc6m7WMyRrzprek+WPvBYPounCezTOmOCjCNyDoI0GOyv+tcS0NrJ\nMUw6AcMdoDd0Y/8TX/bYArJ5AA9IoHYFVo9rTCsvThr5QPF111jxnRxBZliE\n00sYQwkXdyHP3+guTn7fEjIXBJcHtzcy3U83OHRkcR7paZDxBa6AZLgmo5L4\nKZd1BCp7b54LZ/0z1Nr3G7U19ox6ORT5xCJBZFiHh22xqBebpNCC4tOmh4Xl\nbghjIYFl2FRLhwOtdtumaAuQgRZ07bJJMulVXVriBz1I5zeJ2HPlQ+s6Q3dP\n/HRuJaHf4gOkMs2sIz+/rIoJJrXUY/v/Jf9lYLP4ISnLfXwETF0XXsA/iwj4\noIXx\r\n=+/BY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCvrww2DYpdb1XQfUKfiOXcWIIZMJR4O1nko1mSbYs8EgIgMDmffJCvq/HcvrzQeEINOq3aEl1dASR0ExuOhVK99t8="}]},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.24.0_1592602353923_0.1728903925435814"},"_hasShrinkwrap":false},"0.25.0-canary.0":{"name":"@react-ssr/express","version":"0.25.0-canary.0","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","peerDependencies":{"@react-ssr/core":"*","express":"4"},"types":"./index.d.ts","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic `props`\n  - Passing the server data to the React client `props`\n  - Suitable for:\n    - Admin Panels\n    - Blogging\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n  - Built-in Sass (SCSS) support\n\n## Pros and Cons\n\n### Pros\n\nBecause it is just a view template engine:\n\n- It doesn't need to have any APIs, all we have to do is to pass the server data to the client\n- It supports multiple engines like `.hbs`, `.ejs` and React `.(ts|js)x`\n- We can use [passport](http://www.passportjs.org) authentication as it always is\n\n### Cons\n\n- It is not so performant, because it assembles the whole HTML on each request\n- It does not support **client side routing**\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom `process.env.NODE_ENV`\n\nIf you set `process.env.REACT_SSR_ENV`, you can separate `process.env.NODE_ENV` from react-ssr:\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"cross-env NODE_ENV=k8s REACT_SSR_ENV=production node dist/main.js\"\n  }\n}\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom App\n\nJust put `_app.jsx` or `_app.tsx` into the views root:\n\n**`views/_app.jsx`**:\n\n```jsx\n// we can import global styles or use theming\nimport '../styles/global.scss';\n\nconst App = (props) => {\n  // yes, this `props` contains data passed from the server\n  // and also we can inject additional data into pages\n  const { children, ...rest } = props;\n\n  // we can wrap this PageComponent for persisting layout between page changes\n  const PageComponent = children;\n\n  return <PageComponent {...rest} />;\n};\n\nexport default App;\n```\n\nA working example is here:\n\n- [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n### @react-ssr/express\n\n**.jsx**\n\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n- [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n- [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n- [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n- [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-multiple-view-engines](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-multiple-view-engines)\n- [examples/support-yarn2-pnp](https://github.com/saltyshiomix/react-ssr/tree/master/examples/support-yarn2-pnp)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n**.tsx**\n\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/with-tsx-redux-todo](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-tsx-redux-todo)\n\n### @react-ssr/nestjs-express\n\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n\n## Real World Examples\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n- [react-ssr-redux-todo-app](https://github.com/saltyshiomix/react-ssr-redux-todo-app)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n\n## Contact\n\n- via [GitHub Issues](https://github.com/saltyshiomix/react-ssr/issues)\n- via [Twitter](https://twitter.com/saltyshiomix)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.25.0-canary.0","_integrity":"sha512-FdY5D1yHkavfGJiX/+VZVBY9xMq1qaRVb84aCiwAra/MFSTZB7XaPB2cGuCBE/GMfNN36R0y4muCEoYcVFqWWg==","_resolved":"/private/var/folders/mv/4xdry6ln4sd2lpr2ys20zj1m0000gp/T/b8b942f566f3bcc3c298620680164344/react-ssr-express-0.25.0-canary.0.tgz","_from":"file:react-ssr-express-0.25.0-canary.0.tgz","_nodeVersion":"16.17.0","_npmVersion":"8.15.0","dist":{"integrity":"sha512-FdY5D1yHkavfGJiX/+VZVBY9xMq1qaRVb84aCiwAra/MFSTZB7XaPB2cGuCBE/GMfNN36R0y4muCEoYcVFqWWg==","shasum":"d673bd328da82670afa03fd046da4fefa3caf87b","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.25.0-canary.0.tgz","fileCount":8,"unpackedSize":17191,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDFWHBWxMedrQrrlfZpAUDxlszYwiS5cowe93l/M7mYSgIhALfMk9OQNckr/FD9cf3O7nRSYw/Pgsdvg6k87gVoyBsh"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjELd2ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo9Pw/+JfbY9udN8zFStV42l1LsGqZ/46216Dsdbs+301iKS/89kIm+\r\nKhyLBfp9A1ptaJe0sbcQJMDiCRa9Es1iHIMyTf3MDUDqiU/cL26UUexfsVTx\r\n+CJPl/riaE970DMI+gOJQvrJ8mxMD4XLxHnv5GUJuwUmiKbYvJj7HTz8NWza\r\nclw2T2+jsIZJJ1zNh07+1OYjwWgoHshjiHg6/z4DRO33OC9uVmDioeMxb+At\r\n/HBgEtt7ufWGgti3FAqkivA8JxIeV3RuGd32xuH98L6+1cqeUweRRN2Zx2D0\r\nr+vH/QEz4Q+ksiChnvW+1L7SujwANaV3mU7eqVcsCtLIu3TE4tlf2GeF+Zep\r\niH4Ek1mntT5O+/GC6nnNe2gQrLpVnQibK3p9BGbRGttVoGQIy6yyYs+mBFDt\r\nCH0rT0neF6fY4gzdBZHWhSIYBxKjCHescA4W+dDJK4AxcV34euwXJ7TiHTLS\r\nFxzfhOmxGh71Kqm4cW9JWQ8S7WH8xv3ADTBaZOPx73RbKJnKtXu2A7MgvKR1\r\nF3iHbXqLF1KqjLct7F/pwqrCo4VECdIeme81WGb3vZmaB6uxKmFrmM4cJaT9\r\nJjODvHqM8KccmUJHU5kB6I1eNDp+36Q+OXZMAwQi+jeKYTgPfTxvf6GgRTHE\r\nLZcrzbKyLHb+7f1uKVy1w6FiTgKb8qx3lc0=\r\n=NojO\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.25.0-canary.0_1662039926130_0.5135939602888411"},"_hasShrinkwrap":false},"0.25.0-canary.1":{"name":"@react-ssr/express","version":"0.25.0-canary.1","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","peerDependencies":{"@react-ssr/core":"*","express":"4"},"types":"./index.d.ts","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic `props`\n  - Passing the server data to the React client `props`\n  - Suitable for:\n    - Admin Panels\n    - Blogging\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n  - Built-in Sass (SCSS) support\n\n## Pros and Cons\n\n### Pros\n\nBecause it is just a view template engine:\n\n- It doesn't need to have any APIs, all we have to do is to pass the server data to the client\n- It supports multiple engines like `.hbs`, `.ejs` and React `.(ts|js)x`\n- We can use [passport](http://www.passportjs.org) authentication as it always is\n\n### Cons\n\n- It is not so performant, because it assembles the whole HTML on each request\n- It does not support **client side routing**\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom `process.env.NODE_ENV`\n\nIf you set `process.env.REACT_SSR_ENV`, you can separate `process.env.NODE_ENV` from react-ssr:\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"cross-env NODE_ENV=k8s REACT_SSR_ENV=production node dist/main.js\"\n  }\n}\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom App\n\nJust put `_app.jsx` or `_app.tsx` into the views root:\n\n**`views/_app.jsx`**:\n\n```jsx\n// we can import global styles or use theming\nimport '../styles/global.scss';\n\nconst App = (props) => {\n  // yes, this `props` contains data passed from the server\n  // and also we can inject additional data into pages\n  const { children, ...rest } = props;\n\n  // we can wrap this PageComponent for persisting layout between page changes\n  const PageComponent = children;\n\n  return <PageComponent {...rest} />;\n};\n\nexport default App;\n```\n\nA working example is here:\n\n- [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n### @react-ssr/express\n\n**.jsx**\n\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n- [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n- [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n- [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n- [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-multiple-view-engines](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-multiple-view-engines)\n- [examples/support-yarn2-pnp](https://github.com/saltyshiomix/react-ssr/tree/master/examples/support-yarn2-pnp)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n**.tsx**\n\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/with-tsx-redux-todo](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-tsx-redux-todo)\n\n### @react-ssr/nestjs-express\n\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n\n## Real World Examples\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n- [react-ssr-redux-todo-app](https://github.com/saltyshiomix/react-ssr-redux-todo-app)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n\n## Contact\n\n- via [GitHub Issues](https://github.com/saltyshiomix/react-ssr/issues)\n- via [Twitter](https://twitter.com/saltyshiomix)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.25.0-canary.1","_integrity":"sha512-Xy/65fWTZ7bSE2nPtCYSIUIFLUhCM91sZpZdURJHcVUpqQXOfVpfQMJDuAbJWoWkGRtr1oCvePNE3JiZjQZ1zA==","_resolved":"/private/var/folders/mv/4xdry6ln4sd2lpr2ys20zj1m0000gp/T/76f740d2e09de8487753eaf9fd28b76a/react-ssr-express-0.25.0-canary.1.tgz","_from":"file:react-ssr-express-0.25.0-canary.1.tgz","_nodeVersion":"16.17.0","_npmVersion":"8.15.0","dist":{"integrity":"sha512-Xy/65fWTZ7bSE2nPtCYSIUIFLUhCM91sZpZdURJHcVUpqQXOfVpfQMJDuAbJWoWkGRtr1oCvePNE3JiZjQZ1zA==","shasum":"60af2181bb21c96fc1e13efabd809dc7f308860c","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.25.0-canary.1.tgz","fileCount":8,"unpackedSize":17191,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF53DaYT8TuX//cEIA0rRN9kF5miyh3epUfFtGOXdxyhAiB4YBHCX4WsrtEns1zfeUWeo4tr9u5ahASlefYn3aYnGg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjELneACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp/HBAAjIrp49jDZRlvh8ZckDI5ILGTWwjq61PqLM6NF86NkmdBJvS2\r\ns6lC3m17P2kFmQ9V7nd9gfgy7lQ2XQuq/FYuTHb+JxaVRSzz3CWfuQfJghyr\r\nbRJKbI7KDLJNkXgXjNYxbS68uFr5q5CcR+tiEdiJkHj0pnDGsOooujCwkvWu\r\nIlhZjDgrf7eZRbuDl/oovLHqexfpsO7/A4stP0LbklVVofscCJfmvhrU0qtu\r\ngI3ooKtmPrW7FGJ8RnR2JdU1D01vL/gPOfH89k+i4978a694LSurGyehzgVT\r\ndxuGlMW2GZd2tIrqhXySObEqLjMRiXk2e5WAnH+EPN4WJIoqlNtfXpX9f/i6\r\n5fqATJZVo1EIHNTLCmBzoFVsKICPFUV0zq5vTGq0zA4075zlzHoZPext7E8V\r\nj86k+D+B0V0hg9JLvNrnz/xyo3l4/mdJP2wMJY6PFGTMKSo+LWSSNFicJb9j\r\n4YhtYZUB4GIqYLGxZUDeECEo7qlf+0IICwUkGYryeofPQu+KM4tJpJ4plY+k\r\nQSrtFP5y537u0nPXZiINKZHACx7z97fUh75GISbDkd19DNVVS0nG7CpQW+HL\r\nq2CUdcLP4ZJQzMMiWJUSDxCxWvijefZsBFdRAH4KQxBu9cXUXxfdtq/Jhbtm\r\nVcyUpLfcAcx32kthANbIA6TrnRXDACSoznA=\r\n=+lgF\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.25.0-canary.1_1662040542526_0.5542682159994985"},"_hasShrinkwrap":false},"0.25.0-canary.2":{"name":"@react-ssr/express","version":"0.25.0-canary.2","description":"React SSR as a view template engine","repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"license":"MIT","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"publishConfig":{"access":"public"},"main":"index.js","peerDependencies":{"@react-ssr/core":"*","express":"4"},"types":"./index.d.ts","readme":"## Overview\n\n- SSR (Server Side Rendering) as a view template engine\n- Dynamic `props`\n  - Passing the server data to the React client `props`\n  - Suitable for:\n    - Admin Panels\n    - Blogging\n- Developer Experience\n  - Zero config of webpack and babel\n  - HMR (Hot Module Replacement) both scripts and even if styles when `process.env.NODE_ENV !== 'production'`\n  - Built-in Sass (SCSS) support\n\n## Pros and Cons\n\n### Pros\n\nBecause it is just a view template engine:\n\n- It doesn't need to have any APIs, all we have to do is to pass the server data to the client\n- It supports multiple engines like `.hbs`, `.ejs` and React `.(ts|js)x`\n- We can use [passport](http://www.passportjs.org) authentication as it always is\n\n### Cons\n\n- It is not so performant, because it assembles the whole HTML on each request\n- It does not support **client side routing**\n\n## Usage\n\nInstall it:\n\n```bash\n$ npm install --save @react-ssr/core @react-ssr/express express react react-dom\n```\n\nAnd add a script to your package.json like this:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"node server.js\"\n  }\n}\n```\n\nThen, populate files below inside your project:\n\n**`server.js`**:\n\n```js\nconst express = require('express');\nconst register = require('@react-ssr/express/register');\n\nconst app = express();\n\n(async () => {\n  // register `.jsx` or `.tsx` as a view template engine\n  await register(app);\n\n  app.get('/', (req, res) => {\n    const message = 'Hello World!';\n    res.render('index', { message });\n  });\n\n  app.listen(3000, () => {\n    console.log('> Ready on http://localhost:3000');\n  });\n})();\n```\n\n**`views/index.jsx`**:\n\n```jsx\nexport default function Index({ message }) {\n  return <p>{message}</p>;\n}\n```\n\nFinally, just run `npm start` and go to `http://localhost:3000`, and you'll see `Hello World!`.\n\n## Configuration (`ssr.config.js`)\n\nHere is the default `ssr.config.js`, which is used by `react-ssr` when there are no valid values:\n\n```js\nmodule.exports = {\n  id: 'default',\n  distDir: '.ssr',\n  viewsDir: 'views',\n  staticViews: [],\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    return config;\n  },\n};\n```\n\n### `ssr.config.js#id`\n\nThe id of **UI framework**. (default: `default`)\n\nIt can be ignored only when the project does not use any UI frameworks.\n\nSupported UI frameworks are:\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\nFor example, if we want to use `emotion`, `ssr.config.js` is like this:\n\n```js\nmodule.exports = {\n  id: 'emotion',\n};\n```\n\n### `ssr.config.js#distDir`\n\nThe place where `react-ssr` generates **production** results. (default: `.ssr`)\n\nIf we use TypeScript or any other library which must be compiled, the config below may be useful:\n\n```js\nmodule.exports = {\n  // dist folder should be ignored by `.gitignore`\n  distDir: 'dist/.ssr',\n};\n```\n\n### `ssr.config.js#viewsDir`\n\nThe place where we put views. (default: `views`)\n\nA function `res.render('xxx')` will render `views/xxx.jsx` or `views/xxx.tsx`.\n\nA working example is here: [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n\n### `ssr.config.js#staticViews`\n\nIf specified, `react-ssr` generates html cache when production:\n\n```js\nmodule.exports = {\n  staticViews: [\n    'auth/login',\n    'auth/register',\n    'about',\n  ],\n};\n```\n\n### `ssr.config.js#webpack()`\n\n```js\nmodule.exports = {\n  webpack: (config /* webpack.Configuration */, env /* 'development' | 'production' */) => {\n    // we can override default webpack config here\n    return config;\n  },\n};\n```\n\n## Custom `process.env.NODE_ENV`\n\nIf you set `process.env.REACT_SSR_ENV`, you can separate `process.env.NODE_ENV` from react-ssr:\n\n**package.json**\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"cross-env NODE_ENV=k8s REACT_SSR_ENV=production node dist/main.js\"\n  }\n}\n```\n\n## Custom Babel Config\n\nWe can extends its default `.babelrc` like this:\n\n**`.babelrc`**:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ]\n}\n```\n\nA working example is here: [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n\n## Custom App\n\nJust put `_app.jsx` or `_app.tsx` into the views root:\n\n**`views/_app.jsx`**:\n\n```jsx\n// we can import global styles or use theming\nimport '../styles/global.scss';\n\nconst App = (props) => {\n  // yes, this `props` contains data passed from the server\n  // and also we can inject additional data into pages\n  const { children, ...rest } = props;\n\n  // we can wrap this PageComponent for persisting layout between page changes\n  const PageComponent = children;\n\n  return <PageComponent {...rest} />;\n};\n\nexport default App;\n```\n\nA working example is here:\n\n- [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n## Custom Document\n\nJust put `_document.jsx` or `_document.tsx` into the views root:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>Default Title</title>\n          <meta charSet=\"utf-8\" />\n          <meta name=\"viewport\" content=\"minimum-scale=1, initial-scale=1, width=device-width\" />\n          <link rel=\"shortcut icon\" href=\"/favicon.ico\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n};\n```\n\n**Note**:\n\n- **Please put `<Main />` component directly under `<body>` tag and don't wrap `<Main />` component with another components**, because this is a hydration target for the client.\n\nAnd then, use it as always:\n\n**`views/index.jsx`**:\n\n```jsx\nconst Index = (props) => {\n  return <p>Hello World!</p>;\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n\n## Dynamic `Head`\n\nWe can use the `Head` component in any pages:\n\n**`views/index.jsx`**:\n\n```jsx\nimport React from 'react';\nimport { Head } from '@react-ssr/express';\n\nconst Index = (props) => {\n  return (\n    <React.Fragment>\n      <Head>\n        <title>Dynamic Title</title>\n        <meta name=\"description\" content=\"Dynamic Description\" />\n      </Head>\n      <p>Of course, SSR Ready!</p>\n    </React.Fragment>\n  );\n};\n\nexport default Index;\n```\n\nA working example is here: [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n\n## Supported UI Framework\n\n- [x] default (the id `default` doesn't need to be specified in `ssr.config.js`)\n  - [x] [bulma](https://bulma.io)\n  - [x] [semantic-ui](https://react.semantic-ui.com)\n  - [x] Or any other **non** CSS-in-JS UI frameworks\n- [x] [emotion](https://emotion.sh)\n- [x] [styled-components](https://www.styled-components.com)\n- [x] [material-ui](https://material-ui.com)\n- [x] [antd](https://ant.design)\n- [ ] and more...\n\n### Non CSS-in-JS framework\n\n<p align=\"center\"><img src=\"https://i.imgur.com/0PwlfVk.png\"></p>\n\nLike [semantic-ui](https://react.semantic-ui.com), non CSS-in-JS frameworks are supported without extra configuration.\n\nAll we have to do is to load global CSS in `_document` or each page:\n\n**`views/_document.jsx`**:\n\n```jsx\nimport React from 'react';\nimport {\n  Document,\n  Head,\n  Main,\n} from '@react-ssr/express';\n\nexport default class extends Document {\n  render() {\n    return (\n      <html lang=\"en\">\n        <Head>\n          <title>A Sample of Semantic UI React</title>\n          <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\" />\n        </Head>\n        <body>\n          <Main />\n        </body>\n      </html>\n    );\n  }\n}\n```\n\n### With Ant Design\n\n<p align=\"center\"><img src=\"https://i.imgur.com/yWGxseM.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-import` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    [\n      \"import\",\n      {\n        \"libraryName\": \"antd\",\n        \"style\": \"css\"\n      }\n    ]\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n\n### With Emotion\n\n<p align=\"center\"><img src=\"https://i.imgur.com/XN8evEM.png\"></p>\n\nIn order to enable SSR, we must install these packages:\n\n- [@emotion/cache](https://npm.im/@emotion/cache) as **dependencies**\n- [create-emotion-server](https://npm.im/create-emotion-server) as **dependencies**\n- [babel-plugin-emotion](https://npm.im/babel-plugin-emotion) as devDependencies\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"emotion\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n\n### With Material UI\n\n<p align=\"center\"><img src=\"https://i.imgur.com/o1AWdyd.png\"></p>\n\nWe can use [material-ui](https://material-ui.com) without extra configuration.\n\nA working example is here: [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n\n### With styled-components\n\n<p align=\"center\"><img src=\"https://i.imgur.com/RtuijYA.png\"></p>\n\nIn order to enable SSR, we must install `babel-plugin-styled-components` as devDependencies.\n\nAnd then, populate `.babelrc` in your project root:\n\n```json\n{\n  \"presets\": [\n    \"@react-ssr/express/babel\"\n  ],\n  \"plugins\": [\n    \"styled-components\"\n  ]\n}\n```\n\nA working example is here: [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n## TypeScript Support\n\nTo enable TypeScript engine (`.tsx`), just put `tsconfig.json` in your project root directory.\n\nThe code of TypeScript will be like this:\n\n**`package.json`**:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"ts-node server.ts\"\n  }\n}\n```\n\n**`server.ts`**:\n\n```ts\nimport express, { Request, Response } from '@react-ssr/express';\n\nconst app = express();\n\napp.get('/', (req: Request, res: Response) => {\n  const message = 'Hello World!';\n  res.render('index', { message });\n});\n\napp.listen(3000, () => {\n  console.log('> Ready on http://localhost:3000');\n});\n```\n\n**`views/index.tsx`**:\n\n```tsx\ninterface IndexProps {\n  message: string;\n}\n\nexport default function Index({ message }: IndexProps) {\n  return <p>{message}</p>;\n}\n```\n\n## Examples\n\n### @react-ssr/express\n\n**.jsx**\n\n- [examples/basic-jsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-jsx)\n- [examples/basic-custom-app](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-app)\n- [examples/basic-custom-babelrc](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-babelrc)\n- [examples/basic-custom-document](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-document)\n- [examples/basic-custom-views](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-custom-views)\n- [examples/basic-dynamic-head](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-dynamic-head)\n- [examples/basic-hmr-css](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-css)\n- [examples/basic-hmr-scss](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-hmr-scss)\n- [examples/basic-blogging](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-blogging)\n- [examples/basic-multiple-view-engines](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-multiple-view-engines)\n- [examples/support-yarn2-pnp](https://github.com/saltyshiomix/react-ssr/tree/master/examples/support-yarn2-pnp)\n- [examples/with-jsx-antd](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-antd)\n- [examples/with-jsx-bulma](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-bulma)\n- [examples/with-jsx-emotion](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-emotion)\n- [examples/with-jsx-material-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-material-ui)\n- [examples/with-jsx-semantic-ui](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-semantic-ui)\n- [examples/with-jsx-styled-components](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-jsx-styled-components)\n\n**.tsx**\n\n- [examples/basic-tsx](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-tsx)\n- [examples/with-tsx-redux-todo](https://github.com/saltyshiomix/react-ssr/tree/master/examples/with-tsx-redux-todo)\n\n### @react-ssr/nestjs-express\n\n- [examples/basic-nestjs](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs)\n- [examples/basic-nestjs-nodemon](https://github.com/saltyshiomix/react-ssr/tree/master/examples/basic-nestjs-nodemon)\n\n## Real World Examples\n\n- [react-ssr-jsx-starter](https://github.com/saltyshiomix/react-ssr-jsx-starter)\n- [react-ssr-tsx-starter](https://github.com/saltyshiomix/react-ssr-tsx-starter)\n- [react-ssr-nestjs-starter](https://github.com/saltyshiomix/react-ssr-nestjs-starter)\n- [react-ssr-redux-todo-app](https://github.com/saltyshiomix/react-ssr-redux-todo-app)\n\n## Articles\n\n[Introducing an Alternative to NEXT.js](https://dev.to/saltyshiomix/introducing-an-alternative-to-next-js-12ph)\n\n[[Express] React as a View Template Engine?](https://dev.to/saltyshiomix/express-react-as-a-view-template-engine-h37)\n\n## Related\n\n[reactjs/express-react-views](https://github.com/reactjs/express-react-views)\n\n## Contact\n\n- via [GitHub Issues](https://github.com/saltyshiomix/react-ssr/issues)\n- via [Twitter](https://twitter.com/saltyshiomix)\n","readmeFilename":"README.md","_id":"@react-ssr/express@0.25.0-canary.2","_integrity":"sha512-hWaKax3ymqFJl0LxD+gct8r5LkdsyWLb8MRweJDYeoHfel9l2Q4OvPvJ7NEbN4n3Q7u5vsd5+WDAG2epTgEq/Q==","_resolved":"/private/var/folders/mv/4xdry6ln4sd2lpr2ys20zj1m0000gp/T/c6ffdcdd156152095a67412685a60929/react-ssr-express-0.25.0-canary.2.tgz","_from":"file:react-ssr-express-0.25.0-canary.2.tgz","_nodeVersion":"16.17.0","_npmVersion":"8.15.0","dist":{"integrity":"sha512-hWaKax3ymqFJl0LxD+gct8r5LkdsyWLb8MRweJDYeoHfel9l2Q4OvPvJ7NEbN4n3Q7u5vsd5+WDAG2epTgEq/Q==","shasum":"d17600ab445b574fecda14dd665741686a0fd013","tarball":"https://registry.npmjs.org/@react-ssr/express/-/express-0.25.0-canary.2.tgz","fileCount":8,"unpackedSize":17191,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICqQOGA7s9V97KaWnNQQNXFc4AaF6lzeGKodB0fBzZ3gAiEAvPXsVJN+72mOA/wyxHmTMEPVLiSyw07qjdNxC/1abEY="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjELrxACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrdIg//Zw+Xby8FNnhu//p8DT1A9MJGhNaVG6GzR3OVl5Jm5g3hXHNj\r\nNVyKp77feBk3lp92ai4m2dZ511FI+l06TIuzj7S7EmXqAuCzRKCNatETOgXN\r\nVRzhOLnPN4CLtsTloOa+KX/qwsyHzeiWALtv7qsgxjdla26RvjXsLyn08rq6\r\nCFBgzadSvTW3NNt2QSdLC+7AuXFtqadN+GAFI27fslYnybQ5g2PE3DcV1TvH\r\n0ZilgM2FQ1xr4cF2uh/LrmxKmKxx58TUDBCOn1aOpsRiWj7EVwT1IUtDk6JG\r\nwkUSdbSBMw6VSdkXmhw4z0uJzjcKLGPlHr5FdeVklFxTYc0DECvdMmRC+ibS\r\nslVdnfmTyizBEmlVfINIF3NuJ4RuKytmsQ1VH+b6Me2CnVnNu636H9cUi/39\r\nd+ahqKtC/r+9eJps3CjKWvcPQFPxk2gCtKRpyYYXP7khgCVZITgG5QePPsUk\r\nsW2HbHn7FXNuarmLsOALfE4v1TakfuM6Ijh/3O97KdwpSffsUN0BP6UxysdA\r\nIuwJdMyikxI8ggh8hzRaoAKYsGj2JHIZ7FUj9hhzuFvXSzZYU5FEljhkOKKg\r\nyoQHLnJ+mogXJPidHZcETSSpXRpGA/Uv5hvVSwM7rdXkJVKFIJuOiCL8+OAS\r\n5IXL8e8dd4ZxExhm8Z6Qsoq1Lrw9om3Mr2M=\r\n=PhnG\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"},"directories":{},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express_0.25.0-canary.2_1662040817105_0.1970222100930683"},"_hasShrinkwrap":false}},"time":{"created":"2019-05-07T14:57:03.591Z","0.0.1":"2019-05-07T14:57:03.908Z","modified":"2022-09-01T14:00:17.376Z","0.0.2":"2019-05-07T15:50:06.258Z","0.0.3":"2019-05-07T16:50:56.346Z","0.0.4":"2019-05-07T17:00:37.359Z","0.0.5":"2019-05-07T17:06:36.288Z","0.0.6":"2019-05-07T17:20:23.495Z","0.0.7":"2019-05-07T17:29:06.083Z","0.0.8":"2019-05-07T17:41:43.659Z","0.0.9":"2019-05-07T18:02:02.334Z","0.0.10":"2019-05-07T18:11:21.185Z","0.0.11":"2019-05-07T18:35:40.219Z","0.0.12":"2019-05-07T18:47:11.201Z","0.0.13":"2019-05-07T23:17:39.430Z","0.0.14":"2019-05-07T23:26:43.689Z","0.0.15":"2019-05-07T23:38:51.001Z","0.0.16":"2019-05-07T23:45:36.091Z","0.0.17":"2019-05-07T23:50:28.606Z","0.0.18":"2019-05-08T01:10:26.843Z","0.1.0":"2019-05-08T01:26:09.823Z","0.1.1":"2019-05-09T17:51:13.702Z","0.1.2":"2019-05-09T19:20:09.402Z","0.1.3":"2019-05-09T19:37:56.923Z","0.1.4":"2019-05-09T19:48:39.301Z","0.1.5":"2019-05-09T19:51:34.945Z","0.1.6":"2019-05-10T13:39:49.054Z","0.1.34":"2019-05-15T23:48:26.283Z","0.1.37":"2019-05-16T03:56:44.306Z","0.1.39":"2019-05-16T04:11:43.640Z","0.1.40":"2019-05-16T04:21:11.481Z","0.1.41":"2019-05-16T04:55:14.390Z","0.1.42":"2019-05-16T05:11:30.160Z","0.1.43":"2019-05-16T05:30:20.485Z","0.1.44":"2019-05-16T05:33:16.864Z","0.1.45":"2019-05-16T05:39:16.588Z","0.1.46":"2019-05-16T06:44:16.504Z","0.1.47":"2019-05-16T06:47:19.130Z","0.1.48":"2019-05-16T07:04:08.262Z","0.1.49":"2019-05-16T07:06:35.637Z","0.1.50":"2019-05-16T07:10:23.690Z","0.1.51":"2019-05-16T07:31:45.852Z","0.1.52":"2019-05-16T07:33:35.199Z","0.1.53":"2019-05-16T07:40:17.013Z","0.1.54":"2019-05-16T07:43:33.717Z","0.1.57":"2019-05-16T08:06:01.189Z","0.1.58":"2019-05-16T08:12:53.151Z","0.1.59":"2019-05-16T08:16:24.921Z","0.1.60":"2019-05-16T08:20:11.228Z","0.1.61":"2019-05-16T08:32:14.065Z","0.1.63":"2019-05-17T14:09:39.555Z","0.1.64":"2019-05-17T16:19:47.577Z","0.1.66":"2019-05-18T03:37:51.645Z","0.1.67":"2019-05-20T12:48:34.830Z","0.1.123":"2019-05-23T17:21:50.489Z","0.1.124":"2019-05-23T17:38:24.353Z","0.1.125":"2019-05-23T17:43:21.947Z","0.1.126":"2019-05-23T17:53:30.711Z","0.1.127":"2019-05-23T17:56:18.346Z","0.1.128":"2019-05-23T18:03:16.328Z","0.1.129":"2019-05-23T18:11:08.363Z","0.1.130":"2019-05-23T18:16:16.993Z","0.1.131":"2019-05-23T18:21:25.887Z","0.1.132":"2019-05-23T18:23:02.111Z","0.1.133":"2019-05-23T18:31:23.730Z","0.1.134":"2019-05-23T18:34:23.444Z","0.1.135":"2019-05-23T18:36:30.109Z","0.1.136":"2019-05-23T18:45:43.585Z","0.1.137":"2019-05-23T18:49:45.911Z","0.1.138":"2019-05-23T18:56:44.158Z","0.1.139":"2019-05-23T19:01:26.146Z","0.1.140":"2019-05-23T19:06:32.303Z","0.1.141":"2019-05-23T19:45:53.998Z","0.1.142":"2019-05-23T19:53:50.936Z","0.1.143":"2019-05-23T20:03:22.440Z","0.1.144":"2019-05-23T20:06:02.482Z","0.1.145":"2019-05-23T20:18:20.602Z","0.1.146":"2019-05-23T20:28:45.436Z","0.1.147":"2019-05-23T20:32:02.718Z","0.1.148":"2019-05-24T01:57:55.321Z","0.1.149":"2019-05-24T02:12:52.252Z","0.1.150":"2019-05-24T02:15:38.521Z","0.1.151":"2019-05-24T02:26:16.082Z","0.1.152":"2019-05-24T02:41:29.449Z","0.1.153":"2019-05-24T02:49:04.670Z","0.1.154":"2019-05-26T21:00:13.517Z","0.1.155":"2019-05-28T15:03:27.676Z","0.1.156":"2019-05-28T15:10:41.717Z","0.1.157":"2019-05-28T15:18:33.634Z","0.1.158":"2019-05-28T15:36:50.074Z","0.1.159":"2019-05-29T14:02:57.349Z","0.1.160":"2019-05-29T21:12:09.025Z","0.1.161":"2019-05-30T02:30:04.214Z","0.1.162":"2019-06-01T00:00:05.657Z","0.1.163":"2019-06-05T14:21:30.586Z","0.1.164":"2019-06-09T06:18:08.578Z","0.1.165":"2019-06-09T08:11:18.122Z","0.1.166":"2019-06-09T08:20:15.930Z","0.1.167":"2019-06-09T08:24:15.708Z","0.1.168":"2019-06-09T08:28:27.464Z","0.1.169":"2019-06-09T08:33:44.872Z","0.1.170":"2019-06-13T16:06:56.044Z","0.1.171":"2019-06-30T16:07:34.256Z","0.1.172":"2019-07-08T15:18:52.616Z","0.1.173":"2019-07-11T18:32:16.251Z","0.1.174":"2019-07-20T18:08:26.218Z","0.1.175":"2019-07-24T18:08:38.665Z","0.1.176":"2019-07-26T18:49:21.688Z","0.1.177":"2019-07-26T19:53:12.250Z","0.1.178":"2019-07-26T19:59:24.506Z","0.1.179":"2019-08-17T06:28:36.050Z","0.1.180":"2019-08-28T03:37:16.499Z","0.1.181":"2019-08-29T00:10:38.973Z","0.1.182":"2019-08-30T10:54:07.424Z","0.1.183":"2019-09-03T12:39:17.842Z","0.1.184":"2019-09-09T01:56:45.319Z","0.1.185":"2019-09-13T08:07:19.042Z","0.1.186":"2019-09-24T16:48:20.195Z","0.1.187":"2019-09-24T18:28:04.234Z","0.1.188":"2019-10-13T19:46:05.538Z","0.1.189":"2019-10-13T20:14:02.478Z","0.1.190":"2019-10-13T20:58:55.661Z","0.1.191":"2019-10-13T21:02:46.661Z","0.1.192":"2019-10-13T21:04:59.591Z","0.1.193":"2019-10-13T21:10:12.866Z","0.1.194":"2019-10-13T21:12:07.384Z","0.1.195":"2019-10-13T21:13:25.671Z","0.1.196":"2019-10-13T21:17:37.154Z","0.1.197":"2019-10-13T21:20:24.353Z","0.1.198":"2019-10-13T21:23:35.735Z","0.1.199":"2019-10-13T21:31:18.245Z","0.1.200":"2019-10-13T21:37:42.702Z","0.1.201":"2019-10-13T21:40:56.191Z","0.1.202":"2019-10-13T21:58:53.090Z","0.1.203-alpha.0":"2019-10-14T04:39:06.801Z","0.1.203-alpha.1":"2019-10-14T04:48:29.377Z","0.1.203-alpha.2":"2019-10-14T04:55:25.565Z","0.1.203-alpha.3":"2019-10-14T04:59:56.946Z","0.1.203-alpha.4":"2019-10-14T05:05:37.363Z","0.1.203-alpha.5":"2019-10-14T05:14:44.029Z","0.1.203-alpha.6":"2019-10-14T05:20:35.523Z","0.1.203-alpha.7":"2019-10-14T05:27:36.577Z","0.1.203-alpha.8":"2019-10-14T05:33:00.082Z","0.1.203-alpha.9":"2019-10-14T05:36:52.545Z","0.1.203-alpha.10":"2019-10-14T05:45:14.686Z","0.1.203-alpha.11":"2019-10-14T05:54:29.999Z","0.1.203-alpha.12":"2019-10-14T05:59:36.682Z","0.1.203-alpha.13":"2019-10-14T06:02:19.437Z","0.1.203-alpha.14":"2019-10-14T06:07:30.860Z","0.2.0":"2019-10-14T06:17:54.141Z","0.2.1":"2019-10-14T06:28:54.842Z","0.2.2-alpha.2":"2019-10-14T08:11:04.879Z","0.2.2-alpha.3":"2019-10-14T08:16:17.330Z","0.2.2-alpha.4":"2019-10-14T09:05:27.286Z","0.2.2-alpha.5":"2019-10-14T09:07:08.143Z","0.2.2-alpha.6":"2019-10-14T09:09:04.798Z","0.2.2-alpha.7":"2019-10-14T09:11:56.076Z","0.2.2":"2019-10-14T09:16:43.150Z","0.2.3":"2019-10-14T09:55:48.424Z","0.2.4":"2019-10-14T10:00:35.185Z","0.2.5-alpha.0":"2019-10-14T11:43:32.996Z","0.2.5-alpha.2":"2019-10-14T11:48:13.314Z","0.2.5-alpha.4":"2019-10-14T13:10:33.412Z","0.2.5-alpha.5":"2019-10-14T13:14:45.938Z","0.2.5-alpha.6":"2019-10-14T13:31:04.194Z","0.2.5-alpha.7":"2019-10-14T13:38:59.811Z","0.2.5-alpha.8":"2019-10-14T14:02:24.638Z","0.2.5-alpha.9":"2019-10-14T14:10:42.326Z","0.2.5-alpha.11":"2019-10-14T14:16:00.947Z","0.2.5-alpha.12":"2019-10-14T14:55:18.733Z","0.2.5-alpha.13":"2019-10-14T14:59:20.497Z","0.2.5-alpha.15":"2019-10-14T15:13:49.880Z","0.2.5-alpha.16":"2019-10-14T15:19:56.116Z","0.2.5-alpha.17":"2019-10-14T15:28:39.097Z","0.2.5-alpha.18":"2019-10-14T15:36:12.243Z","0.2.5-alpha.19":"2019-10-14T15:42:31.606Z","0.2.5-alpha.20":"2019-10-14T15:49:25.827Z","0.2.5-alpha.21":"2019-10-14T16:00:52.611Z","0.2.5-alpha.22":"2019-10-14T16:06:37.271Z","0.2.5-alpha.23":"2019-10-14T21:06:23.072Z","0.2.5-alpha.24":"2019-10-14T21:17:31.532Z","0.2.5-alpha.25":"2019-10-14T21:23:08.382Z","0.2.5-alpha.26":"2019-10-14T21:42:20.756Z","0.2.5-alpha.27":"2019-10-14T21:45:52.982Z","0.2.5-alpha.28":"2019-10-14T21:53:29.144Z","0.2.5-alpha.29":"2019-10-14T21:59:56.790Z","0.2.5-alpha.30":"2019-10-14T22:10:12.338Z","0.2.5-alpha.31":"2019-10-14T22:13:17.946Z","0.2.5-alpha.32":"2019-10-14T22:15:11.063Z","0.2.5-alpha.33":"2019-10-14T22:23:53.827Z","0.2.5-alpha.34":"2019-10-14T22:27:02.452Z","0.2.5-alpha.36":"2019-10-14T22:35:02.930Z","0.2.5-alpha.37":"2019-10-14T22:38:10.440Z","0.2.5-alpha.38":"2019-10-14T22:41:31.103Z","0.2.5-alpha.39":"2019-10-14T22:49:53.124Z","0.2.5-alpha.40":"2019-10-14T22:54:03.706Z","0.2.5-alpha.41":"2019-10-14T22:58:16.140Z","0.2.5-alpha.42":"2019-10-14T23:04:21.446Z","0.2.5-alpha.44":"2019-10-14T23:07:11.876Z","0.2.5":"2019-10-14T23:09:17.340Z","0.2.6-alpha.2":"2019-10-14T23:14:22.815Z","0.2.6":"2019-10-14T23:17:52.228Z","0.2.7-alpha.0":"2019-10-14T23:44:19.816Z","0.2.7-alpha.2":"2019-10-15T00:02:27.946Z","0.2.7-alpha.3":"2019-10-15T00:07:33.110Z","0.2.7-alpha.4":"2019-10-15T00:09:54.364Z","0.2.7-alpha.6":"2019-10-15T00:19:13.413Z","0.2.7-alpha.7":"2019-10-15T00:21:47.172Z","0.2.7-alpha.8":"2019-10-15T00:26:09.624Z","0.2.7-alpha.9":"2019-10-15T00:31:46.688Z","0.2.7-alpha.10":"2019-10-15T00:36:31.314Z","0.2.7-alpha.11":"2019-10-15T00:38:36.836Z","0.2.7-alpha.12":"2019-10-15T00:42:26.779Z","0.2.7-alpha.13":"2019-10-15T00:50:59.027Z","0.2.7-alpha.14":"2019-10-15T00:56:43.484Z","0.2.7-alpha.15":"2019-10-15T01:01:57.195Z","0.2.7-alpha.16":"2019-10-15T01:04:25.906Z","0.2.7-alpha.17":"2019-10-15T01:09:47.696Z","0.2.7-alpha.18":"2019-10-15T01:12:15.131Z","0.2.7-alpha.19":"2019-10-15T01:19:11.629Z","0.2.7-alpha.20":"2019-10-15T01:32:26.722Z","0.2.7-alpha.21":"2019-10-15T01:47:23.140Z","0.2.7-alpha.22":"2019-10-15T01:53:37.152Z","0.2.7-alpha.23":"2019-10-15T02:00:37.127Z","0.2.7-alpha.24":"2019-10-15T02:09:09.028Z","0.2.7-alpha.25":"2019-10-15T02:15:42.490Z","0.2.7-alpha.26":"2019-10-15T02:22:02.863Z","0.2.7-alpha.27":"2019-10-15T02:26:17.552Z","0.2.7-alpha.29":"2019-10-15T02:38:01.738Z","0.2.7-alpha.31":"2019-10-15T02:41:19.423Z","0.2.7-alpha.32":"2019-10-15T02:47:17.463Z","0.2.7-alpha.33":"2019-10-15T03:08:28.003Z","0.2.7-alpha.34":"2019-10-15T03:13:13.142Z","0.2.7-alpha.35":"2019-10-15T03:16:24.524Z","0.2.7-alpha.36":"2019-10-15T03:19:53.123Z","0.2.7-alpha.37":"2019-10-15T03:23:38.696Z","0.2.7-alpha.38":"2019-10-15T03:30:01.148Z","0.2.7-alpha.39":"2019-10-15T03:34:01.097Z","0.2.7-alpha.40":"2019-10-15T03:55:30.154Z","0.2.7-alpha.41":"2019-10-15T04:03:48.311Z","0.2.7-alpha.42":"2019-10-15T04:08:30.789Z","0.2.7-alpha.43":"2019-10-15T04:11:51.598Z","0.2.7-alpha.44":"2019-10-15T04:14:58.937Z","0.2.7-alpha.45":"2019-10-15T04:20:13.314Z","0.2.7-alpha.46":"2019-10-15T04:23:04.800Z","0.2.7-alpha.48":"2019-10-15T04:31:27.512Z","0.2.7-alpha.50":"2019-10-15T04:35:48.382Z","0.2.7-alpha.51":"2019-10-15T04:42:46.813Z","0.2.7-alpha.52":"2019-10-15T04:45:10.554Z","0.2.7-alpha.53":"2019-10-15T04:47:38.691Z","0.2.7-alpha.54":"2019-10-15T04:51:51.197Z","0.2.7-alpha.55":"2019-10-15T04:54:21.345Z","0.2.7-alpha.58":"2019-10-15T05:02:34.203Z","0.2.7-alpha.60":"2019-10-15T05:06:35.378Z","0.3.0":"2019-10-15T05:08:41.320Z","0.3.1-alpha.2":"2019-10-15T05:48:44.242Z","0.3.1-alpha.3":"2019-10-15T07:36:22.827Z","0.3.1-alpha.4":"2019-10-15T07:38:28.418Z","0.3.1-alpha.5":"2019-10-15T07:50:54.534Z","0.3.1-alpha.6":"2019-10-15T08:01:30.611Z","0.3.1-alpha.7":"2019-10-15T08:05:57.047Z","0.3.1-alpha.8":"2019-10-15T08:08:59.769Z","0.3.1-alpha.9":"2019-10-15T08:14:33.507Z","0.3.1-alpha.10":"2019-10-15T08:16:35.621Z","0.3.1-alpha.11":"2019-10-15T11:46:00.553Z","0.3.1-alpha.12":"2019-10-15T11:57:42.192Z","0.3.1-alpha.13":"2019-10-15T12:26:14.867Z","0.3.1-alpha.14":"2019-10-15T12:32:03.027Z","0.3.1-alpha.15":"2019-10-15T12:43:39.149Z","0.3.1-alpha.16":"2019-10-15T12:51:11.753Z","0.3.1-alpha.17":"2019-10-15T12:54:30.296Z","0.3.1-alpha.18":"2019-10-15T12:56:14.078Z","0.3.1-alpha.19":"2019-10-15T13:15:34.861Z","0.3.1-alpha.20":"2019-10-15T13:59:46.497Z","0.3.1-alpha.21":"2019-10-15T14:03:21.576Z","0.3.1-alpha.22":"2019-10-15T14:07:07.288Z","0.3.1-alpha.23":"2019-10-15T14:09:46.289Z","0.3.1-alpha.25":"2019-10-15T14:22:16.375Z","0.3.1-alpha.26":"2019-10-15T14:25:59.979Z","0.3.1-alpha.27":"2019-10-15T14:30:35.879Z","0.3.1-alpha.28":"2019-10-15T14:34:28.774Z","0.3.1-alpha.29":"2019-10-15T14:40:44.320Z","0.3.1-alpha.30":"2019-10-15T14:43:07.855Z","0.3.1-alpha.31":"2019-10-15T14:47:56.881Z","0.3.1-alpha.32":"2019-10-15T14:49:41.092Z","0.3.1-alpha.33":"2019-10-15T14:54:06.149Z","0.3.1-alpha.34":"2019-10-15T14:57:38.655Z","0.3.1-alpha.35":"2019-10-15T14:59:54.283Z","0.3.1-alpha.36":"2019-10-15T15:01:20.857Z","0.3.1-alpha.37":"2019-10-15T15:03:13.686Z","0.3.1-alpha.38":"2019-10-15T15:07:15.769Z","0.3.1-alpha.39":"2019-10-15T15:12:19.500Z","0.3.1-alpha.40":"2019-10-15T15:14:03.404Z","0.3.1-alpha.41":"2019-10-15T15:20:59.782Z","0.3.1-alpha.42":"2019-10-15T15:27:37.625Z","0.3.1-alpha.43":"2019-10-15T15:34:20.152Z","0.3.1":"2019-10-15T15:37:09.833Z","0.3.2-alpha.0":"2019-10-15T17:07:52.201Z","0.3.2-alpha.3":"2019-10-16T00:40:57.102Z","0.3.2-alpha.4":"2019-10-16T23:14:32.597Z","0.3.2-alpha.5":"2019-10-16T23:21:41.397Z","0.3.2-alpha.6":"2019-10-16T23:28:47.010Z","0.3.2-alpha.7":"2019-10-16T23:32:10.665Z","0.3.2-alpha.8":"2019-10-16T23:43:15.103Z","0.3.2-alpha.9":"2019-10-16T23:47:03.765Z","0.3.2-alpha.10":"2019-10-17T00:28:33.153Z","0.3.2-alpha.11":"2019-10-17T00:30:44.495Z","0.3.2-alpha.12":"2019-10-17T05:09:13.369Z","0.3.2-alpha.13":"2019-10-17T05:16:45.864Z","0.3.2-alpha.14":"2019-10-17T05:19:03.669Z","0.3.2-alpha.15":"2019-10-17T05:23:25.630Z","0.3.2-alpha.17":"2019-10-17T05:28:32.040Z","0.3.2-alpha.18":"2019-10-17T05:36:05.164Z","0.3.2-alpha.19":"2019-10-17T05:39:56.291Z","0.3.2-alpha.20":"2019-10-17T05:46:19.915Z","0.3.2-alpha.24":"2019-10-17T06:23:14.337Z","0.3.2-alpha.25":"2019-10-17T06:27:15.278Z","0.3.2-alpha.26":"2019-10-17T06:30:00.074Z","0.3.2-alpha.27":"2019-10-17T06:41:21.571Z","0.3.2-alpha.28":"2019-10-17T06:48:02.472Z","0.3.2-alpha.29":"2019-10-17T07:02:36.896Z","0.3.2-alpha.30":"2019-10-17T07:08:44.100Z","0.3.2-alpha.32":"2019-10-17T08:15:06.284Z","0.3.2-alpha.34":"2019-10-17T08:24:57.290Z","0.3.2-alpha.35":"2019-10-17T08:36:13.260Z","0.3.2-alpha.36":"2019-10-17T08:42:15.349Z","0.3.2-alpha.37":"2019-10-17T08:48:58.748Z","0.3.2-alpha.38":"2019-10-17T08:52:15.091Z","0.3.2-alpha.39":"2019-10-17T08:58:48.220Z","0.3.2-alpha.40":"2019-10-17T09:01:33.184Z","0.3.2-alpha.41":"2019-10-17T09:03:33.625Z","0.3.2-alpha.43":"2019-10-17T09:10:13.246Z","0.4.0":"2019-10-17T09:18:14.321Z","0.4.1":"2019-10-17T09:20:34.938Z","0.4.2-alpha.3":"2019-10-17T11:09:38.434Z","0.4.2-alpha.4":"2019-10-17T11:14:32.249Z","0.4.2-alpha.5":"2019-10-17T11:19:59.867Z","0.4.2-alpha.8":"2019-10-17T12:36:05.267Z","0.4.2-alpha.9":"2019-10-17T12:45:04.157Z","0.4.2-alpha.10":"2019-10-17T13:00:38.349Z","0.4.2-alpha.13":"2019-10-17T13:09:34.779Z","0.4.2-alpha.15":"2019-10-17T13:18:40.288Z","0.4.2-alpha.18":"2019-10-17T13:30:31.663Z","0.4.2":"2019-10-17T13:36:02.199Z","0.4.3-alpha.0":"2019-10-17T13:52:11.441Z","0.4.3-alpha.1":"2019-10-17T13:58:40.785Z","0.4.3":"2019-10-17T14:03:16.158Z","0.4.4-alpha.0":"2019-10-17T14:13:54.860Z","0.4.4-alpha.1":"2019-10-17T14:19:23.716Z","0.4.4-alpha.2":"2019-10-17T14:26:18.838Z","0.4.4-alpha.3":"2019-10-17T14:34:22.216Z","0.4.4-alpha.4":"2019-10-17T14:41:10.725Z","0.4.4-alpha.5":"2019-10-17T14:44:00.214Z","0.4.4-alpha.6":"2019-10-17T14:45:48.280Z","0.4.4-alpha.7":"2019-10-17T14:47:56.485Z","0.4.4-alpha.8":"2019-10-17T14:57:05.933Z","0.4.4-alpha.9":"2019-10-17T15:02:31.101Z","0.4.4-alpha.10":"2019-10-17T15:14:14.200Z","0.4.4-alpha.11":"2019-10-17T15:34:25.625Z","0.4.4-alpha.12":"2019-10-17T15:39:22.654Z","0.4.4-alpha.13":"2019-10-17T15:45:00.089Z","0.4.4-alpha.14":"2019-10-17T15:56:47.641Z","0.4.4-alpha.15":"2019-10-17T15:58:38.947Z","0.4.4-alpha.16":"2019-10-17T16:01:44.202Z","0.4.4-alpha.17":"2019-10-17T16:03:05.952Z","0.4.4-alpha.18":"2019-10-17T16:04:52.651Z","0.4.4-alpha.19":"2019-10-17T16:06:10.072Z","0.4.4-alpha.20":"2019-10-17T16:06:56.071Z","0.4.4-alpha.21":"2019-10-17T16:08:27.998Z","0.4.4-alpha.22":"2019-10-17T16:09:15.701Z","0.4.4-alpha.23":"2019-10-17T16:10:50.208Z","0.4.4-alpha.24":"2019-10-17T16:11:44.716Z","0.4.4-alpha.25":"2019-10-17T16:12:23.050Z","0.4.4-alpha.26":"2019-10-17T16:13:08.750Z","0.4.4-alpha.27":"2019-10-17T16:15:00.676Z","0.4.4-alpha.28":"2019-10-17T16:15:40.562Z","0.4.4-alpha.29":"2019-10-17T16:16:37.188Z","0.4.4-alpha.30":"2019-10-17T16:17:46.884Z","0.4.4-alpha.31":"2019-10-17T16:18:46.289Z","0.4.4-alpha.32":"2019-10-17T16:19:43.045Z","0.4.4-alpha.34":"2019-10-17T16:37:35.434Z","0.4.4-alpha.35":"2019-10-17T16:40:57.494Z","0.4.4-alpha.36":"2019-10-17T16:43:27.772Z","0.4.4-alpha.37":"2019-10-17T16:46:33.423Z","0.4.4-alpha.38":"2019-10-17T16:50:39.989Z","0.4.4-alpha.39":"2019-10-17T16:53:47.464Z","0.4.4-alpha.40":"2019-10-17T16:55:31.697Z","0.4.4-alpha.41":"2019-10-17T17:00:20.493Z","0.4.4-alpha.42":"2019-10-17T17:03:30.331Z","0.4.4-alpha.43":"2019-10-17T17:07:01.307Z","0.5.0":"2019-10-17T17:09:48.213Z","0.5.1-alpha.1":"2019-10-17T17:20:57.081Z","0.5.1-alpha.6":"2019-10-17T22:12:36.186Z","0.5.1-alpha.7":"2019-10-17T22:16:27.312Z","0.5.1-alpha.8":"2019-10-17T22:18:43.324Z","0.5.1-alpha.9":"2019-10-17T22:22:04.989Z","0.5.1-alpha.10":"2019-10-17T22:27:38.344Z","0.5.1-alpha.11":"2019-10-17T22:31:25.780Z","0.5.1-alpha.12":"2019-10-17T22:35:36.833Z","0.5.1":"2019-10-17T22:55:39.489Z","0.5.2-alpha.6":"2019-10-19T05:51:44.732Z","0.5.2-alpha.7":"2019-10-19T05:59:21.361Z","0.5.2":"2019-10-19T06:27:02.789Z","0.5.3-alpha.0":"2019-10-19T06:32:33.256Z","0.5.3-alpha.6":"2019-10-19T07:46:34.238Z","0.5.3-alpha.7":"2019-10-19T07:53:18.454Z","0.5.3-alpha.9":"2019-10-19T07:57:01.130Z","0.5.3-alpha.10":"2019-10-19T08:04:49.023Z","0.5.3-alpha.11":"2019-10-19T08:44:37.536Z","0.5.3-alpha.13":"2019-10-19T08:54:46.665Z","0.5.3-alpha.15":"2019-10-19T09:06:39.268Z","0.5.3-alpha.16":"2019-10-19T09:13:42.613Z","0.5.3-alpha.17":"2019-10-19T09:21:20.571Z","0.5.3-alpha.18":"2019-10-19T09:24:21.622Z","0.5.3-alpha.19":"2019-10-19T09:28:06.592Z","0.5.3-alpha.20":"2019-10-19T09:33:03.398Z","0.5.3-alpha.21":"2019-10-19T09:53:16.195Z","0.5.3-alpha.22":"2019-10-19T10:02:58.985Z","0.5.3-alpha.23":"2019-10-19T10:10:29.339Z","0.5.3-alpha.24":"2019-10-19T10:12:25.070Z","0.5.3-alpha.25":"2019-10-19T10:14:55.412Z","0.5.3-alpha.26":"2019-10-19T10:17:07.232Z","0.5.3-alpha.27":"2019-10-19T10:19:56.437Z","0.5.3-alpha.28":"2019-10-19T10:24:31.005Z","0.5.3-alpha.29":"2019-10-19T10:27:43.605Z","0.5.3-alpha.30":"2019-10-19T10:32:11.161Z","0.5.3-alpha.31":"2019-10-19T10:53:27.371Z","0.5.3-alpha.32":"2019-10-19T10:59:05.091Z","0.5.3-alpha.33":"2019-10-19T11:02:17.370Z","0.5.3-alpha.34":"2019-10-19T11:12:10.718Z","0.5.3-alpha.35":"2019-10-19T11:57:58.018Z","0.5.3":"2019-10-19T12:14:49.547Z","0.5.4-alpha.0":"2019-10-19T12:15:52.048Z","0.5.4-alpha.1":"2019-10-19T12:30:22.790Z","0.5.4-alpha.2":"2019-10-19T12:35:30.185Z","0.5.4-alpha.5":"2019-10-19T12:56:48.454Z","0.5.4-alpha.6":"2019-10-19T13:00:49.108Z","0.5.4-alpha.7":"2019-10-19T13:13:04.536Z","0.5.4-alpha.8":"2019-10-19T13:30:21.856Z","0.5.4-alpha.9":"2019-10-19T13:33:22.116Z","0.5.4-alpha.10":"2019-10-19T13:37:32.754Z","0.5.4-alpha.13":"2019-10-19T13:45:48.710Z","0.5.4-alpha.14":"2019-10-19T13:49:26.548Z","0.5.4-alpha.17":"2019-10-19T13:55:37.985Z","0.5.4-alpha.21":"2019-10-19T14:15:27.472Z","0.5.4-alpha.25":"2019-10-19T14:42:44.705Z","0.5.4-alpha.26":"2019-10-19T14:53:19.227Z","0.5.4-alpha.28":"2019-10-19T14:58:53.216Z","0.5.4-alpha.29":"2019-10-19T15:21:12.963Z","0.5.4-alpha.32":"2019-10-19T15:30:01.336Z","0.5.4-alpha.35":"2019-10-19T15:39:01.838Z","0.5.4-alpha.36":"2019-10-19T15:48:49.751Z","0.5.4":"2019-10-19T15:58:49.979Z","0.5.5-alpha.0":"2019-10-19T16:19:49.577Z","0.5.5":"2019-10-19T16:24:51.848Z","0.5.6-alpha.2":"2019-10-20T16:52:21.624Z","0.5.6-alpha.4":"2019-10-20T17:03:54.608Z","0.5.6-alpha.5":"2019-10-20T17:07:55.935Z","0.5.6-alpha.6":"2019-10-20T17:10:16.746Z","0.5.6-alpha.7":"2019-10-20T17:15:19.440Z","0.5.6-alpha.8":"2019-10-20T17:18:11.861Z","0.5.6-alpha.9":"2019-10-20T17:26:34.447Z","0.5.6-alpha.10":"2019-10-20T17:29:00.849Z","0.5.6-alpha.15":"2019-10-20T17:53:10.891Z","0.5.6-alpha.16":"2019-10-20T17:55:25.986Z","0.5.6-alpha.17":"2019-10-20T17:58:41.129Z","0.5.6-alpha.18":"2019-10-20T18:13:14.688Z","0.5.6-alpha.20":"2019-10-20T18:33:31.895Z","0.5.6-alpha.22":"2019-10-20T19:01:24.594Z","0.5.6":"2019-10-20T19:27:06.408Z","0.5.7-alpha.1":"2019-10-20T21:05:53.615Z","0.5.7-alpha.2":"2019-10-20T21:08:47.051Z","0.5.7-alpha.4":"2019-10-21T00:09:46.689Z","0.5.7-alpha.5":"2019-10-21T00:13:19.107Z","0.5.7":"2019-10-21T00:17:39.640Z","0.5.8-alpha.0":"2019-10-21T00:23:21.326Z","0.5.8":"2019-10-21T00:53:19.828Z","0.5.9":"2019-10-21T00:57:17.429Z","0.5.10-alpha.0":"2019-10-21T01:10:03.563Z","0.5.10-alpha.1":"2019-10-21T01:13:12.405Z","0.5.10-alpha.2":"2019-10-21T01:14:43.803Z","0.5.10-alpha.3":"2019-10-21T01:24:41.159Z","0.5.10":"2019-10-21T01:25:13.474Z","0.5.11-alpha.1":"2019-10-21T01:31:28.512Z","0.5.11":"2019-10-21T07:17:29.670Z","0.5.12":"2019-10-21T07:33:20.270Z","0.5.13-alpha.0":"2019-10-21T07:34:47.445Z","0.5.13-alpha.2":"2019-10-21T08:16:23.481Z","0.5.13-alpha.4":"2019-10-21T08:32:38.356Z","0.5.13":"2019-10-21T08:46:59.649Z","0.5.14-alpha.0":"2019-10-21T08:49:48.434Z","0.5.14":"2019-10-21T14:39:41.336Z","0.5.15-alpha.22":"2019-10-22T08:46:20.705Z","0.5.15-alpha.23":"2019-10-22T09:34:05.582Z","0.5.15-alpha.24":"2019-10-22T09:36:36.676Z","0.5.15-alpha.25":"2019-10-22T09:38:51.725Z","0.5.15-alpha.26":"2019-10-22T09:46:32.247Z","0.5.15-alpha.27":"2019-10-22T09:48:58.843Z","0.5.15-alpha.28":"2019-10-22T09:51:37.866Z","0.5.15-alpha.29":"2019-10-22T09:53:01.355Z","0.5.15-alpha.30":"2019-10-22T09:54:11.099Z","0.5.15-alpha.31":"2019-10-22T10:02:38.401Z","0.5.15-alpha.32":"2019-10-22T10:04:10.723Z","0.5.15-alpha.33":"2019-10-22T10:08:01.828Z","0.5.15-alpha.34":"2019-10-22T10:10:48.350Z","0.5.15-alpha.35":"2019-10-22T10:13:46.205Z","0.5.15-alpha.36":"2019-10-22T10:16:23.119Z","0.5.15-alpha.37":"2019-10-22T10:33:01.457Z","0.5.15-alpha.38":"2019-10-22T10:38:49.677Z","0.5.15-alpha.39":"2019-10-22T11:17:41.212Z","0.5.15-alpha.40":"2019-10-22T11:21:02.748Z","0.5.15-alpha.41":"2019-10-22T11:25:11.717Z","0.5.15-alpha.42":"2019-10-22T11:28:13.319Z","0.5.15-alpha.43":"2019-10-22T11:30:23.678Z","0.5.15-alpha.44":"2019-10-22T11:34:56.820Z","0.5.15-alpha.45":"2019-10-22T11:38:44.380Z","0.5.15-alpha.46":"2019-10-22T11:42:13.695Z","0.5.15-alpha.47":"2019-10-22T11:46:51.071Z","0.5.15-alpha.48":"2019-10-22T11:50:15.192Z","0.5.15-alpha.49":"2019-10-22T11:53:39.683Z","0.5.15-alpha.50":"2019-10-22T11:55:41.202Z","0.5.15-alpha.51":"2019-10-22T11:57:30.628Z","0.5.15-alpha.52":"2019-10-22T11:58:46.031Z","0.5.15-alpha.53":"2019-10-22T12:05:13.150Z","0.5.15-alpha.54":"2019-10-22T12:05:31.399Z","0.5.15-alpha.55":"2019-10-22T12:10:37.500Z","0.5.15-alpha.56":"2019-10-22T12:55:55.585Z","0.5.15-alpha.57":"2019-10-22T12:58:06.623Z","0.5.15-alpha.58":"2019-10-22T13:12:14.656Z","0.5.15-alpha.59":"2019-10-22T13:15:18.914Z","0.5.15-alpha.60":"2019-10-22T13:18:41.531Z","0.5.15-alpha.61":"2019-10-22T13:25:19.741Z","0.5.15-alpha.62":"2019-10-22T13:28:50.614Z","0.5.15-alpha.63":"2019-10-22T13:37:24.960Z","0.5.15-alpha.64":"2019-10-22T13:40:55.931Z","0.5.15-alpha.65":"2019-10-22T13:44:50.764Z","0.5.15-alpha.66":"2019-10-22T13:46:34.693Z","0.5.15-alpha.67":"2019-10-22T13:51:55.177Z","0.5.15-alpha.68":"2019-10-22T13:54:15.239Z","0.5.15-alpha.69":"2019-10-22T14:40:03.256Z","0.5.15-alpha.70":"2019-10-22T14:47:30.026Z","0.5.15-alpha.72":"2019-10-22T15:01:18.190Z","0.5.15-alpha.74":"2019-10-22T15:06:39.384Z","0.5.15-alpha.75":"2019-10-22T15:14:39.176Z","0.5.15-alpha.76":"2019-10-22T15:21:18.929Z","0.5.15-alpha.77":"2019-10-22T15:34:43.226Z","0.5.15-alpha.78":"2019-10-22T15:38:28.268Z","0.5.15-alpha.79":"2019-10-22T15:39:03.647Z","0.5.15-alpha.80":"2019-10-22T15:50:14.201Z","0.5.15-alpha.81":"2019-10-22T15:54:36.669Z","0.5.15-alpha.82":"2019-10-22T16:06:51.145Z","0.5.15-alpha.83":"2019-10-22T16:14:28.468Z","0.5.15-alpha.84":"2019-10-22T16:19:03.123Z","0.5.15-alpha.85":"2019-10-22T16:22:17.351Z","0.5.15-alpha.86":"2019-10-22T16:27:09.668Z","0.5.15-alpha.87":"2019-10-22T16:30:55.253Z","0.5.15-alpha.88":"2019-10-22T16:36:01.299Z","0.5.15-alpha.89":"2019-10-22T16:40:04.942Z","0.5.15-alpha.90":"2019-10-22T16:42:40.408Z","0.5.15-alpha.91":"2019-10-22T16:45:00.775Z","0.5.15-alpha.92":"2019-10-22T16:53:00.071Z","0.5.15-alpha.93":"2019-10-22T16:55:45.398Z","0.5.15-alpha.94":"2019-10-22T17:25:35.940Z","0.5.15-alpha.95":"2019-10-22T17:29:11.496Z","0.5.15-alpha.96":"2019-10-22T17:31:35.323Z","0.5.15-alpha.97":"2019-10-22T17:37:52.342Z","0.5.15-alpha.98":"2019-10-22T17:42:05.090Z","0.5.15-alpha.99":"2019-10-22T17:49:25.742Z","0.5.15-alpha.100":"2019-10-22T17:54:49.410Z","0.5.15-alpha.101":"2019-10-22T17:56:47.371Z","0.5.15-alpha.102":"2019-10-22T18:00:49.438Z","0.5.15-alpha.103":"2019-10-22T18:05:42.502Z","0.5.15-alpha.105":"2019-10-22T18:24:34.937Z","0.5.15-alpha.106":"2019-10-22T18:27:58.955Z","0.5.15-alpha.107":"2019-10-22T18:38:38.130Z","0.5.15-alpha.108":"2019-10-22T18:41:29.114Z","0.5.15-alpha.109":"2019-10-23T00:55:29.729Z","0.5.15-alpha.110":"2019-10-23T01:00:37.010Z","0.5.15-alpha.111":"2019-10-23T01:02:45.758Z","0.5.15-alpha.112":"2019-10-23T01:16:24.292Z","0.5.15-alpha.113":"2019-10-23T01:18:00.958Z","0.5.15-alpha.114":"2019-10-23T01:20:36.121Z","0.5.15-alpha.115":"2019-10-23T01:25:14.674Z","0.5.15-alpha.116":"2019-10-23T01:29:42.362Z","0.5.15-alpha.117":"2019-10-23T01:34:56.326Z","0.5.15-alpha.118":"2019-10-23T01:41:36.557Z","0.5.15-alpha.119":"2019-10-23T01:43:51.868Z","0.5.15-alpha.120":"2019-10-23T01:46:39.164Z","0.5.15-alpha.121":"2019-10-23T01:58:38.559Z","0.5.15-alpha.122":"2019-10-23T02:05:51.805Z","0.5.15-alpha.123":"2019-10-23T02:09:44.344Z","0.5.15-alpha.124":"2019-10-23T02:13:22.822Z","0.5.15-alpha.125":"2019-10-23T02:18:46.343Z","0.5.15-alpha.126":"2019-10-23T02:24:40.777Z","0.5.15-alpha.127":"2019-10-23T02:29:05.985Z","0.5.15-alpha.128":"2019-10-23T02:36:44.376Z","0.5.15-alpha.129":"2019-10-23T02:39:46.932Z","0.5.15-alpha.130":"2019-10-23T02:55:37.596Z","0.5.15-alpha.131":"2019-10-23T03:04:48.427Z","0.5.15-alpha.132":"2019-10-23T03:17:09.693Z","0.5.15-alpha.133":"2019-10-23T03:19:08.779Z","0.5.15-alpha.134":"2019-10-23T03:35:32.312Z","0.5.15-alpha.135":"2019-10-23T03:37:32.824Z","0.5.15-alpha.136":"2019-10-23T03:41:15.948Z","0.5.15-alpha.137":"2019-10-23T03:53:39.884Z","0.5.15-alpha.138":"2019-10-23T03:56:41.415Z","0.5.15-alpha.139":"2019-10-23T04:05:58.792Z","0.5.15-alpha.140":"2019-10-23T04:12:16.436Z","0.5.15-alpha.141":"2019-10-23T04:15:47.861Z","0.5.15-alpha.142":"2019-10-23T04:18:53.543Z","0.5.15-alpha.143":"2019-10-23T04:23:41.524Z","0.5.15-alpha.144":"2019-10-23T04:33:45.024Z","0.5.15-alpha.145":"2019-10-23T04:36:32.205Z","0.5.15-alpha.146":"2019-10-23T04:44:25.554Z","0.5.15-alpha.147":"2019-10-23T05:13:35.968Z","0.5.15-alpha.148":"2019-10-23T05:16:56.426Z","0.5.15-alpha.149":"2019-10-23T05:22:28.993Z","0.5.15-alpha.150":"2019-10-23T05:24:36.424Z","0.5.15-alpha.151":"2019-10-23T05:27:37.455Z","0.5.15-alpha.152":"2019-10-23T05:35:15.133Z","0.5.15-alpha.153":"2019-10-23T11:15:16.371Z","0.5.15-alpha.154":"2019-10-23T11:19:40.677Z","0.5.15-alpha.155":"2019-10-23T11:22:34.475Z","0.5.15-alpha.156":"2019-10-23T11:25:16.354Z","0.5.15-alpha.157":"2019-10-23T11:29:39.753Z","0.5.15-alpha.158":"2019-10-23T11:36:50.784Z","0.5.15-alpha.159":"2019-10-23T11:38:58.062Z","0.5.15-alpha.160":"2019-10-23T11:46:39.779Z","0.5.15-alpha.161":"2019-10-23T11:51:05.564Z","0.5.15-alpha.162":"2019-10-23T11:57:17.875Z","0.5.15-alpha.163":"2019-10-23T12:25:24.854Z","0.5.15-alpha.164":"2019-10-23T12:29:13.140Z","0.5.15-alpha.165":"2019-10-23T12:36:22.531Z","0.5.15-alpha.166":"2019-10-23T12:41:50.285Z","0.5.15-alpha.167":"2019-10-23T12:57:22.366Z","0.5.15-alpha.168":"2019-10-23T13:00:58.559Z","0.5.15-alpha.169":"2019-10-23T13:06:26.988Z","0.5.15-alpha.170":"2019-10-23T13:36:42.676Z","0.5.15-alpha.171":"2019-10-23T13:40:24.142Z","0.5.15-alpha.172":"2019-10-23T13:49:30.731Z","0.5.15-alpha.173":"2019-10-23T14:08:07.670Z","0.5.15-alpha.174":"2019-10-23T14:09:33.439Z","0.5.15-alpha.175":"2019-10-23T14:13:49.609Z","0.5.15-alpha.176":"2019-10-23T14:17:35.883Z","0.5.15-alpha.177":"2019-10-23T22:52:23.191Z","0.5.15-alpha.178":"2019-10-23T22:57:05.469Z","0.5.15-alpha.179":"2019-10-23T23:03:58.354Z","0.5.15":"2019-10-23T23:06:01.079Z","0.6.0":"2019-10-24T06:30:18.755Z","0.6.1":"2019-10-24T06:40:09.744Z","0.6.2-alpha.6":"2019-10-24T13:50:25.732Z","0.6.2":"2019-10-24T14:14:17.161Z","0.6.3-alpha.0":"2019-10-24T14:38:05.058Z","0.6.3-alpha.1":"2019-10-24T14:46:03.058Z","0.6.3-alpha.2":"2019-10-24T14:47:49.288Z","0.6.3-alpha.3":"2019-10-24T14:52:11.552Z","0.6.3-alpha.4":"2019-10-24T14:56:38.720Z","0.6.3":"2019-10-24T14:59:23.802Z","0.6.4-alpha.1":"2019-10-24T18:54:34.076Z","0.6.4":"2019-10-24T18:55:23.307Z","0.6.5":"2019-10-24T19:01:03.342Z","0.7.0":"2019-10-26T01:26:11.141Z","0.7.1":"2019-10-26T09:32:20.282Z","0.7.2":"2019-10-28T06:47:08.896Z","0.7.3":"2019-10-28T06:56:52.115Z","0.7.4":"2019-10-28T07:02:06.546Z","0.7.5":"2019-10-28T07:05:11.480Z","0.7.6":"2019-10-28T11:57:28.463Z","0.7.7":"2019-10-28T12:16:40.094Z","0.7.8":"2019-10-28T12:29:41.441Z","0.7.9":"2019-10-28T12:42:25.899Z","0.7.10":"2019-10-28T12:52:55.526Z","0.7.11":"2019-10-28T13:32:31.902Z","0.7.12":"2019-10-28T19:19:07.268Z","0.7.13":"2019-10-28T19:26:58.446Z","0.7.14":"2019-10-28T19:35:10.845Z","0.7.15":"2019-10-28T19:37:34.842Z","0.7.16":"2019-10-28T19:41:28.790Z","0.7.17":"2019-10-28T19:44:25.185Z","0.7.18":"2019-10-28T20:09:37.308Z","0.7.19":"2019-10-28T20:13:04.783Z","0.7.20":"2019-10-28T20:16:37.298Z","0.7.21":"2019-10-28T20:18:32.409Z","0.7.22":"2019-10-28T20:30:35.011Z","0.7.23":"2019-10-28T20:36:00.155Z","0.7.24":"2019-10-28T20:39:29.270Z","0.7.25":"2019-10-28T20:50:42.759Z","0.7.26":"2019-10-28T20:56:14.017Z","0.7.27":"2019-10-28T20:59:50.948Z","0.7.28":"2019-10-28T21:10:33.913Z","0.7.29":"2019-10-28T21:13:28.384Z","0.7.30":"2019-10-28T21:17:23.270Z","0.7.31":"2019-10-28T21:24:27.359Z","0.7.32":"2019-10-28T21:26:46.304Z","0.7.33":"2019-10-28T21:31:19.678Z","0.7.34":"2019-10-28T21:33:46.156Z","0.7.35":"2019-10-28T21:36:19.810Z","0.7.36":"2019-10-28T21:38:45.270Z","0.7.37":"2019-10-28T21:41:34.683Z","0.7.38":"2019-10-28T21:45:25.339Z","0.7.39":"2019-10-28T21:52:30.682Z","0.7.40":"2019-10-28T21:55:05.902Z","0.7.41":"2019-10-28T22:19:56.427Z","0.7.42":"2019-10-28T22:33:51.497Z","0.7.43":"2019-10-28T22:41:26.199Z","0.7.44":"2019-10-28T22:47:27.903Z","0.7.45":"2019-10-28T22:49:09.414Z","0.7.46":"2019-10-28T22:51:33.313Z","0.7.47":"2019-10-28T22:57:03.016Z","0.7.48":"2019-10-28T23:03:14.488Z","0.7.49":"2019-10-28T23:07:29.879Z","0.7.50":"2019-10-28T23:12:19.018Z","0.7.51":"2019-10-28T23:17:21.572Z","0.7.52":"2019-10-28T23:19:15.005Z","0.7.53":"2019-10-28T23:21:15.577Z","0.7.54":"2019-10-28T23:24:59.916Z","0.7.55":"2019-10-28T23:28:25.615Z","0.7.56":"2019-10-28T23:30:51.713Z","0.7.57":"2019-10-28T23:35:36.314Z","0.7.58":"2019-10-28T23:42:54.175Z","0.7.59":"2019-10-28T23:49:24.632Z","0.7.60":"2019-10-28T23:54:12.186Z","0.7.61":"2019-10-29T00:06:15.211Z","0.7.62":"2019-10-29T04:12:05.815Z","0.7.63":"2019-10-29T04:57:28.675Z","0.7.64":"2019-10-29T05:14:10.992Z","0.7.65":"2019-10-29T05:17:01.300Z","0.7.66":"2019-10-29T05:19:06.416Z","0.7.67":"2019-10-29T05:20:16.178Z","0.7.68":"2019-10-29T05:24:26.797Z","0.7.69":"2019-10-29T05:32:33.790Z","0.8.0":"2019-10-29T06:09:03.577Z","0.8.1-alpha.25":"2019-11-01T01:10:17.923Z","0.8.1-alpha.26":"2019-11-01T01:16:37.575Z","0.8.1-alpha.27":"2019-11-01T01:22:13.786Z","0.8.1-alpha.28":"2019-11-01T01:25:15.826Z","0.8.1-alpha.29":"2019-11-01T01:29:08.378Z","0.8.1-alpha.30":"2019-11-01T01:43:54.643Z","0.9.0":"2019-11-01T02:47:23.048Z","0.9.1":"2019-11-01T02:50:59.321Z","0.9.2":"2019-11-01T03:08:31.083Z","0.9.3":"2019-11-01T03:18:45.196Z","0.9.4":"2019-11-01T03:23:49.031Z","0.9.5":"2019-11-01T03:26:25.002Z","0.9.6":"2019-11-01T03:36:24.924Z","0.9.7":"2019-11-01T03:38:52.568Z","0.9.8":"2019-11-01T03:44:50.078Z","0.9.9":"2019-11-01T03:47:04.823Z","0.9.10":"2019-11-01T03:52:27.401Z","0.9.11":"2019-11-01T03:54:10.323Z","0.9.12":"2019-11-01T03:56:37.619Z","0.9.13":"2019-11-01T04:02:49.433Z","0.9.14":"2019-11-01T04:08:09.564Z","0.9.15-alpha.3":"2019-11-01T05:18:09.539Z","0.9.15-alpha.5":"2019-11-01T05:22:00.554Z","0.9.15-alpha.7":"2019-11-01T05:29:12.145Z","0.9.15-alpha.8":"2019-11-01T05:31:59.568Z","0.9.15-alpha.10":"2019-11-01T05:38:21.373Z","0.9.15-alpha.11":"2019-11-01T05:40:22.018Z","0.9.15-alpha.13":"2019-11-01T05:52:28.971Z","0.9.15-alpha.15":"2019-11-01T05:54:59.723Z","0.9.15-alpha.16":"2019-11-01T06:00:27.185Z","0.9.15-alpha.17":"2019-11-01T06:02:51.623Z","0.9.15-alpha.18":"2019-11-01T06:04:34.679Z","0.9.15-alpha.19":"2019-11-01T06:06:08.913Z","0.9.15-alpha.20":"2019-11-01T06:28:30.218Z","0.9.15-alpha.21":"2019-11-01T06:30:39.150Z","0.9.15-alpha.22":"2019-11-01T06:33:01.622Z","0.9.15-alpha.23":"2019-11-01T06:46:57.286Z","0.9.15-alpha.24":"2019-11-01T07:07:59.331Z","0.9.15-alpha.26":"2019-11-01T07:12:24.686Z","0.9.15-alpha.27":"2019-11-01T07:13:34.111Z","0.9.15-alpha.28":"2019-11-01T07:18:54.740Z","0.9.15-alpha.29":"2019-11-01T07:43:05.214Z","0.9.15-alpha.30":"2019-11-01T07:46:42.511Z","0.9.15-alpha.31":"2019-11-01T07:50:57.859Z","0.9.15-alpha.32":"2019-11-01T08:01:42.825Z","0.9.15-alpha.33":"2019-11-01T08:05:05.215Z","0.9.15-alpha.34":"2019-11-01T08:21:53.905Z","0.9.15-alpha.35":"2019-11-01T08:23:41.242Z","0.9.15-alpha.36":"2019-11-01T08:30:55.334Z","0.9.15-alpha.37":"2019-11-01T08:47:15.212Z","0.9.15-alpha.38":"2019-11-01T08:55:35.472Z","0.10.0":"2019-11-01T09:19:40.880Z","0.10.1":"2019-11-01T09:30:58.407Z","0.10.2-alpha.0":"2019-11-01T11:46:44.408Z","0.10.2-alpha.1":"2019-11-01T11:53:12.327Z","0.10.2-alpha.2":"2019-11-01T11:56:16.909Z","0.10.2-alpha.4":"2019-11-01T12:01:04.157Z","0.10.2-alpha.5":"2019-11-01T12:12:55.532Z","0.10.2-alpha.6":"2019-11-01T12:14:32.099Z","0.10.2-alpha.7":"2019-11-01T12:20:14.809Z","0.10.2-alpha.8":"2019-11-01T12:28:34.055Z","0.10.2-alpha.9":"2019-11-01T12:30:30.386Z","0.10.2-alpha.10":"2019-11-01T12:32:34.586Z","0.10.2-alpha.11":"2019-11-01T12:33:50.521Z","0.10.2-alpha.12":"2019-11-01T12:36:41.323Z","0.10.2-alpha.13":"2019-11-01T12:43:27.221Z","0.10.2-alpha.14":"2019-11-01T12:52:14.723Z","0.10.2-alpha.15":"2019-11-01T12:54:49.847Z","0.10.2-alpha.16":"2019-11-01T12:58:33.719Z","0.10.2-alpha.17":"2019-11-01T13:00:38.598Z","0.10.2-alpha.18":"2019-11-01T13:02:34.500Z","0.10.2-alpha.19":"2019-11-01T13:08:37.726Z","0.10.2-alpha.20":"2019-11-01T13:09:42.970Z","0.10.2-alpha.21":"2019-11-01T13:13:17.192Z","0.10.2-alpha.22":"2019-11-01T13:19:57.133Z","0.10.2-alpha.23":"2019-11-01T13:21:09.527Z","0.10.2-alpha.24":"2019-11-01T13:28:31.319Z","0.10.2-alpha.25":"2019-11-01T13:37:48.761Z","0.10.2-alpha.26":"2019-11-01T13:40:16.042Z","0.10.2-alpha.27":"2019-11-01T13:49:34.701Z","0.10.2-alpha.28":"2019-11-01T13:52:11.290Z","0.10.2-alpha.29":"2019-11-01T13:53:45.158Z","0.10.2-alpha.30":"2019-11-01T13:56:46.456Z","0.10.2-alpha.31":"2019-11-01T13:59:20.946Z","0.10.2-alpha.32":"2019-11-01T14:01:25.269Z","0.10.2-alpha.33":"2019-11-01T14:03:50.062Z","0.10.2-alpha.34":"2019-11-01T14:12:56.225Z","0.10.2-alpha.35":"2019-11-01T14:14:23.073Z","0.10.2-alpha.36":"2019-11-01T14:16:25.584Z","0.10.2-alpha.37":"2019-11-01T14:19:14.607Z","0.10.2-alpha.38":"2019-11-01T14:23:25.880Z","0.10.2":"2019-11-01T14:27:33.369Z","0.10.3":"2019-11-02T02:00:01.145Z","0.10.4":"2019-11-02T02:12:41.821Z","0.10.5-alpha.1":"2019-11-02T10:23:54.874Z","0.10.5-alpha.2":"2019-11-02T10:26:28.684Z","0.10.5-alpha.3":"2019-11-02T10:28:53.005Z","0.10.5-alpha.4":"2019-11-02T10:30:43.122Z","0.10.5-alpha.5":"2019-11-02T10:34:33.869Z","0.10.5-alpha.6":"2019-11-02T10:35:55.077Z","0.10.5-alpha.7":"2019-11-02T10:37:36.047Z","0.10.5-alpha.8":"2019-11-02T10:39:05.774Z","0.10.5-alpha.9":"2019-11-02T10:42:47.378Z","0.10.5-alpha.11":"2019-11-02T10:51:47.056Z","0.10.5-alpha.12":"2019-11-02T10:55:20.855Z","0.10.5-alpha.13":"2019-11-02T10:57:18.686Z","0.10.5-alpha.14":"2019-11-02T11:00:03.595Z","0.10.5-alpha.15":"2019-11-02T11:04:04.963Z","0.10.5-alpha.16":"2019-11-02T11:10:52.849Z","0.10.5-alpha.17":"2019-11-02T11:19:29.539Z","0.10.5-alpha.18":"2019-11-02T12:01:58.095Z","0.10.5-alpha.19":"2019-11-02T12:07:46.083Z","0.10.5-alpha.20":"2019-11-02T12:11:30.720Z","0.10.5-alpha.21":"2019-11-02T12:14:26.288Z","0.10.5-alpha.22":"2019-11-02T12:16:24.814Z","0.10.5-alpha.23":"2019-11-02T12:26:03.148Z","0.10.5-alpha.24":"2019-11-02T12:31:59.394Z","0.10.5-alpha.25":"2019-11-02T13:12:18.402Z","0.10.5-alpha.26":"2019-11-02T13:18:16.896Z","0.10.5-alpha.27":"2019-11-02T13:20:06.548Z","0.10.5-alpha.28":"2019-11-02T13:22:08.183Z","0.10.5-alpha.29":"2019-11-02T13:37:40.585Z","0.10.5-alpha.30":"2019-11-02T13:40:58.770Z","0.10.5-alpha.31":"2019-11-02T13:43:25.744Z","0.10.5-alpha.32":"2019-11-02T13:46:23.213Z","0.10.5-alpha.33":"2019-11-02T13:50:19.403Z","0.10.5-alpha.34":"2019-11-02T13:52:33.928Z","0.10.5-alpha.35":"2019-11-02T14:00:01.162Z","0.10.5-alpha.36":"2019-11-02T14:02:42.899Z","0.10.5-alpha.37":"2019-11-02T14:04:46.644Z","0.10.5-alpha.38":"2019-11-02T14:13:58.310Z","0.10.5-alpha.39":"2019-11-02T14:54:13.484Z","0.10.5-alpha.41":"2019-11-02T14:56:09.365Z","0.10.5-alpha.43":"2019-11-02T15:05:26.422Z","0.10.5-alpha.44":"2019-11-02T15:11:56.896Z","0.10.5-alpha.45":"2019-11-02T15:15:44.926Z","0.10.5-alpha.46":"2019-11-02T15:18:15.995Z","0.10.5-alpha.47":"2019-11-02T15:22:05.977Z","0.10.5-alpha.48":"2019-11-02T15:24:27.383Z","0.10.5-alpha.49":"2019-11-02T15:26:45.359Z","0.10.5-alpha.50":"2019-11-02T15:28:50.694Z","0.10.5-alpha.51":"2019-11-02T15:31:36.715Z","0.10.5-alpha.52":"2019-11-02T15:35:08.074Z","0.10.5-alpha.53":"2019-11-02T15:37:04.894Z","0.10.5-alpha.54":"2019-11-02T15:38:43.073Z","0.10.5-alpha.55":"2019-11-02T15:40:11.560Z","0.10.5-alpha.56":"2019-11-02T15:41:57.396Z","0.10.5-alpha.57":"2019-11-02T15:47:06.562Z","0.10.5-alpha.58":"2019-11-02T15:49:37.576Z","0.10.5-alpha.59":"2019-11-02T15:52:20.534Z","0.10.5-alpha.60":"2019-11-02T15:57:22.331Z","0.10.5-alpha.61":"2019-11-02T16:19:48.226Z","0.10.5-alpha.62":"2019-11-02T16:21:56.015Z","0.10.5-alpha.63":"2019-11-02T16:26:43.144Z","0.10.5-alpha.64":"2019-11-02T16:30:03.645Z","0.10.5-alpha.65":"2019-11-02T16:38:40.945Z","0.10.5":"2019-11-02T16:41:59.980Z","0.10.6-alpha.1":"2019-11-05T09:04:58.465Z","0.10.6-alpha.2":"2019-11-05T09:09:06.115Z","0.10.6-alpha.4":"2019-11-05T09:15:47.522Z","0.10.6":"2019-11-05T09:41:02.376Z","0.10.7":"2019-11-05T15:21:25.351Z","0.10.8":"2019-11-06T07:16:52.116Z","0.10.9-alpha.5":"2019-11-10T17:05:27.089Z","0.10.9-alpha.6":"2019-11-10T17:09:48.603Z","0.10.9":"2019-11-10T17:16:01.671Z","0.10.10-alpha.0":"2019-11-10T18:32:26.279Z","0.10.10-alpha.1":"2019-11-10T18:34:57.438Z","0.10.10-alpha.2":"2019-11-10T18:38:42.595Z","0.10.10-alpha.3":"2019-11-10T18:39:36.213Z","0.10.10-alpha.4":"2019-11-10T18:51:01.815Z","0.10.10-alpha.5":"2019-11-10T19:29:23.299Z","0.10.10-alpha.6":"2019-11-10T19:33:07.012Z","0.10.10-alpha.7":"2019-11-10T19:37:19.440Z","0.10.10-alpha.8":"2019-11-10T19:41:38.441Z","0.10.10-alpha.9":"2019-11-10T19:43:44.017Z","0.10.10-alpha.10":"2019-11-10T19:47:07.882Z","0.10.10-alpha.11":"2019-11-10T19:49:45.537Z","0.10.10-alpha.12":"2019-11-10T19:54:14.797Z","0.10.10-alpha.13":"2019-11-10T19:59:30.453Z","0.10.10-alpha.14":"2019-11-10T20:05:26.647Z","0.10.10-alpha.15":"2019-11-10T20:07:26.152Z","0.10.10-alpha.16":"2019-11-10T20:11:36.709Z","0.10.10-alpha.17":"2019-11-10T20:13:19.282Z","0.10.10-alpha.18":"2019-11-10T20:16:57.056Z","0.10.10-alpha.19":"2019-11-10T20:25:53.635Z","0.10.10-alpha.20":"2019-11-10T20:29:54.811Z","0.10.10-alpha.21":"2019-11-10T20:31:16.463Z","0.10.10-alpha.22":"2019-11-10T20:37:10.729Z","0.10.10-alpha.23":"2019-11-10T20:38:46.454Z","0.10.10-alpha.24":"2019-11-10T20:41:02.945Z","0.10.10-alpha.25":"2019-11-10T20:47:01.853Z","0.10.10-alpha.26":"2019-11-10T20:58:23.022Z","0.10.10-alpha.27":"2019-11-10T21:00:26.586Z","0.10.10-alpha.29":"2019-11-10T21:04:49.711Z","0.10.10-alpha.30":"2019-11-10T21:06:07.844Z","0.10.10-alpha.31":"2019-11-10T21:08:13.696Z","0.10.10-alpha.32":"2019-11-10T21:09:01.637Z","0.10.10-alpha.33":"2019-11-10T21:11:01.524Z","0.10.10-alpha.34":"2019-11-10T21:12:26.004Z","0.10.10-alpha.35":"2019-11-10T21:22:59.902Z","0.10.10-alpha.36":"2019-11-10T21:33:53.612Z","0.10.10-alpha.37":"2019-11-10T21:40:47.542Z","0.10.10-alpha.38":"2019-11-10T21:52:31.605Z","0.10.10-alpha.39":"2019-11-10T21:55:54.213Z","0.10.10-alpha.40":"2019-11-11T03:50:29.538Z","0.10.10-alpha.41":"2019-11-11T03:57:22.059Z","0.10.10-alpha.42":"2019-11-11T04:00:16.227Z","0.10.10-alpha.43":"2019-11-11T04:01:20.108Z","0.10.10-alpha.44":"2019-11-11T04:06:46.560Z","0.10.10-alpha.45":"2019-11-11T04:14:00.509Z","0.10.10-alpha.46":"2019-11-11T04:16:34.430Z","0.10.10-alpha.47":"2019-11-11T04:18:29.933Z","0.10.10-alpha.48":"2019-11-11T04:32:17.634Z","0.10.10-alpha.49":"2019-11-11T04:35:06.617Z","0.10.10-alpha.50":"2019-11-11T04:42:43.290Z","0.10.10-alpha.51":"2019-11-11T04:47:33.311Z","0.10.10-alpha.52":"2019-11-11T04:51:15.383Z","0.10.10-alpha.53":"2019-11-11T04:52:22.770Z","0.10.10-alpha.54":"2019-11-11T04:54:47.914Z","0.10.10-alpha.55":"2019-11-11T04:57:56.460Z","0.10.10-alpha.56":"2019-11-11T05:03:46.760Z","0.10.10-alpha.57":"2019-11-11T05:05:06.865Z","0.10.10-alpha.58":"2019-11-11T05:06:40.621Z","0.10.10-alpha.59":"2019-11-11T05:22:29.874Z","0.10.10-alpha.60":"2019-11-11T06:27:18.460Z","0.10.10-alpha.61":"2019-11-11T06:36:38.369Z","0.10.10-alpha.62":"2019-11-11T06:38:39.644Z","0.10.10-alpha.63":"2019-11-11T08:45:13.095Z","0.10.10-alpha.64":"2019-11-11T08:48:06.772Z","0.10.10-alpha.65":"2019-11-11T08:50:21.810Z","0.10.10-alpha.66":"2019-11-11T08:53:02.645Z","0.10.10-alpha.67":"2019-11-11T08:57:46.733Z","0.10.10-alpha.68":"2019-11-11T08:59:47.119Z","0.10.10-alpha.69":"2019-11-11T09:05:16.376Z","0.10.10-alpha.70":"2019-11-11T09:12:06.260Z","0.10.10-alpha.71":"2019-11-11T09:25:22.679Z","0.10.10-alpha.72":"2019-11-11T09:34:04.732Z","0.10.10-alpha.73":"2019-11-11T09:39:43.387Z","0.10.10-alpha.74":"2019-11-11T09:41:04.300Z","0.10.10-alpha.75":"2019-11-11T09:53:52.687Z","0.10.10-alpha.76":"2019-11-11T09:59:27.810Z","0.10.10-alpha.77":"2019-11-11T10:08:39.685Z","0.10.10-alpha.78":"2019-11-11T10:10:39.684Z","0.10.10-alpha.79":"2019-11-11T10:12:37.954Z","0.10.10-alpha.80":"2019-11-11T10:16:17.348Z","0.10.10-alpha.81":"2019-11-11T10:22:00.957Z","0.10.10-alpha.82":"2019-11-11T10:26:02.037Z","0.10.10-alpha.83":"2019-11-11T10:29:27.685Z","0.10.10-alpha.84":"2019-11-11T10:34:41.332Z","0.10.10-alpha.85":"2019-11-11T10:36:25.031Z","0.10.10-alpha.86":"2019-11-11T10:38:50.047Z","0.10.10-alpha.87":"2019-11-11T10:42:36.808Z","0.10.10-alpha.88":"2019-11-11T10:45:15.676Z","0.10.10-alpha.89":"2019-11-11T10:49:53.525Z","0.10.10-alpha.90":"2019-11-11T10:52:41.282Z","0.10.10-alpha.91":"2019-11-11T10:54:44.328Z","0.10.10-alpha.92":"2019-11-11T10:57:47.720Z","0.10.10-alpha.93":"2019-11-11T10:59:29.462Z","0.10.10-alpha.94":"2019-11-11T11:03:24.130Z","0.10.10-alpha.95":"2019-11-11T11:07:53.443Z","0.10.10-alpha.96":"2019-11-11T11:16:10.693Z","0.10.10-alpha.97":"2019-11-11T11:31:41.112Z","0.10.10-alpha.98":"2019-11-11T11:36:22.622Z","0.10.10-alpha.99":"2019-11-11T11:41:13.383Z","0.10.10-alpha.100":"2019-11-11T11:44:07.962Z","0.10.10-alpha.101":"2019-11-11T11:48:31.975Z","0.10.10-alpha.102":"2019-11-11T11:50:16.398Z","0.10.10-alpha.103":"2019-11-11T11:54:29.579Z","0.10.10-alpha.104":"2019-11-11T11:58:08.030Z","0.10.10-alpha.105":"2019-11-11T12:07:37.437Z","0.10.10-alpha.106":"2019-11-11T12:13:28.140Z","0.10.10-alpha.107":"2019-11-11T12:18:18.550Z","0.10.10-alpha.108":"2019-11-11T12:21:50.667Z","0.11.0":"2019-11-11T13:14:05.340Z","0.11.1-alpha.1":"2019-11-11T13:28:01.513Z","0.11.1-alpha.2":"2019-11-11T13:39:42.635Z","0.11.1-alpha.3":"2019-11-11T13:45:07.833Z","0.11.1-alpha.4":"2019-11-11T14:00:30.723Z","0.11.1-alpha.5":"2019-11-11T14:05:26.984Z","0.11.1-alpha.6":"2019-11-11T14:10:04.799Z","0.11.1-alpha.7":"2019-11-11T14:16:33.164Z","0.11.1":"2019-11-11T14:18:55.563Z","0.11.2-alpha.0":"2019-11-11T14:28:16.127Z","0.11.2-alpha.1":"2019-11-11T14:38:26.805Z","0.11.2-alpha.2":"2019-11-11T14:40:25.067Z","0.11.2-alpha.3":"2019-11-11T14:48:27.189Z","0.11.2-alpha.4":"2019-11-11T14:49:57.625Z","0.11.2-alpha.5":"2019-11-11T14:52:31.487Z","0.11.2-alpha.6":"2019-11-11T14:54:27.010Z","0.11.2-alpha.7":"2019-11-11T15:01:10.272Z","0.11.2-alpha.8":"2019-11-11T15:02:55.217Z","0.11.2-alpha.9":"2019-11-11T15:05:43.108Z","0.11.2":"2019-11-11T15:11:58.009Z","0.11.3-alpha.0":"2019-11-11T15:15:45.299Z","0.11.3-alpha.1":"2019-11-11T15:18:23.173Z","0.11.3-alpha.2":"2019-11-11T15:21:51.297Z","0.11.3-alpha.3":"2019-11-11T16:14:25.968Z","0.11.3-alpha.4":"2019-11-11T16:25:54.570Z","0.11.3-alpha.5":"2019-11-11T22:39:33.188Z","0.11.3-alpha.6":"2019-11-11T22:42:24.553Z","0.11.3-alpha.7":"2019-11-11T22:55:06.747Z","0.11.3-alpha.8":"2019-11-11T22:58:56.341Z","0.11.3-alpha.9":"2019-11-11T23:14:51.390Z","0.11.3-alpha.10":"2019-11-11T23:19:24.856Z","0.11.3-alpha.11":"2019-11-11T23:21:51.945Z","0.11.3-alpha.12":"2019-11-11T23:23:51.791Z","0.11.3-alpha.13":"2019-11-11T23:33:40.471Z","0.11.3-alpha.14":"2019-11-11T23:34:59.731Z","0.11.3-alpha.15":"2019-11-11T23:37:32.119Z","0.11.3-alpha.16":"2019-11-11T23:38:34.363Z","0.11.3-alpha.17":"2019-11-11T23:42:45.709Z","0.11.3-alpha.18":"2019-11-11T23:44:22.767Z","0.11.3-alpha.19":"2019-11-11T23:46:15.374Z","0.11.3-alpha.20":"2019-11-11T23:47:29.587Z","0.11.3-alpha.21":"2019-11-11T23:49:10.535Z","0.11.3-alpha.22":"2019-11-11T23:50:38.581Z","0.11.3-alpha.23":"2019-11-11T23:52:49.722Z","0.11.3-alpha.24":"2019-11-11T23:55:41.406Z","0.11.3-alpha.25":"2019-11-11T23:58:32.160Z","0.11.3-alpha.26":"2019-11-12T00:11:49.058Z","0.11.3-alpha.27":"2019-11-12T00:13:39.141Z","0.11.3-alpha.28":"2019-11-12T00:15:42.535Z","0.11.3-alpha.29":"2019-11-12T00:18:17.837Z","0.11.3-alpha.30":"2019-11-12T00:20:07.973Z","0.11.3-alpha.31":"2019-11-12T00:22:28.292Z","0.11.3-alpha.32":"2019-11-12T00:25:05.978Z","0.11.3-alpha.33":"2019-11-12T00:43:40.460Z","0.11.3-alpha.34":"2019-11-12T00:45:09.794Z","0.11.3-alpha.35":"2019-11-12T00:54:57.785Z","0.11.3-alpha.36":"2019-11-12T01:02:47.873Z","0.11.3-alpha.37":"2019-11-12T01:08:00.788Z","0.11.3-alpha.38":"2019-11-12T01:19:53.332Z","0.11.3-alpha.39":"2019-11-12T01:21:11.505Z","0.11.3-alpha.40":"2019-11-12T01:22:21.740Z","0.11.3-alpha.41":"2019-11-12T01:24:28.421Z","0.11.3-alpha.42":"2019-11-12T01:27:22.846Z","0.11.3-alpha.43":"2019-11-12T01:29:15.154Z","0.11.3-alpha.44":"2019-11-12T01:30:13.445Z","0.11.3-alpha.45":"2019-11-12T01:34:35.768Z","0.11.3-alpha.46":"2019-11-12T01:37:20.647Z","0.11.3-alpha.47":"2019-11-12T01:40:44.126Z","0.11.3-alpha.48":"2019-11-12T01:45:20.606Z","0.11.3-alpha.49":"2019-11-12T01:46:51.576Z","0.11.3-alpha.50":"2019-11-12T01:47:54.867Z","0.11.3-alpha.51":"2019-11-12T01:49:22.823Z","0.11.3-alpha.52":"2019-11-12T02:02:21.345Z","0.11.3-alpha.53":"2019-11-12T02:04:37.748Z","0.11.3-alpha.54":"2019-11-12T02:07:16.359Z","0.11.3-alpha.55":"2019-11-12T02:13:16.780Z","0.11.3-alpha.56":"2019-11-12T02:15:19.053Z","0.11.3-alpha.57":"2019-11-12T02:18:04.563Z","0.11.3-alpha.58":"2019-11-12T02:33:15.751Z","0.11.3":"2019-11-12T02:50:32.925Z","0.11.4-alpha.0":"2019-11-12T05:36:41.154Z","0.11.4-alpha.1":"2019-11-12T06:03:39.895Z","0.11.4-alpha.2":"2019-11-12T06:16:52.079Z","0.11.4-alpha.3":"2019-11-12T06:19:48.685Z","0.11.4-alpha.4":"2019-11-12T06:31:52.841Z","0.11.4-alpha.5":"2019-11-12T06:41:59.529Z","0.11.4-alpha.6":"2019-11-12T06:44:45.792Z","0.11.4-alpha.7":"2019-11-12T06:48:18.268Z","0.11.4-alpha.8":"2019-11-12T06:50:46.606Z","0.11.4-alpha.9":"2019-11-12T06:53:17.225Z","0.11.4-alpha.10":"2019-11-12T06:57:01.005Z","0.11.4-alpha.11":"2019-11-12T07:03:37.009Z","0.11.4-alpha.12":"2019-11-12T07:06:41.130Z","0.11.4-alpha.13":"2019-11-12T07:07:59.840Z","0.11.4-alpha.14":"2019-11-12T07:12:44.980Z","0.11.4-alpha.15":"2019-11-12T07:16:42.274Z","0.11.4-alpha.16":"2019-11-12T07:19:44.459Z","0.11.4-alpha.17":"2019-11-12T07:25:28.117Z","0.11.4-alpha.18":"2019-11-12T07:30:02.996Z","0.11.4-alpha.19":"2019-11-12T07:32:13.946Z","0.11.4-alpha.20":"2019-11-12T07:36:12.802Z","0.11.4-alpha.21":"2019-11-12T07:38:26.566Z","0.11.4-alpha.22":"2019-11-12T07:54:57.124Z","0.11.4-alpha.23":"2019-11-12T07:56:46.078Z","0.11.4-alpha.24":"2019-11-12T07:59:34.853Z","0.11.4-alpha.25":"2019-11-12T08:11:17.436Z","0.11.4":"2019-11-12T08:24:26.694Z","0.11.5-alpha.0":"2019-11-13T03:50:43.077Z","0.11.5-alpha.1":"2019-11-13T03:57:12.600Z","0.11.5-alpha.2":"2019-11-13T04:00:07.638Z","0.11.5":"2019-11-13T04:07:36.489Z","0.11.6-alpha.1":"2019-11-14T06:51:11.425Z","0.11.6-alpha.2":"2019-11-14T06:53:35.173Z","0.11.6-alpha.3":"2019-11-14T06:59:39.866Z","0.11.6-alpha.4":"2019-11-14T07:15:21.233Z","0.11.6-alpha.5":"2019-11-14T07:17:05.779Z","0.11.6-alpha.6":"2019-11-14T07:18:40.962Z","0.11.6-alpha.7":"2019-11-14T07:39:21.567Z","0.11.6-alpha.8":"2019-11-14T07:40:51.089Z","0.11.6-alpha.9":"2019-11-14T07:41:34.190Z","0.11.6-alpha.10":"2019-11-14T07:43:02.994Z","0.11.6-alpha.11":"2019-11-14T07:44:28.239Z","0.11.6-alpha.12":"2019-11-14T07:47:36.689Z","0.11.6-alpha.13":"2019-11-14T07:49:02.982Z","0.11.6-alpha.14":"2019-11-14T07:56:38.647Z","0.11.6-alpha.15":"2019-11-14T07:58:45.518Z","0.11.6-alpha.16":"2019-11-14T08:04:24.004Z","0.11.6-alpha.17":"2019-11-14T08:07:50.572Z","0.11.6-alpha.18":"2019-11-14T08:10:24.404Z","0.11.6-alpha.19":"2019-11-14T08:13:39.474Z","0.11.6-alpha.20":"2019-11-14T08:16:12.951Z","0.11.6-alpha.21":"2019-11-14T08:24:22.641Z","0.11.6-alpha.22":"2019-11-14T08:26:43.111Z","0.11.6-alpha.23":"2019-11-14T08:28:06.281Z","0.11.6-alpha.24":"2019-11-14T08:38:46.545Z","0.11.6-alpha.25":"2019-11-14T08:40:16.839Z","0.11.6-alpha.26":"2019-11-14T08:41:35.512Z","0.11.6-alpha.27":"2019-11-14T08:43:45.455Z","0.11.6-alpha.28":"2019-11-14T08:47:16.749Z","0.11.6-alpha.29":"2019-11-14T11:44:46.075Z","0.11.6-alpha.30":"2019-11-14T11:48:12.792Z","0.11.6-alpha.31":"2019-11-14T12:01:52.991Z","0.11.6-alpha.32":"2019-11-14T12:04:53.778Z","0.11.6-alpha.33":"2019-11-14T12:16:17.980Z","0.11.6-alpha.34":"2019-11-14T12:17:53.620Z","0.11.6-alpha.35":"2019-11-14T12:24:02.643Z","0.11.6-alpha.36":"2019-11-14T12:27:07.896Z","0.11.6-alpha.37":"2019-11-14T12:33:14.599Z","0.11.6-alpha.38":"2019-11-14T12:47:51.688Z","0.11.6-alpha.39":"2019-11-14T12:51:13.017Z","0.11.6-alpha.40":"2019-11-14T12:55:27.042Z","0.11.6-alpha.41":"2019-11-14T12:57:11.473Z","0.11.6-alpha.42":"2019-11-14T12:59:29.337Z","0.11.6-alpha.43":"2019-11-14T13:01:55.782Z","0.11.6-alpha.44":"2019-11-14T13:06:24.006Z","0.11.6-alpha.45":"2019-11-14T13:09:45.915Z","0.11.6-alpha.46":"2019-11-14T13:12:00.850Z","0.11.6-alpha.47":"2019-11-14T13:13:57.810Z","0.11.6-alpha.48":"2019-11-14T13:18:00.581Z","0.11.6":"2019-11-14T13:32:33.308Z","0.11.7-alpha.0":"2019-11-14T13:58:44.470Z","0.11.7-alpha.1":"2019-11-14T14:04:49.139Z","0.11.7-alpha.2":"2019-11-14T14:23:32.552Z","0.11.7":"2019-11-14T14:25:36.062Z","0.11.8-alpha.1":"2019-11-14T19:03:31.040Z","0.11.8-alpha.2":"2019-11-14T19:07:01.918Z","0.11.8-alpha.3":"2019-11-14T19:32:01.985Z","0.11.8-alpha.4":"2019-11-14T19:37:32.781Z","0.11.8-alpha.5":"2019-11-14T19:39:39.649Z","0.11.8":"2019-11-14T19:51:49.666Z","0.11.9":"2019-11-14T20:20:46.394Z","0.11.10-alpha.0":"2019-11-15T01:35:39.948Z","0.11.10-alpha.1":"2019-11-15T01:41:31.128Z","0.11.10":"2019-11-15T01:44:04.962Z","0.11.11-alpha.1":"2019-11-15T02:16:18.649Z","0.11.11-alpha.5":"2019-11-15T06:37:10.277Z","0.11.11-alpha.6":"2019-11-15T06:40:47.922Z","0.11.11-alpha.7":"2019-11-15T06:52:42.894Z","0.11.11-alpha.8":"2019-11-15T06:55:29.956Z","0.11.11-alpha.9":"2019-11-15T06:56:54.081Z","0.11.11-alpha.10":"2019-11-15T07:02:01.592Z","0.11.11-alpha.11":"2019-11-15T07:05:21.123Z","0.11.11-alpha.12":"2019-11-15T07:06:59.573Z","0.11.11-alpha.13":"2019-11-15T07:14:08.836Z","0.11.11":"2019-11-15T07:17:31.616Z","0.11.12-alpha.0":"2019-11-15T07:23:06.493Z","0.11.12-alpha.1":"2019-11-15T07:27:51.727Z","0.11.12-alpha.2":"2019-11-15T07:42:48.606Z","0.11.12-alpha.3":"2019-11-15T07:50:48.760Z","0.11.12-alpha.4":"2019-11-15T08:03:11.533Z","0.11.12":"2019-11-18T20:24:59.620Z","0.11.13":"2019-11-18T20:28:14.939Z","0.11.14":"2019-11-18T20:37:03.931Z","0.11.15-alpha.0":"2019-11-18T20:45:58.041Z","0.11.15-alpha.1":"2019-11-18T20:51:48.639Z","0.11.15-alpha.2":"2019-11-18T20:55:02.134Z","0.11.15-alpha.3":"2019-11-18T20:58:49.613Z","0.11.15-alpha.4":"2019-11-18T21:02:30.322Z","0.11.15-alpha.5":"2019-11-18T21:06:01.367Z","0.11.15":"2019-11-18T21:07:43.105Z","0.11.16":"2019-11-18T21:15:47.830Z","0.11.17":"2019-11-18T21:42:06.672Z","0.11.18":"2019-11-19T01:20:34.232Z","0.11.19-alpha.0":"2019-11-19T02:26:14.144Z","0.11.19-alpha.1":"2019-11-19T02:28:11.458Z","0.11.19-alpha.2":"2019-11-19T02:30:50.401Z","0.11.19-alpha.3":"2019-11-19T02:32:44.296Z","0.11.19-alpha.4":"2019-11-19T02:34:34.300Z","0.11.19-alpha.5":"2019-11-19T02:37:45.336Z","0.11.19-alpha.6":"2019-11-19T02:40:17.043Z","0.11.19-alpha.7":"2019-11-19T02:44:02.872Z","0.11.19-alpha.8":"2019-11-19T02:45:33.439Z","0.11.19-alpha.9":"2019-11-19T02:47:33.240Z","0.11.19-alpha.10":"2019-11-19T02:49:24.617Z","0.11.19-alpha.11":"2019-11-19T02:53:27.953Z","0.11.19-alpha.12":"2019-11-19T02:56:39.652Z","0.11.19-alpha.13":"2019-11-19T03:00:05.882Z","0.11.19-alpha.14":"2019-11-19T03:02:03.212Z","0.11.19":"2019-11-22T01:18:52.046Z","0.11.20-alpha.2":"2019-11-22T05:27:42.590Z","0.12.0":"2019-11-22T05:55:36.936Z","0.12.1":"2019-11-24T20:59:58.711Z","0.12.2":"2019-11-25T09:01:37.501Z","0.12.3-alpha.0":"2019-11-29T06:00:42.323Z","0.12.3-alpha.1":"2019-11-29T06:22:27.486Z","0.12.3-alpha.3":"2019-11-29T09:41:10.046Z","0.12.3":"2019-11-29T09:43:00.179Z","0.12.4-alpha.1":"2019-11-29T09:51:28.419Z","0.12.4":"2019-11-29T10:01:29.435Z","0.12.5-alpha.1":"2019-12-05T03:35:10.761Z","0.13.0":"2019-12-05T03:43:02.587Z","0.13.1-alpha.1":"2019-12-06T21:43:10.556Z","0.13.1-alpha.2":"2019-12-06T21:46:15.917Z","0.13.1-alpha.3":"2019-12-06T21:54:36.996Z","0.13.1-alpha.4":"2019-12-06T21:57:39.601Z","0.13.1-alpha.5":"2019-12-06T21:59:32.379Z","0.13.1-alpha.6":"2019-12-06T22:01:33.752Z","0.13.1-alpha.7":"2019-12-06T22:04:00.829Z","0.13.1-alpha.8":"2019-12-06T22:45:24.566Z","0.13.1-alpha.9":"2019-12-06T22:49:45.936Z","0.13.1-alpha.10":"2019-12-06T22:56:24.318Z","0.13.1-alpha.11":"2019-12-06T22:59:31.285Z","0.13.1-alpha.12":"2019-12-06T23:05:54.245Z","0.13.1-alpha.13":"2019-12-06T23:10:30.940Z","0.13.1-alpha.14":"2019-12-06T23:15:19.737Z","0.13.1-alpha.15":"2019-12-06T23:19:39.109Z","0.13.1-alpha.16":"2019-12-06T23:23:33.891Z","0.13.1-alpha.17":"2019-12-06T23:26:41.627Z","0.13.1-alpha.18":"2019-12-06T23:32:33.416Z","0.13.1-alpha.19":"2019-12-06T23:36:15.035Z","0.13.1-alpha.20":"2019-12-06T23:37:28.559Z","0.13.1-alpha.21":"2019-12-06T23:40:31.878Z","0.13.1-alpha.22":"2019-12-06T23:55:26.257Z","0.13.1-alpha.23":"2019-12-07T00:00:49.532Z","0.13.1-alpha.24":"2019-12-07T00:05:23.647Z","0.13.1-alpha.25":"2019-12-07T00:10:12.003Z","0.13.1-alpha.27":"2019-12-07T00:19:52.258Z","0.13.1-alpha.28":"2019-12-07T00:25:41.959Z","0.13.1-alpha.29":"2019-12-07T00:29:14.988Z","0.13.1-alpha.30":"2019-12-07T00:33:43.612Z","0.13.1-alpha.31":"2019-12-07T00:38:58.540Z","0.13.1-alpha.32":"2019-12-07T00:43:22.454Z","0.13.1-alpha.33":"2019-12-07T00:46:09.060Z","0.13.1-alpha.34":"2019-12-07T00:50:45.630Z","0.13.1-alpha.35":"2019-12-07T00:51:53.201Z","0.13.1-alpha.36":"2019-12-07T00:56:05.548Z","0.13.1-alpha.37":"2019-12-07T01:03:08.396Z","0.13.1-alpha.38":"2019-12-07T01:04:27.219Z","0.13.1-alpha.39":"2019-12-07T01:09:23.743Z","0.14.0":"2019-12-07T01:33:43.611Z","0.14.1-alpha.4":"2019-12-09T03:32:09.552Z","0.14.1-alpha.5":"2019-12-09T03:39:33.961Z","0.14.1-alpha.6":"2019-12-09T03:43:35.794Z","0.14.1-alpha.7":"2019-12-09T03:49:15.901Z","0.14.1-alpha.8":"2019-12-09T03:55:44.857Z","0.15.0":"2019-12-09T04:07:33.774Z","0.15.1-alpha.2":"2019-12-09T23:06:11.694Z","0.15.1-alpha.3":"2019-12-09T23:17:28.562Z","0.15.1-alpha.4":"2019-12-09T23:21:34.879Z","0.15.1-alpha.5":"2019-12-09T23:24:26.528Z","0.15.1-alpha.6":"2019-12-09T23:27:48.929Z","0.15.1-alpha.7":"2019-12-09T23:33:59.227Z","0.15.1-alpha.8":"2019-12-09T23:37:00.481Z","0.15.1-alpha.9":"2019-12-09T23:40:42.712Z","0.15.1":"2019-12-09T23:48:23.480Z","0.15.2-alpha.4":"2019-12-16T09:04:49.876Z","0.15.2-alpha.5":"2019-12-16T09:37:20.057Z","0.15.2":"2019-12-16T09:43:31.695Z","0.15.3-alpha.0":"2019-12-16T09:49:58.926Z","0.15.3-alpha.1":"2019-12-16T09:54:53.400Z","0.15.3-alpha.2":"2019-12-16T09:57:46.266Z","0.15.3":"2019-12-16T10:01:33.427Z","0.15.4-alpha.0":"2019-12-16T10:07:14.370Z","0.16.0":"2019-12-16T10:09:49.476Z","0.17.0":"2019-12-16T10:16:27.716Z","0.17.1":"2019-12-16T10:24:43.809Z","0.17.2":"2019-12-16T13:15:39.142Z","0.17.3":"2019-12-16T13:23:50.870Z","0.18.0":"2019-12-16T13:41:20.667Z","0.18.1":"2019-12-16T13:53:14.418Z","0.18.2":"2019-12-16T21:45:45.328Z","0.18.3-alpha.2":"2019-12-17T00:33:06.352Z","0.18.3-alpha.3":"2019-12-17T00:35:43.628Z","0.18.3-alpha.4":"2019-12-17T00:40:08.341Z","0.18.3-alpha.6":"2019-12-17T00:50:54.183Z","0.18.3":"2019-12-17T01:05:09.321Z","0.19.0-alpha.5":"2019-12-17T04:59:50.379Z","0.19.0":"2019-12-17T12:27:39.236Z","0.19.1":"2019-12-17T23:55:27.320Z","0.19.2":"2019-12-18T03:23:40.890Z","0.19.4-alpha.7":"2019-12-18T20:25:12.398Z","0.19.4":"2019-12-18T20:37:40.454Z","0.19.5":"2019-12-18T20:44:44.963Z","0.19.6":"2019-12-20T13:52:48.584Z","0.19.8-alpha.9":"2020-01-10T14:30:59.955Z","0.19.8":"2020-01-10T14:33:20.780Z","0.19.9":"2020-01-15T05:32:01.564Z","0.19.10-alpha.2":"2020-03-02T13:19:51.950Z","0.19.10":"2020-03-02T13:23:40.427Z","0.19.11-alpha.13":"2020-03-02T14:01:20.046Z","0.19.11":"2020-03-02T14:03:51.448Z","0.19.12-alpha.1":"2020-03-02T19:32:49.502Z","0.19.12-alpha.2":"2020-03-02T19:40:06.793Z","0.19.12-alpha.3":"2020-03-02T19:44:17.156Z","0.19.12":"2020-03-02T19:47:45.948Z","0.19.13-alpha.0":"2020-03-02T19:59:29.206Z","0.19.13-alpha.1":"2020-03-02T20:02:46.027Z","0.19.13":"2020-03-02T20:05:22.819Z","0.20.0":"2020-03-02T20:40:16.046Z","0.20.1-alpha.1":"2020-03-11T18:33:36.306Z","0.20.1-alpha.2":"2020-03-11T18:36:27.829Z","0.20.1":"2020-03-11T18:38:30.662Z","0.21.1-alpha.1":"2020-03-12T18:32:34.040Z","0.21.1-alpha.2":"2020-03-12T19:07:18.654Z","0.21.1-alpha.3":"2020-03-12T19:15:46.437Z","0.21.1":"2020-03-12T19:22:10.301Z","0.21.2-alpha.3":"2020-03-12T20:06:25.914Z","0.21.2-alpha.4":"2020-03-12T20:12:36.961Z","0.21.2-alpha.6":"2020-03-12T20:49:42.857Z","0.21.2-alpha.7":"2020-03-12T20:54:31.061Z","0.21.2":"2020-03-12T21:02:46.410Z","0.21.3-alpha.0":"2020-03-12T21:18:03.686Z","0.21.3-alpha.1":"2020-03-12T21:19:24.647Z","0.21.3-alpha.2":"2020-03-12T21:23:54.040Z","0.21.3-alpha.3":"2020-03-12T21:27:13.019Z","0.21.3-alpha.4":"2020-03-12T21:32:55.406Z","0.21.3-alpha.5":"2020-03-12T21:36:25.321Z","0.21.3-alpha.6":"2020-03-12T21:38:31.974Z","0.21.3-alpha.7":"2020-03-12T21:41:04.077Z","0.21.3":"2020-03-12T21:44:11.127Z","0.21.4-alpha.3":"2020-03-13T17:31:23.271Z","0.21.4-alpha.4":"2020-03-13T17:32:55.272Z","0.21.4":"2020-03-13T17:36:22.786Z","0.21.5-alpha.0":"2020-03-13T17:46:30.488Z","0.21.5-alpha.1":"2020-03-13T17:54:45.744Z","0.21.5-alpha.2":"2020-03-13T17:57:55.153Z","0.21.5-alpha.3":"2020-03-13T18:01:18.790Z","0.21.5-alpha.4":"2020-03-13T18:03:21.470Z","0.21.5-alpha.5":"2020-03-13T18:07:51.057Z","0.21.5-alpha.6":"2020-03-13T18:16:31.128Z","0.21.5-alpha.7":"2020-03-13T18:24:44.736Z","0.21.5-alpha.8":"2020-03-13T18:28:08.899Z","0.21.5-alpha.9":"2020-03-13T18:33:33.659Z","0.21.5-alpha.10":"2020-03-13T18:35:25.055Z","0.21.5-alpha.11":"2020-03-13T18:38:59.378Z","0.21.5-alpha.12":"2020-03-13T18:42:48.789Z","0.21.5-alpha.13":"2020-03-13T18:45:14.794Z","0.21.5-alpha.14":"2020-03-13T18:47:28.954Z","0.21.5-alpha.15":"2020-03-13T18:49:55.969Z","0.21.5":"2020-03-13T18:53:41.714Z","0.21.7-alpha.0":"2020-03-15T07:33:36.922Z","0.21.7-alpha.1":"2020-03-15T07:35:45.240Z","0.21.7-alpha.2":"2020-03-15T07:47:32.625Z","0.21.7":"2020-03-15T07:59:27.205Z","0.21.8-alpha.0":"2020-03-19T10:05:11.194Z","0.21.8-alpha.1":"2020-03-19T10:08:35.497Z","0.21.8-alpha.2":"2020-03-19T10:12:55.342Z","0.21.8-alpha.3":"2020-03-19T10:28:50.667Z","0.21.8-alpha.4":"2020-03-19T10:36:02.613Z","0.21.8-alpha.5":"2020-03-19T10:38:52.479Z","0.21.8":"2020-03-19T13:26:22.098Z","0.21.9-alpha.0":"2020-03-19T18:48:39.321Z","0.21.9-alpha.1":"2020-03-19T18:51:13.412Z","0.21.9-alpha.2":"2020-03-19T19:39:45.989Z","0.21.9":"2020-03-19T19:44:26.325Z","0.21.10-alpha.0":"2020-03-20T05:07:14.945Z","0.21.10-alpha.1":"2020-03-20T05:13:10.042Z","0.21.10-alpha.2":"2020-03-20T05:19:45.267Z","0.21.10-alpha.3":"2020-03-20T06:13:44.148Z","0.21.10-alpha.4":"2020-03-20T06:22:33.082Z","0.21.10-alpha.5":"2020-03-20T06:38:45.875Z","0.21.10-alpha.6":"2020-03-20T06:58:07.568Z","0.21.10-alpha.7":"2020-03-20T07:01:17.117Z","0.21.10-alpha.8":"2020-03-20T07:29:43.562Z","0.21.10-alpha.9":"2020-03-20T07:33:35.305Z","0.21.10-alpha.10":"2020-03-20T07:38:01.139Z","0.21.10-alpha.11":"2020-03-20T07:47:08.923Z","0.21.10":"2020-03-20T07:50:14.858Z","0.21.11-alpha.0":"2020-03-20T10:19:08.284Z","0.21.11":"2020-03-21T06:49:27.481Z","0.21.12-alpha.0":"2020-03-21T06:55:58.022Z","0.21.12-alpha.1":"2020-03-21T07:01:40.975Z","0.21.12-alpha.2":"2020-03-21T07:04:03.192Z","0.21.12-alpha.3":"2020-03-21T07:06:59.587Z","0.21.12":"2020-03-21T07:10:26.558Z","0.21.13":"2020-03-22T18:48:29.360Z","0.21.14-alpha.5":"2020-03-26T09:36:05.516Z","0.21.14":"2020-03-26T09:40:08.530Z","0.21.15-alpha.1":"2020-03-26T19:58:59.838Z","0.21.15-alpha.2":"2020-03-26T20:01:07.388Z","0.21.15-alpha.3":"2020-03-26T20:03:15.234Z","0.21.15-alpha.4":"2020-03-26T20:08:18.377Z","0.21.15-alpha.5":"2020-03-26T20:14:22.845Z","0.21.15-alpha.6":"2020-03-26T20:21:36.403Z","0.21.15-alpha.7":"2020-03-26T20:29:33.602Z","0.21.15-alpha.8":"2020-03-26T20:33:29.363Z","0.21.15-alpha.9":"2020-03-26T20:40:52.355Z","0.21.15-alpha.10":"2020-03-26T20:41:57.837Z","0.21.15-alpha.11":"2020-03-26T21:05:22.092Z","0.21.15-alpha.12":"2020-03-26T21:14:12.347Z","0.21.15":"2020-03-26T21:18:22.501Z","0.21.16":"2020-03-27T04:09:33.792Z","0.21.17-alpha.2":"2020-03-27T13:02:19.061Z","0.21.17":"2020-03-27T13:05:33.697Z","0.21.18":"2020-03-28T21:15:07.876Z","0.22.0":"2020-03-29T11:23:32.120Z","0.23.0":"2020-06-10T06:48:00.221Z","0.24.0":"2020-06-19T21:32:34.080Z","0.25.0-canary.0":"2022-09-01T13:45:26.338Z","0.25.0-canary.1":"2022-09-01T13:55:42.710Z","0.25.0-canary.2":"2022-09-01T14:00:17.271Z"},"maintainers":[{"name":"saltyshiomix","email":"shiono.yoshihide@gmail.com"}],"description":"React SSR as a view template engine","homepage":"https://github.com/saltyshiomix/react-ssr/tree/master/packages/express/README.md","keywords":["react","express","server-side-rendering","ssr","view-engine","view-template-engine"],"repository":{"type":"git","url":"git+ssh://git@github.com/saltyshiomix/react-ssr.git"},"author":{"name":"Yoshihide Shiono","email":"shiono.yoshihide@gmail.com"},"bugs":{"url":"https://github.com/saltyshiomix/react-ssr/issues","email":"shiono.yoshihide@gmail.com"},"license":"MIT","readme":"","readmeFilename":""}